@depict-ai/ui 0.0.68 → 0.0.70
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/dist/index.d.ts +3 -13
- package/dist/main.js +25 -27
- package/dist/module.js +28 -29
- package/dist/typescript_schema/BaseSearchRequest.d.ts +197 -0
- package/dist/typescript_schema/ProductListingQueriesRequest.d.ts +14 -0
- package/dist/typescript_schema/ProductListingQueriesResponse.d.ts +10 -0
- package/dist/typescript_schema/ProductListingRequest.d.ts +221 -0
- package/dist/typescript_schema/ProductListingResponse.d.ts +232 -0
- package/dist/typescript_schema/RecommendResponse.d.ts +15 -0
- package/dist/typescript_schema/SearchRequest.d.ts +213 -0
- package/dist/typescript_schema/SearchResponse.d.ts +192 -0
- package/dist/typescript_schema/SearchSuggestionsRequest.d.ts +18 -0
- package/dist/typescript_schema/SearchSuggestionsResponse.d.ts +182 -0
- package/dist/typescript_schema/TrackV2Request.d.ts +115 -0
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Display, Elem, ColsAtSize, InfoForProcessing, Node_Array, RR_PostProcessor, RR_PreProcessor } from "@depict-ai/utilishared";
|
|
2
|
+
import { Accessor, JSX, Setter, Signal } from "solid-js";
|
|
3
3
|
import { search_i18n as _search_i18n1 } from "../../../locales";
|
|
4
4
|
import { SearchResponse } from "@depict-ai/types/api/SearchResponse";
|
|
5
5
|
import { SearchRequest, SearchFilter } from "@depict-ai/types/api/SearchRequest";
|
|
@@ -9,17 +9,7 @@ import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestions
|
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
10
|
import { ProductListingResponse, BaseCategoryDisplay } from "@depict-ai/types/api/ProductListingResponse";
|
|
11
11
|
import { JSX as _JSX1 } from "solid-js/types/jsx";
|
|
12
|
-
export const version = "0.0.
|
|
13
|
-
/**
|
|
14
|
-
* Just like `useExpandingContainer` except that the children can be reactive solid-js signals, basically solid's JSX.Element instead of our JSX.Element
|
|
15
|
-
*/
|
|
16
|
-
export function useExpandingContainerReactive(...params: Parameters<typeof useExpandingContainer>): {
|
|
17
|
-
collapse: (collapsing_delay?: any, time_to_collapse?: any) => Promise<Animation | undefined>;
|
|
18
|
-
expand: (expanding_delay?: any, time_to_expand?: any) => Promise<Animation | undefined>;
|
|
19
|
-
ExpandingContainer: ({ children }: {
|
|
20
|
-
children: JSX.Element | (() => JSX.Element);
|
|
21
|
-
}) => HTMLElement;
|
|
22
|
-
};
|
|
12
|
+
export const version = "0.0.70";
|
|
23
13
|
type ExclusiveId = {
|
|
24
14
|
categoryId: string;
|
|
25
15
|
productId?: undefined;
|
package/dist/main.js
CHANGED
|
@@ -6,7 +6,6 @@ function $parcel$export(e, n, v, s) {
|
|
|
6
6
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
$parcel$export(module.exports, "useExpandingContainerReactive", () => $404797169c268f7a$export$5bad61ecde080b1f);
|
|
10
9
|
$parcel$export(module.exports, "fetchDepictRecommendations", () => $8c4e48a4bf96b284$export$58e808b1db15d3bc);
|
|
11
10
|
$parcel$export(module.exports, "QuickLinks", () => $068a627cc18f7bb6$export$de035477d6fef996);
|
|
12
11
|
$parcel$export(module.exports, "BreadCrumbs", () => $068a627cc18f7bb6$export$5b7c3ce0ebe51f86);
|
|
@@ -36,36 +35,11 @@ $parcel$export(module.exports, "solid_format_price", () => $5fc9fc23df1591db$exp
|
|
|
36
35
|
$parcel$export(module.exports, "connect_search_field_height_to_aligner_height", () => $246e3e89a097f014$export$828dcdd425fd3231);
|
|
37
36
|
$parcel$export(module.exports, "PageReplacer", () => $37e96a5ebc768cc7$export$3ccaa27d81dd8556);
|
|
38
37
|
$parcel$export(module.exports, "version", () => $ae93561d5649a847$export$83d89fbfd8236492);
|
|
39
|
-
/*! Depict.ai search and product listing SDK */ const $ae93561d5649a847$export$83d89fbfd8236492 = "0.0.
|
|
38
|
+
/*! Depict.ai search and product listing SDK */ const $ae93561d5649a847$export$83d89fbfd8236492 = "0.0.70";
|
|
40
39
|
|
|
41
40
|
|
|
42
41
|
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
function $404797169c268f7a$export$5bad61ecde080b1f(...params) {
|
|
47
|
-
const { collapse: collapse , expand: expand , ExpandingContainer: ExpandingContainer } = (0, $46MJV$depictaiutilishared.useExpandingContainer)(...params);
|
|
48
|
-
return {
|
|
49
|
-
collapse: collapse,
|
|
50
|
-
expand: expand,
|
|
51
|
-
ExpandingContainer: ({ children: children })=>{
|
|
52
|
-
// get reactive signals/solid's jsx elements into `ExpandingContainer`
|
|
53
|
-
const fake_div = document.createElement("div");
|
|
54
|
-
const outer_expanding = (0, $46MJV$solidjsweb.createComponent)(ExpandingContainer, {
|
|
55
|
-
children: [
|
|
56
|
-
fake_div
|
|
57
|
-
]
|
|
58
|
-
});
|
|
59
|
-
const parent = fake_div.parentElement;
|
|
60
|
-
fake_div.remove();
|
|
61
|
-
(0, $46MJV$solidjsweb.insert)(parent, children);
|
|
62
|
-
return outer_expanding;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
43
|
async function $8c4e48a4bf96b284$export$58e808b1db15d3bc({ merchant: merchant , market: market , headers: headers , ...fetch_recs_options }) {
|
|
70
44
|
return await (0, $46MJV$depictaiutilishared.fetch_recs)({
|
|
71
45
|
tenant: merchant,
|
|
@@ -1149,6 +1123,30 @@ function $8d94abc871e13baf$var$wrap_template_to_throw_into_error_boundary(templa
|
|
|
1149
1123
|
|
|
1150
1124
|
|
|
1151
1125
|
|
|
1126
|
+
function $404797169c268f7a$export$5bad61ecde080b1f(...params) {
|
|
1127
|
+
const { collapse: collapse , expand: expand , ExpandingContainer: ExpandingContainer } = (0, $46MJV$depictaiutilishared.useExpandingContainer)(...params);
|
|
1128
|
+
return {
|
|
1129
|
+
collapse: collapse,
|
|
1130
|
+
expand: expand,
|
|
1131
|
+
ExpandingContainer: ({ children: children })=>{
|
|
1132
|
+
// get reactive signals/solid's jsx elements into `ExpandingContainer`
|
|
1133
|
+
const fake_div = document.createElement("div");
|
|
1134
|
+
const outer_expanding = (0, $46MJV$solidjsweb.createComponent)(ExpandingContainer, {
|
|
1135
|
+
children: [
|
|
1136
|
+
fake_div
|
|
1137
|
+
]
|
|
1138
|
+
});
|
|
1139
|
+
const parent = fake_div.parentElement;
|
|
1140
|
+
fake_div.remove();
|
|
1141
|
+
(0, $46MJV$solidjsweb.insert)(parent, children);
|
|
1142
|
+
return outer_expanding;
|
|
1143
|
+
}
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
|
|
1152
1150
|
|
|
1153
1151
|
|
|
1154
1152
|
|
package/dist/module.js
CHANGED
|
@@ -1,37 +1,12 @@
|
|
|
1
|
-
import {add_to_version_info as $g9l4l$add_to_version_info,
|
|
2
|
-
import {
|
|
1
|
+
import {add_to_version_info as $g9l4l$add_to_version_info, fetch_recs as $g9l4l$fetch_recs, snakeCasifyObject as $g9l4l$snakeCasifyObject, GenericSliderArrowButton as $g9l4l$GenericSliderArrowButton, catchify as $g9l4l$catchify, base_url as $g9l4l$base_url, get_depict_id as $g9l4l$get_depict_id, get_user_id as $g9l4l$get_user_id, get_session_id as $g9l4l$get_session_id, dlog as $g9l4l$dlog, make_url_with_query_params as $g9l4l$make_url_with_query_params, fetch_retry as $g9l4l$fetch_retry, add_version_query_params as $g9l4l$add_version_query_params, sort_obj as $g9l4l$sort_obj, Tenant as $g9l4l$Tenant, Placeholder as $g9l4l$Placeholder, report as $g9l4l$report, javascript_media_query as $g9l4l$javascript_media_query, standard_price_format as $g9l4l$standard_price_format, deparallelize_no_drop as $g9l4l$deparallelize_no_drop, default_rr as $g9l4l$default_rr, make_random_classname as $g9l4l$make_random_classname, n_col_styling_with_dist as $g9l4l$n_col_styling_with_dist, observer as $g9l4l$observer, Lazyfier as $g9l4l$Lazyfier, queueMacroTask as $g9l4l$queueMacroTask, deparallelize as $g9l4l$deparallelize, Rec_Renderer as $g9l4l$Rec_Renderer, CrossIcon as $g9l4l$CrossIcon, useExpandingContainer as $g9l4l$useExpandingContainer, Amazing_Slider as $g9l4l$Amazing_Slider, slider_snap_css as $g9l4l$slider_snap_css, slider_fading_factory as $g9l4l$slider_fading_factory, MinusIcon as $g9l4l$MinusIcon, FilterIcon as $g9l4l$FilterIcon, SortIconAsc as $g9l4l$SortIconAsc, SortIconDesc as $g9l4l$SortIconDesc, PlusIcon as $g9l4l$PlusIcon, hsl_to_rgb as $g9l4l$hsl_to_rgb, relative_luminance_from_rgb as $g9l4l$relative_luminance_from_rgb, TickIcon as $g9l4l$TickIcon, ArrowUp as $g9l4l$ArrowUp, normal_get_product_id as $g9l4l$normal_get_product_id, ContainedPlaceholderImage as $g9l4l$ContainedPlaceholderImage, BackIcon as $g9l4l$BackIcon, SearchIcon as $g9l4l$SearchIcon, Layout as $g9l4l$Layout, make_placeholder_rr as $g9l4l$make_placeholder_rr, async_iterable_ipns as $g9l4l$async_iterable_ipns, make_asyncIterable_exiter as $g9l4l$make_asyncIterable_exiter, href_change_ipns as $g9l4l$href_change_ipns, depict_click as $g9l4l$depict_click, impression_track_element as $g9l4l$impression_track_element, add_new_tab_listener as $g9l4l$add_new_tab_listener, ContainedImage as $g9l4l$ContainedImage, buildThresholdList as $g9l4l$buildThresholdList, PreviousSearchIcon as $g9l4l$PreviousSearchIcon, insert_surfaces as $g9l4l$insert_surfaces, instant_exec_on_popstate_before_ipns_update as $g9l4l$instant_exec_on_popstate_before_ipns_update} from "@depict-ai/utilishared";
|
|
2
|
+
import {template as $g9l4l$template, insert as $g9l4l$insert, effect as $g9l4l$effect, setAttribute as $g9l4l$setAttribute, createComponent as $g9l4l$createComponent, use as $g9l4l$use, addEventListener as $g9l4l$addEventListener, delegateEvents as $g9l4l$delegateEvents, spread as $g9l4l$spread, classList as $g9l4l$classList, memo as $g9l4l$memo, style as $g9l4l$style, mergeProps as $g9l4l$mergeProps, className as $g9l4l$className} from "solid-js/web";
|
|
3
3
|
import {createSignal as $g9l4l$createSignal, onCleanup as $g9l4l$onCleanup, createComputed as $g9l4l$createComputed, createEffect as $g9l4l$createEffect, untrack as $g9l4l$untrack, batch as $g9l4l$batch, createResource as $g9l4l$createResource, createMemo as $g9l4l$createMemo, Show as $g9l4l$Show, createRenderEffect as $g9l4l$createRenderEffect, runWithOwner as $g9l4l$runWithOwner, createRoot as $g9l4l$createRoot, getOwner as $g9l4l$getOwner, createReaction as $g9l4l$createReaction, on as $g9l4l$on, ErrorBoundary as $g9l4l$ErrorBoundary, Index as $g9l4l$Index, For as $g9l4l$For} from "solid-js";
|
|
4
4
|
|
|
5
|
-
/*! Depict.ai search and product listing SDK */ const $18bf1d29fb889cca$export$83d89fbfd8236492 = "0.0.
|
|
5
|
+
/*! Depict.ai search and product listing SDK */ const $18bf1d29fb889cca$export$83d89fbfd8236492 = "0.0.70";
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function $198845c3fc59215a$export$5bad61ecde080b1f(...params) {
|
|
13
|
-
const { collapse: collapse , expand: expand , ExpandingContainer: ExpandingContainer } = (0, $g9l4l$useExpandingContainer)(...params);
|
|
14
|
-
return {
|
|
15
|
-
collapse: collapse,
|
|
16
|
-
expand: expand,
|
|
17
|
-
ExpandingContainer: ({ children: children })=>{
|
|
18
|
-
// get reactive signals/solid's jsx elements into `ExpandingContainer`
|
|
19
|
-
const fake_div = document.createElement("div");
|
|
20
|
-
const outer_expanding = (0, $g9l4l$createComponent)(ExpandingContainer, {
|
|
21
|
-
children: [
|
|
22
|
-
fake_div
|
|
23
|
-
]
|
|
24
|
-
});
|
|
25
|
-
const parent = fake_div.parentElement;
|
|
26
|
-
fake_div.remove();
|
|
27
|
-
(0, $g9l4l$insert)(parent, children);
|
|
28
|
-
return outer_expanding;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
10
|
async function $e95f1855a5e3864f$export$58e808b1db15d3bc({ merchant: merchant , market: market , headers: headers , ...fetch_recs_options }) {
|
|
36
11
|
return await (0, $g9l4l$fetch_recs)({
|
|
37
12
|
tenant: merchant,
|
|
@@ -1115,6 +1090,30 @@ function $57363319986950eb$var$wrap_template_to_throw_into_error_boundary(templa
|
|
|
1115
1090
|
|
|
1116
1091
|
|
|
1117
1092
|
|
|
1093
|
+
function $198845c3fc59215a$export$5bad61ecde080b1f(...params) {
|
|
1094
|
+
const { collapse: collapse , expand: expand , ExpandingContainer: ExpandingContainer } = (0, $g9l4l$useExpandingContainer)(...params);
|
|
1095
|
+
return {
|
|
1096
|
+
collapse: collapse,
|
|
1097
|
+
expand: expand,
|
|
1098
|
+
ExpandingContainer: ({ children: children })=>{
|
|
1099
|
+
// get reactive signals/solid's jsx elements into `ExpandingContainer`
|
|
1100
|
+
const fake_div = document.createElement("div");
|
|
1101
|
+
const outer_expanding = (0, $g9l4l$createComponent)(ExpandingContainer, {
|
|
1102
|
+
children: [
|
|
1103
|
+
fake_div
|
|
1104
|
+
]
|
|
1105
|
+
});
|
|
1106
|
+
const parent = fake_div.parentElement;
|
|
1107
|
+
fake_div.remove();
|
|
1108
|
+
(0, $g9l4l$insert)(parent, children);
|
|
1109
|
+
return outer_expanding;
|
|
1110
|
+
}
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
|
|
1118
1117
|
|
|
1119
1118
|
|
|
1120
1119
|
|
|
@@ -8082,4 +8081,4 @@ class $ba6c9609228edf6b$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
8082
8081
|
(0, $g9l4l$add_to_version_info)("ui", (0, $18bf1d29fb889cca$export$83d89fbfd8236492));
|
|
8083
8082
|
|
|
8084
8083
|
|
|
8085
|
-
export {$
|
|
8084
|
+
export {$e95f1855a5e3864f$export$58e808b1db15d3bc as fetchDepictRecommendations, $ec52ef1e6c117813$export$de035477d6fef996 as QuickLinks, $ec52ef1e6c117813$export$5b7c3ce0ebe51f86 as BreadCrumbs, $6340962f8bafd049$export$b91cec6bdc6b32a1 as CategoryTitle, $9b693ea3ff420de6$export$824dde41348efed1 as embedded_num_products, $80a49d3809ecb080$export$643598a327b5833e as get_categories, $ec52ef1e6c117813$export$f34314aa9505732e as DepictCategory, $ec52ef1e6c117813$export$e2bf8ce7779e827e as CategoryPage, $540e930c58500cbe$export$ac6237957a15b3f0 as DepictSearch, $540e930c58500cbe$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $540e930c58500cbe$export$f2dc7e4e4aa11abb as SearchPage, $540e930c58500cbe$export$316f6f283ae64765 as SearchField, $22d7fd594100c3d0$export$aa14a9f43128f61f as ProductCardError, $7cbfd6122dbaf087$export$d86a33413558014e as open_modal_with_alignment, $aaacfac0064e97d9$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $079defea521d5e2a$export$b3ad617e9036868 as align_field, $b4e6a093ae83373b$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $246aa49a8f85c7f3$export$1233ca167bf71f9a as styles_to_valid_css_string, $a1123c5ed9b0ee29$export$fe334901e8bebd57 as disable_scrolling, $a3e81b85527bc866$export$d0596b5cae35ad4 as open_search_with_shift_slash, $972ebf2641490830$export$26df08e242fe83a3 as push_state_with_query_param_value, $3846bb34098c738f$export$e015ed2f2950f2e3 as DepictAPI, $fefe7683325039b3$export$d9f36cf74e24d595 as media_query_to_accessor, $36316d7b4c897a03$export$689e204eadb33baf as setup_fast_leave, $886fa987db4f3805$export$5196e4c01fa56fcb as show_toast, $5178263ed1e394ca$export$469c7af753d08925 as solid_format_price, $a79ffb1cbfbd2a09$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $ba6c9609228edf6b$export$3ccaa27d81dd8556 as PageReplacer, $18bf1d29fb889cca$export$83d89fbfd8236492 as version};
|
|
@@ -0,0 +1,197 @@
|
|
|
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 BaseSearchRequest {
|
|
14
|
+
tenant: string;
|
|
15
|
+
market: string;
|
|
16
|
+
/**
|
|
17
|
+
* List of filters to apply to the results.
|
|
18
|
+
*/
|
|
19
|
+
filters?: SearchFilter[];
|
|
20
|
+
/**
|
|
21
|
+
* 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.
|
|
22
|
+
*/
|
|
23
|
+
sort?: SortModel;
|
|
24
|
+
/**
|
|
25
|
+
* User identifier
|
|
26
|
+
*/
|
|
27
|
+
user_id?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Session identifier
|
|
30
|
+
*/
|
|
31
|
+
session_id?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Populated for integrations performed by Depict.ai only. Depict.ai Session Id
|
|
34
|
+
*/
|
|
35
|
+
dsid?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Metadata that can be used to modify the behaviour of the search.
|
|
38
|
+
*/
|
|
39
|
+
metadata?: {
|
|
40
|
+
[k: string]: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* The search query.
|
|
44
|
+
*/
|
|
45
|
+
query?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface SearchFilter {
|
|
48
|
+
/**
|
|
49
|
+
* The field to filter by.
|
|
50
|
+
*/
|
|
51
|
+
field: string;
|
|
52
|
+
/**
|
|
53
|
+
* The operation used for filtering. The filtering should be read as `field op data`, for example `brand in ["Nike", "Adidas"]`.
|
|
54
|
+
*/
|
|
55
|
+
op: "eq" | "neq" | "in" | "nin" | "leq" | "geq" | "inrange";
|
|
56
|
+
/**
|
|
57
|
+
* Data for the filter.
|
|
58
|
+
*/
|
|
59
|
+
data?:
|
|
60
|
+
| ("true" | "false")
|
|
61
|
+
| number
|
|
62
|
+
| number
|
|
63
|
+
| string
|
|
64
|
+
| [number, number]
|
|
65
|
+
| [number, number]
|
|
66
|
+
| [number, number]
|
|
67
|
+
| [number, number]
|
|
68
|
+
| (
|
|
69
|
+
| ("true" | "false")
|
|
70
|
+
| number
|
|
71
|
+
| number
|
|
72
|
+
| string
|
|
73
|
+
| [number, number]
|
|
74
|
+
| [number, number]
|
|
75
|
+
| [number, number]
|
|
76
|
+
| [number, number]
|
|
77
|
+
)[]
|
|
78
|
+
| (("true" | "false") | number | number | string)[][];
|
|
79
|
+
/**
|
|
80
|
+
* 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.
|
|
81
|
+
*/
|
|
82
|
+
meta?: RangeFilterMeta | ValuesFilterMeta | HierarchicalValuesFilterMeta;
|
|
83
|
+
/**
|
|
84
|
+
* ID of the filter. If multiple filters share the same ID, they should be grouped together in the UI.
|
|
85
|
+
*/
|
|
86
|
+
id?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface RangeFilterMeta {
|
|
89
|
+
/**
|
|
90
|
+
* Title of the group, where a group consists of all the filters that share an ID.
|
|
91
|
+
*/
|
|
92
|
+
group_title?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the filter group should be expanded by default or not.
|
|
95
|
+
*/
|
|
96
|
+
group_expanded?: boolean;
|
|
97
|
+
type?: "range";
|
|
98
|
+
/**
|
|
99
|
+
* The minimum value that can be selected in the range.
|
|
100
|
+
*/
|
|
101
|
+
min: number;
|
|
102
|
+
/**
|
|
103
|
+
* The maximum value that can be selected in the range.
|
|
104
|
+
*/
|
|
105
|
+
max: number;
|
|
106
|
+
/**
|
|
107
|
+
* The unit of the range values.
|
|
108
|
+
*/
|
|
109
|
+
unit?: string;
|
|
110
|
+
/**
|
|
111
|
+
* The currency of the range values.
|
|
112
|
+
*/
|
|
113
|
+
currency?: string;
|
|
114
|
+
}
|
|
115
|
+
export interface ValuesFilterMeta {
|
|
116
|
+
/**
|
|
117
|
+
* Title of the group, where a group consists of all the filters that share an ID.
|
|
118
|
+
*/
|
|
119
|
+
group_title?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Whether the filter group should be expanded by default or not.
|
|
122
|
+
*/
|
|
123
|
+
group_expanded?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Type of filter.
|
|
126
|
+
*/
|
|
127
|
+
type?: "radio" | "checkbox" | "checkbox-grid";
|
|
128
|
+
/**
|
|
129
|
+
* Selectable values
|
|
130
|
+
*/
|
|
131
|
+
values: (
|
|
132
|
+
| ("true" | "false")
|
|
133
|
+
| number
|
|
134
|
+
| number
|
|
135
|
+
| string
|
|
136
|
+
| [number, number]
|
|
137
|
+
| [number, number]
|
|
138
|
+
| [number, number]
|
|
139
|
+
| [number, number]
|
|
140
|
+
)[];
|
|
141
|
+
/**
|
|
142
|
+
* Counts for values
|
|
143
|
+
*/
|
|
144
|
+
counts?: number[];
|
|
145
|
+
/**
|
|
146
|
+
* Names for values
|
|
147
|
+
*/
|
|
148
|
+
names?: string[];
|
|
149
|
+
}
|
|
150
|
+
export interface HierarchicalValuesFilterMeta {
|
|
151
|
+
/**
|
|
152
|
+
* Title of the group, where a group consists of all the filters that share an ID.
|
|
153
|
+
*/
|
|
154
|
+
group_title?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Whether the filter group should be expanded by default or not.
|
|
157
|
+
*/
|
|
158
|
+
group_expanded?: boolean;
|
|
159
|
+
type?: "checkbox-hierarchical";
|
|
160
|
+
/**
|
|
161
|
+
* Selectable hierarchical values
|
|
162
|
+
*/
|
|
163
|
+
values: (("true" | "false") | number | number | string)[][];
|
|
164
|
+
/**
|
|
165
|
+
* Counts for values
|
|
166
|
+
*/
|
|
167
|
+
counts?: number[];
|
|
168
|
+
/**
|
|
169
|
+
* Names for hierarchical values
|
|
170
|
+
*/
|
|
171
|
+
names?: string[];
|
|
172
|
+
}
|
|
173
|
+
export interface SortModel {
|
|
174
|
+
/**
|
|
175
|
+
* The field to sort by.
|
|
176
|
+
*/
|
|
177
|
+
field: string;
|
|
178
|
+
/**
|
|
179
|
+
* The order to sort by.
|
|
180
|
+
*/
|
|
181
|
+
order: SortingOrder;
|
|
182
|
+
/**
|
|
183
|
+
* Metadata about the sort that can be used for rendering.
|
|
184
|
+
*/
|
|
185
|
+
meta?: SortMeta;
|
|
186
|
+
}
|
|
187
|
+
export interface SortMeta {
|
|
188
|
+
title: string;
|
|
189
|
+
/**
|
|
190
|
+
* Selectable values
|
|
191
|
+
*/
|
|
192
|
+
values?: SortingOrder[];
|
|
193
|
+
/**
|
|
194
|
+
* Names for orders
|
|
195
|
+
*/
|
|
196
|
+
names?: string[];
|
|
197
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 ProductListingQueriesRequest {
|
|
9
|
+
tenant: string;
|
|
10
|
+
market: string;
|
|
11
|
+
metadata?: {
|
|
12
|
+
[k: string]: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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 ProductListingQueriesResponse {
|
|
9
|
+
query_ids?: string[];
|
|
10
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
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 ProductListingRequest {
|
|
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
|
+
* ID of the page to get products for. This is typically the slug, for example `hoodies-and-sweaters`.
|
|
60
|
+
*/
|
|
61
|
+
query_id: string;
|
|
62
|
+
/**
|
|
63
|
+
* Disables rules to hide products.
|
|
64
|
+
*/
|
|
65
|
+
show_hidden_products?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Whether to return grouping IDs or not.
|
|
68
|
+
*/
|
|
69
|
+
return_grouping_ids?: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface SearchFilter {
|
|
72
|
+
/**
|
|
73
|
+
* The field to filter by.
|
|
74
|
+
*/
|
|
75
|
+
field: string;
|
|
76
|
+
/**
|
|
77
|
+
* The operation used for filtering. The filtering should be read as `field op data`, for example `brand in ["Nike", "Adidas"]`.
|
|
78
|
+
*/
|
|
79
|
+
op: "eq" | "neq" | "in" | "nin" | "leq" | "geq" | "inrange";
|
|
80
|
+
/**
|
|
81
|
+
* Data for the filter.
|
|
82
|
+
*/
|
|
83
|
+
data?:
|
|
84
|
+
| ("true" | "false")
|
|
85
|
+
| number
|
|
86
|
+
| number
|
|
87
|
+
| string
|
|
88
|
+
| [number, number]
|
|
89
|
+
| [number, number]
|
|
90
|
+
| [number, number]
|
|
91
|
+
| [number, number]
|
|
92
|
+
| (
|
|
93
|
+
| ("true" | "false")
|
|
94
|
+
| number
|
|
95
|
+
| number
|
|
96
|
+
| string
|
|
97
|
+
| [number, number]
|
|
98
|
+
| [number, number]
|
|
99
|
+
| [number, number]
|
|
100
|
+
| [number, number]
|
|
101
|
+
)[]
|
|
102
|
+
| (("true" | "false") | number | number | string)[][];
|
|
103
|
+
/**
|
|
104
|
+
* 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.
|
|
105
|
+
*/
|
|
106
|
+
meta?: RangeFilterMeta | ValuesFilterMeta | HierarchicalValuesFilterMeta;
|
|
107
|
+
/**
|
|
108
|
+
* ID of the filter. If multiple filters share the same ID, they should be grouped together in the UI.
|
|
109
|
+
*/
|
|
110
|
+
id?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface RangeFilterMeta {
|
|
113
|
+
/**
|
|
114
|
+
* Title of the group, where a group consists of all the filters that share an ID.
|
|
115
|
+
*/
|
|
116
|
+
group_title?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Whether the filter group should be expanded by default or not.
|
|
119
|
+
*/
|
|
120
|
+
group_expanded?: boolean;
|
|
121
|
+
type?: "range";
|
|
122
|
+
/**
|
|
123
|
+
* The minimum value that can be selected in the range.
|
|
124
|
+
*/
|
|
125
|
+
min: number;
|
|
126
|
+
/**
|
|
127
|
+
* The maximum value that can be selected in the range.
|
|
128
|
+
*/
|
|
129
|
+
max: number;
|
|
130
|
+
/**
|
|
131
|
+
* The unit of the range values.
|
|
132
|
+
*/
|
|
133
|
+
unit?: string;
|
|
134
|
+
/**
|
|
135
|
+
* The currency of the range values.
|
|
136
|
+
*/
|
|
137
|
+
currency?: string;
|
|
138
|
+
}
|
|
139
|
+
export interface ValuesFilterMeta {
|
|
140
|
+
/**
|
|
141
|
+
* Title of the group, where a group consists of all the filters that share an ID.
|
|
142
|
+
*/
|
|
143
|
+
group_title?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Whether the filter group should be expanded by default or not.
|
|
146
|
+
*/
|
|
147
|
+
group_expanded?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Type of filter.
|
|
150
|
+
*/
|
|
151
|
+
type?: "radio" | "checkbox" | "checkbox-grid";
|
|
152
|
+
/**
|
|
153
|
+
* Selectable values
|
|
154
|
+
*/
|
|
155
|
+
values: (
|
|
156
|
+
| ("true" | "false")
|
|
157
|
+
| number
|
|
158
|
+
| number
|
|
159
|
+
| string
|
|
160
|
+
| [number, number]
|
|
161
|
+
| [number, number]
|
|
162
|
+
| [number, number]
|
|
163
|
+
| [number, number]
|
|
164
|
+
)[];
|
|
165
|
+
/**
|
|
166
|
+
* Counts for values
|
|
167
|
+
*/
|
|
168
|
+
counts?: number[];
|
|
169
|
+
/**
|
|
170
|
+
* Names for values
|
|
171
|
+
*/
|
|
172
|
+
names?: string[];
|
|
173
|
+
}
|
|
174
|
+
export interface HierarchicalValuesFilterMeta {
|
|
175
|
+
/**
|
|
176
|
+
* Title of the group, where a group consists of all the filters that share an ID.
|
|
177
|
+
*/
|
|
178
|
+
group_title?: string;
|
|
179
|
+
/**
|
|
180
|
+
* Whether the filter group should be expanded by default or not.
|
|
181
|
+
*/
|
|
182
|
+
group_expanded?: boolean;
|
|
183
|
+
type?: "checkbox-hierarchical";
|
|
184
|
+
/**
|
|
185
|
+
* Selectable hierarchical values
|
|
186
|
+
*/
|
|
187
|
+
values: (("true" | "false") | number | number | string)[][];
|
|
188
|
+
/**
|
|
189
|
+
* Counts for values
|
|
190
|
+
*/
|
|
191
|
+
counts?: number[];
|
|
192
|
+
/**
|
|
193
|
+
* Names for hierarchical values
|
|
194
|
+
*/
|
|
195
|
+
names?: string[];
|
|
196
|
+
}
|
|
197
|
+
export interface SortModel {
|
|
198
|
+
/**
|
|
199
|
+
* The field to sort by.
|
|
200
|
+
*/
|
|
201
|
+
field: string;
|
|
202
|
+
/**
|
|
203
|
+
* The order to sort by.
|
|
204
|
+
*/
|
|
205
|
+
order: SortingOrder;
|
|
206
|
+
/**
|
|
207
|
+
* Metadata about the sort that can be used for rendering.
|
|
208
|
+
*/
|
|
209
|
+
meta?: SortMeta;
|
|
210
|
+
}
|
|
211
|
+
export interface SortMeta {
|
|
212
|
+
title: string;
|
|
213
|
+
/**
|
|
214
|
+
* Selectable values
|
|
215
|
+
*/
|
|
216
|
+
values?: SortingOrder[];
|
|
217
|
+
/**
|
|
218
|
+
* Names for orders
|
|
219
|
+
*/
|
|
220
|
+
names?: string[];
|
|
221
|
+
}
|