@faststore/api 4.7.0-dev.4 → 4.7.0-dev.6
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/cjs/index.js +41 -41
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.mjs +242 -227
- package/dist/es/index.mjs.map +1 -1
- package/dist/src/platforms/vtex/index.d.ts.map +1 -1
- package/dist/src/platforms/vtex/resolvers/index.d.ts.map +1 -1
- package/dist/src/platforms/vtex/resolvers/product.d.ts.map +1 -1
- package/dist/src/platforms/vtex/utils/releaseDate.d.ts +22 -0
- package/dist/src/platforms/vtex/utils/releaseDate.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/platforms/vtex/resolvers/product.ts +3 -1
- package/src/platforms/vtex/utils/releaseDate.ts +70 -0
package/dist/es/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import de from "dataloader";
|
|
|
10
10
|
import qn from "sanitize-html";
|
|
11
11
|
import De from "fast-deep-equal";
|
|
12
12
|
import jn from "node:crypto";
|
|
13
|
-
var Wn = /* @__PURE__ */ ((e) => (e.Personal = "personal", e.Shared = "shared", e))(Wn || {}),
|
|
13
|
+
var Wn = /* @__PURE__ */ ((e) => (e.Personal = "personal", e.Shared = "shared", e))(Wn || {}), Hn = /* @__PURE__ */ ((e) => (e.Accepted = "accepted", e.Denied = "denied", e.Pending = "pending", e))(Hn || {}), Gn = /* @__PURE__ */ ((e) => (e.Brand = "Brand", e.Category = "Category", e.Cluster = "Cluster", e.Collection = "Collection", e.Department = "Department", e.SubCategory = "SubCategory", e))(Gn || {}), Xn = /* @__PURE__ */ ((e) => (e.Boolean = "BOOLEAN", e.Range = "RANGE", e))(Xn || {}), Yn = /* @__PURE__ */ ((e) => (e.DiscountDesc = "discount_desc", e.NameAsc = "name_asc", e.NameDesc = "name_desc", e.OrdersDesc = "orders_desc", e.PriceAsc = "price_asc", e.PriceDesc = "price_desc", e.ReleaseDesc = "release_desc", e.ScoreDesc = "score_desc", e))(Yn || {}), Jn = /* @__PURE__ */ ((e) => (e.Error = "ERROR", e.Info = "INFO", e.Warning = "WARNING", e))(Jn || {}), Kn = /* @__PURE__ */ ((e) => (e.Input = "Input", e.Output = "Output", e))(Kn || {});
|
|
14
14
|
const Qn = () => function(n = {}) {
|
|
15
15
|
const t = process.env.FS_DISCOVERY_APP_KEY ?? "", r = process.env.FS_DISCOVERY_APP_TOKEN ?? "";
|
|
16
16
|
if (!t || !r)
|
|
@@ -42,7 +42,7 @@ const Qn = () => function(n = {}) {
|
|
|
42
42
|
return n;
|
|
43
43
|
}
|
|
44
44
|
})
|
|
45
|
-
}, tt = "cacheControl",
|
|
45
|
+
}, tt = "cacheControl", eo = (e, n) => {
|
|
46
46
|
const {
|
|
47
47
|
scope: t = "private",
|
|
48
48
|
sMaxAge: r = 0,
|
|
@@ -80,7 +80,7 @@ const Qn = () => function(n = {}) {
|
|
|
80
80
|
resolvers: n
|
|
81
81
|
})
|
|
82
82
|
);
|
|
83
|
-
}, sn = "@faststore/api", cn = "4.7.0-dev.
|
|
83
|
+
}, sn = "@faststore/api", cn = "4.7.0-dev.5", Te = {
|
|
84
84
|
name: sn,
|
|
85
85
|
version: cn
|
|
86
86
|
}, ot = Vn("@faststore/api"), st = (e, n = "Unknown Graphql Resolver") => (t, r, i, a) => {
|
|
@@ -141,7 +141,7 @@ class $ extends Z {
|
|
|
141
141
|
super({ status: 404, type: "NotFoundError" }, n);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
144
|
+
const no = (e) => e?.name === "FastStoreError", to = (e) => e?.extensions?.type === "BadRequestError", ro = (e) => e?.extensions?.type === "UnauthorizedError", ct = (e) => e?.extensions?.type === "ForbiddenError", X = (e) => e?.extensions?.type === "NotFoundError", lt = `${Te.name}@${Te.version}`, y = async (e, n, t) => {
|
|
145
145
|
const r = await xn(e, {
|
|
146
146
|
...n,
|
|
147
147
|
headers: {
|
|
@@ -440,7 +440,7 @@ const Ct = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
|
|
|
440
440
|
})),
|
|
441
441
|
selectedAddresses: S,
|
|
442
442
|
clearAddressIfPostalCodeNotFound: t
|
|
443
|
-
},
|
|
443
|
+
}, T = s({
|
|
444
444
|
"content-type": "application/json",
|
|
445
445
|
"X-FORWARDED-HOST": p
|
|
446
446
|
});
|
|
@@ -448,7 +448,7 @@ const Ct = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
|
|
|
448
448
|
`${a}/api/checkout/pub/orderForm/${l}/attachments/shippingData`,
|
|
449
449
|
{
|
|
450
450
|
...j,
|
|
451
|
-
headers:
|
|
451
|
+
headers: T,
|
|
452
452
|
body: JSON.stringify(b)
|
|
453
453
|
},
|
|
454
454
|
{ storeCookies: o }
|
|
@@ -501,7 +501,7 @@ const Ct = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
|
|
|
501
501
|
"X-FORWARDED-HOST": p
|
|
502
502
|
}), b = new URLSearchParams();
|
|
503
503
|
(!S || !l) && b.set("sc", O), l && b.set("refreshOutdatedData", g.toString());
|
|
504
|
-
const
|
|
504
|
+
const T = l ? `/${l}` : "", I = `${a}/api/checkout/pub/orderForm${T}?${b}`;
|
|
505
505
|
return y(
|
|
506
506
|
I,
|
|
507
507
|
{
|
|
@@ -722,7 +722,7 @@ const Ct = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
|
|
|
722
722
|
text: O,
|
|
723
723
|
clientEmail: w,
|
|
724
724
|
perPage: b,
|
|
725
|
-
pendingMyApproval:
|
|
725
|
+
pendingMyApproval: T
|
|
726
726
|
}) => {
|
|
727
727
|
const I = new URLSearchParams();
|
|
728
728
|
if (m) {
|
|
@@ -746,7 +746,7 @@ const Ct = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
|
|
|
746
746
|
O && I.append("text", O), g && g.length > 0 && I.append("status", g.filter(Boolean).join(",")), m && S ? I.append(
|
|
747
747
|
"creation_date",
|
|
748
748
|
`creationDate:[${m} TO ${S}]`
|
|
749
|
-
) : 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()), b && I.append("per_page", b.toString()),
|
|
749
|
+
) : 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()), b && I.append("per_page", b.toString()), T && I.append("my_pending_approvals", String(!0));
|
|
750
750
|
const D = s({
|
|
751
751
|
"content-type": "application/json",
|
|
752
752
|
"X-FORWARDED-HOST": p
|
|
@@ -785,7 +785,7 @@ const Ct = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
|
|
|
785
785
|
const O = s({
|
|
786
786
|
"content-type": "application/json",
|
|
787
787
|
"X-FORWARDED-HOST": p
|
|
788
|
-
}),
|
|
788
|
+
}), T = {
|
|
789
789
|
params: {
|
|
790
790
|
ruleId: m,
|
|
791
791
|
dimensionId: g,
|
|
@@ -797,7 +797,7 @@ const Ct = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
|
|
|
797
797
|
{
|
|
798
798
|
method: "POST",
|
|
799
799
|
headers: O,
|
|
800
|
-
body: JSON.stringify(
|
|
800
|
+
body: JSON.stringify(T)
|
|
801
801
|
},
|
|
802
802
|
{ storeCookies: o }
|
|
803
803
|
);
|
|
@@ -1025,10 +1025,10 @@ const Ct = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
|
|
|
1025
1025
|
"content-type": "application/json",
|
|
1026
1026
|
"X-FORWARDED-HOST": p
|
|
1027
1027
|
}), O = `----FastStoreUploadBoundary${Date.now()}`, w = `\r
|
|
1028
|
-
`,
|
|
1028
|
+
`, T = /^[a-zA-Z0-9][a-zA-Z0-9!#$&\-.^_]*\/[a-zA-Z0-9][a-zA-Z0-9!#$&\-.^_+]*$/.test(m) ? m : "application/octet-stream", I = g.replaceAll(/[\r\n"]/g, "_"), D = [
|
|
1029
1029
|
`--${O}`,
|
|
1030
1030
|
`Content-Disposition: form-data; name="file"; filename="${I}"`,
|
|
1031
|
-
`Content-Type: ${
|
|
1031
|
+
`Content-Type: ${T}`,
|
|
1032
1032
|
"",
|
|
1033
1033
|
""
|
|
1034
1034
|
].join(w), A = `${w}--${O}--${w}`, _ = Buffer.from(D), P = Buffer.from(A), R = new Uint8Array(
|
|
@@ -1149,13 +1149,13 @@ const Ct = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
|
|
|
1149
1149
|
}
|
|
1150
1150
|
}
|
|
1151
1151
|
};
|
|
1152
|
-
}, J = (e) => e.discoveryConfig?.localization ?? {}, K = (e) => J(e).enabled === !0, bt = (e) => Object.keys(J(e).locales ?? {}), wt = (e) => J(e).defaultLocale, ie = (e) => K(e) && e.storage.locale || void 0, ge = "fuzzy", me = "operator", he = "pickupPoint",
|
|
1152
|
+
}, J = (e) => e.discoveryConfig?.localization ?? {}, K = (e) => J(e).enabled === !0, bt = (e) => Object.keys(J(e).locales ?? {}), wt = (e) => J(e).defaultLocale, ie = (e) => K(e) && e.storage.locale || void 0, ge = "fuzzy", me = "operator", he = "pickupPoint", ke = "shipping", Ue = "delivery-options", Dt = "in-stock", At = "trade-policy", Pt = "region-id", _t = /* @__PURE__ */ new Set([
|
|
1153
1153
|
At,
|
|
1154
1154
|
Pt,
|
|
1155
1155
|
ge,
|
|
1156
1156
|
me,
|
|
1157
1157
|
he
|
|
1158
|
-
]),
|
|
1158
|
+
]), Tt = /* @__PURE__ */ new Set([
|
|
1159
1159
|
"zip-code",
|
|
1160
1160
|
"pickupPoint",
|
|
1161
1161
|
"country",
|
|
@@ -1164,7 +1164,7 @@ const Ct = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
|
|
|
1164
1164
|
"pickupPointsHash"
|
|
1165
1165
|
]), Re = (e) => encodeURI(decodeURI(e)), Et = (e) => encodeURIComponent(
|
|
1166
1166
|
decodeURIComponent(e).normalize("NFD").replaceAll(/[\u0300-\u036f]/g, "")
|
|
1167
|
-
),
|
|
1167
|
+
), kt = /^pickup-in-point-(.+)$/;
|
|
1168
1168
|
function un(e) {
|
|
1169
1169
|
if (!e)
|
|
1170
1170
|
return {};
|
|
@@ -1184,7 +1184,7 @@ function Ut(e) {
|
|
|
1184
1184
|
const i = r.indexOf("=");
|
|
1185
1185
|
if (i < 0) continue;
|
|
1186
1186
|
const a = r.slice(0, i), o = r.slice(i + 1);
|
|
1187
|
-
!a || !o || (
|
|
1187
|
+
!a || !o || (Tt.has(a) ? n[a] = o : t.push({ key: a, value: o }));
|
|
1188
1188
|
}
|
|
1189
1189
|
return { shipping: n, extraFacets: t };
|
|
1190
1190
|
}
|
|
@@ -1231,7 +1231,7 @@ function pn(e, n) {
|
|
|
1231
1231
|
i != null && i !== "" && e.append(r, String(i));
|
|
1232
1232
|
}
|
|
1233
1233
|
function gn(e) {
|
|
1234
|
-
return
|
|
1234
|
+
return kt.exec(e)?.[1];
|
|
1235
1235
|
}
|
|
1236
1236
|
function Ft(e) {
|
|
1237
1237
|
const n = e.find((r) => r.key === "shipping"), t = n ? gn(n.value) : void 0;
|
|
@@ -1282,11 +1282,11 @@ function Vt(e, n) {
|
|
|
1282
1282
|
}
|
|
1283
1283
|
function xt(e, n) {
|
|
1284
1284
|
const t = e.filter(({ key: c }) => !_t.has(c)), r = e.find(
|
|
1285
|
-
({ key: c, value: d }) => c ===
|
|
1285
|
+
({ key: c, value: d }) => c === ke && d !== "all-delivery-methods"
|
|
1286
1286
|
) ?? null, i = e.find(
|
|
1287
1287
|
({ key: c, value: d }) => c === Ue && d !== "all-delivery-options"
|
|
1288
1288
|
) ?? null, a = [...t], o = a.some(
|
|
1289
|
-
({ key: c }) => c ===
|
|
1289
|
+
({ key: c }) => c === ke
|
|
1290
1290
|
), s = a.some(
|
|
1291
1291
|
({ key: c }) => c === Ue
|
|
1292
1292
|
);
|
|
@@ -1344,7 +1344,7 @@ function W(e, n) {
|
|
|
1344
1344
|
}
|
|
1345
1345
|
};
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function H(e) {
|
|
1348
1348
|
const { endpoint: n, segment: t, defaults: r, args: i = {} } = e, a = Vt(t, r);
|
|
1349
1349
|
switch (n) {
|
|
1350
1350
|
case "product-search":
|
|
@@ -1390,11 +1390,11 @@ function G(e) {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
1392
|
const Wt = 10;
|
|
1393
|
-
function
|
|
1393
|
+
function Ht(e) {
|
|
1394
1394
|
const { regionId: n, seller: t } = e.storage.channel;
|
|
1395
1395
|
return (t ? Buffer.from(`SW#${t}`).toString("base64") : void 0) ?? (n || void 0);
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function Gt(e) {
|
|
1398
1398
|
const t = un(e.headers?.cookie).cultureInfo || "";
|
|
1399
1399
|
return K(e) ? e.storage.locale || t : t || e.storage.locale || "";
|
|
1400
1400
|
}
|
|
@@ -1408,8 +1408,8 @@ const Xt = ({
|
|
|
1408
1408
|
}, o) => {
|
|
1409
1409
|
const s = `https://${e}.${n}.com.br`, c = dn(o), d = un(o.headers?.cookie), u = () => ({
|
|
1410
1410
|
salesChannel: o.storage.channel.salesChannel,
|
|
1411
|
-
regionId:
|
|
1412
|
-
locale:
|
|
1411
|
+
regionId: Ht(o),
|
|
1412
|
+
locale: Gt(o),
|
|
1413
1413
|
hideUnavailableItems: t,
|
|
1414
1414
|
simulationBehavior: r,
|
|
1415
1415
|
showSponsored: i
|
|
@@ -1417,7 +1417,7 @@ const Xt = ({
|
|
|
1417
1417
|
"content-type": "application/json",
|
|
1418
1418
|
"X-FORWARDED-HOST": h
|
|
1419
1419
|
}), l = ({ type: I, ...D }) => {
|
|
1420
|
-
const A = I === "facets" ? "facets" : "product-search", _ =
|
|
1420
|
+
const A = I === "facets" ? "facets" : "product-search", _ = H({
|
|
1421
1421
|
endpoint: A,
|
|
1422
1422
|
segment: d,
|
|
1423
1423
|
defaults: u(),
|
|
@@ -1433,7 +1433,7 @@ const Xt = ({
|
|
|
1433
1433
|
hideUnavailableItems: A,
|
|
1434
1434
|
showInvisibleItems: _
|
|
1435
1435
|
}) => {
|
|
1436
|
-
const P =
|
|
1436
|
+
const P = H({
|
|
1437
1437
|
endpoint: "products",
|
|
1438
1438
|
segment: d,
|
|
1439
1439
|
defaults: u(),
|
|
@@ -1480,7 +1480,7 @@ const Xt = ({
|
|
|
1480
1480
|
);
|
|
1481
1481
|
},
|
|
1482
1482
|
suggestedTerms: (I) => {
|
|
1483
|
-
const D =
|
|
1483
|
+
const D = H({
|
|
1484
1484
|
endpoint: "search-suggestions",
|
|
1485
1485
|
segment: d,
|
|
1486
1486
|
defaults: u(),
|
|
@@ -1492,7 +1492,7 @@ const Xt = ({
|
|
|
1492
1492
|
);
|
|
1493
1493
|
},
|
|
1494
1494
|
topSearches: () => {
|
|
1495
|
-
const I =
|
|
1495
|
+
const I = H({
|
|
1496
1496
|
endpoint: "top-searches",
|
|
1497
1497
|
segment: d,
|
|
1498
1498
|
defaults: u()
|
|
@@ -1503,7 +1503,7 @@ const Xt = ({
|
|
|
1503
1503
|
);
|
|
1504
1504
|
},
|
|
1505
1505
|
productCount: (I) => {
|
|
1506
|
-
const D =
|
|
1506
|
+
const D = H({
|
|
1507
1507
|
endpoint: "catalog-count",
|
|
1508
1508
|
segment: d,
|
|
1509
1509
|
defaults: u(),
|
|
@@ -1670,9 +1670,9 @@ function oe(e) {
|
|
|
1670
1670
|
const t = e.replace(/,/g, "").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}><=_^]/g, "-");
|
|
1671
1671
|
return gr(pr(t)).toLowerCase();
|
|
1672
1672
|
}
|
|
1673
|
-
const
|
|
1673
|
+
const G = (e) => Kt(e) ? e.slug : fe(e) ? e.linkId : e.linkId ?? oe(e.name), hn = {
|
|
1674
1674
|
id: ({ id: e }) => e.toString(),
|
|
1675
|
-
slug: (e) =>
|
|
1675
|
+
slug: (e) => G(e),
|
|
1676
1676
|
seo: (e) => ({
|
|
1677
1677
|
title: e.title ?? e.name,
|
|
1678
1678
|
// pagetype.metaTagDescription and catalog `description` share the same
|
|
@@ -1682,7 +1682,7 @@ const H = (e) => Kt(e) ? e.slug : fe(e) ? e.linkId : e.linkId ?? oe(e.name), hn
|
|
|
1682
1682
|
}),
|
|
1683
1683
|
type: (e) => fe(e) ? "Brand" : Ne(e) ? "Collection" : e.fatherCategoryId === null ? "Department" : "Category",
|
|
1684
1684
|
meta: async (e, n, t) => {
|
|
1685
|
-
const r =
|
|
1685
|
+
const r = G(e);
|
|
1686
1686
|
if (fe(e))
|
|
1687
1687
|
return { selectedFacets: [{ key: "brand", value: r }] };
|
|
1688
1688
|
if (Ne(e))
|
|
@@ -1706,7 +1706,7 @@ const H = (e) => Kt(e) ? e.slug : fe(e) ? e.linkId : e.linkId ?? oe(e.name), hn
|
|
|
1706
1706
|
breadcrumbList: async (e, n, t) => {
|
|
1707
1707
|
const {
|
|
1708
1708
|
loaders: { collectionLoader: r }
|
|
1709
|
-
} = t, a =
|
|
1709
|
+
} = t, a = G(e).split("/").filter(Boolean), o = a.map(
|
|
1710
1710
|
(c, d) => a.slice(0, d + 1).join("/")
|
|
1711
1711
|
), s = await Promise.all(
|
|
1712
1712
|
o.map(
|
|
@@ -1715,7 +1715,7 @@ const H = (e) => Kt(e) ? e.slug : fe(e) ? e.linkId : e.linkId ?? oe(e.name), hn
|
|
|
1715
1715
|
);
|
|
1716
1716
|
return {
|
|
1717
1717
|
itemListElement: s.map((c, d) => ({
|
|
1718
|
-
item: `/${
|
|
1718
|
+
item: `/${G(c)}`,
|
|
1719
1719
|
name: c.name,
|
|
1720
1720
|
position: d + 1
|
|
1721
1721
|
})),
|
|
@@ -1727,7 +1727,7 @@ const H = (e) => Kt(e) ? e.slug : fe(e) ? e.linkId : e.linkId ?? oe(e.name), hn
|
|
|
1727
1727
|
if (!r.enabled) return null;
|
|
1728
1728
|
const i = Object.keys(r.locales ?? {});
|
|
1729
1729
|
if (i.length === 0) return null;
|
|
1730
|
-
const a = t.storage.locale, o =
|
|
1730
|
+
const a = t.storage.locale, o = G(e), s = o.split("/").filter(Boolean);
|
|
1731
1731
|
if (s.length === 0) return null;
|
|
1732
1732
|
const {
|
|
1733
1733
|
loaders: { collectionLoader: c }
|
|
@@ -1915,7 +1915,7 @@ class ee {
|
|
|
1915
1915
|
return JSON.stringify(n);
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1918
|
+
function Tr(e, n) {
|
|
1919
1919
|
return n == null || n === "" || String(n) === String(e.salesChannel ?? "") ? null : ee.stringify({
|
|
1920
1920
|
...e,
|
|
1921
1921
|
salesChannel: String(n),
|
|
@@ -1954,7 +1954,7 @@ function vn(e) {
|
|
|
1954
1954
|
`${e.name}:${JSON.stringify(e.value)}:${e.valueReference}`
|
|
1955
1955
|
);
|
|
1956
1956
|
}
|
|
1957
|
-
const
|
|
1957
|
+
const kr = (e) => {
|
|
1958
1958
|
const n = e.postalCode, t = e.geoCoordinates, r = {
|
|
1959
1959
|
addressType: e.addressType || null,
|
|
1960
1960
|
postalCode: n || null,
|
|
@@ -2127,7 +2127,7 @@ const je = (e) => {
|
|
|
2127
2127
|
return r == null ? !0 : Dn(e, n) !== r;
|
|
2128
2128
|
}, xr = async (e, { clients: { commerce: n } }) => n.checkout.clearOrderFormMessages({
|
|
2129
2129
|
id: e
|
|
2130
|
-
}),
|
|
2130
|
+
}), He = async (e, n, { clients: { commerce: t } }) => {
|
|
2131
2131
|
if (!n)
|
|
2132
2132
|
return e;
|
|
2133
2133
|
const { updateShipping: r, addressChanged: i } = On(
|
|
@@ -2135,7 +2135,7 @@ const je = (e) => {
|
|
|
2135
2135
|
n
|
|
2136
2136
|
);
|
|
2137
2137
|
if (r) {
|
|
2138
|
-
const a = Ur(e, n, i), s = a ||
|
|
2138
|
+
const a = Ur(e, n, i), s = a || kr(n);
|
|
2139
2139
|
return !!n.deliveryMode?.deliveryWindow && await t.checkout.shippingData(
|
|
2140
2140
|
{
|
|
2141
2141
|
id: e.orderFormId,
|
|
@@ -2160,8 +2160,8 @@ const je = (e) => {
|
|
|
2160
2160
|
return "";
|
|
2161
2161
|
const r = Q(e)[n];
|
|
2162
2162
|
return r ? r.split("=")[1] : "";
|
|
2163
|
-
},
|
|
2164
|
-
const t =
|
|
2163
|
+
}, Ge = (e, n) => {
|
|
2164
|
+
const t = Tr(
|
|
2165
2165
|
e.storage.channel,
|
|
2166
2166
|
n.salesChannel
|
|
2167
2167
|
);
|
|
@@ -2183,7 +2183,7 @@ const je = (e) => {
|
|
|
2183
2183
|
u.messages.length !== 0 && await xr(p, r);
|
|
2184
2184
|
const f = Q(r?.headers?.cookie ?? "")?.vtex_session, h = z(f), { acceptedOffer: v, shouldSplitItem: l } = n;
|
|
2185
2185
|
if (Vr(u, h)) {
|
|
2186
|
-
const C =
|
|
2186
|
+
const C = Ge(
|
|
2187
2187
|
r,
|
|
2188
2188
|
u
|
|
2189
2189
|
), N = await We(
|
|
@@ -2199,10 +2199,10 @@ const je = (e) => {
|
|
|
2199
2199
|
C
|
|
2200
2200
|
);
|
|
2201
2201
|
}
|
|
2202
|
-
const m =
|
|
2202
|
+
const m = Ge(
|
|
2203
2203
|
r,
|
|
2204
2204
|
u
|
|
2205
|
-
), S = qe(v), O = qe(u.items.map(ce)), w = Array.from(O.entries()), b = Array.from(S.entries()), { itemsToAdd:
|
|
2205
|
+
), S = qe(v), O = qe(u.items.map(ce)), w = Array.from(O.entries()), b = Array.from(S.entries()), { itemsToAdd: T, itemsToUpdate: I } = b.reduce(
|
|
2206
2206
|
(C, [N, Ae]) => {
|
|
2207
2207
|
const Pe = O.get(N);
|
|
2208
2208
|
if (!Pe)
|
|
@@ -2220,7 +2220,7 @@ const je = (e) => {
|
|
|
2220
2220
|
itemsToAdd: [],
|
|
2221
2221
|
itemsToUpdate: []
|
|
2222
2222
|
}
|
|
2223
|
-
), D = w.filter(([C]) => !S.has(C)).flatMap(([, C]) => C.map((N) => ({ ...N, quantity: 0 }))), A = [...
|
|
2223
|
+
), D = w.filter(([C]) => !S.has(C)).flatMap(([, C]) => C.map((N) => ({ ...N, quantity: 0 }))), A = [...T, ...I, ...D].map(
|
|
2224
2224
|
Mr
|
|
2225
2225
|
), { updateShipping: _ } = t ? On(u, t) : { updateShipping: !1 };
|
|
2226
2226
|
if (A.length === 0 && !_)
|
|
@@ -2236,8 +2236,8 @@ const je = (e) => {
|
|
|
2236
2236
|
orderItems: A,
|
|
2237
2237
|
shouldSplitItem: l
|
|
2238
2238
|
}).then(
|
|
2239
|
-
(C) =>
|
|
2240
|
-
) : P = await
|
|
2239
|
+
(C) => He(C, t, r)
|
|
2240
|
+
) : P = await He(
|
|
2241
2241
|
u,
|
|
2242
2242
|
t,
|
|
2243
2243
|
r
|
|
@@ -2285,17 +2285,17 @@ function Wr(e, n, t, r) {
|
|
|
2285
2285
|
hasOnlyDefaultSalesChannel: i ? !1 : !a
|
|
2286
2286
|
});
|
|
2287
2287
|
}
|
|
2288
|
-
const
|
|
2288
|
+
const Hr = (e) => {
|
|
2289
2289
|
const n = (e?.corporateName ?? "").trim();
|
|
2290
2290
|
return n || (e?.firstName ?? "").trim();
|
|
2291
|
-
},
|
|
2291
|
+
}, Gr = (e) => {
|
|
2292
2292
|
if (!e || typeof e != "object")
|
|
2293
2293
|
return !1;
|
|
2294
2294
|
const n = e;
|
|
2295
2295
|
return typeof n.customerId == "string" && n.customerId.trim() !== "" && typeof n.contractName == "string" && typeof n.isActive == "boolean" && typeof n.isCurrent == "boolean";
|
|
2296
2296
|
}, Xr = (e) => {
|
|
2297
2297
|
const n = e?.availableContracts?.value;
|
|
2298
|
-
return Array.isArray(n) ? n.filter(
|
|
2298
|
+
return Array.isArray(n) ? n.filter(Gr) : [];
|
|
2299
2299
|
}, Yr = (e) => e?.customerId ? !!((e.contractName ?? "").trim() && e.isActive) : !1, Ye = (e) => e?.namespaces?.shopper?.activeContractId?.value?.trim() ?? e?.namespaces?.authentication?.customerId?.value?.trim() ?? e?.namespaces?.profile?.id?.value?.trim() ?? "", Jr = (e, n = "") => {
|
|
2300
2300
|
const t = n.trim();
|
|
2301
2301
|
return e.filter(Yr).map((r) => ({
|
|
@@ -2304,7 +2304,7 @@ const Gr = (e) => {
|
|
|
2304
2304
|
isActive: t ? r.customerId === t : r.isCurrent
|
|
2305
2305
|
}));
|
|
2306
2306
|
}, An = (e, n) => {
|
|
2307
|
-
const t =
|
|
2307
|
+
const t = Hr(e);
|
|
2308
2308
|
return t || (n?.firstName?.value ?? "").trim();
|
|
2309
2309
|
};
|
|
2310
2310
|
async function Kr(e, n, t) {
|
|
@@ -2416,7 +2416,7 @@ const ii = async (e, { session: n, search: t }, { clients: r, headers: i, accoun
|
|
|
2416
2416
|
r,
|
|
2417
2417
|
i?.cookie,
|
|
2418
2418
|
a
|
|
2419
|
-
), m = await r.commerce.session(f.toString()).catch(() => null), S = m?.namespaces.profile ?? null, O = m?.namespaces.shopper ?? null, w = m?.namespaces.store ?? null, b = m?.namespaces.authentication ?? null,
|
|
2419
|
+
), m = await r.commerce.session(f.toString()).catch(() => null), S = m?.namespaces.profile ?? null, O = m?.namespaces.shopper ?? null, w = m?.namespaces.store ?? null, b = m?.namespaces.authentication ?? null, T = m?.namespaces.checkout ?? null, I = m?.namespaces.public ?? null;
|
|
2420
2420
|
let D = null;
|
|
2421
2421
|
if (v && S?.id?.value)
|
|
2422
2422
|
try {
|
|
@@ -2446,7 +2446,7 @@ const ii = async (e, { session: n, search: t }, { clients: r, headers: i, accoun
|
|
|
2446
2446
|
channel: Wr(
|
|
2447
2447
|
o,
|
|
2448
2448
|
w?.channel?.value,
|
|
2449
|
-
|
|
2449
|
+
T?.regionId?.value,
|
|
2450
2450
|
A
|
|
2451
2451
|
),
|
|
2452
2452
|
/**
|
|
@@ -2501,7 +2501,7 @@ const si = (e) => typeof e == "object" ? JSON.stringify(e) : typeof e == "string
|
|
|
2501
2501
|
parseLiteral(e) {
|
|
2502
2502
|
return e.kind === Oe.STRING ? Pn(e.value) : null;
|
|
2503
2503
|
}
|
|
2504
|
-
}),
|
|
2504
|
+
}), k = (e) => "Price" in e && "seller" in e && "product" in e, U = (e) => "skuName" in e, li = {
|
|
2505
2505
|
priceCurrency: async (e, n, t) => {
|
|
2506
2506
|
const {
|
|
2507
2507
|
loaders: { salesChannelLoader: r },
|
|
@@ -2509,34 +2509,34 @@ const si = (e) => typeof e == "object" ? JSON.stringify(e) : typeof e == "string
|
|
|
2509
2509
|
} = t;
|
|
2510
2510
|
return (await r.load(i.salesChannel)).CurrencyCode ?? "";
|
|
2511
2511
|
},
|
|
2512
|
-
priceValidUntil: (e) =>
|
|
2512
|
+
priceValidUntil: (e) => k(e) ? e.PriceValidUntil ?? "" : U(e) ? e.priceValidUntil ?? "" : null,
|
|
2513
2513
|
itemCondition: () => "https://schema.org/NewCondition",
|
|
2514
|
-
availability: async (e) =>
|
|
2515
|
-
seller: (e, n, t) =>
|
|
2514
|
+
availability: async (e) => k(e) ? Le(B(e)) : U(e) ? Le(sr(e.availability)) : null,
|
|
2515
|
+
seller: (e, n, t) => k(e) ? {
|
|
2516
2516
|
identifier: t.storage.channel?.seller || e.seller.sellerId || ""
|
|
2517
2517
|
} : U(e) ? {
|
|
2518
2518
|
identifier: e.seller
|
|
2519
2519
|
} : null,
|
|
2520
|
-
price: (e) =>
|
|
2521
|
-
priceWithTaxes: (e) =>
|
|
2520
|
+
price: (e) => k(e) ? x(e) : U(e) ? e.sellingPrice / 100 : null,
|
|
2521
|
+
priceWithTaxes: (e) => k(e) ? V(x(e), e?.Tax, e.product.unitMultiplier) : U(e) ? V(
|
|
2522
2522
|
e.sellingPrice / 100,
|
|
2523
2523
|
e.tax / 100,
|
|
2524
2524
|
e.unitMultiplier
|
|
2525
2525
|
) : null,
|
|
2526
|
-
sellingPrice: (e) =>
|
|
2527
|
-
listPrice: (e) =>
|
|
2528
|
-
listPriceWithTaxes: (e) =>
|
|
2526
|
+
sellingPrice: (e) => k(e) ? or(e) : U(e) ? e.sellingPrice / 100 : null,
|
|
2527
|
+
listPrice: (e) => k(e) ? e.ListPrice ?? 0 : U(e) ? e.listPrice / 100 : null,
|
|
2528
|
+
listPriceWithTaxes: (e) => k(e) ? V(
|
|
2529
2529
|
e.ListPrice ?? 0,
|
|
2530
2530
|
e?.Tax,
|
|
2531
2531
|
e.product.unitMultiplier
|
|
2532
2532
|
) : U(e) ? V(e.listPrice / 100, e.tax / 100, e.unitMultiplier) : null,
|
|
2533
|
-
itemOffered: (e) =>
|
|
2533
|
+
itemOffered: (e) => k(e) ? e.product : U(e) ? {
|
|
2534
2534
|
...e.product,
|
|
2535
2535
|
attachmentsValues: e.attachments
|
|
2536
2536
|
} : null,
|
|
2537
|
-
quantity: (e) =>
|
|
2537
|
+
quantity: (e) => k(e) ? e.AvailableQuantity ?? 0 : U(e) ? e.quantity : null,
|
|
2538
2538
|
isGift: (e) => U(e) ? e.isGift ?? !1 : null,
|
|
2539
|
-
priceToken: (e) =>
|
|
2539
|
+
priceToken: (e) => k(e) ? e.PriceToken ?? null : null
|
|
2540
2540
|
}, di = ({ linkText: e }) => `/${e}/p`, ui = ({
|
|
2541
2541
|
offer: e,
|
|
2542
2542
|
seller: n,
|
|
@@ -2545,11 +2545,26 @@ const si = (e) => typeof e == "object" ? JSON.stringify(e) : typeof e == "string
|
|
|
2545
2545
|
...e,
|
|
2546
2546
|
product: t,
|
|
2547
2547
|
seller: n
|
|
2548
|
-
}), pi = {
|
|
2548
|
+
}), pi = 1e11, gi = (e) => /^\d+$/.test(e), mi = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/, hi = (e) => {
|
|
2549
|
+
if (!gi(e))
|
|
2550
|
+
return new Date(
|
|
2551
|
+
mi.test(e) ? `${e}Z` : e
|
|
2552
|
+
);
|
|
2553
|
+
const n = Number(e);
|
|
2554
|
+
return new Date(n >= pi ? n : n * 1e3);
|
|
2555
|
+
}, fi = (e) => {
|
|
2556
|
+
if (e == null)
|
|
2557
|
+
return "";
|
|
2558
|
+
const n = String(e).trim();
|
|
2559
|
+
if (n === "")
|
|
2560
|
+
return "";
|
|
2561
|
+
const t = hi(n);
|
|
2562
|
+
return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
|
|
2563
|
+
}, Si = {
|
|
2549
2564
|
imageText: "image",
|
|
2550
2565
|
imageUrl: "https://storecomponents.vtexassets.com/assets/faststore/images/image___117a6d3e229a96ad0e0d0876352566e2.svg",
|
|
2551
2566
|
imageLabel: "label"
|
|
2552
|
-
}, ae = (e, n) => `${e}-${n}`, Ke = (e, n) => `/${ae(e, n)}/p`,
|
|
2567
|
+
}, ae = (e, n) => `${e}-${n}`, Ke = (e, n) => `/${ae(e, n)}/p`, yi = (e) => Array.isArray(e) && e.length > 0 ? e : null;
|
|
2553
2568
|
function Ce(e) {
|
|
2554
2569
|
return e.replace(/^\/+|\/+$/g, "");
|
|
2555
2570
|
}
|
|
@@ -2575,10 +2590,10 @@ async function be(e, n, t) {
|
|
|
2575
2590
|
})();
|
|
2576
2591
|
return i.set(r, o), o;
|
|
2577
2592
|
}
|
|
2578
|
-
const
|
|
2593
|
+
const Ii = (e, n) => {
|
|
2579
2594
|
const t = e.findIndex((r) => Ce(r).split("/").at(-1) === n);
|
|
2580
2595
|
return t < 0 ? 0 : t;
|
|
2581
|
-
},
|
|
2596
|
+
}, vi = {
|
|
2582
2597
|
productID: ({ itemId: e }) => e,
|
|
2583
2598
|
name: ({ isVariantOf: e, name: n }) => n ?? e.productName,
|
|
2584
2599
|
slug: ({ isVariantOf: { linkText: e }, itemId: n }) => ae(e, n),
|
|
@@ -2601,7 +2616,7 @@ const mi = (e, n) => {
|
|
|
2601
2616
|
productId: c
|
|
2602
2617
|
},
|
|
2603
2618
|
itemId: d
|
|
2604
|
-
} = e, u =
|
|
2619
|
+
} = e, u = Ii(s, o), p = r[u], f = Ce(p).split("/"), h = t.storage.locale;
|
|
2605
2620
|
if (K(t) && h) {
|
|
2606
2621
|
const v = await be(t, c, h);
|
|
2607
2622
|
if (v) {
|
|
@@ -2650,7 +2665,7 @@ const mi = (e, n) => {
|
|
|
2650
2665
|
};
|
|
2651
2666
|
},
|
|
2652
2667
|
image: ({ images: e }, n) => {
|
|
2653
|
-
const t = (
|
|
2668
|
+
const t = (yi(e) ?? [Si]).map(
|
|
2654
2669
|
({ imageUrl: s, imageText: c, imageLabel: d }) => ({
|
|
2655
2670
|
alternateName: c ?? "",
|
|
2656
2671
|
url: s.replace("vteximg.com.br", "vtexassets.com"),
|
|
@@ -2704,7 +2719,7 @@ const mi = (e, n) => {
|
|
|
2704
2719
|
hasSpecifications: ({ isVariantOf: e }) => !!e.skuSpecifications?.length,
|
|
2705
2720
|
skuSpecifications: ({ isVariantOf: { skuSpecifications: e } }) => e ?? [],
|
|
2706
2721
|
specificationGroups: ({ isVariantOf: { specificationGroups: e } }) => e,
|
|
2707
|
-
releaseDate: ({ isVariantOf: { releaseDate: e } }) => e
|
|
2722
|
+
releaseDate: ({ isVariantOf: { releaseDate: e } }) => fi(e),
|
|
2708
2723
|
advertisement: ({ isVariantOf: { advertisement: e } }) => e,
|
|
2709
2724
|
deliveryPromiseBadges: ({ isVariantOf: { deliveryPromisesBadges: e } }) => e,
|
|
2710
2725
|
otherLocales: async (e, n, t) => {
|
|
@@ -2721,13 +2736,13 @@ const mi = (e, n) => {
|
|
|
2721
2736
|
return f ? { locale: p, slug: ae(f, a) } : null;
|
|
2722
2737
|
}).filter((p) => p !== null);
|
|
2723
2738
|
}
|
|
2724
|
-
},
|
|
2739
|
+
}, Oi = /* @__PURE__ */ new Set(["allSpecifications"]), Ci = {
|
|
2725
2740
|
hasVariant: (e) => e.isVariantOf.items.map((n) => F(n, e.isVariantOf)),
|
|
2726
2741
|
productGroupID: ({ isVariantOf: e }) => e.productId,
|
|
2727
2742
|
name: (e) => e.isVariantOf.productName,
|
|
2728
2743
|
skuVariants: (e) => e,
|
|
2729
2744
|
additionalProperty: ({ isVariantOf: { specificationGroups: e } }) => e.filter(
|
|
2730
|
-
(n) => !
|
|
2745
|
+
(n) => !Oi.has(n.name)
|
|
2731
2746
|
).flatMap(
|
|
2732
2747
|
({ specifications: n }) => n.flatMap(
|
|
2733
2748
|
({ name: t, values: r }) => r.map((i) => ({
|
|
@@ -2737,7 +2752,7 @@ const mi = (e, n) => {
|
|
|
2737
2752
|
}))
|
|
2738
2753
|
)
|
|
2739
2754
|
)
|
|
2740
|
-
},
|
|
2755
|
+
}, bi = {
|
|
2741
2756
|
propertyID: (e) => e.propertyID || vn(e),
|
|
2742
2757
|
name: ({ name: e }) => e,
|
|
2743
2758
|
value: ({ value: e }) => e,
|
|
@@ -2753,11 +2768,11 @@ const mi = (e, n) => {
|
|
|
2753
2768
|
({ offer: r }, { offer: i }) => mn(r, i)
|
|
2754
2769
|
);
|
|
2755
2770
|
return t ? t.sku : e[0];
|
|
2756
|
-
}, _n = (e) => e !== "" && !Number.isNaN(Number(e)),
|
|
2771
|
+
}, _n = (e) => e !== "" && !Number.isNaN(Number(e)), wi = /^vrn:recommendations:[^:]+:[^:]+:[^:]+$/, Di = async (e, { campaignVrn: n, userId: t, products: r }, i) => {
|
|
2757
2772
|
const {
|
|
2758
2773
|
clients: { commerce: a }
|
|
2759
2774
|
} = i, { salesChannel: o } = i.storage.channel, s = n?.trim();
|
|
2760
|
-
if (!s || !
|
|
2775
|
+
if (!s || !wi.test(s))
|
|
2761
2776
|
throw new E(`Invalid campaignVrn: "${n}"`);
|
|
2762
2777
|
const c = t?.trim();
|
|
2763
2778
|
if (t != null && !c)
|
|
@@ -2790,11 +2805,11 @@ const mi = (e, n) => {
|
|
|
2790
2805
|
release_desc: "release:desc",
|
|
2791
2806
|
discount_desc: "discount:desc",
|
|
2792
2807
|
score_desc: ""
|
|
2793
|
-
},
|
|
2808
|
+
}, Ai = async (e, { operationId: n }, { clients: { commerce: t } }) => {
|
|
2794
2809
|
if (!n)
|
|
2795
2810
|
throw new E("Missing operationId");
|
|
2796
2811
|
return t.orderEntry.getOperation({ operationId: n });
|
|
2797
|
-
},
|
|
2812
|
+
}, Pi = async (e, { orderFormId: n }, { clients: { commerce: t } }) => {
|
|
2798
2813
|
if (!n)
|
|
2799
2814
|
throw new E("Missing orderFormId");
|
|
2800
2815
|
const { items: r } = await t.orderEntry.getOrderFormItems({ orderFormId: n });
|
|
@@ -2810,17 +2825,17 @@ const mi = (e, n) => {
|
|
|
2810
2825
|
unitMultiplier: i.unitMultiplier ?? 1
|
|
2811
2826
|
}));
|
|
2812
2827
|
};
|
|
2813
|
-
async function
|
|
2828
|
+
async function _i(e, n, t, r) {
|
|
2814
2829
|
const i = n.slice(0, n.lastIndexOf("-"));
|
|
2815
2830
|
return (await be(e, t, r))?.linkId === i;
|
|
2816
2831
|
}
|
|
2817
|
-
const
|
|
2818
|
-
async function
|
|
2832
|
+
const Tn = "Invalid SkuId", En = "Slug was set but the fetched sku does not satisfy the slug condition.", Ti = "UseAdHocCard", Ei = (e) => X(e) || e instanceof Error && (e.message === Tn || e.message.startsWith(En));
|
|
2833
|
+
async function ki(e, n, t, r) {
|
|
2819
2834
|
const { linkText: i, productId: a } = n.isVariantOf;
|
|
2820
|
-
if (!(!t || !i || t.startsWith(i) || K(e) && r && _n(t.split("-").pop() ?? "") && await
|
|
2835
|
+
if (!(!t || !i || t.startsWith(i) || K(e) && r && _n(t.split("-").pop() ?? "") && await _i(e, t, a, r)))
|
|
2821
2836
|
throw new Error(`${En} slug: ${t}, linkText: ${i}`);
|
|
2822
2837
|
}
|
|
2823
|
-
async function
|
|
2838
|
+
async function Ui(e, n) {
|
|
2824
2839
|
if (n == null)
|
|
2825
2840
|
throw new E("Missing slug or id");
|
|
2826
2841
|
const {
|
|
@@ -2836,7 +2851,7 @@ async function Pi(e, n) {
|
|
|
2836
2851
|
throw new $(`No product found for id ${i.id}`);
|
|
2837
2852
|
return F(le(a.items), a);
|
|
2838
2853
|
}
|
|
2839
|
-
const
|
|
2854
|
+
const Ri = {
|
|
2840
2855
|
product: async (e, { locator: n }, t) => {
|
|
2841
2856
|
const r = xe(n), i = Ve(n), a = Sr(n), o = fr(n);
|
|
2842
2857
|
r && se(t, r), i && ye(t, i);
|
|
@@ -2846,13 +2861,13 @@ const _i = {
|
|
|
2846
2861
|
try {
|
|
2847
2862
|
const c = a ?? o?.split("-").pop() ?? "";
|
|
2848
2863
|
if (!_n(c))
|
|
2849
|
-
throw new Error(
|
|
2864
|
+
throw new Error(Tn);
|
|
2850
2865
|
const d = await s.load(c);
|
|
2851
|
-
return await
|
|
2866
|
+
return await ki(t, d, o, i), d;
|
|
2852
2867
|
} catch (c) {
|
|
2853
|
-
if (!
|
|
2868
|
+
if (!Ei(c))
|
|
2854
2869
|
throw c;
|
|
2855
|
-
return
|
|
2870
|
+
return Ui(t, o);
|
|
2856
2871
|
}
|
|
2857
2872
|
},
|
|
2858
2873
|
collection: (e, { slug: n }, t) => {
|
|
@@ -3161,7 +3176,7 @@ const _i = {
|
|
|
3161
3176
|
} = t, s = z(L(i?.cookie ?? "", r))?.userId ?? "";
|
|
3162
3177
|
if (!s)
|
|
3163
3178
|
return !0;
|
|
3164
|
-
const c = await a.licenseManager.isResourceGranted({ userId: s, resourceKey:
|
|
3179
|
+
const c = await a.licenseManager.isResourceGranted({ userId: s, resourceKey: Ti }).catch(() => null);
|
|
3165
3180
|
return typeof c == "boolean" ? c : !0;
|
|
3166
3181
|
},
|
|
3167
3182
|
listUserQuotes: async (e, n, t) => {
|
|
@@ -3306,10 +3321,10 @@ const _i = {
|
|
|
3306
3321
|
geoCoordinates: n
|
|
3307
3322
|
});
|
|
3308
3323
|
},
|
|
3309
|
-
orderEntryOperation:
|
|
3310
|
-
orderFormItems:
|
|
3311
|
-
recommendations:
|
|
3312
|
-
},
|
|
3324
|
+
orderEntryOperation: Ai,
|
|
3325
|
+
orderFormItems: Pi,
|
|
3326
|
+
recommendations: Di
|
|
3327
|
+
}, Fi = {
|
|
3313
3328
|
reviewRating: () => ({
|
|
3314
3329
|
ratingValue: 5,
|
|
3315
3330
|
bestRating: 5
|
|
@@ -3317,7 +3332,7 @@ const _i = {
|
|
|
3317
3332
|
author: () => ({
|
|
3318
3333
|
name: ""
|
|
3319
3334
|
})
|
|
3320
|
-
},
|
|
3335
|
+
}, Ni = (e, n, t) => n ? e.key === "category-1" : t ? e.key === "brand" : !1, Li = {
|
|
3321
3336
|
suggestions: async (e, n, t) => {
|
|
3322
3337
|
const {
|
|
3323
3338
|
clients: { search: r }
|
|
@@ -3368,7 +3383,7 @@ const _i = {
|
|
|
3368
3383
|
t.storage.searchArgs = e;
|
|
3369
3384
|
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;
|
|
3370
3385
|
return i.filter(
|
|
3371
|
-
(d) => !a || !
|
|
3386
|
+
(d) => !a || !Ni(d, o, s)
|
|
3372
3387
|
);
|
|
3373
3388
|
},
|
|
3374
3389
|
metadata: async ({ productSearchPromise: e }) => {
|
|
@@ -3380,12 +3395,12 @@ const _i = {
|
|
|
3380
3395
|
};
|
|
3381
3396
|
},
|
|
3382
3397
|
searchId: async ({ productSearchPromise: e }) => (await e).searchId
|
|
3383
|
-
},
|
|
3398
|
+
}, Bi = {
|
|
3384
3399
|
title: ({ title: e }) => e ?? "",
|
|
3385
3400
|
description: ({ description: e }) => e ?? "",
|
|
3386
3401
|
canonical: ({ canonical: e }) => e ?? "",
|
|
3387
3402
|
titleTemplate: () => ""
|
|
3388
|
-
},
|
|
3403
|
+
}, $i = ["bd", "d", "h", "m"], Mi = (e) => $i.includes(e), zi = {
|
|
3389
3404
|
bd: {
|
|
3390
3405
|
0: "Today",
|
|
3391
3406
|
1: "In 1 business day",
|
|
@@ -3406,16 +3421,16 @@ const _i = {
|
|
|
3406
3421
|
1: "In 1 minute",
|
|
3407
3422
|
other: "Up to # minutes"
|
|
3408
3423
|
}
|
|
3409
|
-
},
|
|
3410
|
-
const [n, t] = [e.split(/\D+/)[0], e.split(/[0-9]+/)[1]], r = n !== "" && !Number.isNaN(Number(n)), i =
|
|
3424
|
+
}, kn = (e) => {
|
|
3425
|
+
const [n, t] = [e.split(/\D+/)[0], e.split(/[0-9]+/)[1]], r = n !== "" && !Number.isNaN(Number(n)), i = Mi(t);
|
|
3411
3426
|
if (!r || !i)
|
|
3412
3427
|
return "";
|
|
3413
3428
|
const a = Number(n) < 2 ? Number(n) : "other";
|
|
3414
|
-
return
|
|
3415
|
-
},
|
|
3429
|
+
return zi[t][a].replace("#", n) ?? "";
|
|
3430
|
+
}, Vi = {
|
|
3416
3431
|
carrier: (e) => e?.friendlyName ?? e?.name ?? "",
|
|
3417
3432
|
price: (e) => e?.price ? e.price / 100 : e?.price,
|
|
3418
|
-
localizedEstimates: (e) => e?.shippingEstimate ?
|
|
3433
|
+
localizedEstimates: (e) => e?.shippingEstimate ? kn(e.shippingEstimate) : ""
|
|
3419
3434
|
}, Ze = "skuvariation";
|
|
3420
3435
|
function en(e, n) {
|
|
3421
3436
|
const t = `${Ze}${n}`.toLowerCase(), r = e.find(
|
|
@@ -3428,7 +3443,7 @@ function en(e, n) {
|
|
|
3428
3443
|
);
|
|
3429
3444
|
return i || e[0];
|
|
3430
3445
|
}
|
|
3431
|
-
function
|
|
3446
|
+
function xi(e, n, t) {
|
|
3432
3447
|
const r = {};
|
|
3433
3448
|
return e.forEach((i) => {
|
|
3434
3449
|
const a = i.variations;
|
|
@@ -3446,24 +3461,24 @@ function nn(e) {
|
|
|
3446
3461
|
n[t.name] = t.values[0];
|
|
3447
3462
|
}), n;
|
|
3448
3463
|
}
|
|
3449
|
-
function
|
|
3464
|
+
function qi(e) {
|
|
3450
3465
|
const n = {};
|
|
3451
3466
|
return e?.forEach((t) => {
|
|
3452
3467
|
n[t.field.originalName ?? t.field.name] = t.values.map((r) => r.originalName ?? r.name);
|
|
3453
3468
|
}), n;
|
|
3454
3469
|
}
|
|
3455
|
-
function
|
|
3470
|
+
function ji(e, n) {
|
|
3456
3471
|
return Number.isNaN(Number(e) - Number(n)) ? e < n ? -1 : e > n ? 1 : 0 : Number(e) - Number(n);
|
|
3457
3472
|
}
|
|
3458
|
-
function
|
|
3473
|
+
function Wi(e) {
|
|
3459
3474
|
const n = e;
|
|
3460
3475
|
for (const t in e)
|
|
3461
3476
|
e[t].every(
|
|
3462
3477
|
(i) => !Number.isNaN(Number(i.value))
|
|
3463
|
-
) && e[t].sort((i, a) =>
|
|
3478
|
+
) && e[t].sort((i, a) => ji(i.value, a.value));
|
|
3464
3479
|
return n;
|
|
3465
3480
|
}
|
|
3466
|
-
function
|
|
3481
|
+
function Hi(e, n, t) {
|
|
3467
3482
|
const r = {}, i = /* @__PURE__ */ new Set();
|
|
3468
3483
|
return e.forEach((a) => {
|
|
3469
3484
|
if (a.variations.length === 0)
|
|
@@ -3504,38 +3519,38 @@ function Vi(e, n, t) {
|
|
|
3504
3519
|
};
|
|
3505
3520
|
r[c.name] ? r[c.name].push(p) : r[c.name] = [p];
|
|
3506
3521
|
});
|
|
3507
|
-
}),
|
|
3522
|
+
}), Wi(r);
|
|
3508
3523
|
}
|
|
3509
|
-
const
|
|
3524
|
+
const Gi = {
|
|
3510
3525
|
activeVariations: (e) => nn(e.variations),
|
|
3511
|
-
allVariantsByName: (e) =>
|
|
3512
|
-
slugsMap: (e, n) =>
|
|
3526
|
+
allVariantsByName: (e) => qi(e.isVariantOf.skuSpecifications),
|
|
3527
|
+
slugsMap: (e, n) => xi(
|
|
3513
3528
|
e.isVariantOf.items,
|
|
3514
3529
|
n.dominantVariantName ?? e.variations[0]?.name,
|
|
3515
3530
|
e.isVariantOf.linkText
|
|
3516
3531
|
),
|
|
3517
3532
|
availableVariations: (e, n) => {
|
|
3518
3533
|
const t = n.dominantVariantName ?? e.variations[0]?.name, i = nn(e.variations)[t];
|
|
3519
|
-
return
|
|
3534
|
+
return Hi(
|
|
3520
3535
|
e.isVariantOf.items,
|
|
3521
3536
|
t,
|
|
3522
3537
|
i
|
|
3523
3538
|
);
|
|
3524
3539
|
},
|
|
3525
3540
|
allVariantProducts: (e) => e.isVariantOf.items.map((n) => F(n, e.isVariantOf))
|
|
3526
|
-
},
|
|
3541
|
+
}, Xi = {
|
|
3527
3542
|
"pickup-in-point": "Pickup",
|
|
3528
3543
|
delivery: "Delivery",
|
|
3529
3544
|
pickup: "Pickup",
|
|
3530
3545
|
"take-away": "Take away",
|
|
3531
3546
|
"": ""
|
|
3532
|
-
},
|
|
3547
|
+
}, Yi = {
|
|
3533
3548
|
deliveryOptionsData: (e) => {
|
|
3534
3549
|
const { shippingData: n, items: t } = e, r = n?.logisticsInfo || [], i = n?.selectedAddresses || n?.availableAddresses || [n?.address], a = r.reduce(
|
|
3535
3550
|
(d, u) => {
|
|
3536
|
-
const p = u?.selectedSla || "", f = u?.selectedDeliveryChannel || u?.deliveryChannel || "", h = u?.deliveryCompany || "", v = u?.deliveryWindow, l = u?.pickupStoreInfo, g = u?.shippingEstimate || "", m = u?.shippingEstimate ?
|
|
3551
|
+
const p = u?.selectedSla || "", f = u?.selectedDeliveryChannel || u?.deliveryChannel || "", h = u?.deliveryCompany || "", v = u?.deliveryWindow, l = u?.pickupStoreInfo, g = u?.shippingEstimate || "", m = u?.shippingEstimate ? kn(u?.shippingEstimate) : "", S = u?.shippingEstimateDate || "", O = u?.addressId || "", w = u?.itemIndex ?? 0, b = t?.[w], T = b?.seller || "", I = `${p}|${f}|${h}|${T}|${g}|${S}|${O}|${v?.startDateUtc}|${v?.endDateUtc}`, D = i?.find(
|
|
3537
3552
|
(C) => C?.addressId === O
|
|
3538
|
-
), A = `${
|
|
3553
|
+
), A = `${Xi[f] || ""} ${m} ${D?.neighborhood ? `to ${D?.neighborhood}` : ""}`.trim(), { taxPriceTagsTotal: _, taxPriceTags: P } = Ji(
|
|
3539
3554
|
b?.priceTags ?? []
|
|
3540
3555
|
), R = (b?.sellingPrice ?? 0) * (b?.quantity ?? 0) + (b?.tax ?? 0) + (_ ?? 0);
|
|
3541
3556
|
return d[I] || (d[I] = {
|
|
@@ -3546,7 +3561,7 @@ const xi = {
|
|
|
3546
3561
|
deliveryWindow: v,
|
|
3547
3562
|
shippingEstimate: g,
|
|
3548
3563
|
shippingEstimateDate: S,
|
|
3549
|
-
seller:
|
|
3564
|
+
seller: T,
|
|
3550
3565
|
friendlyShippingEstimate: m,
|
|
3551
3566
|
friendlyDeliveryOptionName: A,
|
|
3552
3567
|
address: D,
|
|
@@ -3593,7 +3608,7 @@ const xi = {
|
|
|
3593
3608
|
) || [];
|
|
3594
3609
|
}
|
|
3595
3610
|
};
|
|
3596
|
-
function
|
|
3611
|
+
function Ji(e) {
|
|
3597
3612
|
const t = e.filter(
|
|
3598
3613
|
(i) => i?.name?.includes("TAX")
|
|
3599
3614
|
), r = t.reduce(
|
|
@@ -3605,28 +3620,28 @@ function Wi(e) {
|
|
|
3605
3620
|
taxPriceTagsTotal: r
|
|
3606
3621
|
};
|
|
3607
3622
|
}
|
|
3608
|
-
const
|
|
3623
|
+
const Ki = {
|
|
3609
3624
|
StoreCollection: hn,
|
|
3610
3625
|
StoreAggregateOffer: lr,
|
|
3611
|
-
StoreProduct:
|
|
3612
|
-
StoreSeo:
|
|
3626
|
+
StoreProduct: vi,
|
|
3627
|
+
StoreSeo: Bi,
|
|
3613
3628
|
StoreFacet: yr,
|
|
3614
3629
|
StoreFacetBoolean: Ir,
|
|
3615
3630
|
StoreFacetRange: vr,
|
|
3616
3631
|
StoreFacetValueBoolean: Or,
|
|
3617
3632
|
StoreOffer: li,
|
|
3618
3633
|
StoreAggregateRating: dr,
|
|
3619
|
-
StoreReview:
|
|
3620
|
-
StoreProductGroup:
|
|
3621
|
-
StoreSearchResult:
|
|
3622
|
-
StorePropertyValue:
|
|
3623
|
-
SkuVariants:
|
|
3624
|
-
ShippingSLA:
|
|
3625
|
-
UserOrderResult:
|
|
3634
|
+
StoreReview: Fi,
|
|
3635
|
+
StoreProductGroup: Ci,
|
|
3636
|
+
StoreSearchResult: Li,
|
|
3637
|
+
StorePropertyValue: bi,
|
|
3638
|
+
SkuVariants: Gi,
|
|
3639
|
+
ShippingSLA: Vi,
|
|
3640
|
+
UserOrderResult: Yi,
|
|
3626
3641
|
ObjectOrString: ci,
|
|
3627
|
-
Query:
|
|
3642
|
+
Query: Ri,
|
|
3628
3643
|
Mutation: ai
|
|
3629
|
-
},
|
|
3644
|
+
}, Qi = () => Ki, Zi = `"""
|
|
3630
3645
|
Address information.
|
|
3631
3646
|
"""
|
|
3632
3647
|
type Address {
|
|
@@ -3671,7 +3686,7 @@ type Address {
|
|
|
3671
3686
|
"""
|
|
3672
3687
|
geoCoordinates: [Float]
|
|
3673
3688
|
}
|
|
3674
|
-
`,
|
|
3689
|
+
`, ea = `"""
|
|
3675
3690
|
Advertisement information about a specific product in a campaign
|
|
3676
3691
|
"""
|
|
3677
3692
|
type Advertisement {
|
|
@@ -3696,7 +3711,7 @@ type Advertisement {
|
|
|
3696
3711
|
"""
|
|
3697
3712
|
adResponseId: String!
|
|
3698
3713
|
}
|
|
3699
|
-
`,
|
|
3714
|
+
`, na = `"""
|
|
3700
3715
|
Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers.
|
|
3701
3716
|
"""
|
|
3702
3717
|
type StoreAggregateOffer {
|
|
@@ -3725,7 +3740,7 @@ type StoreAggregateOffer {
|
|
|
3725
3740
|
"""
|
|
3726
3741
|
offers: [StoreOffer!]!
|
|
3727
3742
|
}
|
|
3728
|
-
`,
|
|
3743
|
+
`, ta = `"""
|
|
3729
3744
|
Average rating, based on multiple ratings or reviews.
|
|
3730
3745
|
"""
|
|
3731
3746
|
type StoreAggregateRating {
|
|
@@ -3738,7 +3753,7 @@ type StoreAggregateRating {
|
|
|
3738
3753
|
"""
|
|
3739
3754
|
reviewCount: Int!
|
|
3740
3755
|
}
|
|
3741
|
-
`,
|
|
3756
|
+
`, ra = `"""
|
|
3742
3757
|
information about the author of a product review or rating.
|
|
3743
3758
|
"""
|
|
3744
3759
|
type StoreAuthor {
|
|
@@ -3747,7 +3762,7 @@ type StoreAuthor {
|
|
|
3747
3762
|
"""
|
|
3748
3763
|
name: String!
|
|
3749
3764
|
}
|
|
3750
|
-
`,
|
|
3765
|
+
`, ia = `"""
|
|
3751
3766
|
Brand of a given product.
|
|
3752
3767
|
"""
|
|
3753
3768
|
type StoreBrand {
|
|
@@ -3756,7 +3771,7 @@ type StoreBrand {
|
|
|
3756
3771
|
"""
|
|
3757
3772
|
name: String!
|
|
3758
3773
|
}
|
|
3759
|
-
`,
|
|
3774
|
+
`, aa = `"""
|
|
3760
3775
|
Item of a list.
|
|
3761
3776
|
"""
|
|
3762
3777
|
type StoreListItem {
|
|
@@ -3787,7 +3802,7 @@ type StoreBreadcrumbList {
|
|
|
3787
3802
|
"""
|
|
3788
3803
|
numberOfItems: Int!
|
|
3789
3804
|
}
|
|
3790
|
-
`,
|
|
3805
|
+
`, oa = `"""
|
|
3791
3806
|
Shopping cart message.
|
|
3792
3807
|
"""
|
|
3793
3808
|
type StoreCartMessage {
|
|
@@ -3824,7 +3839,7 @@ input IStoreCart {
|
|
|
3824
3839
|
"""
|
|
3825
3840
|
order: IStoreOrder!
|
|
3826
3841
|
}
|
|
3827
|
-
`,
|
|
3842
|
+
`, sa = `"""
|
|
3828
3843
|
Product collection type. Possible values are \`Department\`, \`Category\`, \`Brand\` or \`Collection\`.
|
|
3829
3844
|
|
|
3830
3845
|
\`SubCategory\` and \`Cluster\` are still declared for backward compatibility but are
|
|
@@ -3939,7 +3954,7 @@ type StoreCollectionLocale {
|
|
|
3939
3954
|
"""
|
|
3940
3955
|
slug: String!
|
|
3941
3956
|
}
|
|
3942
|
-
`,
|
|
3957
|
+
`, ca = `"""
|
|
3943
3958
|
Delivery Promise badge.
|
|
3944
3959
|
"""
|
|
3945
3960
|
type DeliveryPromiseBadge {
|
|
@@ -3948,7 +3963,7 @@ type DeliveryPromiseBadge {
|
|
|
3948
3963
|
"""
|
|
3949
3964
|
typeName: String
|
|
3950
3965
|
}
|
|
3951
|
-
`,
|
|
3966
|
+
`, la = `union StoreFacet = StoreFacetRange | StoreFacetBoolean
|
|
3952
3967
|
|
|
3953
3968
|
"""
|
|
3954
3969
|
Search facet range information.
|
|
@@ -4025,7 +4040,7 @@ type StoreFacetValueBoolean {
|
|
|
4025
4040
|
"""
|
|
4026
4041
|
quantity: Int
|
|
4027
4042
|
}
|
|
4028
|
-
`,
|
|
4043
|
+
`, da = `"""
|
|
4029
4044
|
Image.
|
|
4030
4045
|
"""
|
|
4031
4046
|
type StoreImage {
|
|
@@ -4052,7 +4067,7 @@ input IStoreImage {
|
|
|
4052
4067
|
"""
|
|
4053
4068
|
alternateName: String!
|
|
4054
4069
|
}
|
|
4055
|
-
`,
|
|
4070
|
+
`, ua = `type Mutation {
|
|
4056
4071
|
"""
|
|
4057
4072
|
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\`.
|
|
4058
4073
|
"""
|
|
@@ -4094,7 +4109,7 @@ input IStoreImage {
|
|
|
4094
4109
|
"""
|
|
4095
4110
|
startRecommendationSession: Boolean!
|
|
4096
4111
|
}
|
|
4097
|
-
`,
|
|
4112
|
+
`, pa = `"""
|
|
4098
4113
|
Newsletter information.
|
|
4099
4114
|
"""
|
|
4100
4115
|
type PersonNewsletter {
|
|
@@ -4117,8 +4132,8 @@ input IPersonNewsletter {
|
|
|
4117
4132
|
"""
|
|
4118
4133
|
email: String!
|
|
4119
4134
|
}
|
|
4120
|
-
`,
|
|
4121
|
-
`,
|
|
4135
|
+
`, ga = `scalar ObjectOrString
|
|
4136
|
+
`, ma = `"""
|
|
4122
4137
|
Offer information.
|
|
4123
4138
|
"""
|
|
4124
4139
|
type StoreOffer {
|
|
@@ -4211,7 +4226,7 @@ input IStoreOffer {
|
|
|
4211
4226
|
"""
|
|
4212
4227
|
priceToken: String
|
|
4213
4228
|
}
|
|
4214
|
-
`,
|
|
4229
|
+
`, ha = `"""
|
|
4215
4230
|
Information of a specific order.
|
|
4216
4231
|
"""
|
|
4217
4232
|
type StoreOrder {
|
|
@@ -4252,7 +4267,7 @@ input IStoreOrder {
|
|
|
4252
4267
|
"""
|
|
4253
4268
|
shouldSplitItem: Boolean
|
|
4254
4269
|
}
|
|
4255
|
-
`,
|
|
4270
|
+
`, fa = `"""
|
|
4256
4271
|
Commercial Authorization response.
|
|
4257
4272
|
"""
|
|
4258
4273
|
type CommercialAuthorizationResponse {
|
|
@@ -4651,7 +4666,7 @@ type ProcessOrderAuthorizationRule {
|
|
|
4651
4666
|
"""
|
|
4652
4667
|
rule: CommercialAuthorizationRule!
|
|
4653
4668
|
}
|
|
4654
|
-
`,
|
|
4669
|
+
`, Sa = `"""
|
|
4655
4670
|
Input for uploading a file to the Order Entry Service.
|
|
4656
4671
|
The file is transmitted as a Base64-encoded string so it can travel
|
|
4657
4672
|
through the standard GraphQL JSON pipeline without multipart support.
|
|
@@ -4712,7 +4727,7 @@ type StoreOrderFormCartItem {
|
|
|
4712
4727
|
seller: String!
|
|
4713
4728
|
unitMultiplier: Float
|
|
4714
4729
|
}
|
|
4715
|
-
`,
|
|
4730
|
+
`, ya = `"""
|
|
4716
4731
|
Organization.
|
|
4717
4732
|
"""
|
|
4718
4733
|
type StoreOrganization {
|
|
@@ -4749,7 +4764,7 @@ type StoreContract {
|
|
|
4749
4764
|
"""
|
|
4750
4765
|
isActive: Boolean!
|
|
4751
4766
|
}
|
|
4752
|
-
`,
|
|
4767
|
+
`, Ia = `"""
|
|
4753
4768
|
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.
|
|
4754
4769
|
"""
|
|
4755
4770
|
type StorePageInfo {
|
|
@@ -4774,7 +4789,7 @@ type StorePageInfo {
|
|
|
4774
4789
|
"""
|
|
4775
4790
|
totalCount: Int!
|
|
4776
4791
|
}
|
|
4777
|
-
`,
|
|
4792
|
+
`, va = `"""
|
|
4778
4793
|
Input type for setting a new password.
|
|
4779
4794
|
"""
|
|
4780
4795
|
input ISetPassword {
|
|
@@ -4817,7 +4832,7 @@ type SetPasswordResponse {
|
|
|
4817
4832
|
"""
|
|
4818
4833
|
message: String
|
|
4819
4834
|
}
|
|
4820
|
-
`,
|
|
4835
|
+
`, Oa = `"""
|
|
4821
4836
|
Client profile data.
|
|
4822
4837
|
"""
|
|
4823
4838
|
type StorePerson {
|
|
@@ -4860,7 +4875,7 @@ input IStorePerson {
|
|
|
4860
4875
|
"""
|
|
4861
4876
|
familyName: String!
|
|
4862
4877
|
}
|
|
4863
|
-
`,
|
|
4878
|
+
`, Ca = `type PickupPointAddress {
|
|
4864
4879
|
"""
|
|
4865
4880
|
Address city.
|
|
4866
4881
|
"""
|
|
@@ -4939,7 +4954,7 @@ type PickupPoints {
|
|
|
4939
4954
|
"""
|
|
4940
4955
|
pickupPointsHash: String
|
|
4941
4956
|
}
|
|
4942
|
-
`,
|
|
4957
|
+
`, ba = `"""
|
|
4943
4958
|
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.
|
|
4944
4959
|
"""
|
|
4945
4960
|
type StoreProduct {
|
|
@@ -5107,7 +5122,7 @@ input IStoreProduct {
|
|
|
5107
5122
|
"""
|
|
5108
5123
|
additionalProperty: [IStorePropertyValue!]
|
|
5109
5124
|
}
|
|
5110
|
-
`,
|
|
5125
|
+
`, wa = `"""
|
|
5111
5126
|
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.
|
|
5112
5127
|
"""
|
|
5113
5128
|
type StoreProductGroup {
|
|
@@ -5134,7 +5149,7 @@ type StoreProductGroup {
|
|
|
5134
5149
|
"""
|
|
5135
5150
|
skuVariants: SkuVariants
|
|
5136
5151
|
}
|
|
5137
|
-
`,
|
|
5152
|
+
`, Da = `type Profile {
|
|
5138
5153
|
"""
|
|
5139
5154
|
Collection of user's address
|
|
5140
5155
|
"""
|
|
@@ -5195,7 +5210,7 @@ type ProfileAddress {
|
|
|
5195
5210
|
"""
|
|
5196
5211
|
geoCoordinate: [Float]
|
|
5197
5212
|
}
|
|
5198
|
-
`,
|
|
5213
|
+
`, Aa = `"""
|
|
5199
5214
|
Properties that can be associated with products and products groups.
|
|
5200
5215
|
"""
|
|
5201
5216
|
type StorePropertyValue {
|
|
@@ -5235,7 +5250,7 @@ input IStorePropertyValue {
|
|
|
5235
5250
|
"""
|
|
5236
5251
|
valueReference: ObjectOrString!
|
|
5237
5252
|
}
|
|
5238
|
-
`,
|
|
5253
|
+
`, Pa = `"""
|
|
5239
5254
|
Each product edge contains a \`node\`, with product information, and a \`cursor\`, that can be used as a reference for pagination.
|
|
5240
5255
|
"""
|
|
5241
5256
|
type StoreProductEdge {
|
|
@@ -5884,7 +5899,7 @@ type StoreAccountProfile {
|
|
|
5884
5899
|
email: String
|
|
5885
5900
|
id: String
|
|
5886
5901
|
}
|
|
5887
|
-
`,
|
|
5902
|
+
`, _a = `"""
|
|
5888
5903
|
Summary of a quote returned in list results.
|
|
5889
5904
|
"""
|
|
5890
5905
|
type UserQuoteSummary {
|
|
@@ -5949,7 +5964,7 @@ type UserQuoteListPaging {
|
|
|
5949
5964
|
"""
|
|
5950
5965
|
perPage: Int!
|
|
5951
5966
|
}
|
|
5952
|
-
`,
|
|
5967
|
+
`, Ta = `type RecommendationResponse {
|
|
5953
5968
|
products: [StoreProduct!]!
|
|
5954
5969
|
correlationId: String!
|
|
5955
5970
|
campaign: RecommendationCampaign!
|
|
@@ -5960,7 +5975,7 @@ type RecommendationCampaign {
|
|
|
5960
5975
|
title: String
|
|
5961
5976
|
type: String!
|
|
5962
5977
|
}
|
|
5963
|
-
`,
|
|
5978
|
+
`, Ea = `"""
|
|
5964
5979
|
Information of a given review rating.
|
|
5965
5980
|
"""
|
|
5966
5981
|
type StoreReviewRating {
|
|
@@ -5987,7 +6002,7 @@ type StoreReview {
|
|
|
5987
6002
|
"""
|
|
5988
6003
|
author: StoreAuthor!
|
|
5989
6004
|
}
|
|
5990
|
-
`,
|
|
6005
|
+
`, ka = `"""
|
|
5991
6006
|
Whether a saved card is personally owned by the buyer or shared by their
|
|
5992
6007
|
Organization/Contract. Resolved server-side by the Saved-cards service from
|
|
5993
6008
|
the buyer's \`useAdHocCard\` role — never inferred client-side.
|
|
@@ -6051,7 +6066,7 @@ type SavedCardListResult {
|
|
|
6051
6066
|
"""
|
|
6052
6067
|
list: [SavedCard!]
|
|
6053
6068
|
}
|
|
6054
|
-
`,
|
|
6069
|
+
`, Ua = `"""
|
|
6055
6070
|
Search Engine Optimization (SEO) tags data.
|
|
6056
6071
|
"""
|
|
6057
6072
|
type StoreSeo {
|
|
@@ -6072,7 +6087,7 @@ type StoreSeo {
|
|
|
6072
6087
|
"""
|
|
6073
6088
|
canonical: String!
|
|
6074
6089
|
}
|
|
6075
|
-
`,
|
|
6090
|
+
`, Ra = `"""
|
|
6076
6091
|
Currency information.
|
|
6077
6092
|
"""
|
|
6078
6093
|
type StoreCurrency {
|
|
@@ -6347,7 +6362,7 @@ input IStoreSession {
|
|
|
6347
6362
|
"""
|
|
6348
6363
|
refreshAfter: String
|
|
6349
6364
|
}
|
|
6350
|
-
`,
|
|
6365
|
+
`, Fa = `"""
|
|
6351
6366
|
Shipping Simulation item input.
|
|
6352
6367
|
"""
|
|
6353
6368
|
input IShippingItem {
|
|
@@ -6678,7 +6693,7 @@ type MessageFields {
|
|
|
6678
6693
|
"""
|
|
6679
6694
|
skuName: String
|
|
6680
6695
|
}
|
|
6681
|
-
`,
|
|
6696
|
+
`, Na = `type SkuVariants {
|
|
6682
6697
|
"""
|
|
6683
6698
|
SKU property values for the current SKU.
|
|
6684
6699
|
"""
|
|
@@ -6773,7 +6788,7 @@ Example:
|
|
|
6773
6788
|
\`\`\`
|
|
6774
6789
|
"""
|
|
6775
6790
|
scalar FormattedVariants
|
|
6776
|
-
`,
|
|
6791
|
+
`, La = `"""
|
|
6777
6792
|
Status used to indicate a message type. For instance, a shopping cart informative or error message.
|
|
6778
6793
|
"""
|
|
6779
6794
|
enum StoreStatus {
|
|
@@ -6781,7 +6796,7 @@ enum StoreStatus {
|
|
|
6781
6796
|
WARNING
|
|
6782
6797
|
ERROR
|
|
6783
6798
|
}
|
|
6784
|
-
`,
|
|
6799
|
+
`, Ba = `scalar JSONObject
|
|
6785
6800
|
|
|
6786
6801
|
type UserOrder {
|
|
6787
6802
|
orderId: String
|
|
@@ -7605,69 +7620,69 @@ type UserOrderBudgetAllocationLinkedEntity {
|
|
|
7605
7620
|
type: String
|
|
7606
7621
|
id: String
|
|
7607
7622
|
}
|
|
7608
|
-
`,
|
|
7609
|
-
"./address.graphql":
|
|
7610
|
-
"./advertisement.graphql":
|
|
7611
|
-
"./aggregateOffer.graphql":
|
|
7612
|
-
"./aggregateRating.graphql":
|
|
7613
|
-
"./author.graphql":
|
|
7614
|
-
"./brand.graphql":
|
|
7615
|
-
"./breadcrumb.graphql":
|
|
7616
|
-
"./cart.graphql":
|
|
7617
|
-
"./collection.graphql":
|
|
7618
|
-
"./deliveryPromisesBadge.graphql":
|
|
7619
|
-
"./facet.graphql":
|
|
7620
|
-
"./image.graphql":
|
|
7621
|
-
"./mutation.graphql":
|
|
7622
|
-
"./newsletter.graphql":
|
|
7623
|
-
"./objectOrString.graphql":
|
|
7624
|
-
"./offer.graphql":
|
|
7625
|
-
"./order.graphql":
|
|
7626
|
-
"./orderCommercialAuthorizaton.graphql":
|
|
7627
|
-
"./orderEntry.graphql":
|
|
7628
|
-
"./organization.graphql":
|
|
7629
|
-
"./pageInfo.graphql":
|
|
7630
|
-
"./password.graphql":
|
|
7631
|
-
"./person.graphql":
|
|
7632
|
-
"./pickupPoints.graphql":
|
|
7633
|
-
"./product.graphql":
|
|
7634
|
-
"./productGroup.graphql":
|
|
7635
|
-
"./profile.graphql":
|
|
7636
|
-
"./propertyValue.graphql":
|
|
7637
|
-
"./query.graphql":
|
|
7638
|
-
"./quote.graphql":
|
|
7639
|
-
"./recommendation.graphql":
|
|
7640
|
-
"./review.graphql":
|
|
7641
|
-
"./savedCard.graphql":
|
|
7642
|
-
"./seo.graphql":
|
|
7643
|
-
"./session.graphql":
|
|
7644
|
-
"./shipping.graphql":
|
|
7645
|
-
"./skuVariants.graphql":
|
|
7646
|
-
"./status.graphql":
|
|
7647
|
-
"./userOrder.graphql":
|
|
7648
|
-
}),
|
|
7649
|
-
Object.values(
|
|
7623
|
+
`, $a = /* @__PURE__ */ Object.assign({
|
|
7624
|
+
"./address.graphql": Zi,
|
|
7625
|
+
"./advertisement.graphql": ea,
|
|
7626
|
+
"./aggregateOffer.graphql": na,
|
|
7627
|
+
"./aggregateRating.graphql": ta,
|
|
7628
|
+
"./author.graphql": ra,
|
|
7629
|
+
"./brand.graphql": ia,
|
|
7630
|
+
"./breadcrumb.graphql": aa,
|
|
7631
|
+
"./cart.graphql": oa,
|
|
7632
|
+
"./collection.graphql": sa,
|
|
7633
|
+
"./deliveryPromisesBadge.graphql": ca,
|
|
7634
|
+
"./facet.graphql": la,
|
|
7635
|
+
"./image.graphql": da,
|
|
7636
|
+
"./mutation.graphql": ua,
|
|
7637
|
+
"./newsletter.graphql": pa,
|
|
7638
|
+
"./objectOrString.graphql": ga,
|
|
7639
|
+
"./offer.graphql": ma,
|
|
7640
|
+
"./order.graphql": ha,
|
|
7641
|
+
"./orderCommercialAuthorizaton.graphql": fa,
|
|
7642
|
+
"./orderEntry.graphql": Sa,
|
|
7643
|
+
"./organization.graphql": ya,
|
|
7644
|
+
"./pageInfo.graphql": Ia,
|
|
7645
|
+
"./password.graphql": va,
|
|
7646
|
+
"./person.graphql": Oa,
|
|
7647
|
+
"./pickupPoints.graphql": Ca,
|
|
7648
|
+
"./product.graphql": ba,
|
|
7649
|
+
"./productGroup.graphql": wa,
|
|
7650
|
+
"./profile.graphql": Da,
|
|
7651
|
+
"./propertyValue.graphql": Aa,
|
|
7652
|
+
"./query.graphql": Pa,
|
|
7653
|
+
"./quote.graphql": _a,
|
|
7654
|
+
"./recommendation.graphql": Ta,
|
|
7655
|
+
"./review.graphql": Ea,
|
|
7656
|
+
"./savedCard.graphql": ka,
|
|
7657
|
+
"./seo.graphql": Ua,
|
|
7658
|
+
"./session.graphql": Ra,
|
|
7659
|
+
"./shipping.graphql": Fa,
|
|
7660
|
+
"./skuVariants.graphql": Na,
|
|
7661
|
+
"./status.graphql": La,
|
|
7662
|
+
"./userOrder.graphql": Ba
|
|
7663
|
+
}), Ma = $n(
|
|
7664
|
+
Object.values($a).map((e) => Mn(e)).reduce(
|
|
7650
7665
|
(e, n) => tn([e, n], { sort: !0 })
|
|
7651
7666
|
)
|
|
7652
|
-
),
|
|
7667
|
+
), za = Ma, io = async (e) => (n) => (n.storage = {
|
|
7653
7668
|
channel: ee.parse(e.channel),
|
|
7654
7669
|
flags: e.flags ?? {},
|
|
7655
7670
|
locale: e.locale,
|
|
7656
7671
|
cookies: /* @__PURE__ */ new Map()
|
|
7657
7672
|
}, n.account = e.account, n.OTEL_ENABLED = e.OTEL_ENABLED, n.discoveryConfig = e.discoveryConfig, n.clients = Yt(e, n), n.loaders = ar(e, n), n);
|
|
7658
|
-
function
|
|
7659
|
-
const e =
|
|
7673
|
+
function Va() {
|
|
7674
|
+
const e = Qi(), n = {};
|
|
7660
7675
|
for (const [t, r] of Object.entries(e))
|
|
7661
7676
|
n[t] = Object.fromEntries(
|
|
7662
7677
|
Object.entries(r).map(([i, a]) => typeof a != "function" ? [i, a] : [i, st(a, `${t}(${i})`)])
|
|
7663
7678
|
);
|
|
7664
7679
|
return n;
|
|
7665
7680
|
}
|
|
7666
|
-
function
|
|
7681
|
+
function ao(e) {
|
|
7667
7682
|
const t = at([
|
|
7668
7683
|
it,
|
|
7669
7684
|
nt
|
|
7670
|
-
])(
|
|
7685
|
+
])(Va(), za);
|
|
7671
7686
|
return e && zn(e) ? Ln({
|
|
7672
7687
|
schemas: [t, e]
|
|
7673
7688
|
}) : t;
|
|
@@ -7677,24 +7692,24 @@ export {
|
|
|
7677
7692
|
E as BadRequestError,
|
|
7678
7693
|
it as CacheControlDirective,
|
|
7679
7694
|
Wn as CardOrigin,
|
|
7680
|
-
|
|
7695
|
+
Hn as CommercialAuthorizationStatus,
|
|
7681
7696
|
Z as FastStoreError,
|
|
7682
7697
|
Y as ForbiddenError,
|
|
7683
|
-
|
|
7684
|
-
|
|
7698
|
+
io as GraphqlVtexContextFactory,
|
|
7699
|
+
ao as GraphqlVtexSchema,
|
|
7685
7700
|
$ as NotFoundError,
|
|
7686
|
-
|
|
7701
|
+
Gn as StoreCollectionType,
|
|
7687
7702
|
Xn as StoreFacetType,
|
|
7688
7703
|
Yn as StoreSort,
|
|
7689
7704
|
Jn as StoreStatus,
|
|
7690
7705
|
re as UnauthorizedError,
|
|
7691
7706
|
Kn as UserOrderInvoiceType,
|
|
7692
|
-
|
|
7693
|
-
|
|
7707
|
+
to as isBadRequestError,
|
|
7708
|
+
no as isFastStoreError,
|
|
7694
7709
|
ct as isForbiddenError,
|
|
7695
7710
|
X as isNotFoundError,
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
|
|
7711
|
+
ro as isUnauthorizedError,
|
|
7712
|
+
eo as stringifyCacheControl,
|
|
7713
|
+
za as typeDefs,
|
|
7699
7714
|
at as withDirectives
|
|
7700
7715
|
};
|