@faststore/api 4.8.1-dev.2 → 4.9.0-dev.0

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/es/index.mjs CHANGED
@@ -42,7 +42,7 @@ const et = () => function(n = {}) {
42
42
  return n;
43
43
  }
44
44
  })
45
- }, it = "cacheControl", ro = (e, n) => {
45
+ }, it = "cacheControl", io = (e, n) => {
46
46
  const {
47
47
  scope: t = "private",
48
48
  sMaxAge: r = 0,
@@ -80,7 +80,7 @@ const et = () => function(n = {}) {
80
80
  resolvers: n
81
81
  })
82
82
  );
83
- }, cn = "@faststore/api", ln = "4.8.1-dev.1", Ee = {
83
+ }, cn = "@faststore/api", ln = "4.8.1-dev.3", Ee = {
84
84
  name: cn,
85
85
  version: ln
86
86
  }, ct = qn("@faststore/api"), lt = (e, n = "Unknown Graphql Resolver") => (t, r, i, a) => {
@@ -121,7 +121,7 @@ class Z extends Error {
121
121
  super(t), this.extensions = n, this.name = "FastStoreError";
122
122
  }
123
123
  }
124
- class E extends Z {
124
+ class k extends Z {
125
125
  constructor(n) {
126
126
  super({ status: 400, type: "BadRequestError" }, n);
127
127
  }
@@ -141,7 +141,7 @@ class $ extends Z {
141
141
  super({ status: 404, type: "NotFoundError" }, n);
142
142
  }
143
143
  }
144
- const io = (e) => e?.name === "FastStoreError", ao = (e) => e?.extensions?.type === "BadRequestError", oo = (e) => e?.extensions?.type === "UnauthorizedError", dt = (e) => e?.extensions?.type === "ForbiddenError", Y = (e) => e?.extensions?.type === "NotFoundError", ut = `${Ee.name}@${Ee.version}`, y = async (e, n, t) => {
144
+ const ao = (e) => e?.name === "FastStoreError", oo = (e) => e?.extensions?.type === "BadRequestError", so = (e) => e?.extensions?.type === "UnauthorizedError", dt = (e) => e?.extensions?.type === "ForbiddenError", Y = (e) => e?.extensions?.type === "NotFoundError", ut = `${Ee.name}@${Ee.version}`, y = async (e, n, t) => {
145
145
  const r = await jn(e, {
146
146
  ...n,
147
147
  headers: {
@@ -156,7 +156,7 @@ const io = (e) => e?.name === "FastStoreError", ao = (e) => e?.extensions?.type
156
156
  if (typeof r?.status == "number")
157
157
  switch (r.status) {
158
158
  case 400:
159
- throw new E(i);
159
+ throw new k(i);
160
160
  case 401:
161
161
  throw new ie(i);
162
162
  case 403:
@@ -440,7 +440,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
440
440
  })),
441
441
  selectedAddresses: S,
442
442
  clearAddressIfPostalCodeNotFound: t
443
- }, k = s({
443
+ }, E = s({
444
444
  "content-type": "application/json",
445
445
  "X-FORWARDED-HOST": g
446
446
  });
@@ -448,7 +448,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
448
448
  `${a}/api/checkout/pub/orderForm/${l}/attachments/shippingData`,
449
449
  {
450
450
  ...H,
451
- headers: k,
451
+ headers: E,
452
452
  body: JSON.stringify(C)
453
453
  },
454
454
  { storeCookies: o }
@@ -501,7 +501,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
501
501
  "X-FORWARDED-HOST": g
502
502
  }), C = new URLSearchParams();
503
503
  (!S || !l) && C.set("sc", O), l && C.set("refreshOutdatedData", p.toString());
504
- const k = l ? `/${l}` : "", I = `${a}/api/checkout/pub/orderForm${k}?${C}`;
504
+ const E = l ? `/${l}` : "", I = `${a}/api/checkout/pub/orderForm${E}?${C}`;
505
505
  return y(
506
506
  I,
507
507
  {
@@ -741,7 +741,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
741
741
  text: O,
742
742
  clientEmail: w,
743
743
  perPage: C,
744
- pendingMyApproval: k
744
+ pendingMyApproval: E
745
745
  }) => {
746
746
  const I = new URLSearchParams();
747
747
  if (m) {
@@ -765,7 +765,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
765
765
  O && I.append("text", O), p && p.length > 0 && I.append("status", p.filter(Boolean).join(",")), m && S ? I.append(
766
766
  "creation_date",
767
767
  `creationDate:[${m} TO ${S}]`
768
- ) : m ? I.append("creation_date", `creationDate:[${m} TO *]`) : S && I.append("creation_date", `creationDate:[* TO ${S}]`), w && I.append("clientEmail", w), l && I.append("page", l.toString()), C && I.append("per_page", C.toString()), k && I.append("my_pending_approvals", String(!0));
768
+ ) : m ? I.append("creation_date", `creationDate:[${m} TO *]`) : S && I.append("creation_date", `creationDate:[* TO ${S}]`), w && I.append("clientEmail", w), l && I.append("page", l.toString()), C && I.append("per_page", C.toString()), E && I.append("my_pending_approvals", String(!0));
769
769
  const D = s({
770
770
  "content-type": "application/json",
771
771
  "X-FORWARDED-HOST": g
@@ -804,7 +804,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
804
804
  const O = s({
805
805
  "content-type": "application/json",
806
806
  "X-FORWARDED-HOST": g
807
- }), k = {
807
+ }), E = {
808
808
  params: {
809
809
  ruleId: m,
810
810
  dimensionId: p,
@@ -816,7 +816,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
816
816
  {
817
817
  method: "POST",
818
818
  headers: O,
819
- body: JSON.stringify(k)
819
+ body: JSON.stringify(E)
820
820
  },
821
821
  { storeCookies: o }
822
822
  );
@@ -966,7 +966,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
966
966
  contractId: l
967
967
  }) => {
968
968
  if (!l)
969
- throw new E("Missing contractId to fetch CL fields.");
969
+ throw new k("Missing contractId to fetch CL fields.");
970
970
  const p = v({
971
971
  Accept: "application/json",
972
972
  "content-type": "application/json"
@@ -984,7 +984,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
984
984
  userId: l
985
985
  }) => {
986
986
  if (!l)
987
- throw new E("Missing userId to fetch shopper name.");
987
+ throw new k("Missing userId to fetch shopper name.");
988
988
  const p = c({
989
989
  Accept: "application/json",
990
990
  "content-type": "application/json",
@@ -1044,10 +1044,10 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
1044
1044
  "content-type": "application/json",
1045
1045
  "X-FORWARDED-HOST": g
1046
1046
  }), O = `----FastStoreUploadBoundary${Date.now()}`, w = `\r
1047
- `, k = /^[a-zA-Z0-9][a-zA-Z0-9!#$&\-.^_]*\/[a-zA-Z0-9][a-zA-Z0-9!#$&\-.^_+]*$/.test(m) ? m : "application/octet-stream", I = p.replaceAll(/[\r\n"]/g, "_"), D = [
1047
+ `, E = /^[a-zA-Z0-9][a-zA-Z0-9!#$&\-.^_]*\/[a-zA-Z0-9][a-zA-Z0-9!#$&\-.^_+]*$/.test(m) ? m : "application/octet-stream", I = p.replaceAll(/[\r\n"]/g, "_"), D = [
1048
1048
  `--${O}`,
1049
1049
  `Content-Disposition: form-data; name="file"; filename="${I}"`,
1050
- `Content-Type: ${k}`,
1050
+ `Content-Type: ${E}`,
1051
1051
  "",
1052
1052
  ""
1053
1053
  ].join(w), A = `${w}--${O}--${w}`, _ = Buffer.from(D), P = Buffer.from(A), R = new Uint8Array(
@@ -1806,7 +1806,7 @@ const ge = (e) => e.toLowerCase(), re = (e, n) => {
1806
1806
  (t) => fr(t.key)
1807
1807
  );
1808
1808
  if (Array.isArray(n) && n.length > 1)
1809
- throw new E(
1809
+ throw new k(
1810
1810
  `You passed ${n.length} cross selling facets but only one is allowed. Please leave one of the following facet: ${n.map((t) => t.key).join(",")}`
1811
1811
  );
1812
1812
  return n?.[0] ?? null;
@@ -1849,7 +1849,7 @@ const ge = (e) => e.toLowerCase(), re = (e, n) => {
1849
1849
  quantity: ({ quantity: e }) => e
1850
1850
  }, wr = async (e, { data: n }, { clients: { commerce: t } }) => {
1851
1851
  if (!n?.orderId)
1852
- throw new E("Missing orderId");
1852
+ throw new k("Missing orderId");
1853
1853
  return { data: (await t.checkout.cancelOrder(n))?.data };
1854
1854
  };
1855
1855
  function In(e) {
@@ -1883,7 +1883,7 @@ const Ar = async (e, { data: n }, { clients: { commerce: t } }) => {
1883
1883
  };
1884
1884
  }, Pr = async (e, { data: n }, { clients: { commerce: t } }) => {
1885
1885
  if (!n?.objectKey)
1886
- throw new E("Missing objectKey");
1886
+ throw new k("Missing objectKey");
1887
1887
  const r = n.orderFormId || (await t.orderEntry.createOrderForm()).orderFormId;
1888
1888
  return t.orderEntry.startOperation({
1889
1889
  objectKey: n.objectKey,
@@ -1899,16 +1899,16 @@ const Ar = async (e, { data: n }, { clients: { commerce: t } }) => {
1899
1899
  }, kr = async (e, { data: n }, { clients: { commerce: t } }) => ({ id: (await t.subscribeToNewsletter(n))?.Id }), Er = async (e, { data: n }, { clients: { commerce: t } }) => {
1900
1900
  const { fileContent: r, fileName: i, mimeType: a } = n;
1901
1901
  if (!r || !i || !a)
1902
- throw new E(
1902
+ throw new k(
1903
1903
  "Missing required fields: fileContent, fileName, mimeType"
1904
1904
  );
1905
1905
  const o = r.replaceAll(/\s/g, ""), s = 5 * 1024 * 1024;
1906
1906
  if (Math.floor(o.length * 3 / 4) > s)
1907
- throw new E("File exceeds maximum allowed size of 5MB");
1907
+ throw new k("File exceeds maximum allowed size of 5MB");
1908
1908
  if (!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(
1909
1909
  o
1910
1910
  ))
1911
- throw new E("Invalid Base64 fileContent");
1911
+ throw new k("Invalid Base64 fileContent");
1912
1912
  const d = Buffer.from(o, "base64");
1913
1913
  return await t.orderEntry.uploadFile({
1914
1914
  fileBuffer: d,
@@ -2221,7 +2221,7 @@ const We = (e) => {
2221
2221
  const m = Xe(
2222
2222
  r,
2223
2223
  d
2224
- ), S = je(v), O = je(d.items.map(le)), w = Array.from(O.entries()), C = Array.from(S.entries()), { itemsToAdd: k, itemsToUpdate: I } = C.reduce(
2224
+ ), S = je(v), O = je(d.items.map(le)), w = Array.from(O.entries()), C = Array.from(S.entries()), { itemsToAdd: E, itemsToUpdate: I } = C.reduce(
2225
2225
  (b, [N, Pe]) => {
2226
2226
  const _e = O.get(N);
2227
2227
  if (!_e)
@@ -2239,7 +2239,7 @@ const We = (e) => {
2239
2239
  itemsToAdd: [],
2240
2240
  itemsToUpdate: []
2241
2241
  }
2242
- ), D = w.filter(([b]) => !S.has(b)).flatMap(([, b]) => b.map((N) => ({ ...N, quantity: 0 }))), A = [...k, ...I, ...D].map(
2242
+ ), D = w.filter(([b]) => !S.has(b)).flatMap(([, b]) => b.map((N) => ({ ...N, quantity: 0 }))), A = [...E, ...I, ...D].map(
2243
2243
  Vr
2244
2244
  ), { updateShipping: _ } = t ? Cn(d, t) : { updateShipping: !1 };
2245
2245
  if (A.length === 0 && !_)
@@ -2440,7 +2440,7 @@ const si = async (e, { session: n, search: t }, { clients: r, headers: i, accoun
2440
2440
  r,
2441
2441
  i?.cookie,
2442
2442
  a
2443
- ), m = await r.commerce.session(f.toString()).catch(() => null), S = m?.namespaces.profile ?? null, O = m?.namespaces.shopper ?? null, w = m?.namespaces.store ?? null, C = m?.namespaces.authentication ?? null, k = m?.namespaces.checkout ?? null, I = m?.namespaces.public ?? null;
2443
+ ), m = await r.commerce.session(f.toString()).catch(() => null), S = m?.namespaces.profile ?? null, O = m?.namespaces.shopper ?? null, w = m?.namespaces.store ?? null, C = m?.namespaces.authentication ?? null, E = m?.namespaces.checkout ?? null, I = m?.namespaces.public ?? null;
2444
2444
  let D = null;
2445
2445
  if (v && S?.id?.value)
2446
2446
  try {
@@ -2470,7 +2470,7 @@ const si = async (e, { session: n, search: t }, { clients: r, headers: i, accoun
2470
2470
  channel: Gr(
2471
2471
  o,
2472
2472
  w?.channel?.value,
2473
- k?.regionId?.value,
2473
+ E?.regionId?.value,
2474
2474
  A
2475
2475
  ),
2476
2476
  /**
@@ -2809,12 +2809,12 @@ const bi = (e, n) => {
2809
2809
  clients: { commerce: a }
2810
2810
  } = i, { salesChannel: o } = i.storage.channel, s = n?.trim();
2811
2811
  if (!s || !Pi.test(s))
2812
- throw new E(`Invalid campaignVrn: "${n}"`);
2812
+ throw new k(`Invalid campaignVrn: "${n}"`);
2813
2813
  const c = t?.trim();
2814
2814
  if (t != null && !c)
2815
- throw new E("Invalid userId: must be a non-empty string");
2815
+ throw new k("Invalid userId: must be a non-empty string");
2816
2816
  if (r != null && (!Array.isArray(r) || r.some((h) => !h?.trim())))
2817
- throw new E(
2817
+ throw new k(
2818
2818
  "Invalid products: must be an array of non-empty strings"
2819
2819
  );
2820
2820
  const u = await a.recommendation.recommendations({
@@ -2841,13 +2841,20 @@ const bi = (e, n) => {
2841
2841
  release_desc: "release:desc",
2842
2842
  discount_desc: "discount:desc",
2843
2843
  score_desc: ""
2844
- }, ki = async (e, { operationId: n }, { clients: { commerce: t } }) => {
2844
+ };
2845
+ function ki(e, n) {
2846
+ let t;
2847
+ if (Object.hasOwn(n, e) ? t = n[e] : Object.hasOwn(Ze, e) && (t = Ze[e]), t === void 0)
2848
+ throw new k(`Unknown sort value: ${e}`);
2849
+ return t;
2850
+ }
2851
+ const Ei = async (e, { operationId: n }, { clients: { commerce: t } }) => {
2845
2852
  if (!n)
2846
- throw new E("Missing operationId");
2853
+ throw new k("Missing operationId");
2847
2854
  return t.orderEntry.getOperation({ operationId: n });
2848
- }, Ei = async (e, { orderFormId: n }, { clients: { commerce: t } }) => {
2855
+ }, Ti = async (e, { orderFormId: n }, { clients: { commerce: t } }) => {
2849
2856
  if (!n)
2850
- throw new E("Missing orderFormId");
2857
+ throw new k("Missing orderFormId");
2851
2858
  const { items: r } = await t.orderEntry.getOrderFormItems({ orderFormId: n });
2852
2859
  return (r ?? []).map((i) => ({
2853
2860
  id: i.id,
@@ -2861,19 +2868,19 @@ const bi = (e, n) => {
2861
2868
  unitMultiplier: i.unitMultiplier ?? 1
2862
2869
  }));
2863
2870
  };
2864
- async function Ti(e, n, t, r) {
2871
+ async function Ui(e, n, t, r) {
2865
2872
  const i = n.slice(0, n.lastIndexOf("-"));
2866
2873
  return (await oe(e, t, r))?.linkId === i;
2867
2874
  }
2868
- const Tn = "Invalid SkuId", Un = "Slug was set but the fetched sku does not satisfy the slug condition.", Ui = "UseAdHocCard", Ri = (e) => Y(e) || e instanceof Error && (e.message === Tn || e.message.startsWith(Un));
2869
- async function Fi(e, n, t, r) {
2875
+ const Tn = "Invalid SkuId", Un = "Slug was set but the fetched sku does not satisfy the slug condition.", Ri = "UseAdHocCard", Fi = (e) => Y(e) || e instanceof Error && (e.message === Tn || e.message.startsWith(Un));
2876
+ async function Ni(e, n, t, r) {
2870
2877
  const { linkText: i, productId: a } = n.isVariantOf;
2871
- if (!(!t || !i || t.startsWith(i) || q(e) && r && En(t.split("-").pop() ?? "") && await Ti(e, t, a, r)))
2878
+ if (!(!t || !i || t.startsWith(i) || q(e) && r && En(t.split("-").pop() ?? "") && await Ui(e, t, a, r)))
2872
2879
  throw new Error(`${Un} slug: ${t}, linkText: ${i}`);
2873
2880
  }
2874
- async function Ni(e, n) {
2881
+ async function Li(e, n) {
2875
2882
  if (n == null)
2876
- throw new E("Missing slug or id");
2883
+ throw new k("Missing slug or id");
2877
2884
  const {
2878
2885
  clients: { commerce: t, search: r }
2879
2886
  } = e, i = await t.catalog.portal.pagetype(`${n}/p`);
@@ -2887,7 +2894,7 @@ async function Ni(e, n) {
2887
2894
  throw new $(`No product found for id ${i.id}`);
2888
2895
  return F(de(a.items), a);
2889
2896
  }
2890
- const Li = {
2897
+ const Bi = {
2891
2898
  product: async (e, { locator: n }, t) => {
2892
2899
  const r = qe(n), i = xe(n), a = Ir(n), o = yr(n);
2893
2900
  r && ce(t, r), i && ve(t, i);
@@ -2899,11 +2906,11 @@ const Li = {
2899
2906
  if (!En(c))
2900
2907
  throw new Error(Tn);
2901
2908
  const u = await s.load(c);
2902
- return await Fi(t, u, o, i), u;
2909
+ return await Ni(t, u, o, i), u;
2903
2910
  } catch (c) {
2904
- if (!Ri(c))
2911
+ if (!Fi(c))
2905
2912
  throw c;
2906
- return Ni(t, o);
2913
+ return Li(t, o);
2907
2914
  }
2908
2915
  },
2909
2916
  collection: (e, { slug: n }, t) => {
@@ -2929,7 +2936,7 @@ const Li = {
2929
2936
  page: Math.ceil(g / n) || 0,
2930
2937
  count: n,
2931
2938
  query: i ?? void 0,
2932
- sort: Ze[r ?? "score_desc"] ?? Ze.score_desc,
2939
+ sort: ki(r ?? "score_desc", s.storage.customSortMap),
2933
2940
  selectedFacets: a?.flatMap(ze) ?? [],
2934
2941
  sponsoredCount: o ?? void 0
2935
2942
  };
@@ -3113,7 +3120,7 @@ const Li = {
3113
3120
  userOrder: async (e, { orderId: n }, t) => {
3114
3121
  try {
3115
3122
  if (!n)
3116
- throw new E("Missing orderId");
3123
+ throw new k("Missing orderId");
3117
3124
  const {
3118
3125
  clients: { commerce: r }
3119
3126
  } = t, i = await r.oms.userOrder({ orderId: n });
@@ -3212,7 +3219,7 @@ const Li = {
3212
3219
  } = t, s = V(L(i?.cookie ?? "", r))?.userId ?? "";
3213
3220
  if (!s)
3214
3221
  return !0;
3215
- const c = await a.licenseManager.isResourceGranted({ userId: s, resourceKey: Ui }).catch(() => null);
3222
+ const c = await a.licenseManager.isResourceGranted({ userId: s, resourceKey: Ri }).catch(() => null);
3216
3223
  return typeof c == "boolean" ? c : !0;
3217
3224
  },
3218
3225
  listUserQuotes: async (e, n, t) => {
@@ -3327,7 +3334,7 @@ const Li = {
3327
3334
  // Contract list from VTEX session `shopper.availableContracts`.
3328
3335
  availableContracts: async (e, { orgUnitId: n }, t) => {
3329
3336
  if (!n)
3330
- throw new E("Missing orgUnitId");
3337
+ throw new k("Missing orgUnitId");
3331
3338
  const {
3332
3339
  account: r,
3333
3340
  headers: i,
@@ -3364,10 +3371,10 @@ const Li = {
3364
3371
  geoCoordinates: n
3365
3372
  });
3366
3373
  },
3367
- orderEntryOperation: ki,
3368
- orderFormItems: Ei,
3374
+ orderEntryOperation: Ei,
3375
+ orderFormItems: Ti,
3369
3376
  recommendations: _i
3370
- }, Bi = {
3377
+ }, $i = {
3371
3378
  reviewRating: () => ({
3372
3379
  ratingValue: 5,
3373
3380
  bestRating: 5
@@ -3375,7 +3382,7 @@ const Li = {
3375
3382
  author: () => ({
3376
3383
  name: ""
3377
3384
  })
3378
- }, $i = (e, n, t) => n ? e.key === "category-1" : t ? e.key === "brand" : !1, Mi = {
3385
+ }, Mi = (e, n, t) => n ? e.key === "category-1" : t ? e.key === "brand" : !1, zi = {
3379
3386
  suggestions: async (e, n, t) => {
3380
3387
  const {
3381
3388
  clients: { search: r }
@@ -3426,7 +3433,7 @@ const Li = {
3426
3433
  t.storage.searchArgs = e;
3427
3434
  const { facets: i = [] } = await r.facets(e), a = !e.query, o = e.selectedFacets?.length ? e.selectedFacets[0].key === "category-1" : !1, s = e.selectedFacets?.length ? e.selectedFacets[0].key === "brand" : !1;
3428
3435
  return i.filter(
3429
- (u) => !a || !$i(u, o, s)
3436
+ (u) => !a || !Mi(u, o, s)
3430
3437
  );
3431
3438
  },
3432
3439
  metadata: async ({ productSearchPromise: e }) => {
@@ -3438,12 +3445,12 @@ const Li = {
3438
3445
  };
3439
3446
  },
3440
3447
  searchId: async ({ productSearchPromise: e }) => (await e).searchId
3441
- }, zi = {
3448
+ }, Vi = {
3442
3449
  title: ({ title: e }) => e ?? "",
3443
3450
  description: ({ description: e }) => e ?? "",
3444
3451
  canonical: ({ canonical: e }) => e ?? "",
3445
3452
  titleTemplate: () => ""
3446
- }, Vi = ["bd", "d", "h", "m"], xi = (e) => Vi.includes(e), qi = {
3453
+ }, xi = ["bd", "d", "h", "m"], qi = (e) => xi.includes(e), ji = {
3447
3454
  bd: {
3448
3455
  0: "Today",
3449
3456
  1: "In 1 business day",
@@ -3465,12 +3472,12 @@ const Li = {
3465
3472
  other: "Up to # minutes"
3466
3473
  }
3467
3474
  }, Rn = (e) => {
3468
- const [n, t] = [e.split(/\D+/)[0], e.split(/[0-9]+/)[1]], r = n !== "" && !Number.isNaN(Number(n)), i = xi(t);
3475
+ const [n, t] = [e.split(/\D+/)[0], e.split(/[0-9]+/)[1]], r = n !== "" && !Number.isNaN(Number(n)), i = qi(t);
3469
3476
  if (!r || !i)
3470
3477
  return "";
3471
3478
  const a = Number(n) < 2 ? Number(n) : "other";
3472
- return qi[t][a].replace("#", n) ?? "";
3473
- }, ji = {
3479
+ return ji[t][a].replace("#", n) ?? "";
3480
+ }, Wi = {
3474
3481
  carrier: (e) => e?.friendlyName ?? e?.name ?? "",
3475
3482
  price: (e) => e?.price ? e.price / 100 : e?.price,
3476
3483
  localizedEstimates: (e) => e?.shippingEstimate ? Rn(e.shippingEstimate) : ""
@@ -3486,7 +3493,7 @@ function nn(e, n) {
3486
3493
  );
3487
3494
  return i || e[0];
3488
3495
  }
3489
- function Wi(e, n, t) {
3496
+ function Hi(e, n, t) {
3490
3497
  const r = {};
3491
3498
  return e.forEach((i) => {
3492
3499
  const a = i.variations;
@@ -3504,24 +3511,24 @@ function tn(e) {
3504
3511
  n[t.name] = t.values[0];
3505
3512
  }), n;
3506
3513
  }
3507
- function Hi(e) {
3514
+ function Gi(e) {
3508
3515
  const n = {};
3509
3516
  return e?.forEach((t) => {
3510
3517
  n[t.field.originalName ?? t.field.name] = t.values.map((r) => r.originalName ?? r.name);
3511
3518
  }), n;
3512
3519
  }
3513
- function Gi(e, n) {
3520
+ function Xi(e, n) {
3514
3521
  return Number.isNaN(Number(e) - Number(n)) ? e < n ? -1 : e > n ? 1 : 0 : Number(e) - Number(n);
3515
3522
  }
3516
- function Xi(e) {
3523
+ function Yi(e) {
3517
3524
  const n = e;
3518
3525
  for (const t in e)
3519
3526
  e[t].every(
3520
3527
  (i) => !Number.isNaN(Number(i.value))
3521
- ) && e[t].sort((i, a) => Gi(i.value, a.value));
3528
+ ) && e[t].sort((i, a) => Xi(i.value, a.value));
3522
3529
  return n;
3523
3530
  }
3524
- function Yi(e, n, t) {
3531
+ function Ji(e, n, t) {
3525
3532
  const r = {}, i = /* @__PURE__ */ new Set();
3526
3533
  return e.forEach((a) => {
3527
3534
  if (a.variations.length === 0)
@@ -3562,38 +3569,38 @@ function Yi(e, n, t) {
3562
3569
  };
3563
3570
  r[c.name] ? r[c.name].push(g) : r[c.name] = [g];
3564
3571
  });
3565
- }), Xi(r);
3572
+ }), Yi(r);
3566
3573
  }
3567
- const Ji = {
3574
+ const Ki = {
3568
3575
  activeVariations: (e) => tn(e.variations),
3569
- allVariantsByName: (e) => Hi(e.isVariantOf.skuSpecifications),
3570
- slugsMap: (e, n) => Wi(
3576
+ allVariantsByName: (e) => Gi(e.isVariantOf.skuSpecifications),
3577
+ slugsMap: (e, n) => Hi(
3571
3578
  e.isVariantOf.items,
3572
3579
  n.dominantVariantName ?? e.variations[0]?.name,
3573
3580
  e.isVariantOf.linkText
3574
3581
  ),
3575
3582
  availableVariations: (e, n) => {
3576
3583
  const t = n.dominantVariantName ?? e.variations[0]?.name, i = tn(e.variations)[t];
3577
- return Yi(
3584
+ return Ji(
3578
3585
  e.isVariantOf.items,
3579
3586
  t,
3580
3587
  i
3581
3588
  );
3582
3589
  },
3583
3590
  allVariantProducts: (e) => e.isVariantOf.items.map((n) => F(n, e.isVariantOf))
3584
- }, Ki = {
3591
+ }, Qi = {
3585
3592
  "pickup-in-point": "Pickup",
3586
3593
  delivery: "Delivery",
3587
3594
  pickup: "Pickup",
3588
3595
  "take-away": "Take away",
3589
3596
  "": ""
3590
- }, Qi = {
3597
+ }, Zi = {
3591
3598
  deliveryOptionsData: (e) => {
3592
3599
  const { shippingData: n, items: t } = e, r = n?.logisticsInfo || [], i = n?.selectedAddresses || n?.availableAddresses || [n?.address], a = r.reduce(
3593
3600
  (u, d) => {
3594
- const g = d?.selectedSla || "", f = d?.selectedDeliveryChannel || d?.deliveryChannel || "", h = d?.deliveryCompany || "", v = d?.deliveryWindow, l = d?.pickupStoreInfo, p = d?.shippingEstimate || "", m = d?.shippingEstimate ? Rn(d?.shippingEstimate) : "", S = d?.shippingEstimateDate || "", O = d?.addressId || "", w = d?.itemIndex ?? 0, C = t?.[w], k = C?.seller || "", I = `${g}|${f}|${h}|${k}|${p}|${S}|${O}|${v?.startDateUtc}|${v?.endDateUtc}`, D = i?.find(
3601
+ const g = d?.selectedSla || "", f = d?.selectedDeliveryChannel || d?.deliveryChannel || "", h = d?.deliveryCompany || "", v = d?.deliveryWindow, l = d?.pickupStoreInfo, p = d?.shippingEstimate || "", m = d?.shippingEstimate ? Rn(d?.shippingEstimate) : "", S = d?.shippingEstimateDate || "", O = d?.addressId || "", w = d?.itemIndex ?? 0, C = t?.[w], E = C?.seller || "", I = `${g}|${f}|${h}|${E}|${p}|${S}|${O}|${v?.startDateUtc}|${v?.endDateUtc}`, D = i?.find(
3595
3602
  (b) => b?.addressId === O
3596
- ), A = `${Ki[f] || ""} ${m} ${D?.neighborhood ? `to ${D?.neighborhood}` : ""}`.trim(), { taxPriceTagsTotal: _, taxPriceTags: P } = Zi(
3603
+ ), A = `${Qi[f] || ""} ${m} ${D?.neighborhood ? `to ${D?.neighborhood}` : ""}`.trim(), { taxPriceTagsTotal: _, taxPriceTags: P } = ea(
3597
3604
  C?.priceTags ?? []
3598
3605
  ), R = (C?.sellingPrice ?? 0) * (C?.quantity ?? 0) + (C?.tax ?? 0) + (_ ?? 0);
3599
3606
  return u[I] || (u[I] = {
@@ -3604,7 +3611,7 @@ const Ji = {
3604
3611
  deliveryWindow: v,
3605
3612
  shippingEstimate: p,
3606
3613
  shippingEstimateDate: S,
3607
- seller: k,
3614
+ seller: E,
3608
3615
  friendlyShippingEstimate: m,
3609
3616
  friendlyDeliveryOptionName: A,
3610
3617
  address: D,
@@ -3651,7 +3658,7 @@ const Ji = {
3651
3658
  ) || [];
3652
3659
  }
3653
3660
  };
3654
- function Zi(e) {
3661
+ function ea(e) {
3655
3662
  const t = e.filter(
3656
3663
  (i) => i?.name?.includes("TAX")
3657
3664
  ), r = t.reduce(
@@ -3663,28 +3670,28 @@ function Zi(e) {
3663
3670
  taxPriceTagsTotal: r
3664
3671
  };
3665
3672
  }
3666
- const ea = {
3673
+ const na = {
3667
3674
  StoreCollection: Sn,
3668
3675
  StoreAggregateOffer: ur,
3669
3676
  StoreProduct: Ci,
3670
- StoreSeo: zi,
3677
+ StoreSeo: Vi,
3671
3678
  StoreFacet: vr,
3672
3679
  StoreFacetBoolean: Or,
3673
3680
  StoreFacetRange: br,
3674
3681
  StoreFacetValueBoolean: Cr,
3675
3682
  StoreOffer: pi,
3676
3683
  StoreAggregateRating: pr,
3677
- StoreReview: Bi,
3684
+ StoreReview: $i,
3678
3685
  StoreProductGroup: Di,
3679
- StoreSearchResult: Mi,
3686
+ StoreSearchResult: zi,
3680
3687
  StorePropertyValue: Ai,
3681
- SkuVariants: Ji,
3682
- ShippingSLA: ji,
3683
- UserOrderResult: Qi,
3688
+ SkuVariants: Ki,
3689
+ ShippingSLA: Wi,
3690
+ UserOrderResult: Zi,
3684
3691
  ObjectOrString: ui,
3685
- Query: Li,
3692
+ Query: Bi,
3686
3693
  Mutation: ci
3687
- }, na = () => ea, ta = `"""
3694
+ }, ta = () => na, ra = `"""
3688
3695
  Address information.
3689
3696
  """
3690
3697
  type Address {
@@ -3729,7 +3736,7 @@ type Address {
3729
3736
  """
3730
3737
  geoCoordinates: [Float]
3731
3738
  }
3732
- `, ra = `"""
3739
+ `, ia = `"""
3733
3740
  Advertisement information about a specific product in a campaign
3734
3741
  """
3735
3742
  type Advertisement {
@@ -3754,7 +3761,7 @@ type Advertisement {
3754
3761
  """
3755
3762
  adResponseId: String!
3756
3763
  }
3757
- `, ia = `"""
3764
+ `, aa = `"""
3758
3765
  Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers.
3759
3766
  """
3760
3767
  type StoreAggregateOffer {
@@ -3783,7 +3790,7 @@ type StoreAggregateOffer {
3783
3790
  """
3784
3791
  offers: [StoreOffer!]!
3785
3792
  }
3786
- `, aa = `"""
3793
+ `, oa = `"""
3787
3794
  Average rating, based on multiple ratings or reviews.
3788
3795
  """
3789
3796
  type StoreAggregateRating {
@@ -3796,7 +3803,7 @@ type StoreAggregateRating {
3796
3803
  """
3797
3804
  reviewCount: Int!
3798
3805
  }
3799
- `, oa = `"""
3806
+ `, sa = `"""
3800
3807
  information about the author of a product review or rating.
3801
3808
  """
3802
3809
  type StoreAuthor {
@@ -3805,7 +3812,7 @@ type StoreAuthor {
3805
3812
  """
3806
3813
  name: String!
3807
3814
  }
3808
- `, sa = `"""
3815
+ `, ca = `"""
3809
3816
  Brand of a given product.
3810
3817
  """
3811
3818
  type StoreBrand {
@@ -3814,7 +3821,7 @@ type StoreBrand {
3814
3821
  """
3815
3822
  name: String!
3816
3823
  }
3817
- `, ca = `"""
3824
+ `, la = `"""
3818
3825
  Item of a list.
3819
3826
  """
3820
3827
  type StoreListItem {
@@ -3845,7 +3852,7 @@ type StoreBreadcrumbList {
3845
3852
  """
3846
3853
  numberOfItems: Int!
3847
3854
  }
3848
- `, la = `"""
3855
+ `, da = `"""
3849
3856
  Shopping cart message.
3850
3857
  """
3851
3858
  type StoreCartMessage {
@@ -3882,7 +3889,7 @@ input IStoreCart {
3882
3889
  """
3883
3890
  order: IStoreOrder!
3884
3891
  }
3885
- `, da = `"""
3892
+ `, ua = `"""
3886
3893
  Product collection type. Possible values are \`Department\`, \`Category\`, \`Brand\` or \`Collection\`.
3887
3894
 
3888
3895
  \`SubCategory\` and \`Cluster\` are still declared for backward compatibility but are
@@ -4008,7 +4015,7 @@ type StoreCollectionLocale {
4008
4015
  """
4009
4016
  slug: String!
4010
4017
  }
4011
- `, ua = `"""
4018
+ `, pa = `"""
4012
4019
  Delivery Promise badge.
4013
4020
  """
4014
4021
  type DeliveryPromiseBadge {
@@ -4017,7 +4024,7 @@ type DeliveryPromiseBadge {
4017
4024
  """
4018
4025
  typeName: String
4019
4026
  }
4020
- `, pa = `union StoreFacet = StoreFacetRange | StoreFacetBoolean
4027
+ `, ga = `union StoreFacet = StoreFacetRange | StoreFacetBoolean
4021
4028
 
4022
4029
  """
4023
4030
  Search facet range information.
@@ -4094,7 +4101,7 @@ type StoreFacetValueBoolean {
4094
4101
  """
4095
4102
  quantity: Int
4096
4103
  }
4097
- `, ga = `"""
4104
+ `, ma = `"""
4098
4105
  Image.
4099
4106
  """
4100
4107
  type StoreImage {
@@ -4121,7 +4128,7 @@ input IStoreImage {
4121
4128
  """
4122
4129
  alternateName: String!
4123
4130
  }
4124
- `, ma = `type Mutation {
4131
+ `, ha = `type Mutation {
4125
4132
  """
4126
4133
  Checks for changes between the cart presented in the UI and the cart stored in the ecommerce platform. If changes are detected, it returns the cart stored on the platform. Otherwise, it returns \`null\`.
4127
4134
  """
@@ -4163,7 +4170,7 @@ input IStoreImage {
4163
4170
  """
4164
4171
  startRecommendationSession: Boolean!
4165
4172
  }
4166
- `, ha = `"""
4173
+ `, fa = `"""
4167
4174
  Newsletter information.
4168
4175
  """
4169
4176
  type PersonNewsletter {
@@ -4186,8 +4193,8 @@ input IPersonNewsletter {
4186
4193
  """
4187
4194
  email: String!
4188
4195
  }
4189
- `, fa = `scalar ObjectOrString
4190
- `, Sa = `"""
4196
+ `, Sa = `scalar ObjectOrString
4197
+ `, ya = `"""
4191
4198
  Offer information.
4192
4199
  """
4193
4200
  type StoreOffer {
@@ -4280,7 +4287,7 @@ input IStoreOffer {
4280
4287
  """
4281
4288
  priceToken: String
4282
4289
  }
4283
- `, ya = `"""
4290
+ `, Ia = `"""
4284
4291
  Information of a specific order.
4285
4292
  """
4286
4293
  type StoreOrder {
@@ -4321,7 +4328,7 @@ input IStoreOrder {
4321
4328
  """
4322
4329
  shouldSplitItem: Boolean
4323
4330
  }
4324
- `, Ia = `"""
4331
+ `, va = `"""
4325
4332
  Commercial Authorization response.
4326
4333
  """
4327
4334
  type CommercialAuthorizationResponse {
@@ -4720,7 +4727,7 @@ type ProcessOrderAuthorizationRule {
4720
4727
  """
4721
4728
  rule: CommercialAuthorizationRule!
4722
4729
  }
4723
- `, va = `"""
4730
+ `, Oa = `"""
4724
4731
  Input for uploading a file to the Order Entry Service.
4725
4732
  The file is transmitted as a Base64-encoded string so it can travel
4726
4733
  through the standard GraphQL JSON pipeline without multipart support.
@@ -4781,7 +4788,7 @@ type StoreOrderFormCartItem {
4781
4788
  seller: String!
4782
4789
  unitMultiplier: Float
4783
4790
  }
4784
- `, Oa = `"""
4791
+ `, ba = `"""
4785
4792
  Organization.
4786
4793
  """
4787
4794
  type StoreOrganization {
@@ -4822,7 +4829,7 @@ type StoreContract {
4822
4829
  """
4823
4830
  isDefault: Boolean!
4824
4831
  }
4825
- `, ba = `"""
4832
+ `, Ca = `"""
4826
4833
  Whenever you make a query that allows for pagination, such as \`allProducts\` or \`allCollections\`, you can check \`StorePageInfo\` to learn more about the complete set of items and use it to paginate your queries.
4827
4834
  """
4828
4835
  type StorePageInfo {
@@ -4847,7 +4854,7 @@ type StorePageInfo {
4847
4854
  """
4848
4855
  totalCount: Int!
4849
4856
  }
4850
- `, Ca = `"""
4857
+ `, wa = `"""
4851
4858
  Input type for setting a new password.
4852
4859
  """
4853
4860
  input ISetPassword {
@@ -4890,7 +4897,7 @@ type SetPasswordResponse {
4890
4897
  """
4891
4898
  message: String
4892
4899
  }
4893
- `, wa = `"""
4900
+ `, Da = `"""
4894
4901
  Client profile data.
4895
4902
  """
4896
4903
  type StorePerson {
@@ -4933,7 +4940,7 @@ input IStorePerson {
4933
4940
  """
4934
4941
  familyName: String!
4935
4942
  }
4936
- `, Da = `type PickupPointAddress {
4943
+ `, Aa = `type PickupPointAddress {
4937
4944
  """
4938
4945
  Address city.
4939
4946
  """
@@ -5012,7 +5019,7 @@ type PickupPoints {
5012
5019
  """
5013
5020
  pickupPointsHash: String
5014
5021
  }
5015
- `, Aa = `"""
5022
+ `, Pa = `"""
5016
5023
  Product information. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.
5017
5024
  """
5018
5025
  type StoreProduct {
@@ -5188,7 +5195,7 @@ input IStoreProduct {
5188
5195
  """
5189
5196
  additionalProperty: [IStorePropertyValue!]
5190
5197
  }
5191
- `, Pa = `"""
5198
+ `, _a = `"""
5192
5199
  Product group information. Product groups are catalog entities that may contain variants. They are equivalent to VTEX [Products](https://help.vtex.com/en/tutorial/what-is-a-product--2zrB2gFCHyQokCKKE8kuAw#), whereas each variant is equivalent to a VTEX [SKU](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.
5193
5200
  """
5194
5201
  type StoreProductGroup {
@@ -5215,7 +5222,7 @@ type StoreProductGroup {
5215
5222
  """
5216
5223
  skuVariants: SkuVariants
5217
5224
  }
5218
- `, _a = `type Profile {
5225
+ `, ka = `type Profile {
5219
5226
  """
5220
5227
  Collection of user's address
5221
5228
  """
@@ -5276,7 +5283,7 @@ type ProfileAddress {
5276
5283
  """
5277
5284
  geoCoordinate: [Float]
5278
5285
  }
5279
- `, ka = `"""
5286
+ `, Ea = `"""
5280
5287
  Properties that can be associated with products and products groups.
5281
5288
  """
5282
5289
  type StorePropertyValue {
@@ -5316,7 +5323,7 @@ input IStorePropertyValue {
5316
5323
  """
5317
5324
  valueReference: ObjectOrString!
5318
5325
  }
5319
- `, Ea = `"""
5326
+ `, Ta = `"""
5320
5327
  Each product edge contains a \`node\`, with product information, and a \`cursor\`, that can be used as a reference for pagination.
5321
5328
  """
5322
5329
  type StoreProductEdge {
@@ -5965,7 +5972,7 @@ type StoreAccountProfile {
5965
5972
  email: String
5966
5973
  id: String
5967
5974
  }
5968
- `, Ta = `"""
5975
+ `, Ua = `"""
5969
5976
  Summary of a quote returned in list results.
5970
5977
  """
5971
5978
  type UserQuoteSummary {
@@ -6030,7 +6037,7 @@ type UserQuoteListPaging {
6030
6037
  """
6031
6038
  perPage: Int!
6032
6039
  }
6033
- `, Ua = `type RecommendationResponse {
6040
+ `, Ra = `type RecommendationResponse {
6034
6041
  products: [StoreProduct!]!
6035
6042
  correlationId: String!
6036
6043
  campaign: RecommendationCampaign!
@@ -6041,7 +6048,7 @@ type RecommendationCampaign {
6041
6048
  title: String
6042
6049
  type: String!
6043
6050
  }
6044
- `, Ra = `"""
6051
+ `, Fa = `"""
6045
6052
  Information of a given review rating.
6046
6053
  """
6047
6054
  type StoreReviewRating {
@@ -6068,7 +6075,7 @@ type StoreReview {
6068
6075
  """
6069
6076
  author: StoreAuthor!
6070
6077
  }
6071
- `, Fa = `"""
6078
+ `, Na = `"""
6072
6079
  Whether a saved card is personally owned by the buyer or shared by their
6073
6080
  Organization/Contract. Resolved server-side by the Saved-cards service from
6074
6081
  the buyer's \`useAdHocCard\` role — never inferred client-side.
@@ -6132,7 +6139,7 @@ type SavedCardListResult {
6132
6139
  """
6133
6140
  list: [SavedCard!]
6134
6141
  }
6135
- `, Na = `"""
6142
+ `, La = `"""
6136
6143
  Search Engine Optimization (SEO) tags data.
6137
6144
  """
6138
6145
  type StoreSeo {
@@ -6153,7 +6160,7 @@ type StoreSeo {
6153
6160
  """
6154
6161
  canonical: String!
6155
6162
  }
6156
- `, La = `"""
6163
+ `, Ba = `"""
6157
6164
  Currency information.
6158
6165
  """
6159
6166
  type StoreCurrency {
@@ -6428,7 +6435,7 @@ input IStoreSession {
6428
6435
  """
6429
6436
  refreshAfter: String
6430
6437
  }
6431
- `, Ba = `"""
6438
+ `, $a = `"""
6432
6439
  Shipping Simulation item input.
6433
6440
  """
6434
6441
  input IShippingItem {
@@ -6759,7 +6766,7 @@ type MessageFields {
6759
6766
  """
6760
6767
  skuName: String
6761
6768
  }
6762
- `, $a = `type SkuVariants {
6769
+ `, Ma = `type SkuVariants {
6763
6770
  """
6764
6771
  SKU property values for the current SKU.
6765
6772
  """
@@ -6854,7 +6861,7 @@ Example:
6854
6861
  \`\`\`
6855
6862
  """
6856
6863
  scalar FormattedVariants
6857
- `, Ma = `"""
6864
+ `, za = `"""
6858
6865
  Status used to indicate a message type. For instance, a shopping cart informative or error message.
6859
6866
  """
6860
6867
  enum StoreStatus {
@@ -6862,7 +6869,7 @@ enum StoreStatus {
6862
6869
  WARNING
6863
6870
  ERROR
6864
6871
  }
6865
- `, za = `scalar JSONObject
6872
+ `, Va = `scalar JSONObject
6866
6873
 
6867
6874
  type UserOrder {
6868
6875
  orderId: String
@@ -7686,83 +7693,84 @@ type UserOrderBudgetAllocationLinkedEntity {
7686
7693
  type: String
7687
7694
  id: String
7688
7695
  }
7689
- `, Va = /* @__PURE__ */ Object.assign({
7690
- "./address.graphql": ta,
7691
- "./advertisement.graphql": ra,
7692
- "./aggregateOffer.graphql": ia,
7693
- "./aggregateRating.graphql": aa,
7694
- "./author.graphql": oa,
7695
- "./brand.graphql": sa,
7696
- "./breadcrumb.graphql": ca,
7697
- "./cart.graphql": la,
7698
- "./collection.graphql": da,
7699
- "./deliveryPromisesBadge.graphql": ua,
7700
- "./facet.graphql": pa,
7701
- "./image.graphql": ga,
7702
- "./mutation.graphql": ma,
7703
- "./newsletter.graphql": ha,
7704
- "./objectOrString.graphql": fa,
7705
- "./offer.graphql": Sa,
7706
- "./order.graphql": ya,
7707
- "./orderCommercialAuthorizaton.graphql": Ia,
7708
- "./orderEntry.graphql": va,
7709
- "./organization.graphql": Oa,
7710
- "./pageInfo.graphql": ba,
7711
- "./password.graphql": Ca,
7712
- "./person.graphql": wa,
7713
- "./pickupPoints.graphql": Da,
7714
- "./product.graphql": Aa,
7715
- "./productGroup.graphql": Pa,
7716
- "./profile.graphql": _a,
7717
- "./propertyValue.graphql": ka,
7718
- "./query.graphql": Ea,
7719
- "./quote.graphql": Ta,
7720
- "./recommendation.graphql": Ua,
7721
- "./review.graphql": Ra,
7722
- "./savedCard.graphql": Fa,
7723
- "./seo.graphql": Na,
7724
- "./session.graphql": La,
7725
- "./shipping.graphql": Ba,
7726
- "./skuVariants.graphql": $a,
7727
- "./status.graphql": Ma,
7728
- "./userOrder.graphql": za
7729
- }), xa = zn(
7730
- Object.values(Va).map((e) => Vn(e)).reduce(
7696
+ `, xa = /* @__PURE__ */ Object.assign({
7697
+ "./address.graphql": ra,
7698
+ "./advertisement.graphql": ia,
7699
+ "./aggregateOffer.graphql": aa,
7700
+ "./aggregateRating.graphql": oa,
7701
+ "./author.graphql": sa,
7702
+ "./brand.graphql": ca,
7703
+ "./breadcrumb.graphql": la,
7704
+ "./cart.graphql": da,
7705
+ "./collection.graphql": ua,
7706
+ "./deliveryPromisesBadge.graphql": pa,
7707
+ "./facet.graphql": ga,
7708
+ "./image.graphql": ma,
7709
+ "./mutation.graphql": ha,
7710
+ "./newsletter.graphql": fa,
7711
+ "./objectOrString.graphql": Sa,
7712
+ "./offer.graphql": ya,
7713
+ "./order.graphql": Ia,
7714
+ "./orderCommercialAuthorizaton.graphql": va,
7715
+ "./orderEntry.graphql": Oa,
7716
+ "./organization.graphql": ba,
7717
+ "./pageInfo.graphql": Ca,
7718
+ "./password.graphql": wa,
7719
+ "./person.graphql": Da,
7720
+ "./pickupPoints.graphql": Aa,
7721
+ "./product.graphql": Pa,
7722
+ "./productGroup.graphql": _a,
7723
+ "./profile.graphql": ka,
7724
+ "./propertyValue.graphql": Ea,
7725
+ "./query.graphql": Ta,
7726
+ "./quote.graphql": Ua,
7727
+ "./recommendation.graphql": Ra,
7728
+ "./review.graphql": Fa,
7729
+ "./savedCard.graphql": Na,
7730
+ "./seo.graphql": La,
7731
+ "./session.graphql": Ba,
7732
+ "./shipping.graphql": $a,
7733
+ "./skuVariants.graphql": Ma,
7734
+ "./status.graphql": za,
7735
+ "./userOrder.graphql": Va
7736
+ }), qa = zn(
7737
+ Object.values(xa).map((e) => Vn(e)).reduce(
7731
7738
  (e, n) => rn([e, n], { sort: !0 })
7732
7739
  )
7733
- ), qa = xa, so = async (e) => (n) => (n.storage = {
7740
+ ), ja = qa, co = async (e) => (n) => (n.storage = {
7734
7741
  channel: ee.parse(e.channel),
7735
7742
  flags: e.flags ?? {},
7736
7743
  locale: e.locale,
7744
+ customSortMap: e.customSortMap ?? {},
7737
7745
  cookies: /* @__PURE__ */ new Map()
7738
7746
  }, n.account = e.account, n.OTEL_ENABLED = e.OTEL_ENABLED, n.discoveryConfig = e.discoveryConfig, n.clients = Kt(e, n), n.loaders = sr(e, n), n);
7739
- function ja() {
7740
- const e = na(), n = {};
7747
+ function Wa() {
7748
+ const e = ta(), n = {};
7741
7749
  for (const [t, r] of Object.entries(e))
7742
7750
  n[t] = Object.fromEntries(
7743
7751
  Object.entries(r).map(([i, a]) => typeof a != "function" ? [i, a] : [i, lt(a, `${t}(${i})`)])
7744
7752
  );
7745
7753
  return n;
7746
7754
  }
7747
- function co(e) {
7755
+ function lo(e) {
7748
7756
  const t = st([
7749
7757
  ot,
7750
7758
  rt
7751
- ])(ja(), qa);
7759
+ ])(Wa(), ja);
7752
7760
  return e && xn(e) ? $n({
7753
7761
  schemas: [t, e]
7754
7762
  }) : t;
7755
7763
  }
7756
7764
  export {
7757
7765
  rt as AuthDirective,
7758
- E as BadRequestError,
7766
+ k as BadRequestError,
7759
7767
  ot as CacheControlDirective,
7760
7768
  Gn as CardOrigin,
7761
7769
  Xn as CommercialAuthorizationStatus,
7762
7770
  Z as FastStoreError,
7763
7771
  J as ForbiddenError,
7764
- so as GraphqlVtexContextFactory,
7765
- co as GraphqlVtexSchema,
7772
+ co as GraphqlVtexContextFactory,
7773
+ lo as GraphqlVtexSchema,
7766
7774
  $ as NotFoundError,
7767
7775
  Yn as StoreCollectionType,
7768
7776
  Jn as StoreFacetType,
@@ -7771,13 +7779,13 @@ export {
7771
7779
  ie as UnauthorizedError,
7772
7780
  Zn as UserOrderInvoiceType,
7773
7781
  L as getAuthCookie,
7774
- ao as isBadRequestError,
7775
- io as isFastStoreError,
7782
+ oo as isBadRequestError,
7783
+ ao as isFastStoreError,
7776
7784
  dt as isForbiddenError,
7777
7785
  Y as isNotFoundError,
7778
- oo as isUnauthorizedError,
7779
- ro as stringifyCacheControl,
7780
- qa as typeDefs,
7786
+ so as isUnauthorizedError,
7787
+ io as stringifyCacheControl,
7788
+ ja as typeDefs,
7781
7789
  nt as validateUserAuthentication,
7782
7790
  st as withDirectives
7783
7791
  };