@faststore/api 1.10.19 → 1.10.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 +31 -0
- package/dist/__generated__/schema.d.ts +94 -0
- package/dist/api.cjs.development.js +196 -9
- 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 +196 -9
- package/dist/api.esm.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/platforms/vtex/index.d.ts +5 -0
- package/dist/platforms/vtex/resolvers/skuVariations.d.ts +6 -0
- package/dist/platforms/vtex/utils/skuVariants.d.ts +15 -0
- package/package.json +3 -3
- package/src/__generated__/schema.ts +99 -0
- package/src/platforms/vtex/index.ts +2 -0
- package/src/platforms/vtex/resolvers/collection.ts +4 -1
- package/src/platforms/vtex/resolvers/productGroup.ts +4 -3
- package/src/platforms/vtex/resolvers/skuVariations.ts +47 -0
- package/src/platforms/vtex/utils/skuVariants.ts +206 -0
- package/src/typeDefs/index.ts +3 -1
- package/src/typeDefs/productGroup.graphql +6 -0
- package/src/typeDefs/skuVariants.graphql +87 -0
package/dist/api.esm.js
CHANGED
|
@@ -591,8 +591,10 @@ function slugify(str) {
|
|
|
591
591
|
|
|
592
592
|
const isBrand = x => x.type === 'brand' || isCollectionPageType(x) && x.pageType.toLowerCase() === 'brand';
|
|
593
593
|
|
|
594
|
+
const isCollection = x => isCollectionPageType(x) && x.pageType.toLowerCase() === 'collection';
|
|
595
|
+
|
|
594
596
|
const slugifyRoot = root => {
|
|
595
|
-
if (isBrand(root)) {
|
|
597
|
+
if (isBrand(root) || isCollection(root)) {
|
|
596
598
|
return slugify(root.name);
|
|
597
599
|
}
|
|
598
600
|
|
|
@@ -1501,15 +1503,14 @@ const StoreProductGroup = {
|
|
|
1501
1503
|
productGroupID: ({
|
|
1502
1504
|
isVariantOf
|
|
1503
1505
|
}) => isVariantOf.productId,
|
|
1504
|
-
name:
|
|
1505
|
-
|
|
1506
|
-
}) => isVariantOf.productName,
|
|
1506
|
+
name: root => root.isVariantOf.productName,
|
|
1507
|
+
skuVariants: root => root,
|
|
1507
1508
|
additionalProperty: ({
|
|
1508
1509
|
isVariantOf: {
|
|
1509
1510
|
specificationGroups
|
|
1510
1511
|
}
|
|
1511
|
-
}) => specificationGroups //
|
|
1512
|
-
.filter(specificationGroup => !BLOCKED_SPECIFICATIONS.has(specificationGroup.name)) // Transform specs back into product specs
|
|
1512
|
+
}) => specificationGroups // Filter sku specifications so we don't mix them with product specs.
|
|
1513
|
+
.filter(specificationGroup => !BLOCKED_SPECIFICATIONS.has(specificationGroup.name)) // Transform specs back into product specs.
|
|
1513
1514
|
.flatMap(({
|
|
1514
1515
|
specifications
|
|
1515
1516
|
}) => specifications.flatMap(({
|
|
@@ -1894,6 +1895,188 @@ const StoreSeo = {
|
|
|
1894
1895
|
titleTemplate: () => ''
|
|
1895
1896
|
};
|
|
1896
1897
|
|
|
1898
|
+
function findSkuVariantImage(availableImages) {
|
|
1899
|
+
var _availableImages$find;
|
|
1900
|
+
|
|
1901
|
+
return (_availableImages$find = availableImages.find(imageProperties => imageProperties.imageLabel === 'skuvariation')) != null ? _availableImages$find : availableImages[0];
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
function createSlugsMap(variants, dominantVariantName, baseSlug) {
|
|
1905
|
+
/**
|
|
1906
|
+
* Maps property value combinations to their respective SKU's slug. Enables
|
|
1907
|
+
* us to retrieve the slug for the SKU that matches the currently selected
|
|
1908
|
+
* variations in O(1) time.
|
|
1909
|
+
*
|
|
1910
|
+
* Example: `'Color-Red-Size-40': 'classic-shoes-37'`
|
|
1911
|
+
*/
|
|
1912
|
+
const slugsMap = {};
|
|
1913
|
+
variants.forEach(variant => {
|
|
1914
|
+
var _skuSpecificationProp, _skuSpecificationProp2;
|
|
1915
|
+
|
|
1916
|
+
const skuSpecificationProperties = variant.variations;
|
|
1917
|
+
|
|
1918
|
+
if (skuSpecificationProperties.length === 0) {
|
|
1919
|
+
return;
|
|
1920
|
+
} // Make sure that the 'name-value' pair for the dominant variation
|
|
1921
|
+
// is always the first one.
|
|
1922
|
+
|
|
1923
|
+
|
|
1924
|
+
const dominantNameValue = `${dominantVariantName}-${(_skuSpecificationProp = (_skuSpecificationProp2 = skuSpecificationProperties.find(variationDetails => variationDetails.name === dominantVariantName)) == null ? void 0 : _skuSpecificationProp2.values[0]) != null ? _skuSpecificationProp : ''}`;
|
|
1925
|
+
const skuVariantKey = skuSpecificationProperties.reduce((acc, property) => {
|
|
1926
|
+
const shouldIgnore = property.name === dominantVariantName;
|
|
1927
|
+
|
|
1928
|
+
if (shouldIgnore) {
|
|
1929
|
+
return acc;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
return acc + `-${property.name}-${property.values[0]}`;
|
|
1933
|
+
}, dominantNameValue);
|
|
1934
|
+
slugsMap[skuVariantKey] = `${baseSlug}-${variant.itemId}`;
|
|
1935
|
+
});
|
|
1936
|
+
return slugsMap;
|
|
1937
|
+
}
|
|
1938
|
+
function getActiveSkuVariations(variations) {
|
|
1939
|
+
const activeVariations = {};
|
|
1940
|
+
variations.forEach(variation => {
|
|
1941
|
+
activeVariations[variation.name] = variation.values[0];
|
|
1942
|
+
});
|
|
1943
|
+
return activeVariations;
|
|
1944
|
+
}
|
|
1945
|
+
function getVariantsByName(skuSpecifications) {
|
|
1946
|
+
const variants = {};
|
|
1947
|
+
skuSpecifications == null ? void 0 : skuSpecifications.forEach(specification => {
|
|
1948
|
+
var _specification$field$;
|
|
1949
|
+
|
|
1950
|
+
variants[(_specification$field$ = specification.field.originalName) != null ? _specification$field$ : specification.field.name] = specification.values.map(value => {
|
|
1951
|
+
var _value$originalName;
|
|
1952
|
+
|
|
1953
|
+
return (_value$originalName = value.originalName) != null ? _value$originalName : value.name;
|
|
1954
|
+
});
|
|
1955
|
+
});
|
|
1956
|
+
return variants;
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
function compare(a, b) {
|
|
1960
|
+
// Values are always represented as Strings, so we need to handle numbers
|
|
1961
|
+
// in this special case.
|
|
1962
|
+
if (!Number.isNaN(Number(a) - Number(b))) {
|
|
1963
|
+
return Number(a) - Number(b);
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
if (a < b) {
|
|
1967
|
+
return -1;
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
if (a > b) {
|
|
1971
|
+
return 1;
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
return 0;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
function sortVariants(variantsByName) {
|
|
1978
|
+
const sortedVariants = variantsByName;
|
|
1979
|
+
|
|
1980
|
+
for (const variantProperty in variantsByName) {
|
|
1981
|
+
variantsByName[variantProperty].sort((a, b) => compare(a.value, b.value));
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
return sortedVariants;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
function getFormattedVariations(variants, dominantVariantName, dominantVariantValue) {
|
|
1988
|
+
/**
|
|
1989
|
+
* SKU options already formatted and indexed by their property name.
|
|
1990
|
+
*
|
|
1991
|
+
* Ex: {
|
|
1992
|
+
* `Size`: [
|
|
1993
|
+
* { label: '42', value: '42' },
|
|
1994
|
+
* { label: '41', value: '41' },
|
|
1995
|
+
* { label: '39', value: '39' },
|
|
1996
|
+
* ]
|
|
1997
|
+
* }
|
|
1998
|
+
*/
|
|
1999
|
+
const variantsByName = {};
|
|
2000
|
+
const previouslySeenPropertyValues = new Set();
|
|
2001
|
+
variants.forEach(variant => {
|
|
2002
|
+
if (variant.variations.length === 0) {
|
|
2003
|
+
return;
|
|
2004
|
+
}
|
|
2005
|
+
|
|
2006
|
+
const variantImageToUse = findSkuVariantImage(variant.images);
|
|
2007
|
+
const dominantVariantEntry = variant.variations.find(variation => variation.name === dominantVariantName);
|
|
2008
|
+
const matchesDominantVariant = (dominantVariantEntry == null ? void 0 : dominantVariantEntry.values[0]) === dominantVariantValue;
|
|
2009
|
+
|
|
2010
|
+
if (!matchesDominantVariant) {
|
|
2011
|
+
var _variantImageToUse$im;
|
|
2012
|
+
|
|
2013
|
+
const nameValueIdentifier = `${dominantVariantName}-${dominantVariantEntry == null ? void 0 : dominantVariantEntry.values[0]}`;
|
|
2014
|
+
|
|
2015
|
+
if (!dominantVariantEntry || previouslySeenPropertyValues.has(nameValueIdentifier)) {
|
|
2016
|
+
return;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
previouslySeenPropertyValues.add(nameValueIdentifier);
|
|
2020
|
+
const formattedVariant = {
|
|
2021
|
+
src: variantImageToUse.imageUrl,
|
|
2022
|
+
alt: (_variantImageToUse$im = variantImageToUse.imageLabel) != null ? _variantImageToUse$im : '',
|
|
2023
|
+
label: `${dominantVariantName}: ${dominantVariantEntry.values[0]}`,
|
|
2024
|
+
value: dominantVariantEntry.values[0]
|
|
2025
|
+
};
|
|
2026
|
+
|
|
2027
|
+
if (variantsByName[dominantVariantEntry.name]) {
|
|
2028
|
+
variantsByName[dominantVariantEntry.name].push(formattedVariant);
|
|
2029
|
+
} else {
|
|
2030
|
+
variantsByName[dominantVariantEntry.name] = [formattedVariant];
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
return;
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
variant.variations.forEach(variationProperty => {
|
|
2037
|
+
var _variantImageToUse$im2;
|
|
2038
|
+
|
|
2039
|
+
const nameValueIdentifier = `${variationProperty.name}-${variationProperty.values[0]}`;
|
|
2040
|
+
|
|
2041
|
+
if (previouslySeenPropertyValues.has(nameValueIdentifier)) {
|
|
2042
|
+
return;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
previouslySeenPropertyValues.add(nameValueIdentifier);
|
|
2046
|
+
const formattedVariant = {
|
|
2047
|
+
src: variantImageToUse.imageUrl,
|
|
2048
|
+
alt: (_variantImageToUse$im2 = variantImageToUse.imageLabel) != null ? _variantImageToUse$im2 : '',
|
|
2049
|
+
label: `${variationProperty.name}: ${variationProperty.values[0]}`,
|
|
2050
|
+
value: variationProperty.values[0]
|
|
2051
|
+
};
|
|
2052
|
+
|
|
2053
|
+
if (variantsByName[variationProperty.name]) {
|
|
2054
|
+
variantsByName[variationProperty.name].push(formattedVariant);
|
|
2055
|
+
} else {
|
|
2056
|
+
variantsByName[variationProperty.name] = [formattedVariant];
|
|
2057
|
+
}
|
|
2058
|
+
});
|
|
2059
|
+
});
|
|
2060
|
+
return sortVariants(variantsByName);
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
const SkuVariants = {
|
|
2064
|
+
activeVariations: root => getActiveSkuVariations(root.variations),
|
|
2065
|
+
allVariantsByName: root => getVariantsByName(root.isVariantOf.skuSpecifications),
|
|
2066
|
+
slugsMap: (root, args) => createSlugsMap(root.isVariantOf.items, // Since `dominantVariantProperty` is a required argument, we can safely
|
|
2067
|
+
// access it.
|
|
2068
|
+
args.dominantVariantName, root.isVariantOf.linkText),
|
|
2069
|
+
availableVariations: (root, args) => {
|
|
2070
|
+
// Since `dominantVariantProperty` is a required argument, we can safely
|
|
2071
|
+
// access it.
|
|
2072
|
+
const dominantVariantName = args.dominantVariantName;
|
|
2073
|
+
const activeVariations = getActiveSkuVariations(root.variations);
|
|
2074
|
+
const activeDominantVariationValue = activeVariations[dominantVariantName];
|
|
2075
|
+
const filteredFormattedVariations = getFormattedVariations(root.isVariantOf.items, dominantVariantName, activeDominantVariationValue);
|
|
2076
|
+
return filteredFormattedVariations;
|
|
2077
|
+
}
|
|
2078
|
+
};
|
|
2079
|
+
|
|
1897
2080
|
const Resolvers = {
|
|
1898
2081
|
StoreCollection,
|
|
1899
2082
|
StoreAggregateOffer,
|
|
@@ -1909,6 +2092,7 @@ const Resolvers = {
|
|
|
1909
2092
|
StoreProductGroup,
|
|
1910
2093
|
StoreSearchResult,
|
|
1911
2094
|
StorePropertyValue,
|
|
2095
|
+
SkuVariants,
|
|
1912
2096
|
ObjectOrString,
|
|
1913
2097
|
Query,
|
|
1914
2098
|
Mutation
|
|
@@ -1969,8 +2153,8 @@ var doc$c = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","de
|
|
|
1969
2153
|
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}};
|
|
1970
2154
|
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}};
|
|
1971
2155
|
|
|
1972
|
-
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":
|
|
1973
|
-
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}};
|
|
2156
|
+
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":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Object containing data structures to facilitate handling different SKU\nvariant properties. Specially useful for implementing SKU selection \ncomponents.","block":true},"name":{"kind":"Name","value":"skuVariants"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"SkuVariants"}},"directives":[]}]}],"loc":{"start":0,"end":1113}};
|
|
2157
|
+
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 Object containing data structures to facilitate handling different SKU\n variant properties. Specially useful for implementing SKU selection \n components.\n \"\"\"\n skuVariants: SkuVariants\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
1974
2158
|
|
|
1975
2159
|
var doc$f = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Each product edge contains a `node`, with product information, and a `cursor`, that can be used as a reference for pagination.","block":true},"name":{"kind":"Name","value":"StoreProductEdge"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Each product node contains the information of a product returned by the query.","block":true},"name":{"kind":"Name","value":"node"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProduct"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product cursor. Used as pagination reference.","block":true},"name":{"kind":"Name","value":"cursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Product connections, including pagination information and products returned by the query.","block":true},"name":{"kind":"Name","value":"StoreProductConnection"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Product pagination information.","block":true},"name":{"kind":"Name","value":"pageInfo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StorePageInfo"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with product connection edges, each containing a product and a corresponding cursor.","block":true},"name":{"kind":"Name","value":"edges"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProductEdge"}}}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Each collection edge contains a `node`, with product collection information, and a `cursor`, that can be used as a reference for pagination.","block":true},"name":{"kind":"Name","value":"StoreCollectionEdge"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Each collection node contains the information of a product collection returned by the query.","block":true},"name":{"kind":"Name","value":"node"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreCollection"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Collection cursor. Used as pagination reference.","block":true},"name":{"kind":"Name","value":"cursor"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Collection connections, including pagination information and collections returned by the query.","block":true},"name":{"kind":"Name","value":"StoreCollectionConnection"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Collection pagination information.","block":true},"name":{"kind":"Name","value":"pageInfo"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StorePageInfo"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with collection connection page edges, each containing a collection and a corresponding cursor..","block":true},"name":{"kind":"Name","value":"edges"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreCollectionEdge"}}}}},"directives":[]}]},{"kind":"EnumTypeDefinition","description":{"kind":"StringValue","value":"Product search results sorting options.","block":true},"name":{"kind":"Name","value":"StoreSort"},"directives":[],"values":[{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by price, from highest to lowest.","block":true},"name":{"kind":"Name","value":"price_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by price, from lowest to highest.","block":true},"name":{"kind":"Name","value":"price_asc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by orders, from highest to lowest.","block":true},"name":{"kind":"Name","value":"orders_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by name, in reverse alphabetical order.","block":true},"name":{"kind":"Name","value":"name_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by name, in alphabetical order.","block":true},"name":{"kind":"Name","value":"name_asc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by release date, from highest to lowest.","block":true},"name":{"kind":"Name","value":"release_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by discount value, from highest to lowest.","block":true},"name":{"kind":"Name","value":"discount_desc"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Sort by product score, from highest to lowest.","block":true},"name":{"kind":"Name","value":"score_desc"},"directives":[]}]},{"kind":"InputObjectTypeDefinition","description":{"kind":"StringValue","value":"Selected search facet input.","block":true},"name":{"kind":"Name","value":"IStoreSelectedFacet"},"directives":[],"fields":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Selected search facet key.","block":true},"name":{"kind":"Name","value":"key"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Selected search facet value.","block":true},"name":{"kind":"Name","value":"value"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"EnumTypeDefinition","description":{"kind":"StringValue","value":"Search facet type.","block":true},"name":{"kind":"Name","value":"StoreFacetType"},"directives":[],"values":[{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Indicates boolean search facet.","block":true},"name":{"kind":"Name","value":"BOOLEAN"},"directives":[]},{"kind":"EnumValueDefinition","description":{"kind":"StringValue","value":"Indicates range type search facet.","block":true},"name":{"kind":"Name","value":"RANGE"},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Suggestion term.","block":true},"name":{"kind":"Name","value":"StoreSuggestionTerm"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"The term.","block":true},"name":{"kind":"Name","value":"value"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Its occurrences count.","block":true},"name":{"kind":"Name","value":"count"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Suggestions information.","block":true},"name":{"kind":"Name","value":"StoreSuggestions"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with suggestion terms.","block":true},"name":{"kind":"Name","value":"terms"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSuggestionTerm"}}}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array with suggestion products' information.","block":true},"name":{"kind":"Name","value":"products"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProduct"}}}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Search result.","block":true},"name":{"kind":"Name","value":"StoreSearchResult"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Search result products.","block":true},"name":{"kind":"Name","value":"products"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProductConnection"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Array of search result facets.","block":true},"name":{"kind":"Name","value":"facets"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreFacet"}}}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Search result suggestions.","block":true},"name":{"kind":"Name","value":"suggestions"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSuggestions"}}},"directives":[]}]},{"kind":"ObjectTypeDefinition","name":{"kind":"Name","value":"Query"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns the details of a product based on the specified locator.","block":true},"name":{"kind":"Name","value":"product"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"An array of selected search facets.","block":true},"name":{"kind":"Name","value":"locator"},"type":{"kind":"NonNullType","type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"IStoreSelectedFacet"}}}}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProduct"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns the details of a collection based on the collection slug.","block":true},"name":{"kind":"Name","value":"collection"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Collection slug.","block":true},"name":{"kind":"Name","value":"slug"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreCollection"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns the result of a product, facet, or suggestion search.","block":true},"name":{"kind":"Name","value":"search"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Search pagination argument, indicating how many results should be returned from the complete result list.","block":true},"name":{"kind":"Name","value":"first"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Search pagination argument, indicating the cursor corresponding with the item after which the results should be fetched.","block":true},"name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Search results sorting mode.","block":true},"name":{"kind":"Name","value":"sort"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSort"}},"defaultValue":{"kind":"EnumValue","value":"score_desc"},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Search term.","block":true},"name":{"kind":"Name","value":"term"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"defaultValue":{"kind":"StringValue","value":"","block":false},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Array of selected search facets.","block":true},"name":{"kind":"Name","value":"selectedFacets"},"type":{"kind":"ListType","type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"IStoreSelectedFacet"}}}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreSearchResult"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns information about all products.","block":true},"name":{"kind":"Name","value":"allProducts"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Product pagination argument, indicating how many items should be returned from the complete result list.","block":true},"name":{"kind":"Name","value":"first"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Product pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.","block":true},"name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreProductConnection"}}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Returns information about all collections.","block":true},"name":{"kind":"Name","value":"allCollections"},"arguments":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Collection pagination argument, indicating how many items should be returned from the complete result list.","block":true},"name":{"kind":"Name","value":"first"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"Int"}}},"directives":[]},{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Collection pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.","block":true},"name":{"kind":"Name","value":"after"},"type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}},"directives":[]}],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"StoreCollectionConnection"}}},"directives":[]}]}],"loc":{"start":0,"end":4916}};
|
|
1976
2160
|
doc$f.loc.source = {"body":"\"\"\"\nEach product edge contains a `node`, with product information, and a `cursor`, that can be used as a reference for pagination.\n\"\"\"\ntype StoreProductEdge {\n \"\"\"\n Each product node contains the information of a product returned by the query.\n \"\"\"\n node: StoreProduct!\n \"\"\"\n Product cursor. Used as pagination reference.\n \"\"\"\n cursor: String!\n}\n\n\"\"\"\nProduct connections, including pagination information and products returned by the query.\n\"\"\"\ntype StoreProductConnection {\n \"\"\"\n Product pagination information.\n \"\"\"\n pageInfo: StorePageInfo!\n \"\"\"\n Array with product connection edges, each containing a product and a corresponding cursor.\n \"\"\"\n edges: [StoreProductEdge!]!\n}\n\n\"\"\"\nEach collection edge contains a `node`, with product collection information, and a `cursor`, that can be used as a reference for pagination.\n\"\"\"\ntype StoreCollectionEdge {\n \"\"\"\n Each collection node contains the information of a product collection returned by the query.\n \"\"\"\n node: StoreCollection!\n \"\"\"\n Collection cursor. Used as pagination reference.\n \"\"\"\n cursor: String!\n}\n\n\"\"\"\nCollection connections, including pagination information and collections returned by the query.\n\"\"\"\ntype StoreCollectionConnection {\n \"\"\"\n Collection pagination information.\n \"\"\"\n pageInfo: StorePageInfo!\n \"\"\"\n Array with collection connection page edges, each containing a collection and a corresponding cursor..\n \"\"\"\n edges: [StoreCollectionEdge!]!\n}\n\n\"\"\"\nProduct search results sorting options.\n\"\"\"\nenum StoreSort {\n \"\"\"\n Sort by price, from highest to lowest.\n \"\"\"\n price_desc\n \"\"\"\n Sort by price, from lowest to highest.\n \"\"\"\n price_asc\n \"\"\"\n Sort by orders, from highest to lowest.\n \"\"\"\n orders_desc\n \"\"\"\n Sort by name, in reverse alphabetical order.\n \"\"\"\n name_desc\n \"\"\"\n Sort by name, in alphabetical order.\n \"\"\"\n name_asc\n \"\"\"\n Sort by release date, from highest to lowest.\n \"\"\"\n release_desc\n \"\"\"\n Sort by discount value, from highest to lowest.\n \"\"\"\n discount_desc\n \"\"\"\n Sort by product score, from highest to lowest.\n \"\"\"\n score_desc\n}\n\n\"\"\"\nSelected search facet input.\n\"\"\"\ninput IStoreSelectedFacet {\n \"\"\"\n Selected search facet key.\n \"\"\"\n key: String!\n \"\"\"\n Selected search facet value.\n \"\"\"\n value: String!\n}\n\n\"\"\"\nSearch facet type.\n\"\"\"\nenum StoreFacetType {\n \"\"\"\n Indicates boolean search facet.\n \"\"\"\n BOOLEAN\n \"\"\"\n Indicates range type search facet.\n \"\"\"\n RANGE\n}\n\n\"\"\"\nSuggestion term.\n\"\"\"\ntype StoreSuggestionTerm {\n \"\"\"\n The term.\n \"\"\"\n value: String!\n \"\"\"\n Its occurrences count.\n \"\"\"\n count: Int!\n}\n\n\"\"\"\nSuggestions information.\n\"\"\"\ntype StoreSuggestions {\n \"\"\"\n Array with suggestion terms.\n \"\"\"\n terms: [StoreSuggestionTerm!]!\n \"\"\"\n Array with suggestion products' information.\n \"\"\"\n products: [StoreProduct!]!\n}\n\n\"\"\"\nSearch result.\n\"\"\"\ntype StoreSearchResult {\n \"\"\"\n Search result products.\n \"\"\"\n products: StoreProductConnection!\n \"\"\"\n Array of search result facets.\n \"\"\"\n facets: [StoreFacet!]!\n \"\"\"\n Search result suggestions.\n \"\"\"\n suggestions: StoreSuggestions!\n}\n\ntype Query {\n \"\"\"\n Returns the details of a product based on the specified locator.\n \"\"\"\n product(\n \"\"\"\n An array of selected search facets.\n \"\"\"\n locator: [IStoreSelectedFacet!]!\n ): StoreProduct!\n\n \"\"\"\n Returns the details of a collection based on the collection slug.\n \"\"\"\n collection(\n \"\"\"\n Collection slug.\n \"\"\"\n slug: String!\n ): StoreCollection!\n\n \"\"\"\n Returns the result of a product, facet, or suggestion search.\n \"\"\"\n search(\n \"\"\"\n Search pagination argument, indicating how many results should be returned from the complete result list.\n \"\"\"\n first: Int!\n \"\"\"\n Search pagination argument, indicating the cursor corresponding with the item after which the results should be fetched.\n \"\"\"\n after: String\n \"\"\"\n Search results sorting mode.\n \"\"\"\n sort: StoreSort = score_desc\n \"\"\"\n Search term.\n \"\"\"\n term: String = \"\"\n \"\"\"\n Array of selected search facets.\n \"\"\"\n selectedFacets: [IStoreSelectedFacet!]\n ): StoreSearchResult!\n\n \"\"\"\n Returns information about all products.\n \"\"\"\n allProducts(\n \"\"\"\n Product pagination argument, indicating how many items should be returned from the complete result list.\n \"\"\"\n first: Int!,\n \"\"\"\n Product pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.\n \"\"\"\n after: String\n ): StoreProductConnection!\n\n \"\"\"\n Returns information about all collections.\n \"\"\"\n allCollections(\n \"\"\"\n Collection pagination argument, indicating how many items should be returned from the complete result list.\n \"\"\"\n first: Int!,\n \"\"\"\n Collection pagination argument, indicating the cursor corresponding with the item after which the items should be fetched.\n \"\"\"\n after: String\n ): StoreCollectionConnection!\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
@@ -2002,7 +2186,10 @@ var doc$n = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","de
|
|
|
2002
2186
|
var doc$o = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","description":{"kind":"StringValue","value":"Newsletter information.","block":true},"name":{"kind":"Name","value":"PersonNewsletter"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Person's ID in the newsletter list.","block":true},"name":{"kind":"Name","value":"id"},"arguments":[],"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]},{"kind":"InputObjectTypeDefinition","description":{"kind":"StringValue","value":"Person data input to the newsletter.","block":true},"name":{"kind":"Name","value":"IPersonNewsletter"},"directives":[],"fields":[{"kind":"InputValueDefinition","description":{"kind":"StringValue","value":"Person's 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":"Person's email.","block":true},"name":{"kind":"Name","value":"email"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}]}],"loc":{"start":0,"end":289}};
|
|
2003
2187
|
doc$o.loc.source = {"body":"\"\"\"\nNewsletter information.\n\"\"\"\n\ntype PersonNewsletter {\n \"\"\"\n Person's ID in the newsletter list.\n \"\"\"\n id: String!\n}\n\n\"\"\"\nPerson data input to the newsletter.\n\"\"\"\ninput IPersonNewsletter {\n \"\"\"\n Person's name.\n \"\"\"\n name: String!\n \"\"\"\n Person's email.\n \"\"\"\n email: String!\n}\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
2004
2188
|
|
|
2005
|
-
|
|
2189
|
+
var doc$p = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","name":{"kind":"Name","value":"SkuVariants"},"interfaces":[],"directives":[],"fields":[{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"SKU property values for the current SKU.","block":true},"name":{"kind":"Name","value":"activeVariations"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"ActiveVariations"}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"All available options for each SKU variant property, indexed by their name.","block":true},"name":{"kind":"Name","value":"allVariantsByName"},"arguments":[],"type":{"kind":"NamedType","name":{"kind":"Name","value":"VariantsByName"}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Maps property value combinations to their respective SKU's slug. Enables\nus to retrieve the slug for the SKU that matches the currently selected\nvariations in O(1) time.","block":true},"name":{"kind":"Name","value":"slugsMap"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"dominantVariantName"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"type":{"kind":"NamedType","name":{"kind":"Name","value":"SlugsMap"}},"directives":[]},{"kind":"FieldDefinition","description":{"kind":"StringValue","value":"Available options for each varying SKU property, taking into account the\n`dominantVariantName` property. Returns all available options for the \ndominant property, and only options that can be combined with its current\nvalue for other properties.","block":true},"name":{"kind":"Name","value":"availableVariations"},"arguments":[{"kind":"InputValueDefinition","name":{"kind":"Name","value":"dominantVariantName"},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}},"directives":[]}],"type":{"kind":"NamedType","name":{"kind":"Name","value":"FormattedVariants"}},"directives":[]}]},{"kind":"ScalarTypeDefinition","description":{"kind":"StringValue","value":"Example: \n\n```json\n{ \n 'Color-Red-Size-40': 'classic-shoes-37'\n}\n```","block":true},"name":{"kind":"Name","value":"SlugsMap"},"directives":[]},{"kind":"ScalarTypeDefinition","description":{"kind":"StringValue","value":"Example:\n\n```json\n{\n Color: 'Red', Size: '42'\n}\n```","block":true},"name":{"kind":"Name","value":"ActiveVariations"},"directives":[]},{"kind":"ScalarTypeDefinition","description":{"kind":"StringValue","value":"Example:\n\n```json\n{\n Color: [ \"Red\", \"Blue\", \"Green\" ],\n Size: [ \"40\", \"41\" ]\n}\n```","block":true},"name":{"kind":"Name","value":"VariantsByName"},"directives":[]},{"kind":"ScalarTypeDefinition","description":{"kind":"StringValue","value":"Example: \n\n```json\n{\n Color: [\n { \n src: \"https://storecomponents.vtexassets.com/...\",\n alt: \"...\",\n label: \"...\",\n value: \"...\"\n },\n { \n src: \"https://storecomponents.vtexassets.com/...\",\n alt: \"...\",\n label: \"...\",\n value: \"...\"\n }\n ],\n Size: [\n { \n src: \"https://storecomponents.vtexassets.com/...\",\n alt: \"...\",\n label: \"...\",\n value: \"...\"\n }\n ]\n}\n```","block":true},"name":{"kind":"Name","value":"FormattedVariants"},"directives":[]}],"loc":{"start":0,"end":1584}};
|
|
2190
|
+
doc$p.loc.source = {"body":"type SkuVariants {\n \"\"\"\n SKU property values for the current SKU.\n \"\"\"\n activeVariations: ActiveVariations\n \"\"\"\n All available options for each SKU variant property, indexed by their name.\n \"\"\"\n allVariantsByName: VariantsByName\n \"\"\"\n Maps property value combinations to their respective SKU's slug. Enables\n us to retrieve the slug for the SKU that matches the currently selected\n variations in O(1) time.\n \"\"\"\n slugsMap(dominantVariantName: String!): SlugsMap\n \"\"\"\n Available options for each varying SKU property, taking into account the\n `dominantVariantName` property. Returns all available options for the \n dominant property, and only options that can be combined with its current\n value for other properties.\n \"\"\"\n availableVariations(dominantVariantName: String!): FormattedVariants\n}\n\n\"\"\"\nExample: \n\n```json\n{ \n 'Color-Red-Size-40': 'classic-shoes-37'\n}\n```\n\"\"\"\nscalar SlugsMap\n\"\"\"\nExample:\n\n```json\n{\n Color: 'Red', Size: '42'\n}\n```\n\"\"\"\nscalar ActiveVariations\n\"\"\"\nExample:\n\n```json\n{\n Color: [ \"Red\", \"Blue\", \"Green\" ],\n Size: [ \"40\", \"41\" ]\n}\n```\n\"\"\"\nscalar VariantsByName\n\"\"\"\nExample: \n\n```json\n{\n Color: [\n { \n src: \"https://storecomponents.vtexassets.com/...\",\n alt: \"...\",\n label: \"...\",\n value: \"...\"\n },\n { \n src: \"https://storecomponents.vtexassets.com/...\",\n alt: \"...\",\n label: \"...\",\n value: \"...\"\n }\n ],\n Size: [\n { \n src: \"https://storecomponents.vtexassets.com/...\",\n alt: \"...\",\n label: \"...\",\n value: \"...\"\n }\n ]\n}\n```\n\"\"\"\nscalar FormattedVariants\n\n","name":"GraphQL request","locationOffset":{"line":1,"column":1}};
|
|
2191
|
+
|
|
2192
|
+
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, doc$n, doc$o, doc$p].map(print).join('\n');
|
|
2006
2193
|
|
|
2007
2194
|
const platforms = {
|
|
2008
2195
|
vtex: {
|