@faststore/api 1.8.2 → 1.8.3
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 +11 -0
- package/dist/api.cjs.development.js +151 -130
- 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 +151 -125
- package/dist/api.esm.js.map +1 -1
- package/dist/index.d.ts +4 -17
- package/dist/local/server.d.ts +1 -0
- package/dist/platforms/vtex/clients/search/types/ProductSearchResult.d.ts +1 -1
- package/dist/platforms/vtex/index.d.ts +4 -17
- package/dist/platforms/vtex/resolvers/aggregateOffer.d.ts +2 -5
- package/dist/platforms/vtex/resolvers/product.d.ts +2 -6
- package/dist/platforms/vtex/utils/enhanceCommercialOffer.d.ts +7 -0
- package/dist/platforms/vtex/utils/productStock.d.ts +7 -6
- package/package.json +2 -2
- package/src/platforms/vtex/clients/search/types/ProductSearchResult.ts +1 -1
- package/src/platforms/vtex/resolvers/aggregateOffer.ts +15 -13
- package/src/platforms/vtex/resolvers/offer.ts +44 -49
- package/src/platforms/vtex/resolvers/product.ts +14 -10
- package/src/platforms/vtex/utils/enhanceCommercialOffer.ts +24 -0
- package/src/platforms/vtex/utils/productStock.ts +22 -25
- package/src/typeDefs/aggregateOffer.graphql +18 -3
- package/src/typeDefs/aggregateRating.graphql +9 -0
- package/src/typeDefs/author.graphql +6 -0
- package/src/typeDefs/brand.graphql +6 -0
- package/src/typeDefs/breadcrumb.graphql +21 -0
- package/src/typeDefs/cart.graphql +24 -0
- package/src/typeDefs/collection.graphql +39 -2
- package/src/typeDefs/facet.graphql +30 -1
- package/src/typeDefs/image.graphql +18 -0
- package/src/typeDefs/mutation.graphql +30 -2
- package/src/typeDefs/offer.graphql +51 -1
- package/src/typeDefs/order.graphql +18 -0
- package/src/typeDefs/organization.graphql +12 -0
- package/src/typeDefs/pageInfo.graphql +18 -1
- package/src/typeDefs/person.graphql +15 -0
- package/src/typeDefs/product.graphql +60 -3
- package/src/typeDefs/productGroup.graphql +15 -0
- package/src/typeDefs/propertyValue.graphql +9 -0
- package/src/typeDefs/query.graphql +66 -0
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EnhancedCommercialOffer } from '../utils/enhanceCommercialOffer';
|
|
2
2
|
import type { StoreProduct } from './product';
|
|
3
3
|
import type { PromiseType } from '../../../typings';
|
|
4
4
|
import type { Resolver } from '..';
|
|
5
|
-
import type { EnhancedSku } from '../utils/enhanceSku';
|
|
6
5
|
declare type Root = PromiseType<ReturnType<typeof StoreProduct.offers>>;
|
|
7
6
|
export declare const StoreAggregateOffer: Record<string, Resolver<Root>> & {
|
|
8
|
-
offers: Resolver<Root, any,
|
|
9
|
-
product: EnhancedSku;
|
|
10
|
-
}>>;
|
|
7
|
+
offers: Resolver<Root, any, EnhancedCommercialOffer[]>;
|
|
11
8
|
};
|
|
12
9
|
export {};
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
+
import type { EnhancedCommercialOffer } from '../utils/enhanceCommercialOffer';
|
|
1
2
|
import type { Resolver } from '..';
|
|
2
3
|
import type { PromiseType } from '../../../typings';
|
|
3
4
|
import type { Query } from './query';
|
|
4
|
-
import type { Item } from '../clients/search/types/ProductSearchResult';
|
|
5
|
-
import type { EnhancedSku } from '../utils/enhanceSku';
|
|
6
5
|
declare type Root = PromiseType<ReturnType<typeof Query.product>>;
|
|
7
6
|
export declare const StoreProduct: Record<string, Resolver<Root>> & {
|
|
8
|
-
offers: Resolver<Root, any,
|
|
9
|
-
items: Item[];
|
|
10
|
-
product: EnhancedSku;
|
|
11
|
-
}>;
|
|
7
|
+
offers: Resolver<Root, any, EnhancedCommercialOffer[]>;
|
|
12
8
|
isVariantOf: Resolver<Root, any, Root>;
|
|
13
9
|
};
|
|
14
10
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CommertialOffer, Seller } from '../clients/search/types/ProductSearchResult';
|
|
2
|
+
import type { EnhancedSku } from './enhanceSku';
|
|
3
|
+
export declare type EnhancedCommercialOffer = CommertialOffer & {
|
|
4
|
+
seller: Seller;
|
|
5
|
+
product: EnhancedSku;
|
|
6
|
+
};
|
|
7
|
+
export declare const enhanceCommercialOffer: (offer: CommertialOffer, seller: Seller, product: EnhancedSku) => EnhancedCommercialOffer;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const inStock: (
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
1
|
+
import type { CommertialOffer } from '../clients/search/types/ProductSearchResult';
|
|
2
|
+
export declare const inStock: (offer: Pick<CommertialOffer, 'AvailableQuantity'>) => boolean;
|
|
3
|
+
export declare const price: (offer: Pick<CommertialOffer, 'spotPrice'>) => number;
|
|
4
|
+
export declare const sellingPrice: (offer: CommertialOffer) => number;
|
|
5
|
+
export declare const availability: (available: boolean) => "https://schema.org/InStock" | "https://schema.org/OutOfStock";
|
|
6
|
+
export declare const bestOfferFirst: (a: Pick<CommertialOffer, 'AvailableQuantity' | 'spotPrice'>, b: Pick<CommertialOffer, 'AvailableQuantity' | 'spotPrice'>) => number;
|
|
7
|
+
export declare const inStockOrderFormItem: (item: string) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/api",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"graphql": "^15.6.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "5ef59a54241b14427380079324148b1f69079eca"
|
|
49
49
|
}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { inStock } from '../utils/productStock'
|
|
2
|
+
import type { EnhancedCommercialOffer } from '../utils/enhanceCommercialOffer'
|
|
2
3
|
import type { StoreProduct } from './product'
|
|
3
4
|
import type { PromiseType } from '../../../typings'
|
|
4
5
|
import type { Resolver } from '..'
|
|
5
|
-
import type { EnhancedSku } from '../utils/enhanceSku'
|
|
6
6
|
|
|
7
7
|
type Root = PromiseType<ReturnType<typeof StoreProduct.offers>>
|
|
8
8
|
|
|
9
9
|
export const StoreAggregateOffer: Record<string, Resolver<Root>> & {
|
|
10
|
-
offers: Resolver<Root, any,
|
|
10
|
+
offers: Resolver<Root, any, EnhancedCommercialOffer[]>
|
|
11
11
|
} = {
|
|
12
|
-
highPrice: (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
highPrice: (offers) => {
|
|
13
|
+
const availableOffers = offers.filter(inStock)
|
|
14
|
+
|
|
15
|
+
return availableOffers[availableOffers.length - 1]?.Price ?? 0
|
|
16
|
+
},
|
|
17
|
+
lowPrice: (offers) => {
|
|
18
|
+
const availableOffers = offers.filter(inStock)
|
|
19
|
+
|
|
20
|
+
return availableOffers[0]?.Price ?? 0
|
|
21
|
+
},
|
|
22
|
+
offerCount: (offers) => offers.length,
|
|
17
23
|
priceCurrency: () => '',
|
|
18
|
-
offers: (
|
|
19
|
-
items.map((item) => ({
|
|
20
|
-
...item,
|
|
21
|
-
product,
|
|
22
|
-
})),
|
|
24
|
+
offers: (offers) => offers,
|
|
23
25
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Resolver } from '..'
|
|
2
|
-
import type { StoreAggregateOffer } from './aggregateOffer'
|
|
3
1
|
import {
|
|
4
|
-
|
|
2
|
+
availability,
|
|
5
3
|
inStock,
|
|
6
4
|
inStockOrderFormItem,
|
|
7
|
-
|
|
5
|
+
price,
|
|
6
|
+
sellingPrice,
|
|
8
7
|
} from '../utils/productStock'
|
|
8
|
+
import type { Resolver } from '..'
|
|
9
|
+
import type { StoreAggregateOffer } from './aggregateOffer'
|
|
9
10
|
import type { ArrayElementType } from '../../../typings'
|
|
10
|
-
import type { Item } from '../clients/search/types/ProductSearchResult'
|
|
11
11
|
import type { EnhancedSku } from '../utils/enhanceSku'
|
|
12
12
|
import type { OrderFormItem } from '../clients/commerce/types/OrderForm'
|
|
13
13
|
|
|
@@ -17,98 +17,93 @@ type SearchProduct = ArrayElementType<
|
|
|
17
17
|
>
|
|
18
18
|
type Root = SearchProduct | OrderFormProduct
|
|
19
19
|
|
|
20
|
-
const isSearchItem = (item:
|
|
21
|
-
|
|
22
|
-
'skuName' in item
|
|
20
|
+
const isSearchItem = (item: Root): item is SearchProduct =>
|
|
21
|
+
'Price' in item && 'seller' in item && 'product' in item
|
|
23
22
|
|
|
24
|
-
const
|
|
25
|
-
|
|
23
|
+
const isOrderFormItem = (item: Root): item is OrderFormProduct =>
|
|
24
|
+
'skuName' in item
|
|
26
25
|
|
|
27
26
|
export const StoreOffer: Record<string, Resolver<Root>> = {
|
|
28
27
|
priceCurrency: () => '',
|
|
29
|
-
priceValidUntil: (
|
|
30
|
-
if (isSearchItem(
|
|
31
|
-
return
|
|
28
|
+
priceValidUntil: (root) => {
|
|
29
|
+
if (isSearchItem(root)) {
|
|
30
|
+
return root.PriceValidUntil ?? ''
|
|
32
31
|
}
|
|
33
32
|
|
|
34
|
-
if (isOrderFormItem(
|
|
35
|
-
return
|
|
33
|
+
if (isOrderFormItem(root)) {
|
|
34
|
+
return root.priceValidUntil ?? ''
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
return null
|
|
39
38
|
},
|
|
40
39
|
itemCondition: () => 'https://schema.org/NewCondition',
|
|
41
|
-
availability: async (
|
|
42
|
-
if (isSearchItem(
|
|
43
|
-
return
|
|
40
|
+
availability: async (root) => {
|
|
41
|
+
if (isSearchItem(root)) {
|
|
42
|
+
return availability(inStock(root))
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
if (isOrderFormItem(
|
|
47
|
-
return
|
|
45
|
+
if (isOrderFormItem(root)) {
|
|
46
|
+
return availability(inStockOrderFormItem(root.availability))
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
return null
|
|
51
50
|
},
|
|
52
|
-
seller: (
|
|
53
|
-
if (isSearchItem(
|
|
51
|
+
seller: (root) => {
|
|
52
|
+
if (isSearchItem(root)) {
|
|
54
53
|
return {
|
|
55
|
-
identifier:
|
|
54
|
+
identifier: root.seller.sellerId ?? '',
|
|
56
55
|
}
|
|
57
56
|
}
|
|
58
57
|
|
|
59
|
-
if (isOrderFormItem(
|
|
58
|
+
if (isOrderFormItem(root)) {
|
|
60
59
|
return {
|
|
61
|
-
identifier:
|
|
60
|
+
identifier: root.seller,
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
return null
|
|
66
65
|
},
|
|
67
|
-
price: (
|
|
68
|
-
if (isSearchItem(
|
|
69
|
-
return
|
|
66
|
+
price: (root) => {
|
|
67
|
+
if (isSearchItem(root)) {
|
|
68
|
+
return price(root)
|
|
70
69
|
}
|
|
71
70
|
|
|
72
|
-
if (isOrderFormItem(
|
|
73
|
-
return
|
|
71
|
+
if (isOrderFormItem(root)) {
|
|
72
|
+
return root.price / 1e2
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
return null
|
|
77
76
|
},
|
|
78
|
-
sellingPrice: (
|
|
79
|
-
if (isSearchItem(
|
|
80
|
-
return
|
|
77
|
+
sellingPrice: (root) => {
|
|
78
|
+
if (isSearchItem(root)) {
|
|
79
|
+
return sellingPrice(root)
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
if (isOrderFormItem(
|
|
84
|
-
return
|
|
82
|
+
if (isOrderFormItem(root)) {
|
|
83
|
+
return root.sellingPrice / 1e2
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
return null
|
|
88
87
|
},
|
|
89
|
-
listPrice: (
|
|
90
|
-
if (isSearchItem(
|
|
91
|
-
return
|
|
88
|
+
listPrice: (root) => {
|
|
89
|
+
if (isSearchItem(root)) {
|
|
90
|
+
return root.ListPrice
|
|
92
91
|
}
|
|
93
92
|
|
|
94
|
-
if (isOrderFormItem(
|
|
95
|
-
return
|
|
93
|
+
if (isOrderFormItem(root)) {
|
|
94
|
+
return root.listPrice / 1e2
|
|
96
95
|
}
|
|
97
96
|
|
|
98
97
|
return null
|
|
99
98
|
},
|
|
100
99
|
itemOffered: ({ product }) => product,
|
|
101
|
-
quantity: (
|
|
102
|
-
if (isSearchItem(
|
|
103
|
-
return
|
|
104
|
-
(quantity, seller) =>
|
|
105
|
-
quantity + seller.commertialOffer.AvailableQuantity,
|
|
106
|
-
0
|
|
107
|
-
)
|
|
100
|
+
quantity: (root) => {
|
|
101
|
+
if (isSearchItem(root)) {
|
|
102
|
+
return root.AvailableQuantity ?? 0
|
|
108
103
|
}
|
|
109
104
|
|
|
110
|
-
if (isOrderFormItem(
|
|
111
|
-
return
|
|
105
|
+
if (isOrderFormItem(root)) {
|
|
106
|
+
return root.quantity
|
|
112
107
|
}
|
|
113
108
|
|
|
114
109
|
return null
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { enhanceCommercialOffer } from '../utils/enhanceCommercialOffer'
|
|
2
|
+
import { bestOfferFirst } from '../utils/productStock'
|
|
3
|
+
import type { EnhancedCommercialOffer } from '../utils/enhanceCommercialOffer'
|
|
1
4
|
import type { Resolver } from '..'
|
|
2
|
-
import { sortOfferByPrice } from '../utils/productStock'
|
|
3
5
|
import type { PromiseType } from '../../../typings'
|
|
4
6
|
import type { Query } from './query'
|
|
5
|
-
import type { Item } from '../clients/search/types/ProductSearchResult'
|
|
6
|
-
import type { EnhancedSku } from '../utils/enhanceSku'
|
|
7
7
|
|
|
8
8
|
type Root = PromiseType<ReturnType<typeof Query.product>>
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@ const nonEmptyArray = <T>(array: T[] | null | undefined) =>
|
|
|
19
19
|
Array.isArray(array) && array.length > 0 ? array : null
|
|
20
20
|
|
|
21
21
|
export const StoreProduct: Record<string, Resolver<Root>> & {
|
|
22
|
-
offers: Resolver<Root, any,
|
|
22
|
+
offers: Resolver<Root, any, EnhancedCommercialOffer[]>
|
|
23
23
|
isVariantOf: Resolver<Root, any, Root>
|
|
24
24
|
} = {
|
|
25
25
|
productID: ({ itemId }) => itemId,
|
|
@@ -66,12 +66,16 @@ export const StoreProduct: Record<string, Resolver<Root>> & {
|
|
|
66
66
|
gtin: ({ referenceId }) => referenceId[0]?.Value ?? '',
|
|
67
67
|
review: () => [],
|
|
68
68
|
aggregateRating: () => ({}),
|
|
69
|
-
offers: (
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
offers: (root) =>
|
|
70
|
+
root.sellers
|
|
71
|
+
.flatMap((seller) =>
|
|
72
|
+
enhanceCommercialOffer({
|
|
73
|
+
offer: seller.commertialOffer,
|
|
74
|
+
seller,
|
|
75
|
+
product: root,
|
|
76
|
+
})
|
|
77
|
+
)
|
|
78
|
+
.sort(bestOfferFirst),
|
|
75
79
|
isVariantOf: (root) => root,
|
|
76
80
|
additionalProperty: ({ variations = [] }) => {
|
|
77
81
|
return variations.flatMap(({ name, values }) =>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
CommertialOffer,
|
|
3
|
+
Seller,
|
|
4
|
+
} from '../clients/search/types/ProductSearchResult'
|
|
5
|
+
import type { EnhancedSku } from './enhanceSku'
|
|
6
|
+
|
|
7
|
+
export type EnhancedCommercialOffer = CommertialOffer & {
|
|
8
|
+
seller: Seller
|
|
9
|
+
product: EnhancedSku
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const enhanceCommercialOffer = ({
|
|
13
|
+
offer,
|
|
14
|
+
seller,
|
|
15
|
+
product,
|
|
16
|
+
}: {
|
|
17
|
+
offer: CommertialOffer
|
|
18
|
+
seller: Seller
|
|
19
|
+
product: EnhancedSku
|
|
20
|
+
}): EnhancedCommercialOffer => ({
|
|
21
|
+
...offer,
|
|
22
|
+
product,
|
|
23
|
+
seller,
|
|
24
|
+
})
|
|
@@ -1,33 +1,30 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
Item,
|
|
3
|
-
Seller,
|
|
4
|
-
CommertialOffer,
|
|
5
|
-
} from '../clients/search/types/ProductSearchResult'
|
|
1
|
+
import type { CommertialOffer } from '../clients/search/types/ProductSearchResult'
|
|
6
2
|
|
|
7
|
-
export const inStock = (
|
|
8
|
-
|
|
3
|
+
export const inStock = (offer: Pick<CommertialOffer, 'AvailableQuantity'>) =>
|
|
4
|
+
offer.AvailableQuantity > 0
|
|
9
5
|
|
|
10
|
-
export const
|
|
11
|
-
|
|
6
|
+
export const price = (offer: Pick<CommertialOffer, 'spotPrice'>) =>
|
|
7
|
+
offer.spotPrice ?? 0
|
|
8
|
+
export const sellingPrice = (offer: CommertialOffer) => offer.Price ?? 0
|
|
12
9
|
|
|
13
|
-
export const
|
|
14
|
-
|
|
15
|
-
key: keyof CommertialOffer
|
|
16
|
-
): number => getFirstSeller(item.sellers)?.commertialOffer[key] ?? 0
|
|
10
|
+
export const availability = (available: boolean) =>
|
|
11
|
+
available ? 'https://schema.org/InStock' : 'https://schema.org/OutOfStock'
|
|
17
12
|
|
|
18
13
|
// Smallest Available Selling Price First
|
|
19
|
-
export const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
export const bestOfferFirst = (
|
|
15
|
+
a: Pick<CommertialOffer, 'AvailableQuantity' | 'spotPrice'>,
|
|
16
|
+
b: Pick<CommertialOffer, 'AvailableQuantity' | 'spotPrice'>
|
|
17
|
+
) => {
|
|
18
|
+
if (inStock(a) && !inStock(b)) {
|
|
19
|
+
return -1
|
|
20
|
+
}
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (!inStock(a) && inStock(b)) {
|
|
23
|
+
return 1
|
|
24
|
+
}
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
return price(a) - price(b)
|
|
27
|
+
}
|
|
31
28
|
|
|
32
|
-
export const inStockOrderFormItem = (
|
|
33
|
-
|
|
29
|
+
export const inStockOrderFormItem = (itemAvailability: string) =>
|
|
30
|
+
itemAvailability === 'available'
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers.
|
|
3
|
+
"""
|
|
1
4
|
type StoreAggregateOffer {
|
|
2
|
-
|
|
5
|
+
"""
|
|
6
|
+
Highest price among all sellers.
|
|
7
|
+
"""
|
|
3
8
|
highPrice: Float!
|
|
4
|
-
|
|
9
|
+
"""
|
|
10
|
+
Lowest price among all sellers.
|
|
11
|
+
"""
|
|
5
12
|
lowPrice: Float!
|
|
6
|
-
|
|
13
|
+
"""
|
|
14
|
+
Number of sellers selling this SKU.
|
|
15
|
+
"""
|
|
7
16
|
offerCount: Int!
|
|
17
|
+
"""
|
|
18
|
+
ISO code of the currency used for the offer prices.
|
|
19
|
+
"""
|
|
8
20
|
priceCurrency: String!
|
|
21
|
+
"""
|
|
22
|
+
Array with information on each available offer.
|
|
23
|
+
"""
|
|
9
24
|
offers: [StoreOffer!]!
|
|
10
25
|
}
|
|
@@ -1,10 +1,31 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Item of a list.
|
|
3
|
+
"""
|
|
1
4
|
type StoreListItem {
|
|
5
|
+
"""
|
|
6
|
+
List item value.
|
|
7
|
+
"""
|
|
2
8
|
item: String!
|
|
9
|
+
"""
|
|
10
|
+
Name of the list item.
|
|
11
|
+
"""
|
|
3
12
|
name: String!
|
|
13
|
+
"""
|
|
14
|
+
Position of the item in the list.
|
|
15
|
+
"""
|
|
4
16
|
position: Int!
|
|
5
17
|
}
|
|
6
18
|
|
|
19
|
+
"""
|
|
20
|
+
List of items consisting of chain linked web pages, ending with the current page.
|
|
21
|
+
"""
|
|
7
22
|
type StoreBreadcrumbList {
|
|
23
|
+
"""
|
|
24
|
+
Array with breadcrumb elements.
|
|
25
|
+
"""
|
|
8
26
|
itemListElement: [StoreListItem!]!
|
|
27
|
+
"""
|
|
28
|
+
Number of breadcrumbs in the list.
|
|
29
|
+
"""
|
|
9
30
|
numberOfItems: Int!
|
|
10
31
|
}
|
|
@@ -1,13 +1,37 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Shopping cart message.
|
|
3
|
+
"""
|
|
1
4
|
type StoreCartMessage {
|
|
5
|
+
"""
|
|
6
|
+
Shopping cart message text.
|
|
7
|
+
"""
|
|
2
8
|
text: String!
|
|
9
|
+
"""
|
|
10
|
+
Shopping cart message status, which can be `INFO`, `WARNING` OR `ERROR`.
|
|
11
|
+
"""
|
|
3
12
|
status: StoreStatus!
|
|
4
13
|
}
|
|
5
14
|
|
|
15
|
+
"""
|
|
16
|
+
Shopping cart information.
|
|
17
|
+
"""
|
|
6
18
|
type StoreCart {
|
|
19
|
+
"""
|
|
20
|
+
Order information, including `orderNumber` and `acceptedOffer`.
|
|
21
|
+
"""
|
|
7
22
|
order: StoreOrder!
|
|
23
|
+
"""
|
|
24
|
+
List of shopping cart messages.
|
|
25
|
+
"""
|
|
8
26
|
messages: [StoreCartMessage!]!
|
|
9
27
|
}
|
|
10
28
|
|
|
29
|
+
"""
|
|
30
|
+
Shopping cart identification input.
|
|
31
|
+
"""
|
|
11
32
|
input IStoreCart {
|
|
33
|
+
"""
|
|
34
|
+
Order information, including `orderNumber` and `acceptedOffer`.
|
|
35
|
+
"""
|
|
12
36
|
order: IStoreOrder!
|
|
13
37
|
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Product collection type. Possible values are `Department`, `Category`, `Brand` or `Cluster`.
|
|
3
|
+
"""
|
|
1
4
|
enum StoreCollectionType {
|
|
2
5
|
Department
|
|
3
6
|
Category
|
|
@@ -5,22 +8,56 @@ enum StoreCollectionType {
|
|
|
5
8
|
Cluster
|
|
6
9
|
}
|
|
7
10
|
|
|
11
|
+
"""
|
|
12
|
+
Product collection facet, used for search.
|
|
13
|
+
"""
|
|
8
14
|
type StoreCollectionFacet {
|
|
15
|
+
"""
|
|
16
|
+
Facet key.
|
|
17
|
+
"""
|
|
9
18
|
key: String!
|
|
19
|
+
"""
|
|
20
|
+
Facet value.
|
|
21
|
+
"""
|
|
10
22
|
value: String!
|
|
11
23
|
}
|
|
12
24
|
|
|
25
|
+
"""
|
|
26
|
+
Collection meta information. Used for search.
|
|
27
|
+
"""
|
|
13
28
|
type StoreCollectionMeta {
|
|
29
|
+
"""
|
|
30
|
+
List of selected collection facets.
|
|
31
|
+
"""
|
|
14
32
|
selectedFacets: [StoreCollectionFacet!]!
|
|
15
33
|
}
|
|
16
34
|
|
|
35
|
+
"""
|
|
36
|
+
Product collection information.
|
|
37
|
+
"""
|
|
17
38
|
type StoreCollection {
|
|
18
|
-
|
|
39
|
+
"""
|
|
40
|
+
Meta tag data.
|
|
41
|
+
"""
|
|
19
42
|
seo: StoreSeo!
|
|
20
|
-
|
|
43
|
+
"""
|
|
44
|
+
List of items consisting of chain linked web pages, ending with the current page.
|
|
45
|
+
"""
|
|
21
46
|
breadcrumbList: StoreBreadcrumbList!
|
|
47
|
+
"""
|
|
48
|
+
Collection meta information. Used for search.
|
|
49
|
+
"""
|
|
22
50
|
meta: StoreCollectionMeta!
|
|
51
|
+
"""
|
|
52
|
+
Collection ID.
|
|
53
|
+
"""
|
|
23
54
|
id: ID!
|
|
55
|
+
"""
|
|
56
|
+
Corresponding collection URL slug, with which to retrieve this entity.
|
|
57
|
+
"""
|
|
24
58
|
slug: String!
|
|
59
|
+
"""
|
|
60
|
+
Collection type.
|
|
61
|
+
"""
|
|
25
62
|
type: StoreCollectionType!
|
|
26
63
|
}
|
|
@@ -1,14 +1,43 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Search facet information.
|
|
3
|
+
"""
|
|
1
4
|
type StoreFacet {
|
|
5
|
+
"""
|
|
6
|
+
Facet key.
|
|
7
|
+
"""
|
|
2
8
|
key: String!
|
|
9
|
+
"""
|
|
10
|
+
Facet label.
|
|
11
|
+
"""
|
|
3
12
|
label: String!
|
|
13
|
+
"""
|
|
14
|
+
Array with information on each facet value.
|
|
15
|
+
"""
|
|
4
16
|
values: [StoreFacetValue!]!
|
|
17
|
+
"""
|
|
18
|
+
Facet type. Possible values are `BOOLEAN` and `RANGE`.
|
|
19
|
+
"""
|
|
5
20
|
type: StoreFacetType!
|
|
6
21
|
}
|
|
7
22
|
|
|
23
|
+
"""
|
|
24
|
+
Information of a specific facet value.
|
|
25
|
+
"""
|
|
8
26
|
type StoreFacetValue {
|
|
27
|
+
"""
|
|
28
|
+
Facet value.
|
|
29
|
+
"""
|
|
9
30
|
value: String!
|
|
31
|
+
"""
|
|
32
|
+
Facet value label.
|
|
33
|
+
"""
|
|
10
34
|
label: String!
|
|
35
|
+
"""
|
|
36
|
+
Indicates whether facet is selected.
|
|
37
|
+
"""
|
|
11
38
|
selected: Boolean!
|
|
12
|
-
|
|
39
|
+
"""
|
|
40
|
+
Number of items with this facet.
|
|
41
|
+
"""
|
|
13
42
|
quantity: Int!
|
|
14
43
|
}
|