@attraqt/search-commons
Advanced tools
Comparing version 1.11.0 to 1.12.0
/* eslint-disable */ | ||
import type { | ||
GroupByOptions, | ||
SearchContext, | ||
SortOptions, | ||
SearchResponseItem, | ||
} from "../../../../com/attraqt/search/protobuf/search"; | ||
} from "./search"; | ||
export interface GroupOptions { | ||
attribute: string; | ||
size: number; | ||
values: string[]; | ||
} | ||
/** @deprecated */ | ||
export interface ProductSuggestOptions { | ||
@@ -22,4 +18,3 @@ /** | ||
filter: string; | ||
/** to do */ | ||
groupBy?: GroupOptions; | ||
groupBy?: GroupByOptions; | ||
/** Response mask to return only specific attributes of items */ | ||
@@ -31,2 +26,3 @@ customResponseMask: string; | ||
/** @deprecated */ | ||
export interface ProductSuggestRequest { | ||
@@ -39,2 +35,3 @@ token: string; | ||
/** @deprecated */ | ||
export interface ProductSuggestMetadata { | ||
@@ -55,2 +52,3 @@ /** Duration of the request */ | ||
/** @deprecated */ | ||
export interface ProductSuggestResponse { | ||
@@ -57,0 +55,0 @@ /** Response metadata */ |
@@ -12,2 +12,8 @@ /* eslint-disable */ | ||
export interface GroupByOptions { | ||
attribute: string; | ||
size: number; | ||
values: string[]; | ||
} | ||
export interface FacetRequestOptions { | ||
@@ -30,3 +36,3 @@ /** | ||
* Feature to disable in the query | ||
* Example: "facet" | ||
* Example: "facet", "item", "group", "redirect" | ||
*/ | ||
@@ -36,3 +42,3 @@ name: string; | ||
export interface SearchOptions { | ||
export interface SearchItemOptions { | ||
/** Pagination: index of the first item to return */ | ||
@@ -55,4 +61,5 @@ offset?: number | undefined; | ||
/** | ||
* Disable rules | ||
* If specified, disable specific functionalities | ||
* DEPRECATED: top-level `disable` feature should be used instead | ||
* | ||
* @deprecated | ||
*/ | ||
@@ -69,6 +76,21 @@ disable: DisableOptions[]; | ||
aiSearch?: boolean | undefined; | ||
/** If specified, this configuration will be used instead of the default configuration set for the tenant */ | ||
configurationId?: string | undefined; | ||
} | ||
export interface SearchGroupOptions { | ||
/** | ||
* List of sorting rules | ||
* (applied in order) | ||
*/ | ||
sortBy: SortOptions[]; | ||
/** Filter string */ | ||
filter?: string | undefined; | ||
/** | ||
* Select which attribute & values for grouping the results. | ||
* If specified, this will add a `groups` list in the response, alongside the regular `items` list | ||
*/ | ||
groupBy?: GroupByOptions | undefined; | ||
/** Response mask to return only specific attributes of items */ | ||
customResponseMask?: string | undefined; | ||
} | ||
/** | ||
@@ -107,9 +129,21 @@ * Context of the search request. | ||
query: string; | ||
/** Search options */ | ||
options?: SearchOptions; | ||
/** | ||
* DEPRECATED: `itemOptions` should be used instead | ||
* | ||
* @deprecated | ||
*/ | ||
options?: SearchItemOptions | undefined; | ||
/** | ||
* Context of the search request. | ||
* Contains both user identification (via the session ids) and XO Context variables | ||
*/ | ||
context?: SearchContext; | ||
context?: SearchContext | undefined; | ||
/** Search options for items search. To control grouping, use `group_options` instead. */ | ||
itemOptions?: SearchItemOptions | undefined; | ||
/** Search options for grouping search. If omitted, no groups will be returned, only items. */ | ||
groupOptions?: SearchGroupOptions | undefined; | ||
/** If specified, this configuration will be used instead of the default configuration set for the tenant */ | ||
configurationId?: string | undefined; | ||
/** Disable some search features. */ | ||
disable: DisableOptions[]; | ||
} | ||
@@ -156,2 +190,8 @@ | ||
export interface SearchResponseGroup { | ||
value: string; | ||
count: number; | ||
items: SearchResponseItem[]; | ||
} | ||
export interface SearchResponseMetadata { | ||
@@ -162,3 +202,3 @@ /** | ||
*/ | ||
count: number; | ||
count?: number | undefined; | ||
/** Duration of the request */ | ||
@@ -174,3 +214,3 @@ time: number; | ||
*/ | ||
offset: number; | ||
offset?: number | undefined; | ||
/** | ||
@@ -180,3 +220,3 @@ * Pagination: size of the page | ||
*/ | ||
limit: number; | ||
limit?: number | undefined; | ||
/** | ||
@@ -193,3 +233,3 @@ * List of facets (and their values) found for the query | ||
*/ | ||
exactCount: boolean; | ||
exactCount?: boolean | undefined; | ||
/** Search configuration id */ | ||
@@ -233,2 +273,4 @@ configurationId: string; | ||
metadata?: SearchResponseMetadata; | ||
/** List of items groups, if requested by a `group_by` in the query */ | ||
groups: SearchResponseGroup[]; | ||
} |
{ | ||
"name": "@attraqt/search-commons", | ||
"description": "Typescript generated code for the search API definition", | ||
"version": "1.11.0", | ||
"version": "1.12.0", | ||
"author": "technique@attraqt.com", | ||
"types": "index.d.ts" | ||
} |
9166
304