Commit 9a64f2c
Implement campaigns module with support for the Campaigns API (#257)
* Implement campaigns module with support for the Campaigns API
* update delete campaign tests
* Move jsdocs
* Update RecommendationContext
* Update CampaignRule types
* Update CampaignRuleInput
* Drop record
* Update CampaignParametersBase
* Update test
* Update type tests
* Rename module
* Refactor searchandising into campaigns sub-module
Split the flat searchandising module into a parent class that exposes a
campaigns sub-module, so each searchandising entity lives in its own class
and file. Consumers now call searchandising.campaigns.retrieveCampaigns().
Also drops the repetitive "Pull X from parameters" comments.
* Add retrieveCampaigns query param tests and type tests
Cover query params extracted from parameters in retrieveCampaigns (id,
refinedFilters, refinedRecommendationContexts, refinedQueries, plus their
snake_case aliases) and add the missing searchandising type tests.
* Type campaigns sub-module as an interface
Use an interface for the campaigns sub-module so the type file keeps a
single declared class, satisfying the max-classes-per-file lint rule that
also runs over .d.ts files in the pre-push hook.
---------
Co-authored-by: Enes Kutay SEZEN <eneskutaysezen@gmail.com>1 parent 49e2009 commit 9a64f2c
11 files changed
Lines changed: 1932 additions & 1 deletion
File tree
- spec/src/modules
- src
- modules/searchandising
- types
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments