@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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,37 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.10.34 (2022-08-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Add skuSelector-related properties to ProductGroup type ([#1407](https://github.com/vtex/faststore/issues/1407)) ([3f9f33f](https://github.com/vtex/faststore/commit/3f9f33f05b47d266465f349edb7645ad06ff7b27))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Chores
|
|
15
|
+
|
|
16
|
+
* Update generated types from `@faststore/api` ([#1431](https://github.com/vtex/faststore/issues/1431)) ([516068a](https://github.com/vtex/faststore/commit/516068a4cb67a9029693c967db34b133aac81403))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## [1.10.33](https://github.com/vtex/faststore/compare/v1.10.32...v1.10.33) (2022-08-03)
|
|
21
|
+
|
|
22
|
+
**Note:** Version bump only for package @faststore/api
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## 1.10.30 (2022-08-02)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Chores
|
|
32
|
+
|
|
33
|
+
* Updates documentation link ([#1424](https://github.com/vtex/faststore/issues/1424)) ([04e518a](https://github.com/vtex/faststore/commit/04e518a92038259bda212024b85c1a807ebf0e1a))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
6
37
|
## [1.10.19](https://github.com/vtex/faststore/compare/v1.10.18...v1.10.19) (2022-07-22)
|
|
7
38
|
|
|
8
39
|
**Note:** Version bump only for package @faststore/api
|
|
@@ -17,7 +17,69 @@ export declare type Scalars = {
|
|
|
17
17
|
Boolean: boolean;
|
|
18
18
|
Int: number;
|
|
19
19
|
Float: number;
|
|
20
|
+
/**
|
|
21
|
+
* Example:
|
|
22
|
+
*
|
|
23
|
+
* ```json
|
|
24
|
+
* {
|
|
25
|
+
* Color: 'Red', Size: '42'
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
ActiveVariations: any;
|
|
30
|
+
/**
|
|
31
|
+
* Example:
|
|
32
|
+
*
|
|
33
|
+
* ```json
|
|
34
|
+
* {
|
|
35
|
+
* Color: [
|
|
36
|
+
* {
|
|
37
|
+
* src: "https://storecomponents.vtexassets.com/...",
|
|
38
|
+
* alt: "...",
|
|
39
|
+
* label: "...",
|
|
40
|
+
* value: "..."
|
|
41
|
+
* },
|
|
42
|
+
* {
|
|
43
|
+
* src: "https://storecomponents.vtexassets.com/...",
|
|
44
|
+
* alt: "...",
|
|
45
|
+
* label: "...",
|
|
46
|
+
* value: "..."
|
|
47
|
+
* }
|
|
48
|
+
* ],
|
|
49
|
+
* Size: [
|
|
50
|
+
* {
|
|
51
|
+
* src: "https://storecomponents.vtexassets.com/...",
|
|
52
|
+
* alt: "...",
|
|
53
|
+
* label: "...",
|
|
54
|
+
* value: "..."
|
|
55
|
+
* }
|
|
56
|
+
* ]
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
FormattedVariants: any;
|
|
20
61
|
ObjectOrString: any;
|
|
62
|
+
/**
|
|
63
|
+
* Example:
|
|
64
|
+
*
|
|
65
|
+
* ```json
|
|
66
|
+
* {
|
|
67
|
+
* 'Color-Red-Size-40': 'classic-shoes-37'
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
SlugsMap: any;
|
|
72
|
+
/**
|
|
73
|
+
* Example:
|
|
74
|
+
*
|
|
75
|
+
* ```json
|
|
76
|
+
* {
|
|
77
|
+
* Color: [ "Red", "Blue", "Green" ],
|
|
78
|
+
* Size: [ "40", "41" ]
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
VariantsByName: any;
|
|
21
83
|
};
|
|
22
84
|
/** Person data input to the newsletter. */
|
|
23
85
|
export declare type IPersonNewsletter = {
|
|
@@ -182,6 +244,32 @@ export declare type QuerySearchArgs = {
|
|
|
182
244
|
sort?: Maybe<StoreSort>;
|
|
183
245
|
term?: Maybe<Scalars['String']>;
|
|
184
246
|
};
|
|
247
|
+
export declare type SkuVariants = {
|
|
248
|
+
__typename?: 'SkuVariants';
|
|
249
|
+
/** SKU property values for the current SKU. */
|
|
250
|
+
activeVariations?: Maybe<Scalars['ActiveVariations']>;
|
|
251
|
+
/** All available options for each SKU variant property, indexed by their name. */
|
|
252
|
+
allVariantsByName?: Maybe<Scalars['VariantsByName']>;
|
|
253
|
+
/**
|
|
254
|
+
* Available options for each varying SKU property, taking into account the
|
|
255
|
+
* `dominantVariantName` property. Returns all available options for the
|
|
256
|
+
* dominant property, and only options that can be combined with its current
|
|
257
|
+
* value for other properties.
|
|
258
|
+
*/
|
|
259
|
+
availableVariations?: Maybe<Scalars['FormattedVariants']>;
|
|
260
|
+
/**
|
|
261
|
+
* Maps property value combinations to their respective SKU's slug. Enables
|
|
262
|
+
* us to retrieve the slug for the SKU that matches the currently selected
|
|
263
|
+
* variations in O(1) time.
|
|
264
|
+
*/
|
|
265
|
+
slugsMap?: Maybe<Scalars['SlugsMap']>;
|
|
266
|
+
};
|
|
267
|
+
export declare type SkuVariantsAvailableVariationsArgs = {
|
|
268
|
+
dominantVariantName: Scalars['String'];
|
|
269
|
+
};
|
|
270
|
+
export declare type SkuVariantsSlugsMapArgs = {
|
|
271
|
+
dominantVariantName: Scalars['String'];
|
|
272
|
+
};
|
|
185
273
|
/** Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers. */
|
|
186
274
|
export declare type StoreAggregateOffer = {
|
|
187
275
|
__typename?: 'StoreAggregateOffer';
|
|
@@ -502,6 +590,12 @@ export declare type StoreProductGroup = {
|
|
|
502
590
|
name: Scalars['String'];
|
|
503
591
|
/** Product group ID. */
|
|
504
592
|
productGroupID: Scalars['String'];
|
|
593
|
+
/**
|
|
594
|
+
* Object containing data structures to facilitate handling different SKU
|
|
595
|
+
* variant properties. Specially useful for implementing SKU selection
|
|
596
|
+
* components.
|
|
597
|
+
*/
|
|
598
|
+
skuVariants?: Maybe<SkuVariants>;
|
|
505
599
|
};
|
|
506
600
|
/** Properties that can be associated with products and products groups. */
|
|
507
601
|
export declare type StorePropertyValue = {
|
|
@@ -595,8 +595,10 @@ function slugify(str) {
|
|
|
595
595
|
|
|
596
596
|
const isBrand = x => x.type === 'brand' || isCollectionPageType(x) && x.pageType.toLowerCase() === 'brand';
|
|
597
597
|
|
|
598
|
+
const isCollection = x => isCollectionPageType(x) && x.pageType.toLowerCase() === 'collection';
|
|
599
|
+
|
|
598
600
|
const slugifyRoot = root => {
|
|
599
|
-
if (isBrand(root)) {
|
|
601
|
+
if (isBrand(root) || isCollection(root)) {
|
|
600
602
|
return slugify(root.name);
|
|
601
603
|
}
|
|
602
604
|
|
|
@@ -1505,15 +1507,14 @@ const StoreProductGroup = {
|
|
|
1505
1507
|
productGroupID: ({
|
|
1506
1508
|
isVariantOf
|
|
1507
1509
|
}) => isVariantOf.productId,
|
|
1508
|
-
name:
|
|
1509
|
-
|
|
1510
|
-
}) => isVariantOf.productName,
|
|
1510
|
+
name: root => root.isVariantOf.productName,
|
|
1511
|
+
skuVariants: root => root,
|
|
1511
1512
|
additionalProperty: ({
|
|
1512
1513
|
isVariantOf: {
|
|
1513
1514
|
specificationGroups
|
|
1514
1515
|
}
|
|
1515
|
-
}) => specificationGroups //
|
|
1516
|
-
.filter(specificationGroup => !BLOCKED_SPECIFICATIONS.has(specificationGroup.name)) // Transform specs back into product specs
|
|
1516
|
+
}) => specificationGroups // Filter sku specifications so we don't mix them with product specs.
|
|
1517
|
+
.filter(specificationGroup => !BLOCKED_SPECIFICATIONS.has(specificationGroup.name)) // Transform specs back into product specs.
|
|
1517
1518
|
.flatMap(({
|
|
1518
1519
|
specifications
|
|
1519
1520
|
}) => specifications.flatMap(({
|
|
@@ -1898,6 +1899,188 @@ const StoreSeo = {
|
|
|
1898
1899
|
titleTemplate: () => ''
|
|
1899
1900
|
};
|
|
1900
1901
|
|
|
1902
|
+
function findSkuVariantImage(availableImages) {
|
|
1903
|
+
var _availableImages$find;
|
|
1904
|
+
|
|
1905
|
+
return (_availableImages$find = availableImages.find(imageProperties => imageProperties.imageLabel === 'skuvariation')) != null ? _availableImages$find : availableImages[0];
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
function createSlugsMap(variants, dominantVariantName, baseSlug) {
|
|
1909
|
+
/**
|
|
1910
|
+
* Maps property value combinations to their respective SKU's slug. Enables
|
|
1911
|
+
* us to retrieve the slug for the SKU that matches the currently selected
|
|
1912
|
+
* variations in O(1) time.
|
|
1913
|
+
*
|
|
1914
|
+
* Example: `'Color-Red-Size-40': 'classic-shoes-37'`
|
|
1915
|
+
*/
|
|
1916
|
+
const slugsMap = {};
|
|
1917
|
+
variants.forEach(variant => {
|
|
1918
|
+
var _skuSpecificationProp, _skuSpecificationProp2;
|
|
1919
|
+
|
|
1920
|
+
const skuSpecificationProperties = variant.variations;
|
|
1921
|
+
|
|
1922
|
+
if (skuSpecificationProperties.length === 0) {
|
|
1923
|
+
return;
|
|
1924
|
+
} // Make sure that the 'name-value' pair for the dominant variation
|
|
1925
|
+
// is always the first one.
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
const dominantNameValue = `${dominantVariantName}-${(_skuSpecificationProp = (_skuSpecificationProp2 = skuSpecificationProperties.find(variationDetails => variationDetails.name === dominantVariantName)) == null ? void 0 : _skuSpecificationProp2.values[0]) != null ? _skuSpecificationProp : ''}`;
|
|
1929
|
+
const skuVariantKey = skuSpecificationProperties.reduce((acc, property) => {
|
|
1930
|
+
const shouldIgnore = property.name === dominantVariantName;
|
|
1931
|
+
|
|
1932
|
+
if (shouldIgnore) {
|
|
1933
|
+
return acc;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
return acc + `-${property.name}-${property.values[0]}`;
|
|
1937
|
+
}, dominantNameValue);
|
|
1938
|
+
slugsMap[skuVariantKey] = `${baseSlug}-${variant.itemId}`;
|
|
1939
|
+
});
|
|
1940
|
+
return slugsMap;
|
|
1941
|
+
}
|
|
1942
|
+
function getActiveSkuVariations(variations) {
|
|
1943
|
+
const activeVariations = {};
|
|
1944
|
+
variations.forEach(variation => {
|
|
1945
|
+
activeVariations[variation.name] = variation.values[0];
|
|
1946
|
+
});
|
|
1947
|
+
return activeVariations;
|
|
1948
|
+
}
|
|
1949
|
+
function getVariantsByName(skuSpecifications) {
|
|
1950
|
+
const variants = {};
|
|
1951
|
+
skuSpecifications == null ? void 0 : skuSpecifications.forEach(specification => {
|
|
1952
|
+
var _specification$field$;
|
|
1953
|
+
|
|
1954
|
+
variants[(_specification$field$ = specification.field.originalName) != null ? _specification$field$ : specification.field.name] = specification.values.map(value => {
|
|
1955
|
+
var _value$originalName;
|
|
1956
|
+
|
|
1957
|
+
return (_value$originalName = value.originalName) != null ? _value$originalName : value.name;
|
|
1958
|
+
});
|
|
1959
|
+
});
|
|
1960
|
+
return variants;
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
function compare(a, b) {
|
|
1964
|
+
// Values are always represented as Strings, so we need to handle numbers
|
|
1965
|
+
// in this special case.
|
|
1966
|
+
if (!Number.isNaN(Number(a) - Number(b))) {
|
|
1967
|
+
return Number(a) - Number(b);
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
if (a < b) {
|
|
1971
|
+
return -1;
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
if (a > b) {
|
|
1975
|
+
return 1;
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
return 0;
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
function sortVariants(variantsByName) {
|
|
1982
|
+
const sortedVariants = variantsByName;
|
|
1983
|
+
|
|
1984
|
+
for (const variantProperty in variantsByName) {
|
|
1985
|
+
variantsByName[variantProperty].sort((a, b) => compare(a.value, b.value));
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
return sortedVariants;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
function getFormattedVariations(variants, dominantVariantName, dominantVariantValue) {
|
|
1992
|
+
/**
|
|
1993
|
+
* SKU options already formatted and indexed by their property name.
|
|
1994
|
+
*
|
|
1995
|
+
* Ex: {
|
|
1996
|
+
* `Size`: [
|
|
1997
|
+
* { label: '42', value: '42' },
|
|
1998
|
+
* { label: '41', value: '41' },
|
|
1999
|
+
* { label: '39', value: '39' },
|
|
2000
|
+
* ]
|
|
2001
|
+
* }
|
|
2002
|
+
*/
|
|
2003
|
+
const variantsByName = {};
|
|
2004
|
+
const previouslySeenPropertyValues = new Set();
|
|
2005
|
+
variants.forEach(variant => {
|
|
2006
|
+
if (variant.variations.length === 0) {
|
|
2007
|
+
return;
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
const variantImageToUse = findSkuVariantImage(variant.images);
|
|
2011
|
+
const dominantVariantEntry = variant.variations.find(variation => variation.name === dominantVariantName);
|
|
2012
|
+
const matchesDominantVariant = (dominantVariantEntry == null ? void 0 : dominantVariantEntry.values[0]) === dominantVariantValue;
|
|
2013
|
+
|
|
2014
|
+
if (!matchesDominantVariant) {
|
|
2015
|
+
var _variantImageToUse$im;
|
|
2016
|
+
|
|
2017
|
+
const nameValueIdentifier = `${dominantVariantName}-${dominantVariantEntry == null ? void 0 : dominantVariantEntry.values[0]}`;
|
|
2018
|
+
|
|
2019
|
+
if (!dominantVariantEntry || previouslySeenPropertyValues.has(nameValueIdentifier)) {
|
|
2020
|
+
return;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
previouslySeenPropertyValues.add(nameValueIdentifier);
|
|
2024
|
+
const formattedVariant = {
|
|
2025
|
+
src: variantImageToUse.imageUrl,
|
|
2026
|
+
alt: (_variantImageToUse$im = variantImageToUse.imageLabel) != null ? _variantImageToUse$im : '',
|
|
2027
|
+
label: `${dominantVariantName}: ${dominantVariantEntry.values[0]}`,
|
|
2028
|
+
value: dominantVariantEntry.values[0]
|
|
2029
|
+
};
|
|
2030
|
+
|
|
2031
|
+
if (variantsByName[dominantVariantEntry.name]) {
|
|
2032
|
+
variantsByName[dominantVariantEntry.name].push(formattedVariant);
|
|
2033
|
+
} else {
|
|
2034
|
+
variantsByName[dominantVariantEntry.name] = [formattedVariant];
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
return;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
variant.variations.forEach(variationProperty => {
|
|
2041
|
+
var _variantImageToUse$im2;
|
|
2042
|
+
|
|
2043
|
+
const nameValueIdentifier = `${variationProperty.name}-${variationProperty.values[0]}`;
|
|
2044
|
+
|
|
2045
|
+
if (previouslySeenPropertyValues.has(nameValueIdentifier)) {
|
|
2046
|
+
return;
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
previouslySeenPropertyValues.add(nameValueIdentifier);
|
|
2050
|
+
const formattedVariant = {
|
|
2051
|
+
src: variantImageToUse.imageUrl,
|
|
2052
|
+
alt: (_variantImageToUse$im2 = variantImageToUse.imageLabel) != null ? _variantImageToUse$im2 : '',
|
|
2053
|
+
label: `${variationProperty.name}: ${variationProperty.values[0]}`,
|
|
2054
|
+
value: variationProperty.values[0]
|
|
2055
|
+
};
|
|
2056
|
+
|
|
2057
|
+
if (variantsByName[variationProperty.name]) {
|
|
2058
|
+
variantsByName[variationProperty.name].push(formattedVariant);
|
|
2059
|
+
} else {
|
|
2060
|
+
variantsByName[variationProperty.name] = [formattedVariant];
|
|
2061
|
+
}
|
|
2062
|
+
});
|
|
2063
|
+
});
|
|
2064
|
+
return sortVariants(variantsByName);
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
const SkuVariants = {
|
|
2068
|
+
activeVariations: root => getActiveSkuVariations(root.variations),
|
|
2069
|
+
allVariantsByName: root => getVariantsByName(root.isVariantOf.skuSpecifications),
|
|
2070
|
+
slugsMap: (root, args) => createSlugsMap(root.isVariantOf.items, // Since `dominantVariantProperty` is a required argument, we can safely
|
|
2071
|
+
// access it.
|
|
2072
|
+
args.dominantVariantName, root.isVariantOf.linkText),
|
|
2073
|
+
availableVariations: (root, args) => {
|
|
2074
|
+
// Since `dominantVariantProperty` is a required argument, we can safely
|
|
2075
|
+
// access it.
|
|
2076
|
+
const dominantVariantName = args.dominantVariantName;
|
|
2077
|
+
const activeVariations = getActiveSkuVariations(root.variations);
|
|
2078
|
+
const activeDominantVariationValue = activeVariations[dominantVariantName];
|
|
2079
|
+
const filteredFormattedVariations = getFormattedVariations(root.isVariantOf.items, dominantVariantName, activeDominantVariationValue);
|
|
2080
|
+
return filteredFormattedVariations;
|
|
2081
|
+
}
|
|
2082
|
+
};
|
|
2083
|
+
|
|
1901
2084
|
const Resolvers = {
|
|
1902
2085
|
StoreCollection,
|
|
1903
2086
|
StoreAggregateOffer,
|
|
@@ -1913,6 +2096,7 @@ const Resolvers = {
|
|
|
1913
2096
|
StoreProductGroup,
|
|
1914
2097
|
StoreSearchResult,
|
|
1915
2098
|
StorePropertyValue,
|
|
2099
|
+
SkuVariants,
|
|
1916
2100
|
ObjectOrString,
|
|
1917
2101
|
Query,
|
|
1918
2102
|
Mutation
|
|
@@ -1973,8 +2157,8 @@ var doc$c = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","de
|
|
|
1973
2157
|
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}};
|
|
1974
2158
|
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}};
|
|
1975
2159
|
|
|
1976
|
-
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":
|
|
1977
|
-
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}};
|
|
2160
|
+
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}};
|
|
2161
|
+
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}};
|
|
1978
2162
|
|
|
1979
2163
|
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}};
|
|
1980
2164
|
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}};
|
|
@@ -2006,7 +2190,10 @@ var doc$n = {"kind":"Document","definitions":[{"kind":"ObjectTypeDefinition","de
|
|
|
2006
2190
|
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}};
|
|
2007
2191
|
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}};
|
|
2008
2192
|
|
|
2009
|
-
|
|
2193
|
+
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}};
|
|
2194
|
+
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}};
|
|
2195
|
+
|
|
2196
|
+
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(graphql.print).join('\n');
|
|
2010
2197
|
|
|
2011
2198
|
const platforms = {
|
|
2012
2199
|
vtex: {
|