Skip to content

Commit 0985834

Browse files
authored
feat(multiple-conditions-on-rules): updates type and tests (#1171)
1 parent 3991e82 commit 0985834

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/client-search/src/__tests__/integration/rules.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test(testSuite.testName, async () => {
4343

4444
const ruleToSave2: Rule = {
4545
objectID: 'query_edits',
46-
condition: { anchoring: 'is', pattern: 'mobile phone', alternatives: true },
46+
conditions: [{ anchoring: 'is', pattern: 'mobile phone', alternatives: true }],
4747
consequence: {
4848
params: {
4949
query: {

packages/client-search/src/types/Rule.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ export type Rule = {
1111
*/
1212
readonly condition?: Condition;
1313

14+
/**
15+
* Conditions of the rule, expressed using the following variables: pattern, anchoring, context.
16+
*/
17+
readonly conditions?: readonly Condition[];
18+
1419
/**
1520
* Consequence of the rule. At least one of the following object must be used: params, promote, hide, userData.
1621
*/

0 commit comments

Comments
 (0)