Skip to content

Commit 7c37289

Browse files
Haroenvnunomaduro
andauthored
feat(rule): add group promotes (#1156)
* feat(rule): add group promotes doesn't have a test yet, but allows you to base on top of this. fixes #1155 * prettier * chore(group-promotes): fixes object ids readonly type Co-authored-by: Nuno Maduro <[email protected]>
1 parent 3818322 commit 7c37289

File tree

1 file changed

+23
-11
lines changed
  • packages/client-search/src/types

1 file changed

+23
-11
lines changed

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

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,29 @@ export type ConsequenceQuery = {
8484
}>;
8585
};
8686

87-
export type ConsequencePromote = {
88-
/**
89-
* Unique identifier of the object to promote.
90-
*/
91-
readonly objectID: string;
92-
93-
/**
94-
* Promoted rank for the object (zero-based).
95-
*/
96-
readonly position: number;
97-
};
87+
export type ConsequencePromote =
88+
| {
89+
/**
90+
* Unique identifier of the object to promote.
91+
*/
92+
readonly objectID: string;
93+
94+
/**
95+
* Promoted rank for the object (zero-based).
96+
*/
97+
readonly position: number;
98+
}
99+
| {
100+
/**
101+
* List of unique identifiers for the objects to promote.
102+
*/
103+
readonly objectIDs: readonly string[];
104+
105+
/**
106+
* Promoted start rank for the objects (zero-based).
107+
*/
108+
readonly position: number;
109+
};
98110

99111
export type ConsequenceParams = {
100112
/**

0 commit comments

Comments
 (0)