@faststore/api 1.8.31 → 1.8.34
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/CHANGELOG.md +27 -0
- package/dist/__generated__/schema.d.ts +17 -2
- package/dist/api.cjs.development.js +133 -20
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +134 -21
- package/dist/api.esm.js.map +1 -1
- package/dist/index.d.ts +50 -7
- package/dist/platforms/vtex/clients/commerce/types/OrderForm.d.ts +6 -0
- package/dist/platforms/vtex/index.d.ts +50 -7
- package/dist/platforms/vtex/resolvers/aggregateOffer.d.ts +1 -2
- package/dist/platforms/vtex/resolvers/mutation.d.ts +1 -0
- package/dist/platforms/vtex/resolvers/objectOrString.d.ts +2 -0
- package/dist/platforms/vtex/resolvers/product.d.ts +6 -2
- package/dist/platforms/vtex/resolvers/propertyValue.d.ts +5 -0
- package/dist/platforms/vtex/resolvers/validateCart.d.ts +1 -0
- package/dist/platforms/vtex/utils/enhanceCommercialOffer.d.ts +8 -9
- package/dist/platforms/vtex/utils/propertyValue.d.ts +12 -0
- package/package.json +2 -2
- package/src/__generated__/schema.ts +18 -2
- package/src/platforms/vtex/clients/commerce/types/OrderForm.ts +7 -0
- package/src/platforms/vtex/index.ts +4 -0
- package/src/platforms/vtex/resolvers/aggregateOffer.ts +1 -2
- package/src/platforms/vtex/resolvers/objectOrString.ts +46 -0
- package/src/platforms/vtex/resolvers/offer.ts +11 -1
- package/src/platforms/vtex/resolvers/product.ts +34 -5
- package/src/platforms/vtex/resolvers/productGroup.ts +6 -1
- package/src/platforms/vtex/resolvers/propertyValue.ts +12 -0
- package/src/platforms/vtex/resolvers/validateCart.ts +23 -1
- package/src/platforms/vtex/utils/enhanceCommercialOffer.ts +8 -12
- package/src/platforms/vtex/utils/propertyValue.ts +22 -0
- package/src/typeDefs/index.ts +2 -0
- package/src/typeDefs/objectOrString.graphql +1 -0
- package/src/typeDefs/product.graphql +4 -0
- package/src/typeDefs/propertyValue.graphql +25 -2
package/dist/api.esm.js
CHANGED
|
@@ -4,7 +4,8 @@ import DataLoader from 'dataloader';
|
|
|
4
4
|
import pLimit from 'p-limit';
|
|
5
5
|
import deepEquals from 'fast-deep-equal';
|
|
6
6
|
import crypto from 'crypto';
|
|
7
|
-
import { print } from 'graphql';
|
|
7
|
+
import { GraphQLScalarType, print } from 'graphql';
|
|
8
|
+
import { Kind } from 'graphql/language';
|
|
8
9
|
|
|
9
10
|
const fetchAPI = async (info, init) => {
|
|
10
11
|
const response = await fetch(info, init);
|
|
@@ -626,7 +627,32 @@ const StoreFacetValue = {
|
|
|
626
627
|
|
|
627
628
|
const md5 = payload => crypto.createHash('md5').update(payload).digest('hex');
|
|
628
629
|
|
|
629
|
-
const
|
|
630
|
+
const VALUE_REFERENCES = {
|
|
631
|
+
attachment: 'ATTACHMENT',
|
|
632
|
+
specification: 'SPECIFICATION'
|
|
633
|
+
};
|
|
634
|
+
function attachmentToPropertyValue(attachment) {
|
|
635
|
+
return {
|
|
636
|
+
name: attachment.name,
|
|
637
|
+
value: attachment.content,
|
|
638
|
+
valueReference: VALUE_REFERENCES.attachment
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
function getPropertyId(item) {
|
|
642
|
+
return md5(`${item.name}:${JSON.stringify(item.value)}:${item.valueReference}`);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
const getAttachments = item => {
|
|
646
|
+
var _item$itemOffered$add;
|
|
647
|
+
|
|
648
|
+
return (_item$itemOffered$add = item.itemOffered.additionalProperty) == null ? void 0 : _item$itemOffered$add.filter(i => i.valueReference === VALUE_REFERENCES.attachment);
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
const getId = item => {
|
|
652
|
+
var _item$itemOffered$add2;
|
|
653
|
+
|
|
654
|
+
return [item.itemOffered.sku, item.seller.identifier, item.price, (_item$itemOffered$add2 = item.itemOffered.additionalProperty) == null ? void 0 : _item$itemOffered$add2.map(getPropertyId).join('-')].filter(Boolean).join('::');
|
|
655
|
+
};
|
|
630
656
|
|
|
631
657
|
const orderFormItemToOffer = (item, index) => ({
|
|
632
658
|
listPrice: item.listPrice / 100,
|
|
@@ -638,17 +664,26 @@ const orderFormItemToOffer = (item, index) => ({
|
|
|
638
664
|
itemOffered: {
|
|
639
665
|
sku: item.id,
|
|
640
666
|
image: [],
|
|
641
|
-
name: item.name
|
|
667
|
+
name: item.name,
|
|
668
|
+
additionalProperty: item.attachments.map(attachmentToPropertyValue)
|
|
642
669
|
},
|
|
643
670
|
index
|
|
644
671
|
});
|
|
645
672
|
|
|
646
|
-
const offerToOrderItemInput = offer =>
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
673
|
+
const offerToOrderItemInput = offer => {
|
|
674
|
+
var _getAttachments;
|
|
675
|
+
|
|
676
|
+
return {
|
|
677
|
+
quantity: offer.quantity,
|
|
678
|
+
seller: offer.seller.identifier,
|
|
679
|
+
id: offer.itemOffered.sku,
|
|
680
|
+
index: offer.index,
|
|
681
|
+
attachments: ((_getAttachments = getAttachments(offer)) != null ? _getAttachments : []).map(attachment => ({
|
|
682
|
+
name: attachment.name,
|
|
683
|
+
content: attachment.value
|
|
684
|
+
}))
|
|
685
|
+
};
|
|
686
|
+
};
|
|
652
687
|
|
|
653
688
|
const groupById = offers => offers.reduce((acc, item) => {
|
|
654
689
|
var _acc$get;
|
|
@@ -967,9 +1002,19 @@ const StoreOffer = {
|
|
|
967
1002
|
|
|
968
1003
|
return null;
|
|
969
1004
|
},
|
|
970
|
-
itemOffered:
|
|
971
|
-
|
|
972
|
-
|
|
1005
|
+
itemOffered: async root => {
|
|
1006
|
+
if (isSearchItem(root)) {
|
|
1007
|
+
return root.product;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
if (isOrderFormItem(root)) {
|
|
1011
|
+
return { ...(await root.product),
|
|
1012
|
+
attachmentsValues: root.attachments
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
return null;
|
|
1017
|
+
},
|
|
973
1018
|
quantity: root => {
|
|
974
1019
|
if (isSearchItem(root)) {
|
|
975
1020
|
var _root$AvailableQuanti;
|
|
@@ -1098,15 +1143,20 @@ const StoreProduct = {
|
|
|
1098
1143
|
})).sort(bestOfferFirst),
|
|
1099
1144
|
isVariantOf: root => root,
|
|
1100
1145
|
additionalProperty: ({
|
|
1101
|
-
variations
|
|
1146
|
+
// Search uses the name variations for specifications
|
|
1147
|
+
variations: specifications = [],
|
|
1148
|
+
attachmentsValues = []
|
|
1102
1149
|
}) => {
|
|
1103
|
-
|
|
1150
|
+
const propertyValueSpecifications = specifications.flatMap(({
|
|
1104
1151
|
name,
|
|
1105
1152
|
values
|
|
1106
1153
|
}) => values.map(value => ({
|
|
1107
1154
|
name,
|
|
1108
|
-
value
|
|
1155
|
+
value,
|
|
1156
|
+
valueReference: VALUE_REFERENCES.specification
|
|
1109
1157
|
})));
|
|
1158
|
+
const propertyValueAttachments = attachmentsValues.map(attachmentToPropertyValue);
|
|
1159
|
+
return [...propertyValueSpecifications, ...propertyValueAttachments];
|
|
1110
1160
|
}
|
|
1111
1161
|
};
|
|
1112
1162
|
|
|
@@ -1132,7 +1182,8 @@ const StoreProductGroup = {
|
|
|
1132
1182
|
values
|
|
1133
1183
|
}) => values.map(value => ({
|
|
1134
1184
|
name,
|
|
1135
|
-
value
|
|
1185
|
+
value,
|
|
1186
|
+
valueReference: VALUE_REFERENCES.specification
|
|
1136
1187
|
}))))
|
|
1137
1188
|
};
|
|
1138
1189
|
|
|
@@ -1459,6 +1510,63 @@ const StoreSeo = {
|
|
|
1459
1510
|
canonical: () => ''
|
|
1460
1511
|
};
|
|
1461
1512
|
|
|
1513
|
+
const ObjectOrString = /*#__PURE__*/new GraphQLScalarType({
|
|
1514
|
+
name: 'ObjectOrString',
|
|
1515
|
+
description: 'A string or the string representation of an object (a stringified object).',
|
|
1516
|
+
parseValue: toObjectOrString,
|
|
1517
|
+
serialize: stringify,
|
|
1518
|
+
|
|
1519
|
+
parseLiteral(ast) {
|
|
1520
|
+
if (ast.kind === Kind.STRING) {
|
|
1521
|
+
return getValueAsObjectOrString(ast.value);
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
return null;
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
});
|
|
1528
|
+
|
|
1529
|
+
function toObjectOrString(value) {
|
|
1530
|
+
if (typeof value === 'string') {
|
|
1531
|
+
return getValueAsObjectOrString(value);
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
return null;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
function getValueAsObjectOrString(value) {
|
|
1538
|
+
try {
|
|
1539
|
+
return JSON.parse(value);
|
|
1540
|
+
} catch (e) {
|
|
1541
|
+
return value;
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
function stringify(value) {
|
|
1546
|
+
if (typeof value === 'object') {
|
|
1547
|
+
return JSON.stringify(value);
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
if (typeof value === 'string') {
|
|
1551
|
+
return value;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
return null;
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
const StorePropertyValue = {
|
|
1558
|
+
propertyID: root => getPropertyId(root),
|
|
1559
|
+
name: ({
|
|
1560
|
+
name
|
|
1561
|
+
}) => name,
|
|
1562
|
+
value: ({
|
|
1563
|
+
value
|
|
1564
|
+
}) => value,
|
|
1565
|
+
valueReference: ({
|
|
1566
|
+
valueReference
|
|
1567
|
+
}) => valueReference
|
|
1568
|
+
};
|
|
1569
|
+
|
|
1462
1570
|
const Resolvers = {
|
|
1463
1571
|
StoreCollection,
|
|
1464
1572
|
StoreAggregateOffer,
|
|
@@ -1471,6 +1579,8 @@ const Resolvers = {
|
|
|
1471
1579
|
StoreReview,
|
|
1472
1580
|
StoreProductGroup,
|
|
1473
1581
|
StoreSearchResult,
|
|
1582
|
+
StorePropertyValue,
|
|
1583
|
+
ObjectOrString,
|
|
1474
1584
|
Query,
|
|
1475
1585
|
Mutation
|
|
1476
1586
|
};
|
|
@@ -1526,8 +1636,8 @@ var doc$b = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","de
|
|
|
1526
1636
|
var doc$c = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Page information.","block":true},"name":{"kind":"Name","value":"StorePageInfo"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Indicates whether next page exists.","block":true},"name":{"kind":"Name","value":"hasNextPage"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Indicates whether previous page exists.","block":true},"name":{"kind":"Name","value":"hasPreviousPage"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Boolean"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Page cursor start.","block":true},"name":{"kind":"Name","value":"startCursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Page cursor end.","block":true},"name":{"kind":"Name","value":"endCursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Total number of items (products or collections), not pages.","block":true},"name":{"kind":"Name","value":"totalCount"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]}]}],"loc":{"start":0,"end":406}};
|
|
1527
1637
|
doc$c.loc.source = {"body":"\"\"\"\nPage information.\n\"\"\"\ntype StorePageInfo {\n \"\"\"\n Indicates whether next page exists.\n \"\"\"\n hasNextPage: Boolean!\n \"\"\"\n Indicates whether previous page exists.\n \"\"\"\n hasPreviousPage: Boolean!\n \"\"\"\n Page cursor start.\n \"\"\"\n startCursor: String!\n \"\"\"\n Page cursor end.\n \"\"\"\n endCursor: String!\n \"\"\"\n Total number of items (products or collections), not pages.\n \"\"\"\n totalCount: Int!\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
1528
1638
|
|
|
1529
|
-
var doc$d = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"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.","block":true},"name":{"kind":"Name","value":"StoreProduct"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Meta tag data.","block":true},"name":{"kind":"Name","value":"seo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSeo"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"List of items consisting of chain linked web pages, ending with the current page.","block":true},"name":{"kind":"Name","value":"breadcrumbList"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreBreadcrumbList"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Corresponding collection URL slug, with which to retrieve this entity.","block":true},"name":{"kind":"Name","value":"slug"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product name.","block":true},"name":{"kind":"Name","value":"name"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product ID, such as [ISBN](https://www.isbn-international.org/content/what-isbn) or similar global IDs.","block":true},"name":{"kind":"Name","value":"productID"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product brand.","block":true},"name":{"kind":"Name","value":"brand"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreBrand"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product description.","block":true},"name":{"kind":"Name","value":"description"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array of images.","block":true},"name":{"kind":"Name","value":"image"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreImage"}}}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Aggregate offer information.","block":true},"name":{"kind":"Name","value":"offers"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreAggregateOffer"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Stock Keeping Unit. Merchant-specific ID for the product.","block":true},"name":{"kind":"Name","value":"sku"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Global Trade Item Number.","block":true},"name":{"kind":"Name","value":"gtin"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with review information.","block":true},"name":{"kind":"Name","value":"review"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreReview"}}}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Aggregate ratings data.","block":true},"name":{"kind":"Name","value":"aggregateRating"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreAggregateRating"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Indicates product group related to this product.","block":true},"name":{"kind":"Name","value":"isVariantOf"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProductGroup"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array of additional properties.","block":true},"name":{"kind":"Name","value":"additionalProperty"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StorePropertyValue"}}}}},"directives":[]}]},{"kind":"InputObjectTypeDefinition","description":{"kind":"StringValue","value":"Product input. 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.","block":true},"name":{"kind":"Name","value":"IStoreProduct"},"directives":[],"fields":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Stock Keeping Unit. Merchant-specific ID for the product.","block":true},"name":{"kind":"Name","value":"sku"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Product name.","block":true},"name":{"kind":"Name","value":"name"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Array of product images.","block":true},"name":{"kind":"Name","value":"image"},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"IStoreImage"}}}}},"directives":[]}]}],"loc":{"start":0,"end":
|
|
1530
|
-
doc$d.loc.source = {"body":"\"\"\"\nProduct 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.\n\"\"\"\ntype StoreProduct {\n \"\"\"\n Meta tag data.\n \"\"\"\n seo: StoreSeo!\n \"\"\"\n List of items consisting of chain linked web pages, ending with the current page.\n \"\"\"\n breadcrumbList: StoreBreadcrumbList!\n \"\"\"\n Corresponding collection URL slug, with which to retrieve this entity.\n \"\"\"\n slug: String!\n \"\"\"\n Product name.\n \"\"\"\n name: String!\n \"\"\"\n Product ID, such as [ISBN](https://www.isbn-international.org/content/what-isbn) or similar global IDs.\n \"\"\"\n productID: String!\n \"\"\"\n Product brand.\n \"\"\"\n brand: StoreBrand!\n \"\"\"\n Product description.\n \"\"\"\n description: String!\n \"\"\"\n Array of images.\n \"\"\"\n image: [StoreImage!]!\n \"\"\"\n Aggregate offer information.\n \"\"\"\n offers: StoreAggregateOffer!\n \"\"\"\n Stock Keeping Unit. Merchant-specific ID for the product.\n \"\"\"\n sku: String!\n \"\"\"\n Global Trade Item Number.\n \"\"\"\n gtin: String!\n \"\"\"\n Array with review information.\n \"\"\"\n review: [StoreReview!]!\n \"\"\"\n Aggregate ratings data.\n \"\"\"\n aggregateRating: StoreAggregateRating!\n \"\"\"\n Indicates product group related to this product.\n \"\"\"\n isVariantOf: StoreProductGroup!\n \"\"\"\n Array of additional properties.\n \"\"\"\n additionalProperty: [StorePropertyValue!]!\n}\n\n\"\"\"\nProduct input. 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.\n\"\"\"\ninput IStoreProduct {\n \"\"\"\n Stock Keeping Unit. Merchant-specific ID for the product.\n \"\"\"\n sku: String!\n \"\"\"\n Product name.\n \"\"\"\n name: String!\n \"\"\"\n Array of product images.\n \"\"\"\n image: [IStoreImage!]!\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
1639
|
+
var doc$d = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"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.","block":true},"name":{"kind":"Name","value":"StoreProduct"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Meta tag data.","block":true},"name":{"kind":"Name","value":"seo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSeo"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"List of items consisting of chain linked web pages, ending with the current page.","block":true},"name":{"kind":"Name","value":"breadcrumbList"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreBreadcrumbList"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Corresponding collection URL slug, with which to retrieve this entity.","block":true},"name":{"kind":"Name","value":"slug"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product name.","block":true},"name":{"kind":"Name","value":"name"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product ID, such as [ISBN](https://www.isbn-international.org/content/what-isbn) or similar global IDs.","block":true},"name":{"kind":"Name","value":"productID"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product brand.","block":true},"name":{"kind":"Name","value":"brand"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreBrand"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product description.","block":true},"name":{"kind":"Name","value":"description"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array of images.","block":true},"name":{"kind":"Name","value":"image"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreImage"}}}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Aggregate offer information.","block":true},"name":{"kind":"Name","value":"offers"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreAggregateOffer"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Stock Keeping Unit. Merchant-specific ID for the product.","block":true},"name":{"kind":"Name","value":"sku"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Global Trade Item Number.","block":true},"name":{"kind":"Name","value":"gtin"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with review information.","block":true},"name":{"kind":"Name","value":"review"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreReview"}}}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Aggregate ratings data.","block":true},"name":{"kind":"Name","value":"aggregateRating"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreAggregateRating"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Indicates product group related to this product.","block":true},"name":{"kind":"Name","value":"isVariantOf"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProductGroup"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array of additional properties.","block":true},"name":{"kind":"Name","value":"additionalProperty"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StorePropertyValue"}}}}},"directives":[]}]},{"kind":"InputObjectTypeDefinition","description":{"kind":"StringValue","value":"Product input. 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.","block":true},"name":{"kind":"Name","value":"IStoreProduct"},"directives":[],"fields":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Stock Keeping Unit. Merchant-specific ID for the product.","block":true},"name":{"kind":"Name","value":"sku"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Product name.","block":true},"name":{"kind":"Name","value":"name"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Array of product images.","block":true},"name":{"kind":"Name","value":"image"},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"IStoreImage"}}}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Custom Product Additional Properties.","block":true},"name":{"kind":"Name","value":"additionalProperty"},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"IStorePropertyValue"}}}},"directives":[]}]}],"loc":{"start":0,"end":2154}};
|
|
1640
|
+
doc$d.loc.source = {"body":"\"\"\"\nProduct 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.\n\"\"\"\ntype StoreProduct {\n \"\"\"\n Meta tag data.\n \"\"\"\n seo: StoreSeo!\n \"\"\"\n List of items consisting of chain linked web pages, ending with the current page.\n \"\"\"\n breadcrumbList: StoreBreadcrumbList!\n \"\"\"\n Corresponding collection URL slug, with which to retrieve this entity.\n \"\"\"\n slug: String!\n \"\"\"\n Product name.\n \"\"\"\n name: String!\n \"\"\"\n Product ID, such as [ISBN](https://www.isbn-international.org/content/what-isbn) or similar global IDs.\n \"\"\"\n productID: String!\n \"\"\"\n Product brand.\n \"\"\"\n brand: StoreBrand!\n \"\"\"\n Product description.\n \"\"\"\n description: String!\n \"\"\"\n Array of images.\n \"\"\"\n image: [StoreImage!]!\n \"\"\"\n Aggregate offer information.\n \"\"\"\n offers: StoreAggregateOffer!\n \"\"\"\n Stock Keeping Unit. Merchant-specific ID for the product.\n \"\"\"\n sku: String!\n \"\"\"\n Global Trade Item Number.\n \"\"\"\n gtin: String!\n \"\"\"\n Array with review information.\n \"\"\"\n review: [StoreReview!]!\n \"\"\"\n Aggregate ratings data.\n \"\"\"\n aggregateRating: StoreAggregateRating!\n \"\"\"\n Indicates product group related to this product.\n \"\"\"\n isVariantOf: StoreProductGroup!\n \"\"\"\n Array of additional properties.\n \"\"\"\n additionalProperty: [StorePropertyValue!]!\n}\n\n\"\"\"\nProduct input. 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.\n\"\"\"\ninput IStoreProduct {\n \"\"\"\n Stock Keeping Unit. Merchant-specific ID for the product.\n \"\"\"\n sku: String!\n \"\"\"\n Product name.\n \"\"\"\n name: String!\n \"\"\"\n Array of product images.\n \"\"\"\n image: [IStoreImage!]!\n \"\"\"\n Custom Product Additional Properties.\n \"\"\"\n additionalProperty: [IStorePropertyValue!]\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
1531
1641
|
|
|
1532
1642
|
var doc$e = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"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.","block":true},"name":{"kind":"Name","value":"StoreProductGroup"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array of variants related to product group. Variants are equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#).","block":true},"name":{"kind":"Name","value":"hasVariant"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProduct"}}}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product group ID.","block":true},"name":{"kind":"Name","value":"productGroupID"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product group name.","block":true},"name":{"kind":"Name","value":"name"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array of additional properties.","block":true},"name":{"kind":"Name","value":"additionalProperty"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StorePropertyValue"}}}}},"directives":[]}]}],"loc":{"start":0,"end":916}};
|
|
1533
1643
|
doc$e.loc.source = {"body":"\"\"\"\nProduct 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.\n\"\"\"\ntype StoreProductGroup {\n \"\"\"\n Array of variants related to product group. Variants are equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#).\n \"\"\"\n hasVariant: [StoreProduct!]!\n \"\"\"\n Product group ID.\n \"\"\"\n productGroupID: String!\n \"\"\"\n Product group name.\n \"\"\"\n name: String!\n \"\"\"\n Array of additional properties.\n \"\"\"\n additionalProperty: [StorePropertyValue!]!\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
@@ -1547,13 +1657,16 @@ var doc$i = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","de
|
|
|
1547
1657
|
var doc$j = {"kind":"Document","definitions":[{"kind":"EnumTypeDefinition","description":{"kind":"StringValue","value":"Status used to indicate type of message. For instance, in shopping cart messages.","block":true},"name":{"kind":"Name","value":"StoreStatus"},"directives":[],"values":[{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"INFO"},"directives":[]},{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"WARNING"},"directives":[]},{"kind":"EnumValueDefinition","name":{"kind":"Name","value":"ERROR"},"directives":[]}]}],"loc":{"start":0,"end":136}};
|
|
1548
1658
|
doc$j.loc.source = {"body":"\"\"\"\nStatus used to indicate type of message. For instance, in shopping cart messages.\n\"\"\"\nenum StoreStatus {\n INFO\n WARNING\n ERROR\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
1549
1659
|
|
|
1550
|
-
var doc$k = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Properties that can be associated with products and products groups.","block":true},"name":{"kind":"Name","value":"StorePropertyValue"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Property value.","block":true},"name":{"kind":"Name","value":"value"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"
|
|
1551
|
-
doc$k.loc.source = {"body":"\"\"\"\nProperties that can be associated with products and products groups.\n\"\"\"\ntype StorePropertyValue {\n \"\"\"\n Property value.\n \"\"\"\n value: String!\n \"\"\"\n Property name.\n \"\"\"\n name: String!\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
1660
|
+
var doc$k = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Properties that can be associated with products and products groups.","block":true},"name":{"kind":"Name","value":"StorePropertyValue"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Property id. This propert changes according to the content of the object.","block":true},"name":{"kind":"Name","value":"propertyID"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Property value. May hold a string or the string representation of an object.","block":true},"name":{"kind":"Name","value":"value"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ObjectOrString"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Property name.","block":true},"name":{"kind":"Name","value":"name"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Specifies the nature of the value","block":true},"name":{"kind":"Name","value":"valueReference"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"InputObjectTypeDefinition","name":{"kind":"Name","value":"IStorePropertyValue"},"directives":[],"fields":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Property value. May hold a string or the string representation of an object.","block":true},"name":{"kind":"Name","value":"value"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ObjectOrString"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Property name.","block":true},"name":{"kind":"Name","value":"name"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Specifies the nature of the value","block":true},"name":{"kind":"Name","value":"valueReference"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]}],"loc":{"start":0,"end":716}};
|
|
1661
|
+
doc$k.loc.source = {"body":"\"\"\"\nProperties that can be associated with products and products groups.\n\"\"\"\ntype StorePropertyValue {\n \"\"\"\n Property id. This propert changes according to the content of the object.\n \"\"\"\n propertyID: String!\n \"\"\"\n Property value. May hold a string or the string representation of an object.\n \"\"\"\n value: ObjectOrString!\n \"\"\"\n Property name.\n \"\"\"\n name: String!\n \"\"\"\n Specifies the nature of the value\n \"\"\"\n valueReference: String!\n}\n\ninput IStorePropertyValue {\n \"\"\"\n Property value. May hold a string or the string representation of an object.\n \"\"\"\n value: ObjectOrString!\n \"\"\"\n Property name.\n \"\"\"\n name: String!\n \"\"\"\n Specifies the nature of the value\n \"\"\"\n valueReference: String!\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
1552
1662
|
|
|
1553
1663
|
var doc$l = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Client profile data.","block":true},"name":{"kind":"Name","value":"StorePerson"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Client ID.","block":true},"name":{"kind":"Name","value":"id"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Client email.","block":true},"name":{"kind":"Name","value":"email"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Client first name.","block":true},"name":{"kind":"Name","value":"givenName"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Client last name.","block":true},"name":{"kind":"Name","value":"familyName"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]}],"loc":{"start":0,"end":242}};
|
|
1554
1664
|
doc$l.loc.source = {"body":"\"\"\"\nClient profile data.\n\"\"\"\ntype StorePerson {\n \"\"\"\n Client ID.\n \"\"\"\n id: String!\n \"\"\"\n Client email.\n \"\"\"\n email: String!\n \"\"\"\n Client first name.\n \"\"\"\n givenName: String!\n \"\"\"\n Client last name.\n \"\"\"\n familyName: String!\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
1555
1665
|
|
|
1556
|
-
|
|
1666
|
+
var doc$m = {"kind":"Document","definitions":[{"kind":"ScalarTypeDefinition","name":{"kind":"Name","value":"ObjectOrString"},"directives":[]}],"loc":{"start":0,"end":21}};
|
|
1667
|
+
doc$m.loc.source = {"body":"scalar ObjectOrString","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
1668
|
+
|
|
1669
|
+
const typeDefs = /*#__PURE__*/[doc$f, doc$8, doc$3, doc$4, doc$5, doc$6, doc$7, doc$c, doc$d, doc$h, doc$9, doc$1, doc$g, doc$2, doc$e, doc$b, doc, doc$a, doc$i, doc$j, doc$k, doc$l, doc$m].map(print).join('\n');
|
|
1557
1670
|
|
|
1558
1671
|
const platforms = {
|
|
1559
1672
|
vtex: {
|