@attraqt/search-commons
Advanced tools
Comparing version 1.10.0 to 1.11.0
/* eslint-disable */ | ||
import type { | ||
SearchContext, | ||
SortOptions, | ||
@@ -33,2 +34,3 @@ SearchResponseItem, | ||
options?: ProductSuggestOptions; | ||
context?: SearchContext; | ||
} | ||
@@ -35,0 +37,0 @@ |
@@ -69,2 +69,30 @@ /* eslint-disable */ | ||
/** | ||
* Context of the search request. | ||
* Can contain information both about the user (using the `session` field) or about the general context | ||
* (using the `variables` fields, via the XO Context Variables) | ||
*/ | ||
export interface SearchContext { | ||
/** | ||
* Identify the user using a set of `$identityRepository/$userId` key/value pairs. | ||
* Usually, one of the `$identityRepository` is `sessionId`. | ||
*/ | ||
session: { [key: string]: string }; | ||
/** | ||
* List of XO context variables attached to the request. The variables will be resolved according | ||
* to your configuration in the XO Console. | ||
*/ | ||
variables: { [key: string]: any }; | ||
} | ||
export interface SearchContext_SessionEntry { | ||
key: string; | ||
value: string; | ||
} | ||
export interface SearchContext_VariablesEntry { | ||
key: string; | ||
value?: any; | ||
} | ||
export interface SearchRequest { | ||
@@ -78,6 +106,6 @@ /** Search token, used by the client to authenticate himself */ | ||
/** | ||
* Profile ID authenticate who performed the request. | ||
* Can be used to trigger action based on user profile. | ||
* Context of the search request. | ||
* Contains both user identification (via the session ids) and XO Context variables | ||
*/ | ||
profileId?: string | undefined; | ||
context?: SearchContext; | ||
} | ||
@@ -84,0 +112,0 @@ |
{ | ||
"name": "@attraqt/search-commons", | ||
"description": "Typescript generated code for the search API definition", | ||
"version": "1.10.0", | ||
"version": "1.11.0", | ||
"author": "technique@attraqt.com", | ||
"types": "index.d.ts" | ||
} |
7850
266