diff --git a/packages/client-composition/model/searchHits.ts b/packages/client-composition/model/searchHits.ts index 1c40dc031..3e410b8a0 100644 --- a/packages/client-composition/model/searchHits.ts +++ b/packages/client-composition/model/searchHits.ts @@ -7,4 +7,14 @@ export type SearchHits> = Record & { * Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting. */ hits: Hit[]; + + /** + * Search query. + */ + query: string; + + /** + * URL-encoded string of all search parameters. + */ + params: string; }; diff --git a/packages/client-composition/model/searchPagination.ts b/packages/client-composition/model/searchPagination.ts index 284961b8f..d5420c628 100644 --- a/packages/client-composition/model/searchPagination.ts +++ b/packages/client-composition/model/searchPagination.ts @@ -4,20 +4,20 @@ export type SearchPagination = { /** * Page of search results to retrieve. */ - page?: number; + page: number; /** * Number of results (hits). */ - nbHits?: number; + nbHits: number; /** * Number of pages of results. */ - nbPages?: number; + nbPages: number; /** * Number of hits per page. */ - hitsPerPage?: number; + hitsPerPage: number; }; diff --git a/packages/client-composition/model/searchResults.ts b/packages/client-composition/model/searchResults.ts index f1846efb9..34e9a400a 100644 --- a/packages/client-composition/model/searchResults.ts +++ b/packages/client-composition/model/searchResults.ts @@ -6,5 +6,5 @@ export type SearchResults> = { /** * Search results. */ - results?: SearchResultsItem[]; + results: SearchResultsItem[]; };