@constructor-io/constructorio-client-javascript 2.35.3 → 2.35.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/types/autocomplete.d.ts +2 -11
- package/lib/types/browse.d.ts +1 -1
- package/lib/types/index.d.ts +30 -4
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConstructorClientOptions,
|
|
3
|
+
Item,
|
|
3
4
|
NetworkParameters,
|
|
4
5
|
RequestFeature,
|
|
5
6
|
RequestFeatureVariant,
|
|
@@ -35,7 +36,7 @@ declare class Autocomplete {
|
|
|
35
36
|
********** */
|
|
36
37
|
export interface AutocompleteResponse extends Record<string, any> {
|
|
37
38
|
request: Partial<AutocompleteRequestType>;
|
|
38
|
-
sections: Record<string,
|
|
39
|
+
sections: Record<string, Item[]>;
|
|
39
40
|
result_id: string;
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -47,13 +48,3 @@ export interface AutocompleteRequestType extends Record<string, any> {
|
|
|
47
48
|
feature_variants: Partial<RequestFeatureVariant>;
|
|
48
49
|
searchandized_items: Record<string, any>;
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
-
export type Section = Partial<SectionItem>[];
|
|
52
|
-
|
|
53
|
-
export interface SectionItem extends Record<string, any> {
|
|
54
|
-
data: Record<string, any>;
|
|
55
|
-
is_slotted: boolean;
|
|
56
|
-
labels: Record<string, any>;
|
|
57
|
-
matched_terms: string[];
|
|
58
|
-
value: string;
|
|
59
|
-
}
|
package/lib/types/browse.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ declare class Browse {
|
|
|
48
48
|
|
|
49
49
|
getBrowseResultsForItemIds(
|
|
50
50
|
itemIds: string[],
|
|
51
|
-
parameters?: Omit<IBrowseParameters, 'preFilterExpression' | '
|
|
51
|
+
parameters?: Omit<IBrowseParameters, 'preFilterExpression' | 'qsParam'>,
|
|
52
52
|
networkParameters?: NetworkParameters
|
|
53
53
|
): Promise<GetBrowseResultsForItemIdsResponse>;
|
|
54
54
|
|
package/lib/types/index.d.ts
CHANGED
|
@@ -127,10 +127,10 @@ export interface FacetOption extends Record<string, any> {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
export interface Group extends BaseGroup, Record<string, any> {
|
|
130
|
-
count
|
|
131
|
-
data
|
|
132
|
-
parents
|
|
133
|
-
children
|
|
130
|
+
count?: number;
|
|
131
|
+
data?: Record<string, any>;
|
|
132
|
+
parents?: BaseGroup[];
|
|
133
|
+
children?: Group[];
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
export interface Collection extends Record<string, any> {
|
|
@@ -178,3 +178,29 @@ export type FilterExpressionRange = {
|
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
export type FilterExpressionRangeValue = ['-inf' | number, 'inf' | number];
|
|
181
|
+
|
|
182
|
+
export interface Item extends Record<string, any> {
|
|
183
|
+
value: string;
|
|
184
|
+
is_slotted: boolean;
|
|
185
|
+
labels: Record<string, unknown>;
|
|
186
|
+
matched_terms: string[];
|
|
187
|
+
data?: ItemData;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface ItemData extends Record<string, any> {
|
|
191
|
+
url?: string;
|
|
192
|
+
id?: string;
|
|
193
|
+
image_url?: string;
|
|
194
|
+
group_ids?: string[];
|
|
195
|
+
groups?: Group[]
|
|
196
|
+
facets?: Facet[];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface Product extends Item {
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export interface SearchSuggestion extends Item {
|
|
203
|
+
data?: {
|
|
204
|
+
total_num_results?: number
|
|
205
|
+
} & ItemData;
|
|
206
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructor-io/constructorio-client-javascript",
|
|
3
|
-
"version": "2.35.
|
|
3
|
+
"version": "2.35.4",
|
|
4
4
|
"description": "Constructor.io JavaScript client",
|
|
5
5
|
"main": "lib/constructorio.js",
|
|
6
6
|
"types": "lib/types/constructorio.d.ts",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"eslint-plugin-import": "^2.25.2",
|
|
61
61
|
"husky": "^7.0.4",
|
|
62
62
|
"jsdoc": "^3.6.7",
|
|
63
|
-
"jsdom": "^16.
|
|
63
|
+
"jsdom": "^16.7.0",
|
|
64
64
|
"license-checker": "^25.0.1",
|
|
65
65
|
"lodash.clonedeep": "^4.5.0",
|
|
66
66
|
"minami": "^1.2.3",
|