Skip to content

Commit 9a64f2c

Browse files
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

cspell.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@
3939
"yoink",
4040
"searchandized",
4141
"searchandizing",
42+
"searchandising",
4243
"patchdelta",
4344
"searchabilities",
4445
"forcesync",
4546
"forcedelta",
4647
"forcepatchdelta",
47-
"skippable"
48+
"skippable",
49+
"timeofday"
4850
]
4951
}

package-lock.json

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"devDependencies": {
3737
"@cspell/eslint-plugin": "^6.8.2",
3838
"@types/events": "^3.0.0",
39+
"@types/node": "^22.19.21",
3940
"@typescript-eslint/eslint-plugin": "^5.46.1",
4041
"@typescript-eslint/parser": "^5.46.1",
4142
"chai": "^4.3.4",

0 commit comments

Comments
 (0)