@faststore/api 1.8.2 → 1.8.5

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/__generated__/schema.d.ts +155 -0
  3. package/dist/api.cjs.development.js +129 -123
  4. package/dist/api.cjs.development.js.map +1 -1
  5. package/dist/api.cjs.production.min.js +1 -1
  6. package/dist/api.cjs.production.min.js.map +1 -1
  7. package/dist/api.esm.js +129 -123
  8. package/dist/api.esm.js.map +1 -1
  9. package/dist/index.d.ts +4 -17
  10. package/dist/platforms/vtex/clients/search/types/ProductSearchResult.d.ts +1 -1
  11. package/dist/platforms/vtex/index.d.ts +4 -17
  12. package/dist/platforms/vtex/resolvers/aggregateOffer.d.ts +2 -5
  13. package/dist/platforms/vtex/resolvers/product.d.ts +2 -6
  14. package/dist/platforms/vtex/utils/enhanceCommercialOffer.d.ts +11 -0
  15. package/dist/platforms/vtex/utils/productStock.d.ts +7 -6
  16. package/package.json +2 -2
  17. package/src/__generated__/schema.ts +155 -0
  18. package/src/platforms/vtex/clients/search/types/ProductSearchResult.ts +1 -1
  19. package/src/platforms/vtex/resolvers/aggregateOffer.ts +15 -13
  20. package/src/platforms/vtex/resolvers/offer.ts +44 -49
  21. package/src/platforms/vtex/resolvers/product.ts +14 -10
  22. package/src/platforms/vtex/utils/enhanceCommercialOffer.ts +24 -0
  23. package/src/platforms/vtex/utils/productStock.ts +22 -25
  24. package/src/typeDefs/aggregateOffer.graphql +18 -3
  25. package/src/typeDefs/aggregateRating.graphql +9 -0
  26. package/src/typeDefs/author.graphql +6 -0
  27. package/src/typeDefs/brand.graphql +6 -0
  28. package/src/typeDefs/breadcrumb.graphql +21 -0
  29. package/src/typeDefs/cart.graphql +24 -0
  30. package/src/typeDefs/collection.graphql +39 -2
  31. package/src/typeDefs/facet.graphql +30 -1
  32. package/src/typeDefs/image.graphql +18 -0
  33. package/src/typeDefs/mutation.graphql +30 -2
  34. package/src/typeDefs/offer.graphql +51 -1
  35. package/src/typeDefs/order.graphql +18 -0
  36. package/src/typeDefs/organization.graphql +12 -0
  37. package/src/typeDefs/pageInfo.graphql +18 -1
  38. package/src/typeDefs/person.graphql +15 -0
  39. package/src/typeDefs/product.graphql +60 -3
  40. package/src/typeDefs/productGroup.graphql +15 -0
  41. package/src/typeDefs/propertyValue.graphql +9 -0
  42. package/src/typeDefs/query.graphql +66 -0
@@ -1,9 +1,27 @@
1
+ """
2
+ Information of a specific order.
3
+ """
1
4
  type StoreOrder {
5
+ """
6
+ Order shopping cart ID, also known as `orderFormId`.
7
+ """
2
8
  orderNumber: String!
9
+ """
10
+ Array with information on each accepted offer.
11
+ """
3
12
  acceptedOffer: [StoreOffer!]!
4
13
  }
5
14
 
15
+ """
16
+ Offer input.
17
+ """
6
18
  input IStoreOrder {
19
+ """
20
+ Order shopping cart ID, also known as `orderFormId`.
21
+ """
7
22
  orderNumber: String!
23
+ """
24
+ Array with information on each accepted offer.
25
+ """
8
26
  acceptedOffer: [IStoreOffer!]!
9
27
  }
@@ -1,7 +1,19 @@
1
+ """
2
+ Organization.
3
+ """
1
4
  type StoreOrganization {
5
+ """
6
+ Organization ID.
7
+ """
2
8
  identifier: String!
3
9
  }
4
10
 
11
+ """
12
+ Organization input.
13
+ """
5
14
  input IStoreOrganization {
15
+ """
16
+ Organization ID.
17
+ """
6
18
  identifier: String!
7
19
  }
@@ -1,8 +1,25 @@
1
+ """
2
+ Page information.
3
+ """
1
4
  type StorePageInfo {
5
+ """
6
+ Indicates whether next page exists.
7
+ """
2
8
  hasNextPage: Boolean!
9
+ """
10
+ Indicates whether previous page exists.
11
+ """
3
12
  hasPreviousPage: Boolean!
13
+ """
14
+ Page cursor start.
15
+ """
4
16
  startCursor: String!
17
+ """
18
+ Page cursor end.
19
+ """
5
20
  endCursor: String!
6
- # Total number of items(products/collections), not pages
21
+ """
22
+ Total number of items (products or collections), not pages.
23
+ """
7
24
  totalCount: Int!
8
25
  }
@@ -1,6 +1,21 @@
1
+ """
2
+ Client profile data.
3
+ """
1
4
  type StorePerson {
5
+ """
6
+ Client ID.
7
+ """
2
8
  id: String!
9
+ """
10
+ Client email.
11
+ """
3
12
  email: String!
13
+ """
14
+ Client first name.
15
+ """
4
16
  givenName: String!
17
+ """
18
+ Client last name.
19
+ """
5
20
  familyName: String!
6
21
  }
@@ -1,26 +1,83 @@
1
+ """
2
+ Product information.
3
+ """
1
4
  type StoreProduct {
2
- # Meta tag data
5
+ """
6
+ Meta tag data.
7
+ """
3
8
  seo: StoreSeo!
4
- # Location for structured data
9
+ """
10
+ List of items consisting of chain linked web pages, ending with the current page.
11
+ """
5
12
  breadcrumbList: StoreBreadcrumbList!
6
- # Where to retrieve this entity
13
+ """
14
+ Corresponding collection URL slug, with which to retrieve this entity.
15
+ """
7
16
  slug: String!
17
+ """
18
+ Product name.
19
+ """
8
20
  name: String!
21
+ """
22
+ Product ID.
23
+ """
9
24
  productID: String!
25
+ """
26
+ Product brand.
27
+ """
10
28
  brand: StoreBrand!
29
+ """
30
+ Product description.
31
+ """
11
32
  description: String!
33
+ """
34
+ Array of images.
35
+ """
12
36
  image: [StoreImage!]!
37
+ """
38
+ Aggregate offer information.
39
+ """
13
40
  offers: StoreAggregateOffer!
41
+ """
42
+ Stock Keeping Unit ID.
43
+ """
14
44
  sku: String!
45
+ """
46
+ Global Trade Item Number.
47
+ """
15
48
  gtin: String!
49
+ """
50
+ Array with review information.
51
+ """
16
52
  review: [StoreReview!]!
53
+ """
54
+ Aggregate ratings data.
55
+ """
17
56
  aggregateRating: StoreAggregateRating!
57
+ """
58
+ Indicates product group related to this product.
59
+ """
18
60
  isVariantOf: StoreProductGroup!
61
+ """
62
+ Array of additional properties.
63
+ """
19
64
  additionalProperty: [StorePropertyValue!]!
20
65
  }
21
66
 
67
+ """
68
+ Product input.
69
+ """
22
70
  input IStoreProduct {
71
+ """
72
+ Stock Keeping Unit ID.
73
+ """
23
74
  sku: String!
75
+ """
76
+ Product name.
77
+ """
24
78
  name: String!
79
+ """
80
+ Array of product images.
81
+ """
25
82
  image: [IStoreImage!]!
26
83
  }
@@ -1,6 +1,21 @@
1
+ """
2
+ Product group information.
3
+ """
1
4
  type StoreProductGroup {
5
+ """
6
+ Array of variants related to product group.
7
+ """
2
8
  hasVariant: [StoreProduct!]!
9
+ """
10
+ Product group ID.
11
+ """
3
12
  productGroupID: String!
13
+ """
14
+ Product group name.
15
+ """
4
16
  name: String!
17
+ """
18
+ Array of additional properties.
19
+ """
5
20
  additionalProperty: [StorePropertyValue!]!
6
21
  }
@@ -1,4 +1,13 @@
1
+ """
2
+ Properties that can be associated with products and products groups.
3
+ """
1
4
  type StorePropertyValue {
5
+ """
6
+ Property value.
7
+ """
2
8
  value: String!
9
+ """
10
+ Property name.
11
+ """
3
12
  name: String!
4
13
  }
@@ -1,23 +1,62 @@
1
+ """
2
+ Product pagination edge.
3
+ """
1
4
  type StoreProductEdge {
5
+ """
6
+ Product pagination node.
7
+ """
2
8
  node: StoreProduct!
9
+ """
10
+ Product pagination cursor.
11
+ """
3
12
  cursor: String!
4
13
  }
5
14
 
15
+ """
16
+ Product connection pagination information.
17
+ """
6
18
  type StoreProductConnection {
19
+ """
20
+ Product connection page information.
21
+ """
7
22
  pageInfo: StorePageInfo!
23
+ """
24
+ Array with product connection page edges.
25
+ """
8
26
  edges: [StoreProductEdge!]!
9
27
  }
10
28
 
29
+ """
30
+ Collection pagination edge.
31
+ """
11
32
  type StoreCollectionEdge {
33
+ """
34
+ Collection pagination node.
35
+ """
12
36
  node: StoreCollection!
37
+ """
38
+ Collection pagination cursor.
39
+ """
13
40
  cursor: String!
14
41
  }
15
42
 
43
+ """
44
+ Collection connection pagination information.
45
+ """
16
46
  type StoreCollectionConnection {
47
+ """
48
+ Collection connection page information.
49
+ """
17
50
  pageInfo: StorePageInfo!
51
+ """
52
+ Array with collection connection page edges.
53
+ """
18
54
  edges: [StoreCollectionEdge!]!
19
55
  }
20
56
 
57
+ """
58
+ Product sorting options used in search.
59
+ """
21
60
  enum StoreSort {
22
61
  price_desc
23
62
  price_asc
@@ -29,24 +68,51 @@ enum StoreSort {
29
68
  score_desc
30
69
  }
31
70
 
71
+ """
72
+ Selected facet input.
73
+ """
32
74
  input IStoreSelectedFacet {
33
75
  key: String!
34
76
  value: String!
35
77
  }
36
78
 
79
+ """
80
+ Search facet type.
81
+ """
37
82
  enum StoreFacetType {
38
83
  BOOLEAN
39
84
  RANGE
40
85
  }
41
86
 
87
+ """
88
+ Suggestions information.
89
+ """
42
90
  type StoreSuggestions {
91
+ """
92
+ Array with suggestion terms.
93
+ """
43
94
  terms: [String!]
95
+ """
96
+ Array with suggestion products' information.
97
+ """
44
98
  products: [StoreProduct!]
45
99
  }
46
100
 
101
+ """
102
+ Search result.
103
+ """
47
104
  type StoreSearchResult {
105
+ """
106
+ Search result products.
107
+ """
48
108
  products: StoreProductConnection!
109
+ """
110
+ Array of search result facets.
111
+ """
49
112
  facets: [StoreFacet!]!
113
+ """
114
+ Search result suggestions.
115
+ """
50
116
  suggestions: StoreSuggestions!
51
117
  }
52
118