fast-simon-sdk 1.6.4 → 1.6.8

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.
Files changed (82) hide show
  1. package/lib/config.d.ts +3 -0
  2. package/lib/config.js +4 -1
  3. package/lib/config.js.map +1 -1
  4. package/lib/index.js +2 -1
  5. package/lib/index.js.map +1 -1
  6. package/lib/models/autocomplete.d.ts +4 -1
  7. package/lib/models/common.d.ts +59 -0
  8. package/lib/models/common.js +3 -1
  9. package/lib/models/common.js.map +1 -1
  10. package/lib/models/events.d.ts +27 -1
  11. package/lib/models/fullTextSearch.d.ts +4 -0
  12. package/lib/models/fullTextSearch.js.map +1 -1
  13. package/lib/models/smartCollections.d.ts +4 -0
  14. package/lib/models/visualDiscovery.d.ts +129 -0
  15. package/lib/models/visualDiscovery.js +31 -0
  16. package/lib/models/visualDiscovery.js.map +1 -0
  17. package/lib/sections/enums/index.d.ts +2 -0
  18. package/lib/sections/enums/index.js +2 -0
  19. package/lib/sections/enums/index.js.map +1 -1
  20. package/lib/sections/eventReporter/index.js +147 -20
  21. package/lib/sections/eventReporter/index.js.map +1 -1
  22. package/lib/sections/eventReporter/utils.js +2 -0
  23. package/lib/sections/eventReporter/utils.js.map +1 -1
  24. package/lib/sections/fullTextSearch/index.js +12 -5
  25. package/lib/sections/fullTextSearch/index.js.map +1 -1
  26. package/lib/sections/fullTextSearch/utils.d.ts +1 -1
  27. package/lib/sections/fullTextSearch/utils.js +8 -4
  28. package/lib/sections/fullTextSearch/utils.js.map +1 -1
  29. package/lib/sections/index.js +92 -0
  30. package/lib/sections/index.js.map +1 -1
  31. package/lib/sections/initialization/utils.js +5 -1
  32. package/lib/sections/initialization/utils.js.map +1 -1
  33. package/lib/sections/landingPage/utils.js +6 -0
  34. package/lib/sections/landingPage/utils.js.map +1 -1
  35. package/lib/sections/recommendations/index.d.ts +5 -1
  36. package/lib/sections/recommendations/index.js +49 -2
  37. package/lib/sections/recommendations/index.js.map +1 -1
  38. package/lib/sections/recommendations/utils.d.ts +0 -1
  39. package/lib/sections/recommendations/utils.js +0 -9
  40. package/lib/sections/recommendations/utils.js.map +1 -1
  41. package/lib/sections/smartCollections/index.js +12 -6
  42. package/lib/sections/smartCollections/index.js.map +1 -1
  43. package/lib/sections/smartCollections/utils.d.ts +1 -0
  44. package/lib/sections/smartCollections/utils.js +15 -3
  45. package/lib/sections/smartCollections/utils.js.map +1 -1
  46. package/lib/sections/visualDiscovery/index.d.ts +22 -0
  47. package/lib/sections/visualDiscovery/index.js +266 -0
  48. package/lib/sections/visualDiscovery/index.js.map +1 -0
  49. package/lib/services/fullTextSearch.d.ts +1 -1
  50. package/lib/services/fullTextSearch.js +9 -6
  51. package/lib/services/fullTextSearch.js.map +1 -1
  52. package/lib/services/related.d.ts +19 -0
  53. package/lib/services/related.js +42 -0
  54. package/lib/services/related.js.map +1 -1
  55. package/lib/services/reporting.d.ts +14 -2
  56. package/lib/services/reporting.js +58 -8
  57. package/lib/services/reporting.js.map +1 -1
  58. package/lib/services/smartCollections.d.ts +1 -1
  59. package/lib/services/smartCollections.js +17 -6
  60. package/lib/services/smartCollections.js.map +1 -1
  61. package/lib/services/visualDiscovery.d.ts +9 -0
  62. package/lib/services/visualDiscovery.js +171 -0
  63. package/lib/services/visualDiscovery.js.map +1 -0
  64. package/lib/utils/ABTesting.d.ts +2 -1
  65. package/lib/utils/ABTesting.js +16 -2
  66. package/lib/utils/ABTesting.js.map +1 -1
  67. package/lib/utils/bindingBoxes.d.ts +23 -0
  68. package/lib/utils/bindingBoxes.js +90 -0
  69. package/lib/utils/bindingBoxes.js.map +1 -0
  70. package/lib/utils/image.d.ts +6 -0
  71. package/lib/utils/image.js +154 -0
  72. package/lib/utils/image.js.map +1 -0
  73. package/lib/utils/personalization.d.ts +2 -0
  74. package/lib/utils/personalization.js +21 -0
  75. package/lib/utils/personalization.js.map +1 -0
  76. package/lib/utils/sortUtil.d.ts +1 -0
  77. package/lib/utils/sortUtil.js +25 -0
  78. package/lib/utils/sortUtil.js.map +1 -0
  79. package/lib/utils/updateRecentSearches.d.ts +1 -0
  80. package/lib/utils/updateRecentSearches.js +33 -2
  81. package/lib/utils/updateRecentSearches.js.map +1 -1
  82. package/package.json +1 -1
package/lib/config.d.ts CHANGED
@@ -4,6 +4,7 @@ export declare const RECENT_PRODUCT_LS_KEY = "ISP_PRODUCTS_VIEWED_SESSION_2";
4
4
  export declare const RECENT_COLLECTION_PRODUCTS_KEY = "isp-recent-product-collection";
5
5
  export declare const RECENT_SERP_PRODUCTS_KEY = "isp-recent-product-serp";
6
6
  export declare const RECENT_RESPONSE_SERP_PRODUCTS_KEY = "isp-recent-response-product-serp";
7
+ export declare const RECENT_RESPONSE_COLLECTION_PRODUCTS_KEY = "isp-recent-response-product-collection";
7
8
  export declare const POST_LOAD_EVENT_KEY = "post-load-event";
8
9
  export declare const SDK_DEBUG_LS_LEY = "isp-sdk-version";
9
10
  export declare const SDK_NO_CACHING_LS_KEY = "isp-sdk-caching";
@@ -20,3 +21,5 @@ export declare const API_ERROR_MSG = "\u274C IS+ SDK Error | Please turn on the
20
21
  export declare const PROMOTED_PRODUCTS_BY_PERSONALIZATION = "isp-promoted-products-by-personalization";
21
22
  export declare const INITIALIZATION_ERROR_MSG = "\u274C IS+ SDK Error | SDK Not Initialized Yet";
22
23
  export declare const ISP_LOCAL_STORAGE_LOAD_ERROR_MSG = "\u274C IS+ SDK Error | Error parsing data from localStorage";
24
+ export declare const RECENT_PRODUCTS_EXPIRY_DAYS = 5;
25
+ export declare const RECENT_PRODUCTS_LENGTH_LIMIT = 10;
package/lib/config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ISP_LOCAL_STORAGE_LOAD_ERROR_MSG = exports.INITIALIZATION_ERROR_MSG = exports.PROMOTED_PRODUCTS_BY_PERSONALIZATION = exports.API_ERROR_MSG = exports.POST_LOAD_WAIT_TIME = exports.MIN_RECENT_SERP_PRODUCTS = exports.MAX_RECENT_SERP_PRODUCT_LIFE = exports.MAX_RECENT_SERP_PRODUCTS_PRODUCTS = exports.MAX_RECENT_COLLECTION_PRODUCTS = exports.MAX_RECENT_PRODUCTS = exports.SESSION_TOKEN_LIFE = exports.CART_TOKEN_COOKIE_NAME = exports.CART_TOKEN_LS_KEY = exports.SDK_NO_CACHING_LS_KEY = exports.SDK_DEBUG_LS_LEY = exports.POST_LOAD_EVENT_KEY = exports.RECENT_RESPONSE_SERP_PRODUCTS_KEY = exports.RECENT_SERP_PRODUCTS_KEY = exports.RECENT_COLLECTION_PRODUCTS_KEY = exports.RECENT_PRODUCT_LS_KEY = exports.USER_SESSION_TOKEN_LS_KEY = exports.SESSION_TOKEN_LS_KEY = void 0;
3
+ exports.RECENT_PRODUCTS_LENGTH_LIMIT = exports.RECENT_PRODUCTS_EXPIRY_DAYS = exports.ISP_LOCAL_STORAGE_LOAD_ERROR_MSG = exports.INITIALIZATION_ERROR_MSG = exports.PROMOTED_PRODUCTS_BY_PERSONALIZATION = exports.API_ERROR_MSG = exports.POST_LOAD_WAIT_TIME = exports.MIN_RECENT_SERP_PRODUCTS = exports.MAX_RECENT_SERP_PRODUCT_LIFE = exports.MAX_RECENT_SERP_PRODUCTS_PRODUCTS = exports.MAX_RECENT_COLLECTION_PRODUCTS = exports.MAX_RECENT_PRODUCTS = exports.SESSION_TOKEN_LIFE = exports.CART_TOKEN_COOKIE_NAME = exports.CART_TOKEN_LS_KEY = exports.SDK_NO_CACHING_LS_KEY = exports.SDK_DEBUG_LS_LEY = exports.POST_LOAD_EVENT_KEY = exports.RECENT_RESPONSE_COLLECTION_PRODUCTS_KEY = exports.RECENT_RESPONSE_SERP_PRODUCTS_KEY = exports.RECENT_SERP_PRODUCTS_KEY = exports.RECENT_COLLECTION_PRODUCTS_KEY = exports.RECENT_PRODUCT_LS_KEY = exports.USER_SESSION_TOKEN_LS_KEY = exports.SESSION_TOKEN_LS_KEY = void 0;
4
4
  //Local Storage Keys
5
5
  exports.SESSION_TOKEN_LS_KEY = "isp-session-token";
6
6
  exports.USER_SESSION_TOKEN_LS_KEY = "isp-user-session-token";
@@ -8,6 +8,7 @@ exports.RECENT_PRODUCT_LS_KEY = "ISP_PRODUCTS_VIEWED_SESSION_2";
8
8
  exports.RECENT_COLLECTION_PRODUCTS_KEY = "isp-recent-product-collection";
9
9
  exports.RECENT_SERP_PRODUCTS_KEY = "isp-recent-product-serp";
10
10
  exports.RECENT_RESPONSE_SERP_PRODUCTS_KEY = "isp-recent-response-product-serp";
11
+ exports.RECENT_RESPONSE_COLLECTION_PRODUCTS_KEY = "isp-recent-response-product-collection";
11
12
  exports.POST_LOAD_EVENT_KEY = "post-load-event";
12
13
  exports.SDK_DEBUG_LS_LEY = "isp-sdk-version";
13
14
  exports.SDK_NO_CACHING_LS_KEY = "isp-sdk-caching";
@@ -25,4 +26,6 @@ exports.API_ERROR_MSG = "\u274C IS+ SDK Error | Please turn on the \"REST API\"
25
26
  exports.PROMOTED_PRODUCTS_BY_PERSONALIZATION = "isp-promoted-products-by-personalization";
26
27
  exports.INITIALIZATION_ERROR_MSG = "\u274C IS+ SDK Error | SDK Not Initialized Yet";
27
28
  exports.ISP_LOCAL_STORAGE_LOAD_ERROR_MSG = "\u274C IS+ SDK Error | Error parsing data from localStorage";
29
+ exports.RECENT_PRODUCTS_EXPIRY_DAYS = 5;
30
+ exports.RECENT_PRODUCTS_LENGTH_LIMIT = 10;
28
31
  //# sourceMappingURL=config.js.map
package/lib/config.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AAAA,oBAAoB;AACP,QAAA,oBAAoB,GAAG,mBAAmB,CAAC;AAC3C,QAAA,yBAAyB,GAAG,wBAAwB,CAAC;AAErD,QAAA,qBAAqB,GAAG,+BAA+B,CAAC;AACxD,QAAA,8BAA8B,GAAG,+BAA+B,CAAC;AAEjE,QAAA,wBAAwB,GAA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BAAgB,CAAC;AACrC,QAAA,sBAAsB,GAAG,MAAM,CAAA;AAE5C,WAAW;AACE,QAAA,kBAAkB,GAAG,IAAI,CAAC;AAE1B,QAAA,mBAAmB,GAAG,EAAE,CAAC;AACzB,QAAA,8BAA8B,GAAG,CAAC,CAAC;AAEnC,QAAA,iCAAiC,GAAG,EAAE,CAAC;AACvC,QAAA,4BAA4B,GAAG,GAAG,CAAC;AACnC,QAAA,wBAAwB,GAAG,CAAC,CAAC;AAE7B,QAAA,mBAAmB,GAAG,IAAI,CAAC;AAE3B,QAAA,aAAa,GAAG,8GAAuG,CAAC;AAExH,QAAA,oCAAoC,GAAG,0CAA0C,CAAC;AAElF,QAAA,wBAAwB,GAAG,gDAA2C,CAAC;AAEvE,QAAA,gCAAgC,GAAG,6DAAwD,CAAC;AAE5F,QAAA,2BAA2B,GAAG,CAAC,CAAC;AAChC,QAAA,4BAA4B,GAAG,EAAE,CAAC"}
package/lib/index.js CHANGED
@@ -40,7 +40,7 @@ window._debugSDKVersion = function (version) {
40
40
  };
41
41
  // Immediately-invoked function to initialize the SDK or load the debug version
42
42
  (function () {
43
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
43
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
44
44
  var testVersion = localStorage.getItem(utilities_1.FSKeys.ISP_SDK_TEST_VERSION_HANDLE);
45
45
  var testVersionLoaded = localStorage.getItem(utilities_1.FSKeys.ISP_SDK_TEST_VERSION_LOADED);
46
46
  if (testVersion && !testVersionLoaded) {
@@ -61,6 +61,7 @@ window._debugSDKVersion = function (version) {
61
61
  storeID: (_g = (_f = window.__fast_simon_sdk_config) === null || _f === void 0 ? void 0 : _f.store_id) !== null && _g !== void 0 ? _g : (_h = window.__fast_simon_sdk_config) === null || _h === void 0 ? void 0 : _h.storeID,
62
62
  uuid: (_k = (_j = window.__fast_simon_sdk_config) === null || _j === void 0 ? void 0 : _j.store_uuid) !== null && _k !== void 0 ? _k : (_l = window.__fast_simon_sdk_config) === null || _l === void 0 ? void 0 : _l.uuid,
63
63
  type: (_m = window.__fast_simon_sdk_config) === null || _m === void 0 ? void 0 : _m.type,
64
+ withAttributes: (_o = window.__fast_simon_sdk_config) === null || _o === void 0 ? void 0 : _o.withAttributes,
64
65
  onReady: function () {
65
66
  var _a;
66
67
  (_a = window.__fast_simon_sdk_config) === null || _a === void 0 ? void 0 : _a.onReady();
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAAmC;AAuDpB,6FAvDP,kBAAO,OAuDY;AAtD3B,0CAAmG;AACnG,uCAAsD;AACtD,mDAA6C;AAE7C,kDAAkD;AAClD,SAAS,iBAAiB,CAAC,MAAc;IACrC,IAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,CAAC,GAAG,GAAG,2CAAoC,MAAM,uBAAoB,CAAC;IAC5E,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,MAAM,CAAC,MAAM,GAAG,cAAM,UAAU,CAAC,cAAM,YAAY,CAAC,UAAU,CAAC,kBAAM,CAAC,2BAA2B,CAAC,CAAC,CAAA,CAAC,EAAC,GAAG,CAAC,CAAC,CAAA,CAAC,CAAC;IAC5G,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAGD,4DAA4D;AAC3D,MAAc,CAAC,gBAAgB,GAAG,UAAC,OAAe;;IAC/C,YAAY,CAAC,UAAU,CAAC,kBAAM,CAAC,2BAA2B,CAAC,CAAC;IAC5D,YAAY,CAAC,UAAU,CAAC,kBAAM,CAAC,2BAA2B,CAAC,CAAC;IAC5D,IAAI,OAAO,EAAE;QACT,YAAY,CAAC,OAAO,CAAC,kBAAM,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;QAClE,M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,MAAc,CAAC,uBAAuB,0CAAE,OAAO;YAC9G,IAAI,EAAE,MAAA,MAAC,MAAc,CAAC,uBAAuB,0CAAE,UAAU,mCAAI,MAAC,MAAc,CAAC,uBAAuB,0CAAE,IAAI;YAC1G,IAAI,EAAE,MAAC,MAAc,CAAC,uBAAuB,0CAAE,IAAI;YACnD,cAAc,EAAE,MAAC,MAAc,CAAC,uBAAuB,0CAAE,cAAc;YACvE,OAAO,EAAE;;gBACL,MAAC,MAAc,CAAC,uBAAuB,0CAAE,OAAO,EAAE,CAAA;YACtD,CAAC;SACJ,CAAC,CAAC;KACN;AACL,CAAC,CAAC,EAAE,CAAC;AAML,mDAAiC"}
@@ -1,4 +1,4 @@
1
- import { AutocompleteResults } from "./common";
1
+ import { AutocompleteResults, CollectionsPersonalization } from "./common";
2
2
  import { Product } from "./fullTextSearch";
3
3
  export interface DashboardResponse extends DashboardKeys {
4
4
  cdn_cache_key: number;
@@ -28,6 +28,9 @@ export interface DashboardKeys {
28
28
  };
29
29
  headers_language?: string;
30
30
  is_personalized_filter?: boolean;
31
+ has_visual_discovery_tapcart?: boolean;
32
+ collectionsPersonalization?: CollectionsPersonalization;
33
+ searchPersonalization?: boolean;
31
34
  }
32
35
  export interface PopResponse {
33
36
  products: Product[];
@@ -5,6 +5,7 @@ import { Report } from "./events";
5
5
  import { Specs, SRC_TYPES, WidgetCallback } from "./related";
6
6
  import { ContentSearchProps } from "./content";
7
7
  import { inventoryCallback } from "./productsInventory";
8
+ import { AppReference, DiscoveryCallback, ImageSearchCallback, ImageSendCallback, ProductsByImageCallback, ProductsDiscoveryCallback, ResultType } from "./visualDiscovery";
8
9
  export type AppType = "SPA" | "MPA";
9
10
  export type SDKStatus = "loading" | "error" | "ready";
10
11
  type ContentPage = number;
@@ -29,6 +30,9 @@ export interface SDKData {
29
30
  [key: string]: object;
30
31
  };
31
32
  };
33
+ personalizedProducts?: string | undefined;
34
+ collectionsPersonalization?: CollectionsPersonalization;
35
+ searchPersonalization?: boolean;
32
36
  }
33
37
  export interface AutocompleteResults {
34
38
  totalResults: number;
@@ -67,6 +71,8 @@ export interface LandingPageResults {
67
71
  pageCount?: number;
68
72
  ancestors?: CategoryAncestor[];
69
73
  avoidPrefixList?: string[];
74
+ bannerHTML?: string;
75
+ title?: string;
70
76
  }
71
77
  export interface SDKTemp {
72
78
  autocomplete: AutocompleteResults;
@@ -106,6 +112,7 @@ export interface FullTextSearchProps {
106
112
  disableMerchandisingRules?: boolean;
107
113
  onProductsLoaded?: fullTextProductsCallback;
108
114
  onFacetsLoaded?: fullTextFacetsCallback;
115
+ disableTurbolinks?: boolean;
109
116
  }
110
117
  export type LandingPageCallback = ({}: {
111
118
  action: "products" | "facets and products";
@@ -142,6 +149,7 @@ export interface smartCollectionsProps {
142
149
  disableMerchandisingRules?: boolean;
143
150
  onProductsLoaded?: smartCollectionsCallback;
144
151
  onFacetsLoaded?: smartCollectionsCallback;
152
+ disableTurbolinks: boolean;
145
153
  }
146
154
  export interface LookALikeProps {
147
155
  viewedProductId: string;
@@ -159,6 +167,14 @@ export interface RelatedProps {
159
167
  withAttributes?: boolean;
160
168
  src?: SRC_TYPES;
161
169
  }
170
+ export interface RelatedWidgetProps {
171
+ productID: string;
172
+ widgetsIDS: string[];
173
+ callback: WidgetCallback;
174
+ recent?: string[];
175
+ withAttributes?: boolean;
176
+ src?: SRC_TYPES;
177
+ }
162
178
  export interface GetProductsProps {
163
179
  productIds: string[];
164
180
  callback?: (products: Product[]) => void;
@@ -169,6 +185,10 @@ export interface SDKUtils {
169
185
  data: SDKData;
170
186
  temp: SDKTemp;
171
187
  callbacks?: (() => any)[];
188
+ fsGridCurrentResponse: {
189
+ status: "loading" | "done";
190
+ data: Record<string, any>;
191
+ } | Record<string, any>;
172
192
  }
173
193
  export interface PopularProductsProps {
174
194
  withAttributes?: boolean;
@@ -190,6 +210,12 @@ export interface SDK {
190
210
  keys: (Partial<keyof DashboardKeys>)[];
191
211
  callback: (keys: Partial<DashboardKeys>) => void;
192
212
  }) => void;
213
+ productRecommendationByWidget: ({}: RelatedWidgetProps) => void;
214
+ productsByDiscovery: ({}: ProductsDiscoveryInternalProps) => void;
215
+ discoveryImages: ({}: DiscoveryInternalProps) => void;
216
+ sendImage: ({}: ImageSendInternalProps) => void;
217
+ ProductsByImage: ({}: ProductsByImageInternalProps) => void;
218
+ visualSearch: ({}: ImageSearchInternalProps) => void;
193
219
  }
194
220
  export declare const defaultSDKTemp: SDKTemp;
195
221
  export declare const defaultDashboardData: DashboardKeys;
@@ -205,4 +231,37 @@ export interface ShopifyTokenResponse {
205
231
  token: string;
206
232
  }
207
233
  export type Platfrom = "Shopify" | "Bigcommerce" | "";
234
+ export interface ProductsDiscoveryInternalProps {
235
+ imageID: string;
236
+ mode: ResultType;
237
+ callback: ProductsDiscoveryCallback;
238
+ }
239
+ export interface DiscoveryInternalProps {
240
+ mode: ResultType;
241
+ callback: DiscoveryCallback;
242
+ }
243
+ export interface ImageSendInternalProps {
244
+ fileData: File;
245
+ itemName: string | undefined;
246
+ callback: ImageSendCallback;
247
+ }
248
+ export interface ProductsByImageInternalProps {
249
+ imageID: string;
250
+ callback: ProductsByImageCallback;
251
+ reference?: AppReference;
252
+ imageBase64?: string | null;
253
+ }
254
+ export interface ImageSearchInternalProps {
255
+ fileData: File;
256
+ itemName: string | undefined;
257
+ callback: ImageSearchCallback;
258
+ }
259
+ export interface CollectionsPersonalization {
260
+ active: boolean;
261
+ avoidProducts: string[] | null;
262
+ avoidCategories: string[];
263
+ disableCategories: string[];
264
+ recencyLimit: number;
265
+ maxRecencyLimit: number;
266
+ }
208
267
  export {};
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defaultSDKData = exports.defaultDashboardData = exports.defaultSDKTemp = void 0;
4
+ var config_1 = require("../config");
4
5
  exports.defaultSDKTemp = {
5
6
  autocomplete: {
6
7
  totalResults: 0,
@@ -53,12 +54,13 @@ exports.defaultSDKData = {
53
54
  lastActive: Date.now(),
54
55
  start: Date.now()
55
56
  },
56
- userToken: "",
57
+ userToken: localStorage.getItem(config_1.USER_SESSION_TOKEN_LS_KEY) || '',
57
58
  cartToken: "",
58
59
  dashboard: exports.defaultDashboardData,
59
60
  popularProducts: [],
60
61
  categories: [],
61
62
  turbolinks: [],
62
63
  contentData: { 0: "" },
64
+ abTestingVariations: {}
63
65
  };
64
66
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/models/common.ts"],"names":[],"mappings":";;;AA0Na,QAAA,cAAc,GAAY;IACnC,YAAY,EAAE;QACV,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,EAAE;QACd,eAAe,EAAE,EAAE;QACnB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,EAAE;QACd,KAAK,EAAE,EAAE;KACZ;IACD,cAAc,EAAE;QACZ,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,CAAC;KAClB;IACD,gBAAgB,EAAE;QACd,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,CAAC;QACf,IAAI,EAAE,EAAE;KACX;IACD,WAAW,EAAE;QACT,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,CAAC;KAClB;CACJ,CAAC;AAEW,QAAA,oBAAoB,GAAkB;IAC/C,QAAQ,EAAE,EAAE;IACZ,8BAA8B,EAAE,KAAK;IACrC,kCAAkC,EAAE,CAAC;IACrC,gCAAgC,EAAE,CAAC;IACnC,uBAAuB,EAAE,CAAC;IAC1B,aAAa,EAAE,IAAI;IACnB,+BAA+B,EAAE,KAAK;IACtC,iBAAiB,EAAE,EAAE;IACrB,4BAA4B,EAAE,EAAE;IAChC,8BAA8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,EAAE;IACZ,8BAA8B,EAAE,KAAK;IACrC,kCAAkC,EAAE,CAAC;IACrC,gCAAgC,EAAE,CAAC;IACnC,uBAAuB,EAAE,CAAC;IAC1B,aAAa,EAAE,IAAI;IACnB,+BAA+B,EAAE,KAAK;IACtC,iBAAiB,EAAE,EAAE;IACrB,4BAA4B,EAAE,EAAE;IAChC,8BAA8B,EAAE,KAAK;IACrC,UAAU,EAAE,KAAK;IACjB,mCAAmC,EAAE,KAAK;CAC7C,CAAC;AAEW,QAAA,cAAc,GAAY;IACnC,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE;IAClB,YAAY,EAAE;QACV,UAAU,EAAE,IAAI,CAAC,GAAG,EAAE;QACtB,KAAK,EAAE,IAAI,CAAC,GAAG,EAAE;KACpB;IACD,SAAS,EAAE,YAAY,CAAC,OAAO,CAAC,kCAAyB,CAAC,IAAI,EAAE;IAChE,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,4BAAoB;IAC/B,eAAe,EAAE,EAAE;IACnB,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,WAAW,EAAE,EAAC,CAAC,EAAE,EAAE,EAAC;IACpB,mBAAmB,EAAE,EAAE;CAC1B,CAAC"}
@@ -11,7 +11,7 @@ export interface Report<T> {
11
11
  payload: any;
12
12
  }) => void;
13
13
  }
14
- export type EventName = "instantsearch-product" | "instantsearch-popular-search" | "instantsearch-category" | "search" | "collection" | "productFromSearch" | "productFromCollection" | "productFromRecommendation" | "productDirect" | "lookALikeViewSerp" | "quickViewSerp" | "lookALikeViewCollection" | "quickViewCollection" | "productFromLookALike" | "productFromQuickView" | "cartVisited" | "cartPerformed";
14
+ export type EventName = "instantsearch-product" | "instantsearch-popular-search" | "instantsearch-category" | "search" | "collection" | "productFromSearch" | "productFromCollection" | "promoTileFromSearch" | "promoTileFromCollection" | "productFromRecommendation" | "productDirect" | "lookALikeViewSerp" | "quickViewSerp" | "lookALikeViewCollection" | "quickViewCollection" | "productFromLookALike" | "productFromQuickView" | "cartVisited" | "cartPerformed" | "collectionPreformedFromTurbolink";
15
15
  export interface ProductSeenAutocompleteData {
16
16
  query: string;
17
17
  productID: string;
@@ -31,6 +31,14 @@ export interface ProductSeenSerpData {
31
31
  position?: number;
32
32
  imageID?: string;
33
33
  }
34
+ export interface PromotileSeenSerpData {
35
+ query: string;
36
+ productID: string;
37
+ position?: number;
38
+ imageID?: string;
39
+ link: string;
40
+ thumbnail: string;
41
+ }
34
42
  export interface ProductSeenRecommendations {
35
43
  productID: string;
36
44
  sourceProductID: string;
@@ -48,6 +56,15 @@ export interface ProductSeenCollectionData {
48
56
  query?: string;
49
57
  imageID?: string;
50
58
  }
59
+ export interface PromotileSeenCollectionData {
60
+ collectionID: string;
61
+ productID: string;
62
+ position?: number;
63
+ query?: string;
64
+ imageID?: string;
65
+ link: string;
66
+ thumbnail: string;
67
+ }
51
68
  export interface SearchPreformedData {
52
69
  query: string;
53
70
  narrowBy?: Narrow[];
@@ -55,6 +72,13 @@ export interface SearchPreformedData {
55
72
  products?: string[];
56
73
  pagenum?: string;
57
74
  rescount?: string;
75
+ promoTiles?: PromotileEvent[];
76
+ }
77
+ export interface PromotileEvent {
78
+ id: number;
79
+ name: string;
80
+ link: string;
81
+ thumbnail: string;
58
82
  }
59
83
  export interface CollectionPreformedData {
60
84
  categoryID: string;
@@ -64,6 +88,8 @@ export interface CollectionPreformedData {
64
88
  products?: string[];
65
89
  pagenum?: string;
66
90
  rescount?: string;
91
+ promoTiles?: PromotileEvent[];
92
+ fromTurboLink?: boolean;
67
93
  }
68
94
  export interface QuickViewSerpData {
69
95
  term: string;
@@ -18,6 +18,8 @@ export interface fullTextSearchResponse {
18
18
  turbolink?: string;
19
19
  related_categories?: RelatedCategoryServer[];
20
20
  related_results?: boolean;
21
+ banner_html?: string;
22
+ title?: string;
21
23
  }
22
24
  export interface fullTextSearchProps {
23
25
  term: string;
@@ -47,6 +49,8 @@ export interface fullTextSearchProps {
47
49
  disableStrategies?: boolean;
48
50
  disableMerchandisingRules?: boolean;
49
51
  isPersonalizedFiltersActive?: boolean;
52
+ disableTurbolinks?: boolean;
53
+ searchPersonalization?: boolean;
50
54
  }
51
55
  export type SortBy = "price_min_to_max" | "price_max_to_min" | "creation_date" | "creation_date_oldest" | "popularity" | "reviews" | "a_to_z" | "z_to_a" | 'relevency';
52
56
  export declare function isSortBy(sort: string | undefined): sort is SortBy;
@@ -1 +1 @@
1
- {"version":3,"file":"fullTextSearch.js","sourceRoot":"","sources":["../../src/models/fullTextSearch.ts"],"names":[],"mappings":";;;AAgEA,SAAgB,QAAQ,CAAC,IAAwB;IAC7C,IAAI,CAAC,IAAI,EAAE;QACP,OAAO,KAAK,CAAC;KAChB;IAED,OAAO,CAAC,CAAC,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,sBAAsB,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxK,CAAC;AAND,4BAMC;AAQD,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,6EAAgB,CAAA;IAChB,yFAAsB,CAAA;IACtB,qFAAoB,CAAA;IACpB,mFAAmB,CAAA;AACvB,CAAC,EALW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK1B"}
1
+ {"version":3,"file":"fullTextSearch.js","sourceRoot":"","sources":["../../src/models/fullTextSearch.ts"],"names":[],"mappings":";;;AAoEA,SAAgB,QAAQ,CAAC,IAAwB;IAC7C,IAAI,CAAC,IAAI,EAAE;QACP,OAAO,KAAK,CAAC;KAChB;IAED,OAAO,CAAC,CAAC,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,sBAAsB,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxK,CAAC;AAND,4BAMC;AAQD,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,6EAAgB,CAAA;IAChB,yFAAsB,CAAA;IACtB,qFAAoB,CAAA;IACpB,mFAAmB,CAAA;AACvB,CAAC,EALW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK1B"}
@@ -1,5 +1,6 @@
1
1
  import { FacetRequired, Narrow, Product, RelatedCategoryServer, SortBy } from "./fullTextSearch";
2
2
  import { ServerFacet } from "@fast-simon/utilities";
3
+ import { CollectionsPersonalization } from "./common";
3
4
  export interface SmartCollectionsResponse {
4
5
  ancestor_categories: CategoryAncestor[];
5
6
  category_description: string;
@@ -25,6 +26,7 @@ export interface SmartCollectionsResponse {
25
26
  merch?: any;
26
27
  banner_html?: string;
27
28
  related_categories?: RelatedCategoryServer[];
29
+ personalized_products?: number[];
28
30
  }
29
31
  export type CategoryAncestor = [string, string, string];
30
32
  export interface smartCollections {
@@ -56,6 +58,8 @@ export interface smartCollections {
56
58
  disableStrategies?: boolean;
57
59
  disableMerchandisingRules?: boolean;
58
60
  isPersonalizedFiltersActive?: boolean;
61
+ disableTurbolinks?: boolean;
62
+ collectionPersonalization?: CollectionsPersonalization;
59
63
  }
60
64
  export interface smartCollectionsResults {
61
65
  ancestors: CategoryAncestor[];
@@ -0,0 +1,129 @@
1
+ import { Product } from "./fullTextSearch";
2
+ import { Box } from "../utils/bindingBoxes";
3
+ export interface RequestKey {
4
+ uuid: string;
5
+ storeID: number;
6
+ cdnCacheKey: string;
7
+ }
8
+ export declare enum ResultType {
9
+ Instagram = "instagram",
10
+ Visual = "visual",
11
+ Popular = "popular",
12
+ Product = "product"
13
+ }
14
+ export interface ExtendedRequestKey extends RequestKey {
15
+ userSessionID: string;
16
+ sessionToken: string | null | undefined;
17
+ }
18
+ export interface FetchProductsResponse {
19
+ image_id: string;
20
+ items: Product[];
21
+ likes: number;
22
+ t: string;
23
+ d: string;
24
+ bbox?: ApiBoundingBox[];
25
+ complete_the_look?: {
26
+ [key: string]: Product[];
27
+ };
28
+ product_label?: string;
29
+ similar?: Product[];
30
+ video_url?: string;
31
+ }
32
+ export interface VisualSearchProductResponse {
33
+ image_id: string;
34
+ items: Product[];
35
+ method: string;
36
+ bbox?: (ApiBoundingBox[] | Box[]);
37
+ }
38
+ export interface DiscoveryImage {
39
+ image_id: string;
40
+ likes: number;
41
+ t: string;
42
+ d: string;
43
+ }
44
+ export interface ShopTheLookResponse extends ShopTheLookData {
45
+ product_label?: string;
46
+ image_id?: number | string;
47
+ similar?: Product[];
48
+ }
49
+ export interface ShopTheLookData {
50
+ bbox?: ApiBoundingBox[];
51
+ complete_the_look?: {
52
+ [key: string]: Product[];
53
+ };
54
+ showShopTheLookSwitch?: boolean;
55
+ }
56
+ export interface ApiBoundingBox {
57
+ name: string;
58
+ bb: number[];
59
+ person: string;
60
+ }
61
+ export interface FetchProductsDiscoveryParams extends RequestKey {
62
+ imageID: string;
63
+ mode: ResultType;
64
+ }
65
+ export interface FetchDiscoveryParams extends RequestKey {
66
+ mode: ResultType;
67
+ }
68
+ export interface FetchProductsDiscoveryParamsUserImageParams extends ExtendedRequestKey {
69
+ imageID: string;
70
+ }
71
+ export interface FetchProductsDiscoveryParamsUserImageWithLatencyParams extends ExtendedRequestKey {
72
+ imageID: string;
73
+ }
74
+ export interface SendImageParams extends ExtendedRequestKey {
75
+ itemName?: string;
76
+ base64String?: string | null;
77
+ }
78
+ export interface FetchShopTheLookProductsParams {
79
+ uuid: string;
80
+ storeID: number;
81
+ productId: number;
82
+ imageUrl: string;
83
+ cdnCacheKey: string;
84
+ }
85
+ export type ProductsDiscoveryCallback = ({}: {
86
+ action: "ProductsDiscovery" | "Error";
87
+ payload: FetchProductsResponse | string | undefined;
88
+ }) => void;
89
+ export type DiscoveryCallback = ({}: {
90
+ action: "DiscoveryImages" | "Error";
91
+ payload: DiscoveryImage[] | string | undefined;
92
+ }) => void;
93
+ export type ImageSendCallback = ({}: {
94
+ action: "ImageSend" | "Error";
95
+ payload: FetchProductsResponse | string | undefined;
96
+ }) => void;
97
+ export type ProductsByImageCallback = ({}: {
98
+ action: "ImageSearch" | "Error";
99
+ payload: VisualSearchProductResponse | string | undefined;
100
+ }) => void;
101
+ export type ImageSearchCallback = ({}: {
102
+ action: "ImageSearch" | "Error";
103
+ payload: VisualSearchProductResponse | string | undefined;
104
+ }) => void;
105
+ export interface VisualSearchUsedProps extends ExtendedRequestKey {
106
+ imageID: string;
107
+ products: string;
108
+ latency: number;
109
+ count: number;
110
+ ref: AppReference;
111
+ }
112
+ export declare enum AppReference {
113
+ POPUP = "popup",
114
+ WIDGET = "widget",
115
+ PDP = "pdp",
116
+ AUTOCOMPLETE = "ac"
117
+ }
118
+ export declare enum ReportingUPType {
119
+ visualSearchUsed = 21,
120
+ discoveryOpen = 37,
121
+ instagramDiscovery = 35,
122
+ popularDiscovery = 33,
123
+ instagramProductVisit = 36,
124
+ popularProductVisit = 34,
125
+ visualProductVisit = 32,
126
+ discoveryInstagramATC = 38,
127
+ discoveryPopularATC = 39,
128
+ discoveryVisualATC = 40
129
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReportingUPType = exports.AppReference = exports.ResultType = void 0;
4
+ var ResultType;
5
+ (function (ResultType) {
6
+ ResultType["Instagram"] = "instagram";
7
+ ResultType["Visual"] = "visual";
8
+ ResultType["Popular"] = "popular";
9
+ ResultType["Product"] = "product";
10
+ })(ResultType = exports.ResultType || (exports.ResultType = {}));
11
+ var AppReference;
12
+ (function (AppReference) {
13
+ AppReference["POPUP"] = "popup";
14
+ AppReference["WIDGET"] = "widget";
15
+ AppReference["PDP"] = "pdp";
16
+ AppReference["AUTOCOMPLETE"] = "ac";
17
+ })(AppReference = exports.AppReference || (exports.AppReference = {}));
18
+ var ReportingUPType;
19
+ (function (ReportingUPType) {
20
+ ReportingUPType[ReportingUPType["visualSearchUsed"] = 21] = "visualSearchUsed";
21
+ ReportingUPType[ReportingUPType["discoveryOpen"] = 37] = "discoveryOpen";
22
+ ReportingUPType[ReportingUPType["instagramDiscovery"] = 35] = "instagramDiscovery";
23
+ ReportingUPType[ReportingUPType["popularDiscovery"] = 33] = "popularDiscovery";
24
+ ReportingUPType[ReportingUPType["instagramProductVisit"] = 36] = "instagramProductVisit";
25
+ ReportingUPType[ReportingUPType["popularProductVisit"] = 34] = "popularProductVisit";
26
+ ReportingUPType[ReportingUPType["visualProductVisit"] = 32] = "visualProductVisit";
27
+ ReportingUPType[ReportingUPType["discoveryInstagramATC"] = 38] = "discoveryInstagramATC";
28
+ ReportingUPType[ReportingUPType["discoveryPopularATC"] = 39] = "discoveryPopularATC";
29
+ ReportingUPType[ReportingUPType["discoveryVisualATC"] = 40] = "discoveryVisualATC";
30
+ })(ReportingUPType = exports.ReportingUPType || (exports.ReportingUPType = {}));
31
+ //# sourceMappingURL=visualDiscovery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visualDiscovery.js","sourceRoot":"","sources":["../../src/models/visualDiscovery.ts"],"names":[],"mappings":";;;AAQA,IAAY,UAKX;AALD,WAAY,UAAU;IAClB,qCAAuB,CAAA;IACvB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;AACvB,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB;AAgHD,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,+BAAe,CAAA;IACf,iCAAiB,CAAA;IACjB,2BAAW,CAAA;IACX,mCAAmB,CAAA;AACvB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AACD,IAAY,eAWX;AAXD,WAAY,eAAe;IACvB,8EAAqB,CAAA;IACrB,wEAAkB,CAAA;IAClB,kFAAuB,CAAA;IACvB,8EAAqB,CAAA;IACrB,wFAA0B,CAAA;IAC1B,oFAAwB,CAAA;IACxB,kFAAuB,CAAA;IACvB,wFAA0B,CAAA;IAC1B,oFAAwB,CAAA;IACxB,kFAAuB,CAAA;AAC3B,CAAC,EAXW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAW1B"}
@@ -10,6 +10,8 @@ export declare const FastEventName: {
10
10
  SmartCollectionPreformed: string;
11
11
  SerpProductClicked: string;
12
12
  CollectionProductClicked: string;
13
+ SerpPromoTileClicked: string;
14
+ CollectionPromoTileClicked: string;
13
15
  RecommendationProductClicked: string;
14
16
  LookALikeClickedSerp: string;
15
17
  QuickViewClickedCollection: string;
@@ -13,6 +13,8 @@ exports.FastEventName = {
13
13
  SmartCollectionPreformed: "collection",
14
14
  SerpProductClicked: "productFromSearch",
15
15
  CollectionProductClicked: "productFromCollection",
16
+ SerpPromoTileClicked: "promoTileFromSearch",
17
+ CollectionPromoTileClicked: "promoTileFromCollection",
16
18
  RecommendationProductClicked: "productFromRecommendation",
17
19
  LookALikeClickedSerp: "lookALikeViewSerp",
18
20
  QuickViewClickedCollection: "quickViewCollection",
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sections/enums/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACvB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,KAAK;CACnB,CAAC;AAEW,QAAA,aAAa,GAAG;IACzB,0BAA0B,EAAE,uBAAuB;IACnD,2BAA2B,EAAE,wBAAwB;IACrD,0BAA0B,EAAE,8BAA8B;IAC1D,eAAe,EAAE,QAAQ;IACzB,wBAAwB,EAAE,YAAY;IACtC,kBAAkB,EAAE,mBAAmB;IACvC,wBAAwB,EAAE,uBAAuB;IACjD,4BAA4B,EAAE,2BAA2B;IACzD,oBAAoB,EAAE,mBAAmB;IACzC,0BAA0B,EAAE,qBAAqB;IACjD,0BAA0B,EAAE,yBAAyB;IACrD,oBAAoB,EAAE,eAAe;IACrC,uBAAuB,EAAE,sBAAsB;IAC/C,uBAAuB,EAAE,sBAAsB;IAC/C,oBAAoB,EAAE,eAAe;IACrC,WAAW,EAAE,aAAa;IAC1B,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