Skip to content

Commit

Permalink
feat(types): support type and facet in search methods (#1263)
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Apr 9, 2021
1 parent 3aec216 commit 54c1cb7
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion packages/client-search/src/types/MultipleQueriesQuery.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { SearchOptions } from '.';

export type MultipleQueriesQuery = {
type SharedMultipleQueriesQuery = {
/**
* The type of query to perform.
*
* @defaultValue "default"
*/
readonly type?: 'default' | 'facet';

/**
* The index name.
*/
Expand All @@ -16,3 +23,17 @@ export type MultipleQueriesQuery = {
*/
readonly query?: string;
};

export type MultipleQueriesQuery = SharedMultipleQueriesQuery &
(
| {
readonly type?: 'default';
}
| {
readonly type: 'facet';
/**
* The facet name.
*/
readonly facet: string;
}
);

0 comments on commit 54c1cb7

Please sign in to comment.