@tapcart/mobile-components 0.16.0 → 0.16.2

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 (25) hide show
  1. package/dist/components/hooks/use-nosto-recommendation.d.ts +4 -0
  2. package/dist/components/hooks/use-nosto-recommendation.d.ts.map +1 -1
  3. package/dist/components/hooks/use-nosto-recommendation.js +116 -23
  4. package/dist/components/hooks/use-nosto-recommendation.queries.d.ts +0 -1
  5. package/dist/components/hooks/use-nosto-recommendation.queries.d.ts.map +1 -1
  6. package/dist/components/hooks/use-nosto-recommendation.queries.js +0 -3
  7. package/dist/components/hooks/use-nosto-recommendation.test.js +168 -171
  8. package/dist/components/hooks/use-order-details.d.ts +23 -0
  9. package/dist/components/hooks/use-order-details.d.ts.map +1 -1
  10. package/dist/components/hooks/use-order-details.js +59 -11
  11. package/dist/components/hooks/use-products.d.ts.map +1 -1
  12. package/dist/components/hooks/use-products.js +24 -4
  13. package/dist/components/hooks/use-products.test.d.ts +2 -0
  14. package/dist/components/hooks/use-products.test.d.ts.map +1 -0
  15. package/dist/components/hooks/use-products.test.js +129 -0
  16. package/dist/components/libs/cache/ProductsLocalStorage.d.ts.map +1 -1
  17. package/dist/components/libs/cache/ProductsLocalStorage.js +32 -0
  18. package/dist/components/libs/cache/ProductsLocalStorage.test.d.ts +2 -0
  19. package/dist/components/libs/cache/ProductsLocalStorage.test.d.ts.map +1 -0
  20. package/dist/components/libs/cache/ProductsLocalStorage.test.js +110 -0
  21. package/dist/components/ui/drawer.d.ts +3 -2
  22. package/dist/components/ui/drawer.d.ts.map +1 -1
  23. package/dist/components/ui/drawer.js +3 -3
  24. package/dist/tests/use-order-details.test.js +84 -1
  25. package/package.json +1 -1
@@ -7,6 +7,9 @@ export declare enum NostoRecommendationsType {
7
7
  BEST_SELLERS = "BEST_SELLERS",
8
8
  VIEWED_CATEGORY = "VIEWED_CATEGORY"
9
9
  }
10
+ export declare const NOSTO_CID_COOKIE_NAME = "2c.cId";
11
+ export declare const readCookie: (name: string) => string | null;
12
+ export type NostoPersonalization = "session" | "cookie" | "none";
10
13
  export declare function useNostoRecommendations(integrations: Integrations, baseURL: string, slotId?: string, country?: string, recommendationsType?: NostoRecommendationsType | "", productIds?: string[], skip?: boolean, mockFallback?: boolean, mockFallbackAppId?: string, session?: {
11
14
  sessionId: string;
12
15
  lastSessionEventTimestamp: number;
@@ -15,5 +18,6 @@ export declare function useNostoRecommendations(integrations: Integrations, base
15
18
  isLoading: boolean;
16
19
  error: any;
17
20
  isEmpty: boolean;
21
+ personalization: NostoPersonalization;
18
22
  };
19
23
  //# sourceMappingURL=use-nosto-recommendation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-nosto-recommendation.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-nosto-recommendation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAe/C,oBAAY,wBAAwB;IAClC,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;IACnC,qBAAqB,0BAA0B;IAC/C,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;CACpC;AAwTD,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,MAAM,EACf,MAAM,SAAK,EACX,OAAO,SAAO,EACd,mBAAmB,CAAC,EAAE,wBAAwB,GAAG,EAAE,EACnD,UAAU,CAAC,EAAE,MAAM,EAAE,EACrB,IAAI,CAAC,EAAE,OAAO,EACd,YAAY,CAAC,EAAE,OAAO,EACtB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,OAAO,CAAC,EAAE;IACR,SAAS,EAAE,MAAM,CAAA;IACjB,yBAAyB,EAAE,MAAM,CAAA;CAClC;;;;;EAwDF"}
1
+ {"version":3,"file":"use-nosto-recommendation.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-nosto-recommendation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAc/C,oBAAY,wBAAwB;IAClC,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;IACnC,qBAAqB,0BAA0B;IAC/C,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;CACpC;AA6CD,eAAO,MAAM,qBAAqB,WAAW,CAAA;AAM7C,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,MAAM,GAAG,IAgBlD,CAAA;AAiBD,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAA;AAsVhE,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,MAAM,EACf,MAAM,SAAK,EACX,OAAO,SAAO,EACd,mBAAmB,CAAC,EAAE,wBAAwB,GAAG,EAAE,EACnD,UAAU,CAAC,EAAE,MAAM,EAAE,EACrB,IAAI,CAAC,EAAE,OAAO,EACd,YAAY,CAAC,EAAE,OAAO,EACtB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,OAAO,CAAC,EAAE;IACR,SAAS,EAAE,MAAM,CAAA;IACjB,yBAAyB,EAAE,MAAM,CAAA;CAClC;;;;;;EAyDF"}
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  import { useState, useEffect, useMemo } from "react";
12
12
  import { useProducts } from "./use-products";
13
- import { bestSellersRecommendationsQuery, categoryPageRecommendationsQuery, getFrontPageRecommendationsQuery, getProductPageRecommendationsQuery, getRelatedProductsRecommendationsQuery, newSessionQuery, } from "./use-nosto-recommendation.queries";
13
+ import { bestSellersRecommendationsQuery, categoryPageRecommendationsQuery, getFrontPageRecommendationsQuery, getProductPageRecommendationsQuery, getRelatedProductsRecommendationsQuery, } from "./use-nosto-recommendation.queries";
14
14
  export var NostoRecommendationsType;
15
15
  (function (NostoRecommendationsType) {
16
16
  NostoRecommendationsType["BOUGHT_TOGETHER"] = "BOUGHT_TOGETHER";
@@ -40,35 +40,75 @@ const fetchNosto = (nostoKey, graphqlBody, mode) => __awaiter(void 0, void 0, vo
40
40
  const getProductIdsFromPageResponse = (pageResponse) => {
41
41
  return ((pageResponse === null || pageResponse === void 0 ? void 0 : pageResponse.flatMap((page) => page.primary).filter((item) => item && item.productId).map((item) => item.productId)) || []);
42
42
  };
43
- const resolveSessionId = (nostoKey, optionalSessionId) => __awaiter(void 0, void 0, void 0, function* () {
43
+ // The Nosto ev1 customer id cookie, minted by the WebView Nosto JS SDK.
44
+ // Exported as the single source of truth so app-side consumers read the exact
45
+ // same cookie with the exact same parsing semantics (TICKET-5763).
46
+ export const NOSTO_CID_COOKIE_NAME = "2c.cId";
47
+ // SSR-safe cookie reader. Returns null when `document` is unavailable, the
48
+ // cookie is absent, or its value is malformed (decodeURIComponent throws) —
49
+ // never the raw value, so a corrupt cookie routes into the designed no-cID
50
+ // fallbacks instead of minting a bogus server-side identity.
51
+ export const readCookie = (name) => {
52
+ if (typeof document === "undefined") {
53
+ return null;
54
+ }
55
+ const escapedName = name.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
56
+ const match = document.cookie.match(new RegExp(`(?:^|; )${escapedName}=([^;]*)`));
57
+ if (!match) {
58
+ return null;
59
+ }
60
+ try {
61
+ return decodeURIComponent(match[1]);
62
+ }
63
+ catch (_a) {
64
+ return null;
65
+ }
66
+ };
67
+ // Reads the Nosto ev1 customer id (2c.cId) minted by the WebView Nosto JS SDK.
68
+ const readCidCookie = () => readCookie(NOSTO_CID_COOKIE_NAME);
69
+ // Single source of truth for the Nosto session/customer id: the passed-in
70
+ // session (from native storage), else the ev1 `2c.cId` cookie, else null.
71
+ // Never mints a new session — that would split customer identity (TICKET-5763).
72
+ const resolveSessionId = (optionalSessionId) => {
73
+ return optionalSessionId || readCidCookie() || null;
74
+ };
75
+ const resolvePersonalization = (optionalSessionId) => {
44
76
  if (optionalSessionId) {
45
- return optionalSessionId;
77
+ return "session";
46
78
  }
47
- else {
48
- const sessionData = yield fetchNosto(nostoKey, newSessionQuery);
49
- return sessionData.data.newSession;
79
+ if (readCidCookie()) {
80
+ return "cookie";
50
81
  }
51
- });
82
+ return "none";
83
+ };
52
84
  const fetchFrontPageRecommendations = (nostoKey, slotId, optionalSessionId) => __awaiter(void 0, void 0, void 0, function* () {
53
85
  var _a, _b, _c;
54
- // Fetch sessionId
55
- const sessionId = yield resolveSessionId(nostoKey, optionalSessionId);
86
+ const sessionId = resolveSessionId(optionalSessionId);
87
+ // No cID available yet: skip the session-based query so the caller's
88
+ // non-personalized fallback (bestSellers) engages.
89
+ if (!sessionId) {
90
+ return [];
91
+ }
56
92
  // Main recommendation query
57
93
  const body = getFrontPageRecommendationsQuery(sessionId, slotId);
58
94
  const response = yield fetchNosto(nostoKey, body, "cors");
59
95
  return getProductIdsFromPageResponse((_c = (_b = (_a = response.data) === null || _a === void 0 ? void 0 : _a.updateSession) === null || _b === void 0 ? void 0 : _b.pages) === null || _c === void 0 ? void 0 : _c.forFrontPage);
60
96
  });
61
- const fetchProductPageRecommendations = (nostoKey, productId, slotId, optionalSessionId) => __awaiter(void 0, void 0, void 0, function* () {
97
+ const fetchProductPageRecommendations = (nostoKey, productId, slotId, resolvedSessionId) => __awaiter(void 0, void 0, void 0, function* () {
62
98
  var _d, _e, _f;
63
- const sessionId = yield resolveSessionId(nostoKey, optionalSessionId);
64
- const body = getProductPageRecommendationsQuery(sessionId, productId, slotId);
99
+ if (!resolvedSessionId) {
100
+ return [];
101
+ }
102
+ const body = getProductPageRecommendationsQuery(resolvedSessionId, productId, slotId);
65
103
  const response = yield fetchNosto(nostoKey, body, "cors");
66
104
  return getProductIdsFromPageResponse((_f = (_e = (_d = response.data) === null || _d === void 0 ? void 0 : _d.updateSession) === null || _e === void 0 ? void 0 : _e.pages) === null || _f === void 0 ? void 0 : _f.forProductPage);
67
105
  });
68
- const fetchCategoryPageRecommendations = (nostoKey, sourceCollectionTitle, optionalSessionId) => __awaiter(void 0, void 0, void 0, function* () {
106
+ const fetchCategoryPageRecommendations = (nostoKey, sourceCollectionTitle, resolvedSessionId) => __awaiter(void 0, void 0, void 0, function* () {
69
107
  var _g, _h, _j;
70
- const sessionId = yield resolveSessionId(nostoKey, optionalSessionId);
71
- const body = categoryPageRecommendationsQuery(sessionId, sourceCollectionTitle);
108
+ if (!resolvedSessionId) {
109
+ return [];
110
+ }
111
+ const body = categoryPageRecommendationsQuery(resolvedSessionId, sourceCollectionTitle);
72
112
  const response = yield fetchNosto(nostoKey, body, "cors");
73
113
  return getProductIdsFromPageResponse((_j = (_h = (_g = response.data) === null || _g === void 0 ? void 0 : _g.updateSession) === null || _h === void 0 ? void 0 : _h.pages) === null || _j === void 0 ? void 0 : _j.forCategoryPage);
74
114
  });
@@ -86,10 +126,15 @@ const fetchRelatedProductsRecommendations = (nostoKey, recommendationsType, prod
86
126
  const recommendedProductIds = ((_s = (_r = (_q = (_p = response === null || response === void 0 ? void 0 : response.data) === null || _p === void 0 ? void 0 : _p.recos) === null || _q === void 0 ? void 0 : _q.related) === null || _r === void 0 ? void 0 : _r.primary) === null || _s === void 0 ? void 0 : _s.map((item) => item.productId)) || [];
87
127
  return recommendedProductIds;
88
128
  });
89
- const fetchPDPFallbackRecommendations = (nostoKey, productId, recommendationsType = NostoRecommendationsType.BOUGHT_TOGETHER, sessionId) => __awaiter(void 0, void 0, void 0, function* () {
129
+ const fetchPDPFallbackRecommendations = (nostoKey, productId, recommendationsType = NostoRecommendationsType.BOUGHT_TOGETHER, resolvedSessionId) => __awaiter(void 0, void 0, void 0, function* () {
90
130
  switch (recommendationsType) {
91
131
  case NostoRecommendationsType.VIEWED_CATEGORY:
92
- return fetchCategoryPageRecommendations(nostoKey, productId, sessionId);
132
+ // Category recos require a session; without a cID serve bestSellers
133
+ // rather than returning nothing.
134
+ if (!resolvedSessionId) {
135
+ return fetchBestSellersRecommendations(nostoKey);
136
+ }
137
+ return fetchCategoryPageRecommendations(nostoKey, productId, resolvedSessionId);
93
138
  case NostoRecommendationsType.BEST_SELLERS:
94
139
  return fetchBestSellersRecommendations(nostoKey);
95
140
  default:
@@ -115,20 +160,24 @@ const fetchHomeRecommendations = (nostoKey, slotId, sessionId) => __awaiter(void
115
160
  return productIdRecommendations;
116
161
  });
117
162
  const fetchPDPRecommendations = (nostoKey, productId, slotId, recommendationsType = NostoRecommendationsType.BOUGHT_TOGETHER, sessionId) => __awaiter(void 0, void 0, void 0, function* () {
163
+ // Resolve the session/cID once for the whole PDP fetch and thread it through
164
+ // both helpers, so a single cookie parse serves the product-page query and
165
+ // its category/bestSellers fallback.
166
+ const resolvedSessionId = resolveSessionId(sessionId);
118
167
  let productIdRecommendations = [];
119
168
  if (slotId) {
120
169
  try {
121
- productIdRecommendations = yield fetchProductPageRecommendations(nostoKey, productId, slotId, sessionId);
170
+ productIdRecommendations = yield fetchProductPageRecommendations(nostoKey, productId, slotId, resolvedSessionId);
122
171
  if (productIdRecommendations.length === 0) {
123
- productIdRecommendations = yield fetchPDPFallbackRecommendations(nostoKey, productId, recommendationsType, sessionId);
172
+ productIdRecommendations = yield fetchPDPFallbackRecommendations(nostoKey, productId, recommendationsType, resolvedSessionId);
124
173
  }
125
174
  }
126
175
  catch (error) {
127
- productIdRecommendations = yield fetchPDPFallbackRecommendations(nostoKey, productId, recommendationsType, sessionId);
176
+ productIdRecommendations = yield fetchPDPFallbackRecommendations(nostoKey, productId, recommendationsType, resolvedSessionId);
128
177
  }
129
178
  }
130
179
  else {
131
- productIdRecommendations = yield fetchPDPFallbackRecommendations(nostoKey, productId, recommendationsType, sessionId);
180
+ productIdRecommendations = yield fetchPDPFallbackRecommendations(nostoKey, productId, recommendationsType, resolvedSessionId);
132
181
  }
133
182
  return productIdRecommendations;
134
183
  });
@@ -148,7 +197,38 @@ function useNostoRecommendationsProductIds(nostoKey, slotId = "", recommendation
148
197
  const [recommendedProductIds, setRecommendedProductIds] = useState([]);
149
198
  const [isLoading, setIsLoading] = useState(true);
150
199
  const [error, setError] = useState(null);
200
+ const [personalization, setPersonalization] = useState("none");
201
+ // When there's no native session, identity comes from the ev1 `2c.cId`
202
+ // cookie — but the WebView Nosto SDK mints it asynchronously (the SSR
203
+ // initializer explicitly polls for it). Track it in state and bounded-poll
204
+ // for a late cookie so a carousel mounted before the cookie exists upgrades
205
+ // from the bestSellers fallback to personalized results once it appears,
206
+ // instead of settling on `personalization: "none"` for the mount's lifetime.
207
+ // This value is purely a re-render trigger: personalization and the fetch
208
+ // helpers each re-read the cookie themselves, preserving source labeling.
209
+ const [cookieCid, setCookieCid] = useState(() => readCidCookie());
210
+ useEffect(() => {
211
+ // A native session is authoritative and a cookie already present needs no
212
+ // watching; only poll while we have no identity yet.
213
+ if (sessionId || cookieCid)
214
+ return;
215
+ // Mirror the SSR initializer's window: 250ms cadence, 60s hard stop.
216
+ let elapsed = 0;
217
+ const interval = setInterval(() => {
218
+ elapsed += 250;
219
+ const cId = readCidCookie();
220
+ if (cId) {
221
+ setCookieCid(cId);
222
+ clearInterval(interval);
223
+ }
224
+ else if (elapsed >= 60000) {
225
+ clearInterval(interval);
226
+ }
227
+ }, 250);
228
+ return () => clearInterval(interval);
229
+ }, [sessionId, cookieCid]);
151
230
  useEffect(() => {
231
+ setPersonalization(resolvePersonalization(sessionId));
152
232
  function fetchNostoData() {
153
233
  return __awaiter(this, void 0, void 0, function* () {
154
234
  try {
@@ -170,11 +250,23 @@ function useNostoRecommendationsProductIds(nostoKey, slotId = "", recommendation
170
250
  });
171
251
  }
172
252
  fetchNostoData();
173
- }, [nostoKey, slotId, recommendationsType, productIds, skip, sessionId]);
253
+ // `cookieCid` is a late-cookie refetch trigger; `sessionId` still drives
254
+ // personalization + resolution so the identity source stays correctly
255
+ // labeled (a cookie-sourced id must not read as "session").
256
+ }, [
257
+ nostoKey,
258
+ slotId,
259
+ recommendationsType,
260
+ productIds,
261
+ skip,
262
+ sessionId,
263
+ cookieCid,
264
+ ]);
174
265
  return {
175
266
  recommendedProductIds,
176
267
  isLoading,
177
268
  error,
269
+ personalization,
178
270
  };
179
271
  }
180
272
  export function useNostoRecommendations(integrations, baseURL, slotId = "", country = "US", recommendationsType, productIds, skip, mockFallback, mockFallbackAppId, session) {
@@ -189,7 +281,7 @@ export function useNostoRecommendations(integrations, baseURL, slotId = "", coun
189
281
  Date.now() - NOSTO_SESSION_EXPIRATION_TIME) {
190
282
  sessionId = session.sessionId;
191
283
  }
192
- const { recommendedProductIds, isLoading, error } = useNostoRecommendationsProductIds(nostoKey, slotId, recommendationsType, productIds, skip, sessionId);
284
+ const { recommendedProductIds, isLoading, error, personalization } = useNostoRecommendationsProductIds(nostoKey, slotId, recommendationsType, productIds, skip, sessionId);
193
285
  const shouldMock = useMemo(() => recommendedProductIds.length === 0 && !isLoading && mockFallback, [recommendedProductIds, isLoading, mockFallback]);
194
286
  const appId = shouldMock ? mockFallbackAppId : undefined;
195
287
  const { products, error: productsError, isLoading: productsLoading, } = useProducts({
@@ -207,5 +299,6 @@ export function useNostoRecommendations(integrations, baseURL, slotId = "", coun
207
299
  isLoading: isLoading || productsLoading,
208
300
  error: error || productsError,
209
301
  isEmpty: products.length === 0,
302
+ personalization,
210
303
  };
211
304
  }
@@ -43,6 +43,5 @@ export declare const getProductPageRecommendationsQuery: (sessionId: string, pro
43
43
  export declare const categoryPageRecommendationsQuery: (sessionId: string, sourceCollectionTitle: string) => string;
44
44
  export declare const bestSellersRecommendationsQuery: string;
45
45
  export declare const getRelatedProductsRecommendationsQuery: (recommendationsType: NostoRecommendationsType, productIds: string[]) => string;
46
- export declare const newSessionQuery: string;
47
46
  export {};
48
47
  //# sourceMappingURL=use-nosto-recommendation.queries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-nosto-recommendation.queries.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-nosto-recommendation.queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAErE,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,IAAI;IACzC,IAAI,CAAC,EAAE;QACL,aAAa,CAAC,EAAE;YACd,KAAK,CAAC,EAAE;iBACL,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;oBACd,OAAO,EAAE,KAAK,CAAC;wBAAE,SAAS,EAAE,MAAM,CAAA;qBAAE,CAAC,CAAA;iBACtC,CAAC;aACH,CAAA;SACF,CAAA;KACF,CAAA;CACF,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC,cAAc,CAAC,CAAA;AACtE,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,CAAA;AAC1E,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;AAE5E,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE;YACN,OAAO,CAAC,EAAE;gBACR,OAAO,EAAE,KAAK,CAAC;oBAAE,IAAI,EAAE,MAAM,CAAC;oBAAC,SAAS,EAAE,MAAM,CAAA;iBAAE,CAAC,CAAA;aACpD,CAAA;SACF,CAAA;KACF,CAAA;CACF,CAAA;AACD,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE;YACN,OAAO,CAAC,EAAE;gBACR,OAAO,EAAE,KAAK,CAAC;oBAAE,SAAS,EAAE,MAAM,CAAA;iBAAE,CAAC,CAAA;aACtC,CAAA;SACF,CAAA;KACF,CAAA;CACF,CAAA;AAED,eAAO,MAAM,gCAAgC,cAChC,MAAM,WACR,MAAM,WAkCb,CAAA;AAEJ,eAAO,MAAM,kCAAkC,cAClC,MAAM,aACN,MAAM,WACR,MAAM,WAsCb,CAAA;AAEJ,eAAO,MAAM,gCAAgC,cAChC,MAAM,yBACM,MAAM,WAsC3B,CAAA;AAEJ,eAAO,MAAM,+BAA+B,QAe1C,CAAA;AAEF,eAAO,MAAM,sCAAsC,wBAC5B,wBAAwB,cACjC,MAAM,EAAE,WAsBlB,CAAA;AAEJ,eAAO,MAAM,eAAe,QAE1B,CAAA"}
1
+ {"version":3,"file":"use-nosto-recommendation.queries.d.ts","sourceRoot":"","sources":["../../../components/hooks/use-nosto-recommendation.queries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAErE,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,IAAI;IACzC,IAAI,CAAC,EAAE;QACL,aAAa,CAAC,EAAE;YACd,KAAK,CAAC,EAAE;iBACL,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;oBACd,OAAO,EAAE,KAAK,CAAC;wBAAE,SAAS,EAAE,MAAM,CAAA;qBAAE,CAAC,CAAA;iBACtC,CAAC;aACH,CAAA;SACF,CAAA;KACF,CAAA;CACF,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC,cAAc,CAAC,CAAA;AACtE,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,CAAA;AAC1E,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;AAE5E,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE;YACN,OAAO,CAAC,EAAE;gBACR,OAAO,EAAE,KAAK,CAAC;oBAAE,IAAI,EAAE,MAAM,CAAC;oBAAC,SAAS,EAAE,MAAM,CAAA;iBAAE,CAAC,CAAA;aACpD,CAAA;SACF,CAAA;KACF,CAAA;CACF,CAAA;AACD,MAAM,MAAM,4BAA4B,GAAG;IACzC,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE;YACN,OAAO,CAAC,EAAE;gBACR,OAAO,EAAE,KAAK,CAAC;oBAAE,SAAS,EAAE,MAAM,CAAA;iBAAE,CAAC,CAAA;aACtC,CAAA;SACF,CAAA;KACF,CAAA;CACF,CAAA;AAED,eAAO,MAAM,gCAAgC,cAChC,MAAM,WACR,MAAM,WAkCb,CAAA;AAEJ,eAAO,MAAM,kCAAkC,cAClC,MAAM,aACN,MAAM,WACR,MAAM,WAsCb,CAAA;AAEJ,eAAO,MAAM,gCAAgC,cAChC,MAAM,yBACM,MAAM,WAsC3B,CAAA;AAEJ,eAAO,MAAM,+BAA+B,QAe1C,CAAA;AAEF,eAAO,MAAM,sCAAsC,wBAC5B,wBAAwB,cACjC,MAAM,EAAE,WAsBlB,CAAA"}
@@ -138,6 +138,3 @@ export const getRelatedProductsRecommendationsQuery = (recommendationsType, prod
138
138
  productIds: productIds,
139
139
  },
140
140
  });
141
- export const newSessionQuery = JSON.stringify({
142
- query: `mutation { newSession }`,
143
- });