@attraqt/search-commons
Advanced tools
Comparing version 1.2.0 to 1.3.0
173
index.d.ts
@@ -1,171 +0,2 @@ | ||
/* eslint-disable */ | ||
export const protobufPackage = "com.attraqt.search.protobuf"; | ||
export interface SortOptions { | ||
/** Attribute to sort by */ | ||
attribute: string; | ||
/** | ||
* Order of the sort. | ||
* Must be either "asc" or "desc" | ||
*/ | ||
order: string; | ||
} | ||
/** Selected facet to filter by */ | ||
export interface FacetRequestOptions { | ||
/** | ||
* Note: Should be removed after migration to technical name in all services (with reserved) | ||
* | ||
* @deprecated | ||
*/ | ||
attribute: string; | ||
/** Values of the facet used for filtering the results */ | ||
values: string[]; | ||
/** Selected facet to filter by (technical name) */ | ||
name: string; | ||
} | ||
export interface DisableOptions { | ||
/** | ||
* Feature to disable in the query | ||
* Example: "facet" | ||
*/ | ||
name: string; | ||
} | ||
export interface SearchOptions { | ||
/** Pagination: index of the first item to return */ | ||
offset: number; | ||
/** Pagination: size of the page */ | ||
limit: number; | ||
/** | ||
* List of sorting rules | ||
* (applied in order) | ||
*/ | ||
sortBy: SortOptions[]; | ||
/** | ||
* List of selected facets | ||
* (translated into filters at search time) | ||
*/ | ||
facets: FacetRequestOptions[]; | ||
/** Filter string */ | ||
filter: string; | ||
/** | ||
* Disable rules | ||
* If specified, disable specific functionalities | ||
*/ | ||
disable: DisableOptions[]; | ||
/** Response mask to return only specific attributes of items */ | ||
customResponseMask: string; | ||
} | ||
export interface SearchRequest { | ||
/** Search token, used by the client to authenticate himself */ | ||
token: string; | ||
/** Text query */ | ||
query: string; | ||
/** Search options */ | ||
options?: SearchOptions; | ||
/** | ||
* Profile ID authenticate who performed the request. | ||
* Can be used to trigger action based on user profile. | ||
*/ | ||
profileId: string; | ||
} | ||
export interface SearchResponseRedirectItem { | ||
/** ID of the redirect */ | ||
id: string; | ||
/** Name of the triggered redirect */ | ||
name: string; | ||
/** URL the client should redirect to */ | ||
url: string; | ||
} | ||
/** | ||
* All fields are unknown, as they depends on the XO catalog. | ||
* However, in protobuf v3.5+, unknown fields are preserved. | ||
* See here: https://developers.google.com/protocol-buffers/docs/proto3#unknowns | ||
*/ | ||
export interface SearchResponseProduct { | ||
[attribute: string]: any;} | ||
export interface SearchResponseItem { | ||
/** ID of the item */ | ||
id: string; | ||
/** Score of this item */ | ||
score: number; | ||
/** | ||
* If specified, it's a "standard" item. | ||
* Contains attributes as specified in the XO catalog | ||
*/ | ||
product?: SearchResponseProduct | undefined; | ||
/** If specified, it's a "redirect" item. */ | ||
redirect?: SearchResponseRedirectItem | undefined; | ||
kind: string; | ||
context: string; | ||
} | ||
export interface SearchResponseMetadata { | ||
/** | ||
* Number of items matching the query | ||
* (higher than the actual number of returned items, set by "limit") | ||
*/ | ||
count: number; | ||
/** Duration of the request */ | ||
time: number; | ||
/** Token used for the request (same as SearchRequest.token) */ | ||
token: string; | ||
/** URL that can be used to send an equivalent request */ | ||
url: string; | ||
/** | ||
* Pagination: index of the first returned item | ||
* (same as SearchRequest.options.offset) | ||
*/ | ||
offset: number; | ||
/** | ||
* Pagination: size of the page | ||
* (same as SearchRequest.options.limit) | ||
*/ | ||
limit: number; | ||
/** | ||
* List of facets (and their values) found for the query | ||
* ( /!\ Different from SearchRequest.options.facets ) | ||
*/ | ||
facets: SearchResponseMetadata_Facet[]; | ||
} | ||
export interface SearchResponseMetadata_Facet { | ||
/** ID of the facet in database */ | ||
id: string; | ||
/** | ||
* Attribute of detected facet | ||
* | ||
* @deprecated | ||
*/ | ||
attribute: string; | ||
/** Title (set in XO Console) */ | ||
title: string; | ||
/** Number of different values found */ | ||
count: number; | ||
/** List of values */ | ||
values: SearchResponseMetadata_Facet_Value[]; | ||
/** Name of detected facet */ | ||
name: string; | ||
} | ||
export interface SearchResponseMetadata_Facet_Value { | ||
/** Value of a facet */ | ||
value: string; | ||
/** Number of items matching this value */ | ||
count: number; | ||
/** If true, this facet's value was specified in SearchRequest.options.facet. */ | ||
selected: boolean; | ||
} | ||
export interface SearchResponse { | ||
/** List of items found */ | ||
items: SearchResponseItem[]; | ||
/** Response metadata */ | ||
metadata?: SearchResponseMetadata; | ||
} | ||
export * from './com/attraqt/search/protobuf/search'; | ||
export * from './com/attraqt/search/protobuf/product_suggest'; |
{ | ||
"name": "@attraqt/search-commons", | ||
"description": "Typescript generated code for the search API definition", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"author": "technique@attraqt.com", | ||
"types": "index.d.ts" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
5719
4
206
1