Skip to content

Commit 54c1cb7

Browse files
feat(types): support type and facet in search methods (#1263)
1 parent 3aec216 commit 54c1cb7

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
import { SearchOptions } from '.';
22

3-
export type MultipleQueriesQuery = {
3+
type SharedMultipleQueriesQuery = {
4+
/**
5+
* The type of query to perform.
6+
*
7+
* @defaultValue "default"
8+
*/
9+
readonly type?: 'default' | 'facet';
10+
411
/**
512
* The index name.
613
*/
@@ -16,3 +23,17 @@ export type MultipleQueriesQuery = {
1623
*/
1724
readonly query?: string;
1825
};
26+
27+
export type MultipleQueriesQuery = SharedMultipleQueriesQuery &
28+
(
29+
| {
30+
readonly type?: 'default';
31+
}
32+
| {
33+
readonly type: 'facet';
34+
/**
35+
* The facet name.
36+
*/
37+
readonly facet: string;
38+
}
39+
);

0 commit comments

Comments
 (0)