@faststore/api 4.9.0-dev.5 → 4.9.0-dev.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +27 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/index.mjs +96 -77
- package/dist/es/index.mjs.map +1 -1
- package/dist/src/__generated__/schema.d.ts +10 -0
- package/dist/src/__generated__/schema.d.ts.map +1 -1
- package/dist/src/platforms/vtex/clients/search/types/ProductSearchResult.d.ts +6 -2
- package/dist/src/platforms/vtex/clients/search/types/ProductSearchResult.d.ts.map +1 -1
- package/dist/src/platforms/vtex/resolvers/productGroup.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/__generated__/schema.ts +11 -0
- package/src/platforms/vtex/clients/search/types/ProductSearchResult.ts +7 -2
- package/src/platforms/vtex/resolvers/productGroup.ts +1 -0
- package/src/platforms/vtex/typeDefs/productGroup.graphql +18 -0
|
@@ -1842,6 +1842,15 @@ export type StoreProductImageArgs = {
|
|
|
1842
1842
|
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
1843
1843
|
};
|
|
1844
1844
|
|
|
1845
|
+
/** A product cluster (collection) associated with a product group. */
|
|
1846
|
+
export type StoreProductCluster = {
|
|
1847
|
+
__typename?: 'StoreProductCluster';
|
|
1848
|
+
/** Product cluster ID. */
|
|
1849
|
+
id: Scalars['String']['output'];
|
|
1850
|
+
/** Product cluster name. */
|
|
1851
|
+
name: Scalars['String']['output'];
|
|
1852
|
+
};
|
|
1853
|
+
|
|
1845
1854
|
/** Product connections, including pagination information and products returned by the query. */
|
|
1846
1855
|
export type StoreProductConnection = {
|
|
1847
1856
|
__typename?: 'StoreProductConnection';
|
|
@@ -1869,6 +1878,8 @@ export type StoreProductGroup = {
|
|
|
1869
1878
|
hasVariant: Array<StoreProduct>;
|
|
1870
1879
|
/** Product group name. */
|
|
1871
1880
|
name: Scalars['String']['output'];
|
|
1881
|
+
/** Product clusters (collections) the product group belongs to. */
|
|
1882
|
+
productClusters: Array<StoreProductCluster>;
|
|
1872
1883
|
/** Product group ID. */
|
|
1873
1884
|
productGroupID: Scalars['String']['output'];
|
|
1874
1885
|
/**
|
|
@@ -78,8 +78,8 @@ export interface Product {
|
|
|
78
78
|
linkText: string
|
|
79
79
|
productReference: string
|
|
80
80
|
categoryId: string
|
|
81
|
-
clusterHighlights:
|
|
82
|
-
productClusters:
|
|
81
|
+
clusterHighlights: ProductCluster[]
|
|
82
|
+
productClusters: ProductCluster[]
|
|
83
83
|
categories: string[]
|
|
84
84
|
categoriesIds: string[]
|
|
85
85
|
link: string
|
|
@@ -100,6 +100,11 @@ export interface Product {
|
|
|
100
100
|
deliveryPromisesBadges?: DeliveryPromiseBadge[]
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
export interface ProductCluster {
|
|
104
|
+
id: string
|
|
105
|
+
name: string
|
|
106
|
+
}
|
|
107
|
+
|
|
103
108
|
interface Image {
|
|
104
109
|
imageId: string
|
|
105
110
|
imageLabel: string | null
|
|
@@ -12,6 +12,7 @@ export const StoreProductGroup: Record<string, GraphqlResolver<Root>> = {
|
|
|
12
12
|
hasVariant: (root) =>
|
|
13
13
|
root.isVariantOf.items.map((item) => enhanceSku(item, root.isVariantOf)),
|
|
14
14
|
productGroupID: ({ isVariantOf }) => isVariantOf.productId,
|
|
15
|
+
productClusters: ({ isVariantOf }) => isVariantOf.productClusters ?? [],
|
|
15
16
|
name: (root) => root.isVariantOf.productName,
|
|
16
17
|
skuVariants: (root) => root,
|
|
17
18
|
additionalProperty: ({ isVariantOf: { specificationGroups } }) =>
|
|
@@ -11,6 +11,10 @@ type StoreProductGroup {
|
|
|
11
11
|
"""
|
|
12
12
|
productGroupID: String!
|
|
13
13
|
"""
|
|
14
|
+
Product clusters (collections) the product group belongs to.
|
|
15
|
+
"""
|
|
16
|
+
productClusters: [StoreProductCluster!]!
|
|
17
|
+
"""
|
|
14
18
|
Product group name.
|
|
15
19
|
"""
|
|
16
20
|
name: String!
|
|
@@ -25,3 +29,17 @@ type StoreProductGroup {
|
|
|
25
29
|
"""
|
|
26
30
|
skuVariants: SkuVariants
|
|
27
31
|
}
|
|
32
|
+
|
|
33
|
+
"""
|
|
34
|
+
A product cluster (collection) associated with a product group.
|
|
35
|
+
"""
|
|
36
|
+
type StoreProductCluster {
|
|
37
|
+
"""
|
|
38
|
+
Product cluster ID.
|
|
39
|
+
"""
|
|
40
|
+
id: String!
|
|
41
|
+
"""
|
|
42
|
+
Product cluster name.
|
|
43
|
+
"""
|
|
44
|
+
name: String!
|
|
45
|
+
}
|