@depict-ai/ui 1.0.2 → 1.0.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/README.md +4 -2
- package/dist/index.d.ts +5 -2
- package/dist/main.js +1790 -1762
- package/dist/module.js +1758 -1731
- package/locales/index.js +129 -129
- package/locales/require.js +141 -141
- package/package.json +66 -14
- package/ssr/client/index.d.ts +539 -0
- package/ssr/client/index.js +8646 -0
- package/ssr/client/require.js +8678 -0
- package/ssr/server/index.d.ts +539 -0
- package/ssr/server/index.js +7715 -0
- package/ssr/server/require.js +7747 -0
- package/dist/typescript_schema/BaseSearchRequest.d.ts +0 -197
- package/dist/typescript_schema/ProductListingQueriesRequest.d.ts +0 -14
- package/dist/typescript_schema/ProductListingQueriesResponse.d.ts +0 -10
- package/dist/typescript_schema/ProductListingRequest.d.ts +0 -221
- package/dist/typescript_schema/ProductListingResponse.d.ts +0 -232
- package/dist/typescript_schema/RecommendResponse.d.ts +0 -15
- package/dist/typescript_schema/SearchRequest.d.ts +0 -213
- package/dist/typescript_schema/SearchResponse.d.ts +0 -192
- package/dist/typescript_schema/SearchSuggestionsRequest.d.ts +0 -18
- package/dist/typescript_schema/SearchSuggestionsResponse.d.ts +0 -182
- package/dist/typescript_schema/TrackV2Request.d.ts +0 -115
- package/jest.setup.js +0 -7
- package/tsconfig.json +0 -8
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/**
|
|
3
|
-
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
-
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
-
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* An enumeration.
|
|
10
|
-
*/
|
|
11
|
-
export type SortingOrder = "asc" | "desc";
|
|
12
|
-
|
|
13
|
-
export interface SearchRequest {
|
|
14
|
-
/**
|
|
15
|
-
* Deprecated, do not use. Will be removed.
|
|
16
|
-
*/
|
|
17
|
-
page?: number;
|
|
18
|
-
/**
|
|
19
|
-
* Deprecated, do not use. Will be removed.
|
|
20
|
-
*/
|
|
21
|
-
hits_per_page?: number;
|
|
22
|
-
/**
|
|
23
|
-
* Used for cursor-based pagination. Set it to the cursor from the last response. If not set, will return the first results.
|
|
24
|
-
*/
|
|
25
|
-
cursor?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Maximum number of results per response.
|
|
28
|
-
*/
|
|
29
|
-
limit?: number;
|
|
30
|
-
tenant: string;
|
|
31
|
-
market: string;
|
|
32
|
-
/**
|
|
33
|
-
* List of filters to apply to the results.
|
|
34
|
-
*/
|
|
35
|
-
filters?: SearchFilter[];
|
|
36
|
-
/**
|
|
37
|
-
* Specifies the sorting method. By default, the results are ordered by relevance. To find the possible values for this field, query the endpoint and look at the `sorts` field.
|
|
38
|
-
*/
|
|
39
|
-
sort?: SortModel;
|
|
40
|
-
/**
|
|
41
|
-
* User identifier
|
|
42
|
-
*/
|
|
43
|
-
user_id?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Session identifier
|
|
46
|
-
*/
|
|
47
|
-
session_id?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Populated for integrations performed by Depict.ai only. Depict.ai Session Id
|
|
50
|
-
*/
|
|
51
|
-
dsid?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Metadata that can be used to modify the behaviour of the search.
|
|
54
|
-
*/
|
|
55
|
-
metadata?: {
|
|
56
|
-
[k: string]: string;
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* The search query.
|
|
60
|
-
*/
|
|
61
|
-
query?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface SearchFilter {
|
|
64
|
-
/**
|
|
65
|
-
* The field to filter by.
|
|
66
|
-
*/
|
|
67
|
-
field: string;
|
|
68
|
-
/**
|
|
69
|
-
* The operation used for filtering. The filtering should be read as `field op data`, for example `brand in ["Nike", "Adidas"]`.
|
|
70
|
-
*/
|
|
71
|
-
op: "eq" | "neq" | "in" | "nin" | "leq" | "geq" | "inrange";
|
|
72
|
-
/**
|
|
73
|
-
* Data for the filter.
|
|
74
|
-
*/
|
|
75
|
-
data?:
|
|
76
|
-
| ("true" | "false")
|
|
77
|
-
| number
|
|
78
|
-
| number
|
|
79
|
-
| string
|
|
80
|
-
| [number, number]
|
|
81
|
-
| [number, number]
|
|
82
|
-
| [number, number]
|
|
83
|
-
| [number, number]
|
|
84
|
-
| (
|
|
85
|
-
| ("true" | "false")
|
|
86
|
-
| number
|
|
87
|
-
| number
|
|
88
|
-
| string
|
|
89
|
-
| [number, number]
|
|
90
|
-
| [number, number]
|
|
91
|
-
| [number, number]
|
|
92
|
-
| [number, number]
|
|
93
|
-
)[]
|
|
94
|
-
| (("true" | "false") | number | number | string)[][];
|
|
95
|
-
/**
|
|
96
|
-
* Metadata about the filter that can be used for rendering. For example, this could contain the possible values to filter by and their counts in the results.
|
|
97
|
-
*/
|
|
98
|
-
meta?: RangeFilterMeta | ValuesFilterMeta | HierarchicalValuesFilterMeta;
|
|
99
|
-
/**
|
|
100
|
-
* ID of the filter. If multiple filters share the same ID, they should be grouped together in the UI.
|
|
101
|
-
*/
|
|
102
|
-
id?: string;
|
|
103
|
-
}
|
|
104
|
-
export interface RangeFilterMeta {
|
|
105
|
-
/**
|
|
106
|
-
* Title of the group, where a group consists of all the filters that share an ID.
|
|
107
|
-
*/
|
|
108
|
-
group_title?: string;
|
|
109
|
-
/**
|
|
110
|
-
* Whether the filter group should be expanded by default or not.
|
|
111
|
-
*/
|
|
112
|
-
group_expanded?: boolean;
|
|
113
|
-
type?: "range";
|
|
114
|
-
/**
|
|
115
|
-
* The minimum value that can be selected in the range.
|
|
116
|
-
*/
|
|
117
|
-
min: number;
|
|
118
|
-
/**
|
|
119
|
-
* The maximum value that can be selected in the range.
|
|
120
|
-
*/
|
|
121
|
-
max: number;
|
|
122
|
-
/**
|
|
123
|
-
* The unit of the range values.
|
|
124
|
-
*/
|
|
125
|
-
unit?: string;
|
|
126
|
-
/**
|
|
127
|
-
* The currency of the range values.
|
|
128
|
-
*/
|
|
129
|
-
currency?: string;
|
|
130
|
-
}
|
|
131
|
-
export interface ValuesFilterMeta {
|
|
132
|
-
/**
|
|
133
|
-
* Title of the group, where a group consists of all the filters that share an ID.
|
|
134
|
-
*/
|
|
135
|
-
group_title?: string;
|
|
136
|
-
/**
|
|
137
|
-
* Whether the filter group should be expanded by default or not.
|
|
138
|
-
*/
|
|
139
|
-
group_expanded?: boolean;
|
|
140
|
-
/**
|
|
141
|
-
* Type of filter.
|
|
142
|
-
*/
|
|
143
|
-
type?: "radio" | "checkbox" | "checkbox-grid";
|
|
144
|
-
/**
|
|
145
|
-
* Selectable values
|
|
146
|
-
*/
|
|
147
|
-
values: (
|
|
148
|
-
| ("true" | "false")
|
|
149
|
-
| number
|
|
150
|
-
| number
|
|
151
|
-
| string
|
|
152
|
-
| [number, number]
|
|
153
|
-
| [number, number]
|
|
154
|
-
| [number, number]
|
|
155
|
-
| [number, number]
|
|
156
|
-
)[];
|
|
157
|
-
/**
|
|
158
|
-
* Counts for values
|
|
159
|
-
*/
|
|
160
|
-
counts?: number[];
|
|
161
|
-
/**
|
|
162
|
-
* Names for values
|
|
163
|
-
*/
|
|
164
|
-
names?: string[];
|
|
165
|
-
}
|
|
166
|
-
export interface HierarchicalValuesFilterMeta {
|
|
167
|
-
/**
|
|
168
|
-
* Title of the group, where a group consists of all the filters that share an ID.
|
|
169
|
-
*/
|
|
170
|
-
group_title?: string;
|
|
171
|
-
/**
|
|
172
|
-
* Whether the filter group should be expanded by default or not.
|
|
173
|
-
*/
|
|
174
|
-
group_expanded?: boolean;
|
|
175
|
-
type?: "checkbox-hierarchical";
|
|
176
|
-
/**
|
|
177
|
-
* Selectable hierarchical values
|
|
178
|
-
*/
|
|
179
|
-
values: (("true" | "false") | number | number | string)[][];
|
|
180
|
-
/**
|
|
181
|
-
* Counts for values
|
|
182
|
-
*/
|
|
183
|
-
counts?: number[];
|
|
184
|
-
/**
|
|
185
|
-
* Names for hierarchical values
|
|
186
|
-
*/
|
|
187
|
-
names?: string[];
|
|
188
|
-
}
|
|
189
|
-
export interface SortModel {
|
|
190
|
-
/**
|
|
191
|
-
* The field to sort by.
|
|
192
|
-
*/
|
|
193
|
-
field: string;
|
|
194
|
-
/**
|
|
195
|
-
* The order to sort by.
|
|
196
|
-
*/
|
|
197
|
-
order: SortingOrder;
|
|
198
|
-
/**
|
|
199
|
-
* Metadata about the sort that can be used for rendering.
|
|
200
|
-
*/
|
|
201
|
-
meta?: SortMeta;
|
|
202
|
-
}
|
|
203
|
-
export interface SortMeta {
|
|
204
|
-
title: string;
|
|
205
|
-
/**
|
|
206
|
-
* Selectable values
|
|
207
|
-
*/
|
|
208
|
-
values?: SortingOrder[];
|
|
209
|
-
/**
|
|
210
|
-
* Names for orders
|
|
211
|
-
*/
|
|
212
|
-
names?: string[];
|
|
213
|
-
}
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/**
|
|
3
|
-
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
-
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
-
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* An enumeration.
|
|
10
|
-
*/
|
|
11
|
-
export type SortingOrder = "asc" | "desc";
|
|
12
|
-
|
|
13
|
-
export interface SearchResponse {
|
|
14
|
-
/**
|
|
15
|
-
* Total number of results for this query. Not necessarily exact.
|
|
16
|
-
*/
|
|
17
|
-
n_hits: number;
|
|
18
|
-
/**
|
|
19
|
-
* Temporary during migration
|
|
20
|
-
*/
|
|
21
|
-
page?: number;
|
|
22
|
-
/**
|
|
23
|
-
* The search results.
|
|
24
|
-
*/
|
|
25
|
-
displays: {
|
|
26
|
-
[k: string]: unknown;
|
|
27
|
-
}[];
|
|
28
|
-
/**
|
|
29
|
-
* Available methods for sorting the response. Any element from this list can be sent as `sort` in subsequent requests.
|
|
30
|
-
*/
|
|
31
|
-
sorts?: SortModel[];
|
|
32
|
-
/**
|
|
33
|
-
* Available filters that can be used for filtering in the subsequent request.
|
|
34
|
-
*/
|
|
35
|
-
filters?: SearchFilter[];
|
|
36
|
-
search_request_id: string;
|
|
37
|
-
/**
|
|
38
|
-
* Cursor that can be used in the next request to get subsequent results. If this is not set, there are no more results.
|
|
39
|
-
*/
|
|
40
|
-
cursor?: string;
|
|
41
|
-
}
|
|
42
|
-
export interface SortModel {
|
|
43
|
-
/**
|
|
44
|
-
* The field to sort by.
|
|
45
|
-
*/
|
|
46
|
-
field: string;
|
|
47
|
-
/**
|
|
48
|
-
* The order to sort by.
|
|
49
|
-
*/
|
|
50
|
-
order: SortingOrder;
|
|
51
|
-
/**
|
|
52
|
-
* Metadata about the sort that can be used for rendering.
|
|
53
|
-
*/
|
|
54
|
-
meta?: SortMeta;
|
|
55
|
-
}
|
|
56
|
-
export interface SortMeta {
|
|
57
|
-
title: string;
|
|
58
|
-
/**
|
|
59
|
-
* Selectable values
|
|
60
|
-
*/
|
|
61
|
-
values?: SortingOrder[];
|
|
62
|
-
/**
|
|
63
|
-
* Names for orders
|
|
64
|
-
*/
|
|
65
|
-
names?: string[];
|
|
66
|
-
}
|
|
67
|
-
export interface SearchFilter {
|
|
68
|
-
/**
|
|
69
|
-
* The field to filter by.
|
|
70
|
-
*/
|
|
71
|
-
field: string;
|
|
72
|
-
/**
|
|
73
|
-
* The operation used for filtering. The filtering should be read as `field op data`, for example `brand in ["Nike", "Adidas"]`.
|
|
74
|
-
*/
|
|
75
|
-
op: "eq" | "neq" | "in" | "nin" | "leq" | "geq" | "inrange";
|
|
76
|
-
/**
|
|
77
|
-
* Data for the filter.
|
|
78
|
-
*/
|
|
79
|
-
data?:
|
|
80
|
-
| ("true" | "false")
|
|
81
|
-
| number
|
|
82
|
-
| number
|
|
83
|
-
| string
|
|
84
|
-
| [number, number]
|
|
85
|
-
| [number, number]
|
|
86
|
-
| [number, number]
|
|
87
|
-
| [number, number]
|
|
88
|
-
| (
|
|
89
|
-
| ("true" | "false")
|
|
90
|
-
| number
|
|
91
|
-
| number
|
|
92
|
-
| string
|
|
93
|
-
| [number, number]
|
|
94
|
-
| [number, number]
|
|
95
|
-
| [number, number]
|
|
96
|
-
| [number, number]
|
|
97
|
-
)[]
|
|
98
|
-
| (("true" | "false") | number | number | string)[][];
|
|
99
|
-
/**
|
|
100
|
-
* Metadata about the filter that can be used for rendering. For example, this could contain the possible values to filter by and their counts in the results.
|
|
101
|
-
*/
|
|
102
|
-
meta?: RangeFilterMeta | ValuesFilterMeta | HierarchicalValuesFilterMeta;
|
|
103
|
-
/**
|
|
104
|
-
* ID of the filter. If multiple filters share the same ID, they should be grouped together in the UI.
|
|
105
|
-
*/
|
|
106
|
-
id?: string;
|
|
107
|
-
}
|
|
108
|
-
export interface RangeFilterMeta {
|
|
109
|
-
/**
|
|
110
|
-
* Title of the group, where a group consists of all the filters that share an ID.
|
|
111
|
-
*/
|
|
112
|
-
group_title?: string;
|
|
113
|
-
/**
|
|
114
|
-
* Whether the filter group should be expanded by default or not.
|
|
115
|
-
*/
|
|
116
|
-
group_expanded?: boolean;
|
|
117
|
-
type?: "range";
|
|
118
|
-
/**
|
|
119
|
-
* The minimum value that can be selected in the range.
|
|
120
|
-
*/
|
|
121
|
-
min: number;
|
|
122
|
-
/**
|
|
123
|
-
* The maximum value that can be selected in the range.
|
|
124
|
-
*/
|
|
125
|
-
max: number;
|
|
126
|
-
/**
|
|
127
|
-
* The unit of the range values.
|
|
128
|
-
*/
|
|
129
|
-
unit?: string;
|
|
130
|
-
/**
|
|
131
|
-
* The currency of the range values.
|
|
132
|
-
*/
|
|
133
|
-
currency?: string;
|
|
134
|
-
}
|
|
135
|
-
export interface ValuesFilterMeta {
|
|
136
|
-
/**
|
|
137
|
-
* Title of the group, where a group consists of all the filters that share an ID.
|
|
138
|
-
*/
|
|
139
|
-
group_title?: string;
|
|
140
|
-
/**
|
|
141
|
-
* Whether the filter group should be expanded by default or not.
|
|
142
|
-
*/
|
|
143
|
-
group_expanded?: boolean;
|
|
144
|
-
/**
|
|
145
|
-
* Type of filter.
|
|
146
|
-
*/
|
|
147
|
-
type?: "radio" | "checkbox" | "checkbox-grid";
|
|
148
|
-
/**
|
|
149
|
-
* Selectable values
|
|
150
|
-
*/
|
|
151
|
-
values: (
|
|
152
|
-
| ("true" | "false")
|
|
153
|
-
| number
|
|
154
|
-
| number
|
|
155
|
-
| string
|
|
156
|
-
| [number, number]
|
|
157
|
-
| [number, number]
|
|
158
|
-
| [number, number]
|
|
159
|
-
| [number, number]
|
|
160
|
-
)[];
|
|
161
|
-
/**
|
|
162
|
-
* Counts for values
|
|
163
|
-
*/
|
|
164
|
-
counts?: number[];
|
|
165
|
-
/**
|
|
166
|
-
* Names for values
|
|
167
|
-
*/
|
|
168
|
-
names?: string[];
|
|
169
|
-
}
|
|
170
|
-
export interface HierarchicalValuesFilterMeta {
|
|
171
|
-
/**
|
|
172
|
-
* Title of the group, where a group consists of all the filters that share an ID.
|
|
173
|
-
*/
|
|
174
|
-
group_title?: string;
|
|
175
|
-
/**
|
|
176
|
-
* Whether the filter group should be expanded by default or not.
|
|
177
|
-
*/
|
|
178
|
-
group_expanded?: boolean;
|
|
179
|
-
type?: "checkbox-hierarchical";
|
|
180
|
-
/**
|
|
181
|
-
* Selectable hierarchical values
|
|
182
|
-
*/
|
|
183
|
-
values: (("true" | "false") | number | number | string)[][];
|
|
184
|
-
/**
|
|
185
|
-
* Counts for values
|
|
186
|
-
*/
|
|
187
|
-
counts?: number[];
|
|
188
|
-
/**
|
|
189
|
-
* Names for hierarchical values
|
|
190
|
-
*/
|
|
191
|
-
names?: string[];
|
|
192
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/**
|
|
3
|
-
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
-
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
-
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export interface SearchSuggestionsRequest {
|
|
9
|
-
tenant: string;
|
|
10
|
-
market: string;
|
|
11
|
-
/**
|
|
12
|
-
* The search query.
|
|
13
|
-
*/
|
|
14
|
-
query?: string;
|
|
15
|
-
user_id?: string;
|
|
16
|
-
session_id?: string;
|
|
17
|
-
dsid?: string;
|
|
18
|
-
}
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/**
|
|
3
|
-
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
-
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
-
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* An enumeration.
|
|
10
|
-
*/
|
|
11
|
-
export type ECategoryType = "TAG" | "CATEGORY" | "TENANT_CATEGORY" | "TENANT_SECONDARY_CATEGORY" | "CAMPAIGN";
|
|
12
|
-
|
|
13
|
-
export interface SearchSuggestionsResponse {
|
|
14
|
-
suggestions_request_id: string;
|
|
15
|
-
/**
|
|
16
|
-
* List of suggestions for search queries that should be shown to the user while they are typing.
|
|
17
|
-
*/
|
|
18
|
-
suggestions: (QuerySuggestion | CategorySuggestion)[];
|
|
19
|
-
}
|
|
20
|
-
export interface QuerySuggestion {
|
|
21
|
-
type?: "query";
|
|
22
|
-
/**
|
|
23
|
-
* Title for suggestion.
|
|
24
|
-
*/
|
|
25
|
-
title: string;
|
|
26
|
-
suggestions_result_id: string;
|
|
27
|
-
}
|
|
28
|
-
export interface CategorySuggestion {
|
|
29
|
-
/**
|
|
30
|
-
* Unique identifier of the category.
|
|
31
|
-
*/
|
|
32
|
-
category_id: string;
|
|
33
|
-
/**
|
|
34
|
-
* The title of the category
|
|
35
|
-
*/
|
|
36
|
-
title: string;
|
|
37
|
-
/**
|
|
38
|
-
* The full URL to the category page
|
|
39
|
-
*/
|
|
40
|
-
page_url: string;
|
|
41
|
-
/**
|
|
42
|
-
* Optionally a unique query ID for the category
|
|
43
|
-
*/
|
|
44
|
-
query_id?: string;
|
|
45
|
-
/**
|
|
46
|
-
* The type of category, for example CAMPAIGN, TAG, or CATEGORY
|
|
47
|
-
*/
|
|
48
|
-
category_type?: ECategoryType & string;
|
|
49
|
-
/**
|
|
50
|
-
* type
|
|
51
|
-
*/
|
|
52
|
-
type?: "category";
|
|
53
|
-
filter: SearchFilter;
|
|
54
|
-
suggestions_result_id: string;
|
|
55
|
-
[k: string]: unknown;
|
|
56
|
-
}
|
|
57
|
-
export interface SearchFilter {
|
|
58
|
-
/**
|
|
59
|
-
* The field to filter by.
|
|
60
|
-
*/
|
|
61
|
-
field: string;
|
|
62
|
-
/**
|
|
63
|
-
* The operation used for filtering. The filtering should be read as `field op data`, for example `brand in ["Nike", "Adidas"]`.
|
|
64
|
-
*/
|
|
65
|
-
op: "eq" | "neq" | "in" | "nin" | "leq" | "geq" | "inrange";
|
|
66
|
-
/**
|
|
67
|
-
* Data for the filter.
|
|
68
|
-
*/
|
|
69
|
-
data?:
|
|
70
|
-
| ("true" | "false")
|
|
71
|
-
| number
|
|
72
|
-
| number
|
|
73
|
-
| string
|
|
74
|
-
| [number, number]
|
|
75
|
-
| [number, number]
|
|
76
|
-
| [number, number]
|
|
77
|
-
| [number, number]
|
|
78
|
-
| (
|
|
79
|
-
| ("true" | "false")
|
|
80
|
-
| number
|
|
81
|
-
| number
|
|
82
|
-
| string
|
|
83
|
-
| [number, number]
|
|
84
|
-
| [number, number]
|
|
85
|
-
| [number, number]
|
|
86
|
-
| [number, number]
|
|
87
|
-
)[]
|
|
88
|
-
| (("true" | "false") | number | number | string)[][];
|
|
89
|
-
/**
|
|
90
|
-
* Metadata about the filter that can be used for rendering. For example, this could contain the possible values to filter by and their counts in the results.
|
|
91
|
-
*/
|
|
92
|
-
meta?: RangeFilterMeta | ValuesFilterMeta | HierarchicalValuesFilterMeta;
|
|
93
|
-
/**
|
|
94
|
-
* ID of the filter. If multiple filters share the same ID, they should be grouped together in the UI.
|
|
95
|
-
*/
|
|
96
|
-
id?: string;
|
|
97
|
-
}
|
|
98
|
-
export interface RangeFilterMeta {
|
|
99
|
-
/**
|
|
100
|
-
* Title of the group, where a group consists of all the filters that share an ID.
|
|
101
|
-
*/
|
|
102
|
-
group_title?: string;
|
|
103
|
-
/**
|
|
104
|
-
* Whether the filter group should be expanded by default or not.
|
|
105
|
-
*/
|
|
106
|
-
group_expanded?: boolean;
|
|
107
|
-
type?: "range";
|
|
108
|
-
/**
|
|
109
|
-
* The minimum value that can be selected in the range.
|
|
110
|
-
*/
|
|
111
|
-
min: number;
|
|
112
|
-
/**
|
|
113
|
-
* The maximum value that can be selected in the range.
|
|
114
|
-
*/
|
|
115
|
-
max: number;
|
|
116
|
-
/**
|
|
117
|
-
* The unit of the range values.
|
|
118
|
-
*/
|
|
119
|
-
unit?: string;
|
|
120
|
-
/**
|
|
121
|
-
* The currency of the range values.
|
|
122
|
-
*/
|
|
123
|
-
currency?: string;
|
|
124
|
-
}
|
|
125
|
-
export interface ValuesFilterMeta {
|
|
126
|
-
/**
|
|
127
|
-
* Title of the group, where a group consists of all the filters that share an ID.
|
|
128
|
-
*/
|
|
129
|
-
group_title?: string;
|
|
130
|
-
/**
|
|
131
|
-
* Whether the filter group should be expanded by default or not.
|
|
132
|
-
*/
|
|
133
|
-
group_expanded?: boolean;
|
|
134
|
-
/**
|
|
135
|
-
* Type of filter.
|
|
136
|
-
*/
|
|
137
|
-
type?: "radio" | "checkbox" | "checkbox-grid";
|
|
138
|
-
/**
|
|
139
|
-
* Selectable values
|
|
140
|
-
*/
|
|
141
|
-
values: (
|
|
142
|
-
| ("true" | "false")
|
|
143
|
-
| number
|
|
144
|
-
| number
|
|
145
|
-
| string
|
|
146
|
-
| [number, number]
|
|
147
|
-
| [number, number]
|
|
148
|
-
| [number, number]
|
|
149
|
-
| [number, number]
|
|
150
|
-
)[];
|
|
151
|
-
/**
|
|
152
|
-
* Counts for values
|
|
153
|
-
*/
|
|
154
|
-
counts?: number[];
|
|
155
|
-
/**
|
|
156
|
-
* Names for values
|
|
157
|
-
*/
|
|
158
|
-
names?: string[];
|
|
159
|
-
}
|
|
160
|
-
export interface HierarchicalValuesFilterMeta {
|
|
161
|
-
/**
|
|
162
|
-
* Title of the group, where a group consists of all the filters that share an ID.
|
|
163
|
-
*/
|
|
164
|
-
group_title?: string;
|
|
165
|
-
/**
|
|
166
|
-
* Whether the filter group should be expanded by default or not.
|
|
167
|
-
*/
|
|
168
|
-
group_expanded?: boolean;
|
|
169
|
-
type?: "checkbox-hierarchical";
|
|
170
|
-
/**
|
|
171
|
-
* Selectable hierarchical values
|
|
172
|
-
*/
|
|
173
|
-
values: (("true" | "false") | number | number | string)[][];
|
|
174
|
-
/**
|
|
175
|
-
* Counts for values
|
|
176
|
-
*/
|
|
177
|
-
counts?: number[];
|
|
178
|
-
/**
|
|
179
|
-
* Names for hierarchical values
|
|
180
|
-
*/
|
|
181
|
-
names?: string[];
|
|
182
|
-
}
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/**
|
|
3
|
-
* This file was automatically generated by json-schema-to-typescript.
|
|
4
|
-
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
|
|
5
|
-
* and run json-schema-to-typescript to regenerate this file.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* An enumeration.
|
|
10
|
-
*/
|
|
11
|
-
export type EUnavailabilityType = "out_of_stock" | "missing";
|
|
12
|
-
|
|
13
|
-
export interface TrackV2Request {
|
|
14
|
-
/**
|
|
15
|
-
* Identifier associated with the API integration
|
|
16
|
-
*/
|
|
17
|
-
tenant: string;
|
|
18
|
-
/**
|
|
19
|
-
* Market identifier
|
|
20
|
-
*/
|
|
21
|
-
market: string;
|
|
22
|
-
events: (UserTransactionMappingEvent | PurchaseEvent | ProductUnavailableEvent)[];
|
|
23
|
-
}
|
|
24
|
-
export interface UserTransactionMappingEvent {
|
|
25
|
-
/**
|
|
26
|
-
* User Id. Persistent between devices, typically on a logged in user.
|
|
27
|
-
*/
|
|
28
|
-
user_id?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Session Id. Unique to a browser/app and stored locally, e.g. cookie or localStorage.
|
|
31
|
-
*/
|
|
32
|
-
session_id?: string;
|
|
33
|
-
/**
|
|
34
|
-
* Populated for integrations performed by Depict.ai only. Depict.ai Session Id.
|
|
35
|
-
*/
|
|
36
|
-
dsid?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Unique identifier for the transaction.
|
|
39
|
-
*/
|
|
40
|
-
transaction_id: string;
|
|
41
|
-
/**
|
|
42
|
-
* The type identifier for this event: transaction_mapping.
|
|
43
|
-
*/
|
|
44
|
-
event_type?: "transaction_mapping";
|
|
45
|
-
}
|
|
46
|
-
export interface PurchaseEvent {
|
|
47
|
-
/**
|
|
48
|
-
* User Id. Persistent between devices, typically on a logged in user.
|
|
49
|
-
*/
|
|
50
|
-
user_id?: string;
|
|
51
|
-
/**
|
|
52
|
-
* Session Id. Unique to a browser/app and stored locally, e.g. cookie or localStorage.
|
|
53
|
-
*/
|
|
54
|
-
session_id?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Populated for integrations performed by Depict.ai only. Depict.ai Session Id.
|
|
57
|
-
*/
|
|
58
|
-
dsid?: string;
|
|
59
|
-
/**
|
|
60
|
-
* Unique identifier for the transaction.
|
|
61
|
-
*/
|
|
62
|
-
transaction_id: string;
|
|
63
|
-
/**
|
|
64
|
-
* The type identifier for this event: purchase.
|
|
65
|
-
*/
|
|
66
|
-
event_type?: "purchase";
|
|
67
|
-
/**
|
|
68
|
-
* Currency the purchase was paid in
|
|
69
|
-
*/
|
|
70
|
-
currency: string;
|
|
71
|
-
/**
|
|
72
|
-
* All the products purchased in this transaction
|
|
73
|
-
*/
|
|
74
|
-
products: PurchasedProduct[];
|
|
75
|
-
}
|
|
76
|
-
export interface PurchasedProduct {
|
|
77
|
-
/**
|
|
78
|
-
* Stock keeping unit, a distinct item for sale. If you are using Google Analytics, it should be the same id used for products there.
|
|
79
|
-
*/
|
|
80
|
-
sku: string;
|
|
81
|
-
/**
|
|
82
|
-
* Price per unit. If there are discounts because of quantity, the unit price should be adjusted accordingly.
|
|
83
|
-
*/
|
|
84
|
-
price: number;
|
|
85
|
-
/**
|
|
86
|
-
* The number of times the product was purchased.
|
|
87
|
-
*/
|
|
88
|
-
quantity: number;
|
|
89
|
-
}
|
|
90
|
-
export interface ProductUnavailableEvent {
|
|
91
|
-
/**
|
|
92
|
-
* User Id. Persistent between devices, typically on a logged in user.
|
|
93
|
-
*/
|
|
94
|
-
user_id?: string;
|
|
95
|
-
/**
|
|
96
|
-
* Session Id. Unique to a browser/app and stored locally, e.g. cookie or localStorage.
|
|
97
|
-
*/
|
|
98
|
-
session_id?: string;
|
|
99
|
-
/**
|
|
100
|
-
* Populated for integrations performed by Depict.ai only. Depict.ai Session Id.
|
|
101
|
-
*/
|
|
102
|
-
dsid?: string;
|
|
103
|
-
/**
|
|
104
|
-
* The type identifier for this event: product_unavailable.
|
|
105
|
-
*/
|
|
106
|
-
event_type: "product_unavailable";
|
|
107
|
-
/**
|
|
108
|
-
* Main product identifier
|
|
109
|
-
*/
|
|
110
|
-
product_id: string;
|
|
111
|
-
/**
|
|
112
|
-
* Reason the product isn't available for purchase
|
|
113
|
-
*/
|
|
114
|
-
unavailability_type: EUnavailabilityType;
|
|
115
|
-
}
|