@sixtyninecommerce/client 0.24.0 → 0.26.0

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 (293) hide show
  1. package/README.md +21 -0
  2. package/dist/admin/forms.js +19 -0
  3. package/dist/admin/forms.js.map +1 -1
  4. package/dist/admin/http.d.ts +9 -0
  5. package/dist/admin/http.d.ts.map +1 -1
  6. package/dist/admin/http.js +3 -0
  7. package/dist/admin/http.js.map +1 -1
  8. package/dist/admin/index.d.ts +63 -0
  9. package/dist/admin/index.d.ts.map +1 -1
  10. package/dist/admin/index.js +67 -0
  11. package/dist/admin/index.js.map +1 -1
  12. package/dist/admin/redirects.d.ts +6 -0
  13. package/dist/admin/redirects.d.ts.map +1 -1
  14. package/dist/admin/redirects.js +12 -0
  15. package/dist/admin/redirects.js.map +1 -1
  16. package/dist/admin/types.d.ts +63 -0
  17. package/dist/admin/types.d.ts.map +1 -1
  18. package/dist/cache-tags.d.ts +19 -0
  19. package/dist/cache-tags.d.ts.map +1 -1
  20. package/dist/cache-tags.js +19 -0
  21. package/dist/cache-tags.js.map +1 -1
  22. package/dist/client.d.ts +17 -0
  23. package/dist/client.d.ts.map +1 -1
  24. package/dist/client.js +17 -0
  25. package/dist/client.js.map +1 -1
  26. package/dist/commerce/age-verification.js +3 -3
  27. package/dist/commerce/age-verification.js.map +1 -1
  28. package/dist/commerce/branding.js +7 -0
  29. package/dist/commerce/branding.js.map +1 -1
  30. package/dist/commerce/cart.js +25 -0
  31. package/dist/commerce/cart.js.map +1 -1
  32. package/dist/commerce/checkout.d.ts +68 -0
  33. package/dist/commerce/checkout.d.ts.map +1 -1
  34. package/dist/commerce/checkout.js +83 -0
  35. package/dist/commerce/checkout.js.map +1 -1
  36. package/dist/commerce/customer.d.ts +58 -0
  37. package/dist/commerce/customer.d.ts.map +1 -1
  38. package/dist/commerce/customer.js +65 -0
  39. package/dist/commerce/customer.js.map +1 -1
  40. package/dist/commerce/pickup-location-parser.d.ts +18 -0
  41. package/dist/commerce/pickup-location-parser.d.ts.map +1 -1
  42. package/dist/commerce/pickup-location-parser.js +28 -0
  43. package/dist/commerce/pickup-location-parser.js.map +1 -1
  44. package/dist/commerce/placement-error.d.ts +52 -0
  45. package/dist/commerce/placement-error.d.ts.map +1 -1
  46. package/dist/commerce/placement-error.js +87 -0
  47. package/dist/commerce/placement-error.js.map +1 -1
  48. package/dist/commerce/products.d.ts +48 -0
  49. package/dist/commerce/products.d.ts.map +1 -1
  50. package/dist/commerce/products.js +92 -0
  51. package/dist/commerce/products.js.map +1 -1
  52. package/dist/commerce/queries.d.ts +113 -27
  53. package/dist/commerce/queries.d.ts.map +1 -1
  54. package/dist/commerce/queries.js +188 -2
  55. package/dist/commerce/queries.js.map +1 -1
  56. package/dist/commerce/quotes.js +33 -0
  57. package/dist/commerce/quotes.js.map +1 -1
  58. package/dist/commerce/saved-lists.d.ts +7 -7
  59. package/dist/commerce/saved-lists.d.ts.map +1 -1
  60. package/dist/commerce/saved-lists.js +1 -1
  61. package/dist/commerce/search.js +3 -0
  62. package/dist/commerce/search.js.map +1 -1
  63. package/dist/commerce/shipping.js +3 -3
  64. package/dist/commerce/shipping.js.map +1 -1
  65. package/dist/commerce/stock-notifications.d.ts +11 -0
  66. package/dist/commerce/stock-notifications.d.ts.map +1 -1
  67. package/dist/commerce/stock-notifications.js +11 -0
  68. package/dist/commerce/stock-notifications.js.map +1 -1
  69. package/dist/commerce/vat-validation.js +4 -4
  70. package/dist/commerce/vat-validation.js.map +1 -1
  71. package/dist/constants.d.ts +31 -0
  72. package/dist/constants.d.ts.map +1 -1
  73. package/dist/constants.js +32 -0
  74. package/dist/constants.js.map +1 -1
  75. package/dist/content/asset-urls.d.ts +50 -0
  76. package/dist/content/asset-urls.d.ts.map +1 -1
  77. package/dist/content/asset-urls.js +92 -0
  78. package/dist/content/asset-urls.js.map +1 -1
  79. package/dist/content/assets.d.ts +15 -0
  80. package/dist/content/assets.d.ts.map +1 -1
  81. package/dist/content/assets.js +15 -0
  82. package/dist/content/assets.js.map +1 -1
  83. package/dist/content/collection-pages.d.ts +5 -0
  84. package/dist/content/collection-pages.d.ts.map +1 -1
  85. package/dist/content/collection-pages.js +8 -0
  86. package/dist/content/collection-pages.js.map +1 -1
  87. package/dist/content/collections.d.ts +14 -0
  88. package/dist/content/collections.d.ts.map +1 -1
  89. package/dist/content/collections.js +16 -0
  90. package/dist/content/collections.js.map +1 -1
  91. package/dist/content/filtered-products.d.ts +18 -0
  92. package/dist/content/filtered-products.d.ts.map +1 -1
  93. package/dist/content/filtered-products.js +16 -0
  94. package/dist/content/filtered-products.js.map +1 -1
  95. package/dist/content/form-field-types.d.ts +6 -0
  96. package/dist/content/form-field-types.d.ts.map +1 -1
  97. package/dist/content/form-field-types.js +12 -0
  98. package/dist/content/form-field-types.js.map +1 -1
  99. package/dist/content/forms.d.ts +16 -0
  100. package/dist/content/forms.d.ts.map +1 -1
  101. package/dist/content/forms.js +23 -0
  102. package/dist/content/forms.js.map +1 -1
  103. package/dist/content/items.d.ts +26 -0
  104. package/dist/content/items.d.ts.map +1 -1
  105. package/dist/content/items.js +33 -0
  106. package/dist/content/items.js.map +1 -1
  107. package/dist/content/resolve.js +6 -0
  108. package/dist/content/resolve.js.map +1 -1
  109. package/dist/content/sitemap.d.ts +5 -0
  110. package/dist/content/sitemap.d.ts.map +1 -1
  111. package/dist/content/sitemap.js +5 -0
  112. package/dist/content/sitemap.js.map +1 -1
  113. package/dist/core/context.js +6 -0
  114. package/dist/core/context.js.map +1 -1
  115. package/dist/core/headers.js +2 -0
  116. package/dist/core/headers.js.map +1 -1
  117. package/dist/core/http.d.ts +8 -0
  118. package/dist/core/http.d.ts.map +1 -1
  119. package/dist/core/http.js +89 -1
  120. package/dist/core/http.js.map +1 -1
  121. package/dist/credit/credit-status.js +2 -2
  122. package/dist/credit/credit-status.js.map +1 -1
  123. package/dist/credit/payment-terms.js +2 -2
  124. package/dist/credit/payment-terms.js.map +1 -1
  125. package/dist/currency/exchange.d.ts +11 -0
  126. package/dist/currency/exchange.d.ts.map +1 -1
  127. package/dist/currency/exchange.js +11 -0
  128. package/dist/currency/exchange.js.map +1 -1
  129. package/dist/errors.d.ts +50 -2
  130. package/dist/errors.d.ts.map +1 -1
  131. package/dist/errors.js +48 -2
  132. package/dist/errors.js.map +1 -1
  133. package/dist/events/envelope.d.ts +60 -0
  134. package/dist/events/envelope.d.ts.map +1 -1
  135. package/dist/events/envelope.js +12 -0
  136. package/dist/events/envelope.js.map +1 -1
  137. package/dist/events/index.d.ts +14 -1
  138. package/dist/events/index.d.ts.map +1 -1
  139. package/dist/events/index.js +13 -0
  140. package/dist/events/index.js.map +1 -1
  141. package/dist/events/payloads.d.ts +19 -0
  142. package/dist/events/payloads.d.ts.map +1 -1
  143. package/dist/events/payloads.js +12 -0
  144. package/dist/events/payloads.js.map +1 -1
  145. package/dist/index.d.ts +7 -0
  146. package/dist/index.d.ts.map +1 -1
  147. package/dist/index.js +7 -0
  148. package/dist/index.js.map +1 -1
  149. package/dist/media/index.js +2 -0
  150. package/dist/media/index.js.map +1 -1
  151. package/dist/media/urls.d.ts +52 -0
  152. package/dist/media/urls.d.ts.map +1 -1
  153. package/dist/media/urls.js +38 -0
  154. package/dist/media/urls.js.map +1 -1
  155. package/dist/media/video.d.ts +16 -0
  156. package/dist/media/video.d.ts.map +1 -1
  157. package/dist/media/video.js +16 -0
  158. package/dist/media/video.js.map +1 -1
  159. package/dist/next/artifact-handler.d.ts +22 -0
  160. package/dist/next/artifact-handler.d.ts.map +1 -1
  161. package/dist/next/artifact-handler.js +22 -0
  162. package/dist/next/artifact-handler.js.map +1 -1
  163. package/dist/next/event-revalidate-handler.d.ts +67 -0
  164. package/dist/next/event-revalidate-handler.d.ts.map +1 -1
  165. package/dist/next/event-revalidate-handler.js +48 -0
  166. package/dist/next/event-revalidate-handler.js.map +1 -1
  167. package/dist/next/index.d.ts +6 -0
  168. package/dist/next/index.d.ts.map +1 -1
  169. package/dist/next/index.js +6 -0
  170. package/dist/next/index.js.map +1 -1
  171. package/dist/next/json-ld.d.ts +9 -0
  172. package/dist/next/json-ld.d.ts.map +1 -1
  173. package/dist/next/json-ld.js +9 -0
  174. package/dist/next/json-ld.js.map +1 -1
  175. package/dist/next/metadata.d.ts +18 -0
  176. package/dist/next/metadata.d.ts.map +1 -1
  177. package/dist/next/metadata.js +21 -0
  178. package/dist/next/metadata.js.map +1 -1
  179. package/dist/next/redirect-middleware.d.ts +39 -0
  180. package/dist/next/redirect-middleware.d.ts.map +1 -1
  181. package/dist/next/redirect-middleware.js +32 -0
  182. package/dist/next/redirect-middleware.js.map +1 -1
  183. package/dist/next/revalidate-handler.d.ts +30 -0
  184. package/dist/next/revalidate-handler.d.ts.map +1 -1
  185. package/dist/next/revalidate-handler.js +22 -0
  186. package/dist/next/revalidate-handler.js.map +1 -1
  187. package/dist/order-scope.d.ts +27 -0
  188. package/dist/order-scope.d.ts.map +1 -1
  189. package/dist/order-scope.js +29 -0
  190. package/dist/order-scope.js.map +1 -1
  191. package/dist/pricing/format.d.ts +17 -0
  192. package/dist/pricing/format.d.ts.map +1 -1
  193. package/dist/pricing/format.js +19 -0
  194. package/dist/pricing/format.js.map +1 -1
  195. package/dist/pricing/index.d.ts +8 -1
  196. package/dist/pricing/index.d.ts.map +1 -1
  197. package/dist/pricing/index.js +18 -2
  198. package/dist/pricing/index.js.map +1 -1
  199. package/dist/pricing/tax-display.d.ts +77 -0
  200. package/dist/pricing/tax-display.d.ts.map +1 -1
  201. package/dist/pricing/tax-display.js +85 -0
  202. package/dist/pricing/tax-display.js.map +1 -1
  203. package/dist/pricing/tiers.d.ts +9 -0
  204. package/dist/pricing/tiers.d.ts.map +1 -1
  205. package/dist/pricing/tiers.js +9 -0
  206. package/dist/pricing/tiers.js.map +1 -1
  207. package/dist/pricing/validation.d.ts +56 -1
  208. package/dist/pricing/validation.d.ts.map +1 -1
  209. package/dist/pricing/validation.js +61 -0
  210. package/dist/pricing/validation.js.map +1 -1
  211. package/dist/redirects/index.d.ts +1 -0
  212. package/dist/redirects/index.d.ts.map +1 -1
  213. package/dist/redirects/index.js +1 -0
  214. package/dist/redirects/index.js.map +1 -1
  215. package/dist/redirects/store.d.ts +20 -0
  216. package/dist/redirects/store.d.ts.map +1 -1
  217. package/dist/redirects/store.js +57 -0
  218. package/dist/redirects/store.js.map +1 -1
  219. package/dist/redirects/types.d.ts +24 -0
  220. package/dist/redirects/types.d.ts.map +1 -1
  221. package/dist/redirects/types.js +1 -0
  222. package/dist/redirects/types.js.map +1 -1
  223. package/dist/revalidation/event-plan.d.ts +48 -0
  224. package/dist/revalidation/event-plan.d.ts.map +1 -1
  225. package/dist/revalidation/event-plan.js +61 -0
  226. package/dist/revalidation/event-plan.js.map +1 -1
  227. package/dist/revalidation/event-verify.d.ts +25 -0
  228. package/dist/revalidation/event-verify.d.ts.map +1 -1
  229. package/dist/revalidation/event-verify.js +27 -0
  230. package/dist/revalidation/event-verify.js.map +1 -1
  231. package/dist/revalidation/types.d.ts +20 -0
  232. package/dist/revalidation/types.d.ts.map +1 -1
  233. package/dist/revalidation/types.js +10 -0
  234. package/dist/revalidation/types.js.map +1 -1
  235. package/dist/revalidation/url-context.d.ts +25 -0
  236. package/dist/revalidation/url-context.d.ts.map +1 -1
  237. package/dist/revalidation/url-context.js +17 -0
  238. package/dist/revalidation/url-context.js.map +1 -1
  239. package/dist/revalidation/verify.d.ts +8 -0
  240. package/dist/revalidation/verify.d.ts.map +1 -1
  241. package/dist/revalidation/verify.js +8 -0
  242. package/dist/revalidation/verify.js.map +1 -1
  243. package/dist/seo/ai.d.ts +17 -0
  244. package/dist/seo/ai.d.ts.map +1 -1
  245. package/dist/seo/ai.js +12 -0
  246. package/dist/seo/ai.js.map +1 -1
  247. package/dist/seo/alternates.js +13 -0
  248. package/dist/seo/alternates.js.map +1 -1
  249. package/dist/seo/artifacts.d.ts +13 -0
  250. package/dist/seo/artifacts.d.ts.map +1 -1
  251. package/dist/seo/artifacts.js +19 -0
  252. package/dist/seo/artifacts.js.map +1 -1
  253. package/dist/seo/canonical.d.ts +15 -0
  254. package/dist/seo/canonical.d.ts.map +1 -1
  255. package/dist/seo/canonical.js +24 -0
  256. package/dist/seo/canonical.js.map +1 -1
  257. package/dist/seo/index.js +6 -0
  258. package/dist/seo/index.js.map +1 -1
  259. package/dist/seo/json-ld.d.ts +13 -0
  260. package/dist/seo/json-ld.d.ts.map +1 -1
  261. package/dist/seo/json-ld.js +32 -0
  262. package/dist/seo/json-ld.js.map +1 -1
  263. package/dist/seo/locale-tag.d.ts +31 -0
  264. package/dist/seo/locale-tag.d.ts.map +1 -1
  265. package/dist/seo/locale-tag.js +31 -0
  266. package/dist/seo/locale-tag.js.map +1 -1
  267. package/dist/seo/meta-tags.d.ts +29 -0
  268. package/dist/seo/meta-tags.d.ts.map +1 -1
  269. package/dist/seo/meta-tags.js +28 -0
  270. package/dist/seo/meta-tags.js.map +1 -1
  271. package/dist/seo/metadata-parser.d.ts +24 -0
  272. package/dist/seo/metadata-parser.d.ts.map +1 -1
  273. package/dist/seo/metadata-parser.js +38 -0
  274. package/dist/seo/metadata-parser.js.map +1 -1
  275. package/dist/seo/metadata-types.d.ts +16 -0
  276. package/dist/seo/metadata-types.d.ts.map +1 -1
  277. package/dist/seo/product-path.d.ts +96 -0
  278. package/dist/seo/product-path.d.ts.map +1 -1
  279. package/dist/seo/product-path.js +96 -0
  280. package/dist/seo/product-path.js.map +1 -1
  281. package/dist/seo/robots.d.ts +17 -0
  282. package/dist/seo/robots.d.ts.map +1 -1
  283. package/dist/seo/robots.js +12 -0
  284. package/dist/seo/robots.js.map +1 -1
  285. package/dist/seo/types.d.ts +39 -0
  286. package/dist/seo/types.d.ts.map +1 -1
  287. package/dist/seo/url-builder.d.ts +31 -0
  288. package/dist/seo/url-builder.d.ts.map +1 -1
  289. package/dist/seo/url-builder.js +36 -0
  290. package/dist/seo/url-builder.js.map +1 -1
  291. package/dist/types.d.ts +1163 -0
  292. package/dist/types.d.ts.map +1 -1
  293. package/package.json +1 -1
@@ -3,10 +3,21 @@ import { tagRequest } from '../core/http.js';
3
3
  import { StorefrontError } from '../errors.js';
4
4
  import { parseProductMetadata } from '../seo/metadata-parser.js';
5
5
  import { GET_COLLECTION, GET_COLLECTION_BY_ID, GET_PRODUCT, GET_PRODUCT_BY_ID, LIST_COLLECTIONS, LIST_FACETS, LIST_PRODUCT_CARDS, LIST_PRODUCTS, PRODUCT_PROPERTIES, PROPERTY_GROUPS, SEARCH_PRODUCTS, } from './queries.js';
6
+ /**
7
+ * Replace the raw `metadata` payload on a fetched product with the parsed +
8
+ * validated SDK shape. Idempotent for products without metadata (null).
9
+ */
6
10
  function hydrateProductMetadata(product) {
7
11
  const raw = product.metadata;
8
12
  return { ...product, metadata: parseProductMetadata(raw ?? null) };
9
13
  }
14
+ /**
15
+ * Map a SearchResultItem to the honest collection-listing shape. The search
16
+ * endpoint returns flatter data than the products list (no `variants[]`, only
17
+ * an aggregate price), so we synthesise a single-variant record that's enough
18
+ * for product cards. Storefronts that need the full variant tree should call
19
+ * `getProduct(slug)` for the detail view.
20
+ */
10
21
  function searchItemToCollectionProduct(item) {
11
22
  const identity = { id: item.productId, slug: item.slug };
12
23
  const priceWithTax = requireSearchPrice(item.priceWithTax, 'priceWithTax', identity);
@@ -20,6 +31,9 @@ function searchItemToCollectionProduct(item) {
20
31
  featuredAsset: previewUrl
21
32
  ? {
22
33
  source: '',
34
+ // The search endpoint returns a single preview URL — synthesise
35
+ // an Asset whose every preset points at it so consumers calling
36
+ // `media.getPresetUrl(asset, anyPreset)` get a usable URL back.
23
37
  presets: {
24
38
  xxs: { url: previewUrl, webpUrl: previewUrl },
25
39
  xs: { url: previewUrl, webpUrl: previewUrl },
@@ -32,6 +46,9 @@ function searchItemToCollectionProduct(item) {
32
46
  : null,
33
47
  variants: [
34
48
  {
49
+ // The orderable variant id — NOT item.productId. Passing a product id
50
+ // to addToCart makes Vendure reject it with "No ProductVariant with the
51
+ // id … could be found".
35
52
  id: item.productVariantId,
36
53
  name: item.productName,
37
54
  price,
@@ -42,11 +59,24 @@ function searchItemToCollectionProduct(item) {
42
59
  ],
43
60
  };
44
61
  }
62
+ /**
63
+ * Legacy mapper for the deprecated `getProducts({ collectionSlug })` path,
64
+ * which promised the `ProductSummary` shape and filled the gaps with dummies
65
+ * (`sku: ''`). Kept only for that path's back-compat — new code goes through
66
+ * `getProductsInCollection`, which returns the honest shape.
67
+ */
45
68
  function searchItemToProductSummary(item) {
46
69
  const product = searchItemToCollectionProduct(item);
47
70
  const [variant] = product.variants;
48
71
  return { ...product, variants: [{ ...variant, sku: '' }] };
49
72
  }
73
+ /**
74
+ * Extract the numeric amount from a search-result price (SinglePrice `value`
75
+ * or PriceRange `min`). A search row with no numeric price is a data-integrity
76
+ * failure, not a €0 product — throw with the offending product's identity
77
+ * rather than silently rendering a €0.00 card (repo no-silent-default rule).
78
+ * A genuine `0` (free product) is a valid number and passes through.
79
+ */
50
80
  function requireSearchPrice(value, field, product) {
51
81
  if (value) {
52
82
  if (typeof value.value === 'number')
@@ -56,6 +86,17 @@ function requireSearchPrice(value, field, product) {
56
86
  }
57
87
  throw new StorefrontError(`Search result for product "${product.slug}" (${product.id}) has no numeric ${field}`, 'vendure', undefined, 'MALFORMED_SEARCH_PRICE');
58
88
  }
89
+ /**
90
+ * Flatten `getProductProperties(...)` output into a `slug → value` record for
91
+ * the product-detail view. Walks every group's `properties` to recover each
92
+ * value's slug (values are keyed by `propertyId`, not slug), then attaches the
93
+ * stored value. Later groups win on the rare slug collision.
94
+ *
95
+ * Empty-string and falsy-but-valid values (`false`, `0`) are preserved — the
96
+ * caller decides what counts as "blank". `content_item` slugs (e.g.
97
+ * `producer_winehouse`) map to a CMS item id string, not a name; resolve it
98
+ * against the CMS before display (see `ProductPropertyRecord`).
99
+ */
59
100
  export function mapProductProperties(groups) {
60
101
  const record = {};
61
102
  for (const { group, values } of groups) {
@@ -84,7 +125,36 @@ export function createProductMethods(http) {
84
125
  }
85
126
  return hydrateProductMetadata(data.product);
86
127
  },
128
+ /**
129
+ * List products for the active channel via the `products` list query.
130
+ * Defaults to `filter: { enabled: { eq: true } }` (and the Shop API forces
131
+ * the same server-side), so `totalItems` matches the browsable catalogue.
132
+ *
133
+ * Cannot sort by price — Vendure's `ProductSortParameter` has no price
134
+ * field. Price-sorted listings go through `getProductsInCollection` or
135
+ * `searchProducts`.
136
+ *
137
+ * The deprecated `{ collectionSlug }` option reroutes to the search
138
+ * backend with its flatter row shape — call `getProductsInCollection`
139
+ * instead, which returns that shape honestly typed. That branch returns
140
+ * before the document switch, so `detail` has no effect on it.
141
+ *
142
+ * Pass `{ detail: 'card' }` for listing pages: it swaps in a grid-tile
143
+ * selection that drops the per-VARIANT stock reads a tile never shows
144
+ * (`availabilityByLocation`, `stockOnHand`/`stockAllocated`, and the
145
+ * incoming-stock trio) plus the product `description`, including the
146
+ * per-language copy inside `translations`. Those variant fields are
147
+ * per-variant field resolvers server-side, so this cuts backend work and SQL
148
+ * statements, not only bytes.
149
+ *
150
+ * The collection tree, the translated slugs and `priceTiers` are KEPT, so a
151
+ * card row still drives canonical/hreflang URLs and quantity-break pricing —
152
+ * see `ProductListOptions.detail` for the full kept/dropped list and why.
153
+ * The default is unchanged, so existing callers keep the full shape.
154
+ */
87
155
  async getProducts(listOptions, options) {
156
+ // Deprecated reroute, kept for back-compat: the `products` query has no
157
+ // collection filter, so collection listings go through `search`.
88
158
  if (listOptions?.collectionSlug) {
89
159
  const data = await http.graphql(SEARCH_PRODUCTS, {
90
160
  input: {
@@ -100,11 +170,19 @@ export function createProductMethods(http) {
100
170
  totalItems: data.search.totalItems,
101
171
  };
102
172
  }
173
+ // `detail` picks the DOCUMENT, not server-side list options — Vendure's
174
+ // `ProductListOptions` input has no such field and would reject it.
103
175
  const queryOptions = {
104
176
  take: listOptions?.take ?? 20,
105
177
  skip: listOptions?.skip ?? 0,
106
178
  };
107
179
  if (listOptions?.sort) {
180
+ // Guard for JS callers the type-level removal can't reach: sending
181
+ // sort.price to the `products` query is a guaranteed server error
182
+ // ("price" is not defined by type ProductSortParameter) — fail with
183
+ // guidance instead. A present-but-nullish price key (callers composing
184
+ // the sort from optional params, `{ name: q.name, price: q.price }`)
185
+ // is not a price sort: it is stripped, never sent, and never throws.
108
186
  const { price, ...listSort } = listOptions.sort;
109
187
  if (price != null) {
110
188
  throw new StorefrontError('getProducts cannot sort by price — Vendure\'s "products" query has no price sort ' +
@@ -114,6 +192,10 @@ export function createProductMethods(http) {
114
192
  if (Object.keys(listSort).length > 0)
115
193
  queryOptions.sort = listSort;
116
194
  }
195
+ // Default to enabled-only so a plain getProducts() never leaks disabled
196
+ // products. An explicit `filter` REPLACES the default; `enabled` is a
197
+ // deprecated shorthand ignored when `filter` is set (and overridden
198
+ // server-side — the Shop API always forces enabled-only).
117
199
  if (listOptions?.filter) {
118
200
  queryOptions.filter = listOptions.filter;
119
201
  }
@@ -124,6 +206,15 @@ export function createProductMethods(http) {
124
206
  const data = await http.graphql(document, { options: queryOptions }, tagRequest(options, 'getProducts'));
125
207
  return data.products;
126
208
  },
209
+ /**
210
+ * List the products of one collection, via the search backend — the only
211
+ * Shop API path that filters by collection. Returns the honest search-row
212
+ * shape (`CollectionProductSummary`): one synthesised variant per product,
213
+ * no `sku`/`facetValues`/`collections`, and a single preview image. Use
214
+ * `getProduct(slug)` for a product's full variant/asset tree. Supports
215
+ * `sort: { price }` (unlike `getProducts`). A search row with a
216
+ * missing/malformed price throws rather than defaulting to €0.
217
+ */
127
218
  async getProductsInCollection(collectionSlug, listOptions, options) {
128
219
  const data = await http.graphql(SEARCH_PRODUCTS, {
129
220
  input: {
@@ -139,6 +230,7 @@ export function createProductMethods(http) {
139
230
  totalItems: data.search.totalItems,
140
231
  };
141
232
  },
233
+ /** `getProductsInCollection` by id, tagged `collection:<id>`. */
142
234
  async getProductsInCollectionById(collectionId, listOptions, options) {
143
235
  const data = await http.graphql(SEARCH_PRODUCTS, {
144
236
  input: {
@@ -1 +1 @@
1
-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AE,CAAC,CAAC,CAAC,CACnE,CAAC;YACF,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;gBACrB,MAAM,IAAI,eAAe,CAAC,yBAAyB,EAAE,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC;YACxF,CAAC;YACD,OAAO,IAAI,CAAC,UAAU,CAAC;QACzB,CAAC;QAED,KAAK,CAAC,iBAAiB,CAAC,OAAwB;YAC9C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAC7B,eAAe,EACf,SAAS,EACT,OAAO,CACR,CAAC;YACF,OAAO,IAAI,CAAC,qBAAqB,CAAC;QACpC,CAAC;QAED,KAAK,CAAC,oBAAoB,CACxB,SAAiB,EACjB,OAAwB;YAExB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAG7B,kBAAkB,EAClB,EAAE,SAAS,EAAE,EACb,UAAU,CAAC,OAAO,EAAE,sBAAsB,EAAE,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,CAC1E,CAAC;YACF,OAAO,IAAI,CAAC,qBAAqB,CAAC;QACpC,CAAC;QAED,oBAAoB;KACrB,CAAC;AACJ,CAAC"}
@@ -1,31 +1,103 @@
1
- export declare const GET_PRODUCT = "\n query GetProduct($slug: String!) {\n product(slug: $slug) {\n id name slug description\n featuredAsset {\n source name width height\n customFields { altText }\n presets {\n xxs { url webpUrl } xs { url webpUrl }\n s { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n assets {\n source name width height\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n options { id code name group { id name code } }\n customFields { minOrderQuantity salesUnit position }\n featuredAsset {\n source name width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } }\n }\n assets {\n source name width height\n customFields { altText }\n presets { m { url webpUrl } l { url webpUrl } }\n }\n }\n optionGroups { id name code options { id name code } }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id slug }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n documents {\n id position title description fileUrl fileMimeType fileSize fileName requiresAuth\n }\n \n metadata {\n seoTitle seoDescription canonicalUrl\n socialTitle socialDescription socialImageAlt socialOgType\n socialImage {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n twitterCardType twitterTitleOverride twitterDescriptionOverride\n twitterImageOverride {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n aiSummary qaPairs qaEmitFaqpageJsonld\n breadcrumbOverride hreflangOverrides\n metaRobots resolvedBotDirectives\n includeReviewsInJsonld\n }\n\n }\n }\n";
2
- export declare const GET_PRODUCT_BY_ID = "\n query GetProductById($id: ID!) {\n product(id: $id) {\n id name slug description\n featuredAsset {\n source name width height\n customFields { altText }\n presets {\n xxs { url webpUrl } xs { url webpUrl }\n s { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n assets {\n source name width height\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n options { id code name group { id name code } }\n customFields { minOrderQuantity salesUnit position }\n featuredAsset {\n source name width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } }\n }\n assets {\n source name width height\n customFields { altText }\n presets { m { url webpUrl } l { url webpUrl } }\n }\n }\n optionGroups { id name code options { id name code } }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id slug }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n documents {\n id position title description fileUrl fileMimeType fileSize fileName requiresAuth\n }\n \n metadata {\n seoTitle seoDescription canonicalUrl\n socialTitle socialDescription socialImageAlt socialOgType\n socialImage {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n twitterCardType twitterTitleOverride twitterDescriptionOverride\n twitterImageOverride {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n aiSummary qaPairs qaEmitFaqpageJsonld\n breadcrumbOverride hreflangOverrides\n metaRobots resolvedBotDirectives\n includeReviewsInJsonld\n }\n\n }\n }\n";
3
- export declare const LIST_PRODUCTS = "\n query ListProducts($options: ProductListOptions) {\n products(options: $options) {\n items {\n id name slug description enabled\n featuredAsset {\n source name width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id slug }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n }\n totalItems\n }\n }\n";
4
- export declare const LIST_PRODUCT_CARDS = "\n query ListProductCards($options: ProductListOptions) {\n products(options: $options) {\n items {\n id name slug enabled\n featuredAsset {\n source name width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel saleable\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n customFields { minOrderQuantity salesUnit position }\n }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug }\n collections {\n id name slug position\n parent { id slug }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n }\n totalItems\n }\n }\n";
1
+ export declare const GET_PRODUCT = "\n query GetProduct($slug: String!) {\n product(slug: $slug) {\n id name slug description\n featuredAsset {\n source name width height\n customFields { altText }\n presets {\n xxs { url webpUrl } xs { url webpUrl }\n s { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n assets {\n source name width height\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n backorderAllowance\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n options { id code name group { id name code } }\n customFields { minOrderQuantity salesUnit position }\n featuredAsset {\n source name width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } }\n }\n assets {\n source name width height\n customFields { altText }\n presets { m { url webpUrl } l { url webpUrl } }\n }\n }\n optionGroups { id name code options { id name code } }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id slug }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n documents {\n id position title description fileUrl fileMimeType fileSize fileName requiresAuth\n }\n \n metadata {\n seoTitle seoDescription canonicalUrl\n socialTitle socialDescription socialImageAlt socialOgType\n socialImage {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n twitterCardType twitterTitleOverride twitterDescriptionOverride\n twitterImageOverride {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n aiSummary qaPairs qaEmitFaqpageJsonld\n breadcrumbOverride hreflangOverrides\n metaRobots resolvedBotDirectives\n includeReviewsInJsonld\n }\n\n }\n }\n";
2
+ export declare const GET_PRODUCT_BY_ID = "\n query GetProductById($id: ID!) {\n product(id: $id) {\n id name slug description\n featuredAsset {\n source name width height\n customFields { altText }\n presets {\n xxs { url webpUrl } xs { url webpUrl }\n s { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n assets {\n source name width height\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n backorderAllowance\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n options { id code name group { id name code } }\n customFields { minOrderQuantity salesUnit position }\n featuredAsset {\n source name width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } }\n }\n assets {\n source name width height\n customFields { altText }\n presets { m { url webpUrl } l { url webpUrl } }\n }\n }\n optionGroups { id name code options { id name code } }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id slug }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n documents {\n id position title description fileUrl fileMimeType fileSize fileName requiresAuth\n }\n \n metadata {\n seoTitle seoDescription canonicalUrl\n socialTitle socialDescription socialImageAlt socialOgType\n socialImage {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n twitterCardType twitterTitleOverride twitterDescriptionOverride\n twitterImageOverride {\n source name\n customFields { altText }\n presets {\n xs { url webpUrl } m { url webpUrl }\n l { url webpUrl } xl { url webpUrl }\n }\n }\n aiSummary qaPairs qaEmitFaqpageJsonld\n breadcrumbOverride hreflangOverrides\n metaRobots resolvedBotDirectives\n includeReviewsInJsonld\n }\n\n }\n }\n";
3
+ export declare const LIST_PRODUCTS = "\n query ListProducts($options: ProductListOptions) {\n products(options: $options) {\n items {\n id name slug description enabled\n featuredAsset {\n source name width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n backorderAllowance\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug description }\n collections {\n id name slug position\n parent { id slug }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n }\n totalItems\n }\n }\n";
4
+ /**
5
+ * The card selection: what a product GRID tile renders, and nothing else.
6
+ *
7
+ * `LIST_PRODUCTS` above asks for detail-page data on every row. The costly part
8
+ * is NOT the byte count — it is the per-product and per-VARIANT field resolvers
9
+ * behind it, which turn one listing request into four figures of SQL statements.
10
+ *
11
+ * Dropped here, and why each is safe for a tile:
12
+ * - `availabilityByLocation` — one `stock_level` query PER VARIANT
13
+ * (vendure-plugin-stock-transfer); per-warehouse availability is a
14
+ * detail-page concern.
15
+ * - `stockOnHand` / `stockAllocated` — raw operational numbers a tile never
16
+ * shows, and another read per variant.
17
+ * - `incomingStock` / `projectedSaleable` / `nextExpectedArrival` — restock
18
+ * data, gated to B2B customer groups and only rendered on a detail page.
19
+ * - `description`, including the per-language copy inside `translations` —
20
+ * the single biggest contributor to the payload, and nothing a tile shows.
21
+ *
22
+ * KEPT, each for a concrete reason — do not "tidy" these away:
23
+ * - `saleable` + `backorderAllowance` + `enabled` — storefronts gate
24
+ * orderability on `saleable == null || saleable > 0 || backorderAllowance > 0`;
25
+ * dropping them changes which products look buyable. `backorderAllowance`
26
+ * is not free on a tenant that enabled backorders: for a signed-in buyer
27
+ * whose group may backorder, an `incoming` or `limited` variant costs an
28
+ * incoming-stock read and a ledger read per variant (a `deny` variant —
29
+ * the default everywhere — and an anonymous visitor cost neither). A grid
30
+ * that must not label a backorderable SKU "out of stock" pays that either
31
+ * way: asking for it in a second document would cost the same.
32
+ * - The whole `collections { … parent … translations … customFields }` block
33
+ * and `translations { languageCode name slug }` — `pickCanonicalRoot` /
34
+ * `isUserFacingRoot` (src/seo) derive a product's canonical URL from
35
+ * `customFields.isCanonical` + `parent.slug` + `position`, and its localized
36
+ * slug from the translations. A card row still satisfies `ProductForSeo`
37
+ * structurally, so omitting these does not fail to compile — it silently
38
+ * hands every product the FLAT path. Note these cost bytes, not queries:
39
+ * Vendure resolves `Product.collections` in one query per product whichever
40
+ * subfields are asked for.
41
+ * - `priceTiers` — the SDK's own `getPriceDisplay()` reads
42
+ * `variant.priceTiers?.length ? … : null`, so an ABSENT ladder is
43
+ * indistinguishable from "this variant has no tiers": a tile would quietly
44
+ * show the base price while the detail page and the cart show the tier
45
+ * price. It is also free of DB cost — the price-list plugin resolves tiers
46
+ * from an in-memory map filled during price application, not a query.
47
+ * - `sku`, `priceListName`, `retailPrice(WithTax)`, variant `customFields`
48
+ * (purchase constraints shown as "per 6") and `facetValues` (tiles derive
49
+ * producer/vintage/volume and filter tags from them).
50
+ *
51
+ * Reached with `getProducts(..., { detail: 'card' })`. The default stays
52
+ * `LIST_PRODUCTS`, so no existing caller changes behaviour.
53
+ */
54
+ export declare const LIST_PRODUCT_CARDS = "\n query ListProductCards($options: ProductListOptions) {\n products(options: $options) {\n items {\n id name slug enabled\n featuredAsset {\n source name width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel saleable backorderAllowance\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n customFields { minOrderQuantity salesUnit position }\n }\n facetValues { id name code facet { id name code } }\n translations { languageCode name slug }\n collections {\n id name slug position\n parent { id slug }\n translations { languageCode name slug }\n customFields { isRoutable isCanonical }\n }\n }\n totalItems\n }\n }\n";
5
55
  export declare const LIST_FACETS = "\n query ListFacets {\n facets {\n items {\n id name code\n values { id name code }\n }\n totalItems\n }\n }\n";
6
56
  export declare const LIST_COLLECTIONS = "\n query ListCollections($options: CollectionListOptions) {\n collections(options: $options) {\n items {\n id name slug description\n breadcrumbs { id name slug }\n featuredAsset {\n source width height\n presets { xs { url webpUrl } m { url webpUrl } }\n }\n parent { id name slug }\n children { id name slug }\n }\n totalItems\n }\n }\n";
7
- export declare const GET_COLLECTION = "\n query GetCollection($slug: String!) {\n collection(slug: $slug) {\n id name slug description position\n featuredAsset {\n source width height\n presets { l { url webpUrl } xl { url webpUrl } }\n }\n breadcrumbs { id name slug }\n parent { id }\n children { id name slug }\n customFields {\n isRoutable\n isCanonical\n noindex\n nofollow\n metaRobotsMaxImagePreview\n socialImageId\n socialOgType\n twitterCardType\n }\n translations {\n languageCode\n name\n slug\n customFields {\n seoTitle\n seoDescription\n canonicalUrl\n socialTitle\n socialDescription\n socialImageAlt\n }\n }\n productVariants(options: { take: 20 }) {\n items {\n id\n product {\n id name slug\n featuredAsset { source width height presets { m { url webpUrl } } }\n }\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n totalItems\n }\n }\n }\n";
8
- export declare const GET_COLLECTION_BY_ID = "\n query GetCollectionById($id: ID!) {\n collection(id: $id) {\n id name slug description position\n featuredAsset {\n source width height\n presets { l { url webpUrl } xl { url webpUrl } }\n }\n breadcrumbs { id name slug }\n parent { id }\n children { id name slug }\n customFields {\n isRoutable\n isCanonical\n noindex\n nofollow\n metaRobotsMaxImagePreview\n socialImageId\n socialOgType\n twitterCardType\n }\n translations {\n languageCode\n name\n slug\n customFields {\n seoTitle\n seoDescription\n canonicalUrl\n socialTitle\n socialDescription\n socialImageAlt\n }\n }\n productVariants(options: { take: 20 }) {\n items {\n id\n product {\n id name slug\n featuredAsset { source width height presets { m { url webpUrl } } }\n }\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n totalItems\n }\n }\n }\n";
57
+ export declare const GET_COLLECTION = "\n query GetCollection($slug: String!) {\n collection(slug: $slug) {\n id name slug description position\n featuredAsset {\n source width height\n presets { l { url webpUrl } xl { url webpUrl } }\n }\n breadcrumbs { id name slug }\n parent { id }\n children { id name slug }\n customFields {\n isRoutable\n isCanonical\n noindex\n nofollow\n metaRobotsMaxImagePreview\n socialImageId\n socialOgType\n twitterCardType\n }\n translations {\n languageCode\n name\n slug\n customFields {\n seoTitle\n seoDescription\n canonicalUrl\n socialTitle\n socialDescription\n socialImageAlt\n }\n }\n productVariants(options: { take: 20 }) {\n items {\n id\n product {\n id name slug\n featuredAsset { source width height presets { m { url webpUrl } } }\n }\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n backorderAllowance\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n totalItems\n }\n }\n }\n";
58
+ export declare const GET_COLLECTION_BY_ID = "\n query GetCollectionById($id: ID!) {\n collection(id: $id) {\n id name slug description position\n featuredAsset {\n source width height\n presets { l { url webpUrl } xl { url webpUrl } }\n }\n breadcrumbs { id name slug }\n parent { id }\n children { id name slug }\n customFields {\n isRoutable\n isCanonical\n noindex\n nofollow\n metaRobotsMaxImagePreview\n socialImageId\n socialOgType\n twitterCardType\n }\n translations {\n languageCode\n name\n slug\n customFields {\n seoTitle\n seoDescription\n canonicalUrl\n socialTitle\n socialDescription\n socialImageAlt\n }\n }\n productVariants(options: { take: 20 }) {\n items {\n id\n product {\n id name slug\n featuredAsset { source width height presets { m { url webpUrl } } }\n }\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n backorderAllowance\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n totalItems\n }\n }\n }\n";
9
59
  export declare const SEARCH_PRODUCTS = "\n query SearchProducts($input: SearchInput!) {\n search(input: $input) {\n items {\n productId productVariantId productName slug description\n price { ... on SinglePrice { value } ... on PriceRange { min max } }\n priceWithTax { ... on SinglePrice { value } ... on PriceRange { min max } }\n currencyCode\n productAsset { preview focalPoint { x y } }\n collectionIds\n inStock\n }\n totalItems\n facetValues { facetValue { id name code facet { id name code } } count }\n }\n }\n";
10
- export declare const ACTIVE_ORDER = "\n query ActiveOrder {\n activeOrder { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
11
- export declare const ADD_TO_CART = "\n mutation AddToCart($variantId: ID!, $quantity: Int!) {\n addItemToOrder(productVariantId: $variantId, quantity: $quantity) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { \n errorCode message quantityAvailable\n productVariantId orderLineId sku productName productVariantName\n quantityRequested inputIndex\n order { id } }\n }\n }\n";
12
- export declare const ADJUST_ORDER_LINE = "\n mutation AdjustOrderLine($lineId: ID!, $quantity: Int!) {\n adjustOrderLine(orderLineId: $lineId, quantity: $quantity) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { \n errorCode message quantityAvailable\n productVariantId orderLineId sku productName productVariantName\n quantityRequested inputIndex\n }\n }\n }\n";
13
- export declare const REMOVE_ORDER_LINE = "\n mutation RemoveOrderLine($lineId: ID!) {\n removeOrderLine(orderLineId: $lineId) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n }\n }\n";
14
- export declare const APPLY_COUPON = "\n mutation ApplyCoupon($code: String!) {\n applyCouponCode(couponCode: $code) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on CouponCodeExpiredError { errorCode message couponCode }\n ... on CouponCodeInvalidError { errorCode message couponCode }\n ... on CouponCodeLimitError { errorCode message couponCode limit }\n }\n }\n";
15
- export declare const REMOVE_COUPON = "\n mutation RemoveCoupon($code: String!) {\n removeCouponCode(couponCode: $code) { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
16
- export declare const REMOVE_ALL_ORDER_LINES = "\n mutation RemoveAllOrderLines {\n removeAllOrderLines {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n }\n }\n";
17
- export declare const ADD_ITEMS_TO_CART = "\n mutation AddItemsToCart($inputs: [AddItemInput!]!) {\n addItemsToOrder(inputs: $inputs) {\n order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n errorResults {\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { \n errorCode message quantityAvailable\n productVariantId orderLineId sku productName productVariantName\n quantityRequested inputIndex\n }\n ... on OrderInterceptorError { errorCode message interceptorError }\n }\n }\n }\n";
18
- export declare const SET_CUSTOMER = "\n mutation SetCustomer($input: CreateCustomerInput!) {\n setCustomerForOrder(input: $input) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on AlreadyLoggedInError { errorCode message }\n ... on EmailAddressConflictError { errorCode message }\n ... on GuestCheckoutError { errorCode message }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
19
- export declare const SET_SHIPPING_ADDRESS = "\n mutation SetShippingAddress($input: CreateAddressInput!) {\n setOrderShippingAddress(input: $input) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
20
- export declare const SET_BILLING_ADDRESS = "\n mutation SetBillingAddress($input: CreateAddressInput!) {\n setOrderBillingAddress(input: $input) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
60
+ export declare const ACTIVE_ORDER = "\n query ActiveOrder {\n activeOrder { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
61
+ export declare const ADD_TO_CART = "\n mutation AddToCart($variantId: ID!, $quantity: Int!) {\n addItemToOrder(productVariantId: $variantId, quantity: $quantity) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { \n errorCode message quantityAvailable\n productVariantId orderLineId sku productName productVariantName\n quantityRequested inputIndex\n order { id } }\n }\n }\n";
62
+ export declare const ADJUST_ORDER_LINE = "\n mutation AdjustOrderLine($lineId: ID!, $quantity: Int!) {\n adjustOrderLine(orderLineId: $lineId, quantity: $quantity) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { \n errorCode message quantityAvailable\n productVariantId orderLineId sku productName productVariantName\n quantityRequested inputIndex\n }\n }\n }\n";
63
+ export declare const REMOVE_ORDER_LINE = "\n mutation RemoveOrderLine($lineId: ID!) {\n removeOrderLine(orderLineId: $lineId) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n }\n }\n";
64
+ export declare const APPLY_COUPON = "\n mutation ApplyCoupon($code: String!) {\n applyCouponCode(couponCode: $code) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on CouponCodeExpiredError { errorCode message couponCode }\n ... on CouponCodeInvalidError { errorCode message couponCode }\n ... on CouponCodeLimitError { errorCode message couponCode limit }\n }\n }\n";
65
+ export declare const REMOVE_COUPON = "\n mutation RemoveCoupon($code: String!) {\n removeCouponCode(couponCode: $code) { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
66
+ export declare const REMOVE_ALL_ORDER_LINES = "\n mutation RemoveAllOrderLines {\n removeAllOrderLines {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n }\n }\n";
67
+ /**
68
+ * Bulk add (favourite-box bundles). `addItemsToOrder` returns
69
+ * UpdateMultipleOrderItemsResult: a single resulting Order plus a per-input
70
+ * `errorResults` list — partial success is possible, so surface both.
71
+ */
72
+ export declare const ADD_ITEMS_TO_CART = "\n mutation AddItemsToCart($inputs: [AddItemInput!]!) {\n addItemsToOrder(inputs: $inputs) {\n order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n errorResults {\n ... on OrderModificationError { errorCode message }\n ... on OrderLimitError { errorCode message maxItems }\n ... on NegativeQuantityError { errorCode message }\n ... on InsufficientStockError { \n errorCode message quantityAvailable\n productVariantId orderLineId sku productName productVariantName\n quantityRequested inputIndex\n }\n ... on OrderInterceptorError { errorCode message interceptorError }\n }\n }\n }\n";
73
+ export declare const SET_CUSTOMER = "\n mutation SetCustomer($input: CreateCustomerInput!) {\n setCustomerForOrder(input: $input) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on AlreadyLoggedInError { errorCode message }\n ... on EmailAddressConflictError { errorCode message }\n ... on GuestCheckoutError { errorCode message }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
74
+ export declare const SET_SHIPPING_ADDRESS = "\n mutation SetShippingAddress($input: CreateAddressInput!) {\n setOrderShippingAddress(input: $input) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
75
+ export declare const SET_BILLING_ADDRESS = "\n mutation SetBillingAddress($input: CreateAddressInput!) {\n setOrderBillingAddress(input: $input) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
21
76
  export declare const ELIGIBLE_SHIPPING_METHODS = "\n query ShippingMethods {\n eligibleShippingMethods {\n id name description price priceWithTax metadata isPreferred isDeliveryTermsEligible\n }\n }\n";
22
77
  export declare const MY_DELIVERY_TERMS = "\n query MyDeliveryTerms {\n myDeliveryTerms {\n customerId source managedExternally status shippingMethodStatus policyStatus summary\n preferredShippingMethodId preferredShippingMethodCode preferredShippingMethodName\n preferredShippingMethodAvailable\n eligibleShippingMethodIds\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning\n }\n }\n";
23
- export declare const SET_SHIPPING_METHOD = "\n mutation SetShippingMethod($ids: [ID!]!) {\n selectOrderDeliveryMethod(shippingMethodIds: $ids) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on IneligibleShippingMethodError { errorCode message }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
24
- export declare const APPLY_PREFERRED_SHIPPING_METHOD = "\n mutation ApplyPreferredShippingMethod {\n applyPreferredDeliveryMethod {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on IneligibleShippingMethodError { errorCode message }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
78
+ export declare const SET_SHIPPING_METHOD = "\n mutation SetShippingMethod($ids: [ID!]!) {\n selectOrderDeliveryMethod(shippingMethodIds: $ids) {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on IneligibleShippingMethodError { errorCode message }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
79
+ export declare const APPLY_PREFERRED_SHIPPING_METHOD = "\n mutation ApplyPreferredShippingMethod {\n applyPreferredDeliveryMethod {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderModificationError { errorCode message }\n ... on IneligibleShippingMethodError { errorCode message }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
25
80
  export declare const ELIGIBLE_PAYMENT_METHODS = "\n query PaymentMethods {\n eligiblePaymentMethods {\n id name code description isEligible eligibilityMessage\n }\n }\n";
26
- export declare const TRANSITION_TO_ARRANGING_PAYMENT = "\n mutation TransitionToArrangingPayment {\n transitionOrderToState(state: \"ArrangingPayment\") {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderStateTransitionError {\n errorCode message transitionError\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n }\n }\n";
27
- export declare const SET_PAYMENT_INTENT = "\n mutation SetOrderPaymentIntent($intent: OrderPaymentIntent!) {\n setOrderPaymentIntent(intent: $intent) {\n ... on Order {\n \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n\n customFields { paymentIntent }\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
28
- export declare const ADD_PAYMENT = "\n mutation AddPayment($input: PaymentInput!) {\n addPaymentToOrder(input: $input) {\n ... on Order {\n \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n }\n ... on OrderPaymentStateError { errorCode message }\n ... on IneligiblePaymentMethodError { errorCode message }\n ... on PaymentFailedError {\n errorCode message paymentErrorMessage\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n ... on PaymentDeclinedError {\n errorCode message paymentErrorMessage\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n ... on OrderStateTransitionError {\n errorCode message transitionError\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
81
+ export declare const TRANSITION_TO_ARRANGING_PAYMENT = "\n mutation TransitionToArrangingPayment {\n transitionOrderToState(state: \"ArrangingPayment\") {\n ... on Order { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n ... on OrderStateTransitionError {\n errorCode message transitionError\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n }\n }\n";
82
+ /**
83
+ * Record how the buyer intends to pay AND re-price the order in one round trip.
84
+ *
85
+ * The re-price is the reason this is a mutation of its own rather than a
86
+ * `setOrderCustomFields` call: the engine only applies promotions that key on
87
+ * the intent when the order is recalculated, and `setOrderCustomFields` does not
88
+ * recalculate. The returned Order is therefore already the one to render —
89
+ * `discounts`, `promotions` and `totalWithTax` include (or no longer include)
90
+ * the pay-now discount.
91
+ *
92
+ * `customFields { paymentIntent }` is selected HERE and nowhere else, and that
93
+ * is deliberate. Putting it in the shared `ORDER_FIELDS` would make every order
94
+ * query and cart mutation in this client fail GraphQL validation against an
95
+ * engine that predates the field — one missing feature would take the whole cart
96
+ * down. Confined to this document, only the call that needs the field is
97
+ * coupled to an engine that has it.
98
+ */
99
+ export declare const SET_PAYMENT_INTENT = "\n mutation SetOrderPaymentIntent($intent: OrderPaymentIntent!) {\n setOrderPaymentIntent(intent: $intent) {\n ... on Order {\n \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n\n customFields { paymentIntent }\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
100
+ export declare const ADD_PAYMENT = "\n mutation AddPayment($input: PaymentInput!) {\n addPaymentToOrder(input: $input) {\n ... on Order {\n \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n }\n ... on OrderPaymentStateError { errorCode message }\n ... on IneligiblePaymentMethodError { errorCode message }\n ... on PaymentFailedError {\n errorCode message paymentErrorMessage\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n ... on PaymentDeclinedError {\n errorCode message paymentErrorMessage\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n ... on OrderStateTransitionError {\n errorCode message transitionError\n placement { \n code\n customerMessage\n linesTruncated\n requiredAmount\n currencyCode\n amountBasis\n requiredQuantity\n priceListName\n salesUnit\n minimumAge\n lines {\n orderLineId\n productVariantId\n sku\n productName\n productVariantName\n quantityRequested\n quantityAvailable\n }\n details { field code message }\n }\n }\n ... on NoActiveOrderError { errorCode message }\n }\n }\n";
29
101
  export declare const PICKUP_LOCATIONS = "\n query PickupLocations($input: PickupLocationSearchInput!) {\n pickupLocations(input: $input) {\n \n provider\n carrier\n locationCode\n name\n address {\n streetLine1\n number\n postalCode\n city\n countryCode\n region\n }\n openingHours {\n weekday\n open\n close\n }\n details\n\n }\n }\n";
30
102
  export declare const ACTIVE_ORDER_PICKUP_LOCATION = "\n query ActiveOrderPickupLocation {\n activeOrderPickupLocation {\n \n provider\n carrier\n locationCode\n name\n address {\n streetLine1\n number\n postalCode\n city\n countryCode\n region\n }\n openingHours {\n weekday\n open\n close\n }\n details\n\n }\n }\n";
31
103
  export declare const SET_ACTIVE_ORDER_PICKUP_LOCATION = "\n mutation SetActiveOrderPickupLocation($location: StoredPickupLocationInput!) {\n setActiveOrderPickupLocation(location: $location) {\n __typename\n ... on Order {\n id code state\n }\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n";
@@ -38,7 +110,7 @@ export declare const LOGIN = "\n mutation Login($email: String!, $password: Str
38
110
  export declare const REGISTER = "\n mutation Register($input: RegisterCustomerInput!) {\n registerCustomerAccount(input: $input) {\n ... on Success { success }\n ... on MissingPasswordError { errorCode message }\n ... on PasswordValidationError { errorCode message validationErrorMessage }\n ... on NativeAuthStrategyError { errorCode message }\n }\n }\n";
39
111
  export declare const GET_CURRENT_CUSTOMER = "\n query Me {\n activeCustomer {\n id firstName lastName emailAddress phoneNumber\n groups { id name }\n isB2B\n addresses {\n id fullName streetLine1 streetLine2 city province postalCode\n country { code name }\n defaultShippingAddress defaultBillingAddress\n }\n orders(options: { take: 10, sort: { createdAt: DESC } }) {\n items {\n \n id code state total totalWithTax currencyCode createdAt\n lines {\n id quantity linePriceWithTax\n productVariant {\n id name sku\n product { slug featuredAsset { preview presets { xs { webpUrl } } } }\n }\n }\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n externalShipments {\n carrier reference isLink shippedAt deliveryNumber\n }\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n\n }\n totalItems\n }\n }\n }\n";
40
112
  export declare const ACTIVE_CUSTOMER_PRICE_LISTS = "\n query ActiveCustomerPriceLists {\n activeCustomerPriceLists { id name isContract }\n }\n";
41
- export declare const GET_CUSTOMER_ORDERS = "\n query CustomerOrders($options: OrderListOptions) {\n activeCustomer {\n orders(options: $options) {\n items {\n \n id code state total totalWithTax currencyCode createdAt\n lines {\n id quantity linePriceWithTax\n productVariant {\n id name sku\n product { slug featuredAsset { preview presets { xs { webpUrl } } } }\n }\n }\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n externalShipments {\n carrier reference isLink shippedAt deliveryNumber\n }\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n\n }\n totalItems\n }\n }\n }\n";
113
+ export declare const GET_CUSTOMER_ORDERS = "\n query CustomerOrders($options: OrderListOptions) {\n activeCustomer {\n orders(options: $options) {\n items {\n \n id code state total totalWithTax currencyCode createdAt\n lines {\n id quantity linePriceWithTax\n productVariant {\n id name sku\n product { slug featuredAsset { preview presets { xs { webpUrl } } } }\n }\n }\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n externalShipments {\n carrier reference isLink shippedAt deliveryNumber\n }\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n\n lines { id backorderedQuantity }\n }\n totalItems\n }\n }\n }\n";
42
114
  export declare const LOGOUT = "\n mutation Logout {\n logout { success }\n }\n";
43
115
  export declare const UPDATE_CUSTOMER = "\n mutation UpdateCustomer($input: UpdateCustomerInput!) {\n updateCustomer(input: $input) {\n id firstName lastName emailAddress phoneNumber\n }\n }\n";
44
116
  export declare const UPDATE_PASSWORD = "\n mutation UpdatePassword($currentPassword: String!, $newPassword: String!) {\n updateCustomerPassword(currentPassword: $currentPassword, newPassword: $newPassword) {\n ... on Success { success }\n ... on InvalidCredentialsError { errorCode message }\n ... on PasswordValidationError { errorCode message validationErrorMessage }\n ... on NativeAuthStrategyError { errorCode message }\n }\n }\n";
@@ -55,15 +127,24 @@ export declare const CREATE_ADDRESS = "\n mutation CreateAddress($input: Create
55
127
  export declare const UPDATE_ADDRESS = "\n mutation UpdateAddress($input: UpdateAddressInput!) {\n updateCustomerAddress(input: $input) {\n id fullName streetLine1 streetLine2 city province postalCode\n country { code name }\n defaultShippingAddress defaultBillingAddress\n }\n }\n";
56
128
  export declare const DELETE_ADDRESS = "\n mutation DeleteAddress($id: ID!) {\n deleteCustomerAddress(id: $id) {\n success\n }\n }\n";
57
129
  export declare const AVAILABLE_COUNTRIES = "\n query AvailableCountries {\n availableCountries {\n id code name\n }\n }\n";
58
- export declare const ORDER_BY_CODE = "\n query OrderByCode($code: String!) {\n orderByCode(code: $code) {\n \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n externalShipments {\n carrier reference isLink shippedAt deliveryNumber\n }\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n }\n }\n";
130
+ /**
131
+ * `lines { backorderedQuantity }` is selected HERE and on `GET_CUSTOMER_ORDERS`,
132
+ * and nowhere else — the same rule `customFields { paymentIntent }` follows
133
+ * below. In the shared `ORDER_FIELDS` fragment it would make every cart read
134
+ * and mutation fail validation against an engine that predates the backorders
135
+ * plugin, taking the whole cart down for a field a cart line never carries a
136
+ * value for (the stamp is written at placement). GraphQL merges this `lines`
137
+ * selection with the fragment's, so the line still comes back whole.
138
+ */
139
+ export declare const ORDER_BY_CODE = "\n query OrderByCode($code: String!) {\n orderByCode(code: $code) {\n \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n\n lines { id backorderedQuantity }\n \n fulfillments {\n id state method trackingCode createdAt updatedAt\n lines { orderLineId quantity }\n }\n externalShipments {\n carrier reference isLink shippedAt deliveryNumber\n }\n\n \n paymentTerms {\n source managedExternally status\n conditionCode conditionDescription summary classification\n paymentDays paymentEndOfMonths paymentMethod percentage\n discountPaymentDays discountPercentage paymentDiscountType\n stale syncedAt error\n resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch\n }\n\n \n deliveryTerms {\n source managedExternally status shippingMethodStatus policyStatus summary selectionSource\n selectedShippingMethodId selectedShippingMethodCode selectedShippingMethodName\n platformShippingMethodCode platformShippingMethodName platformShippingMethodDescription\n platformShippingPrice platformShippingPriceWithTax\n preferredShippingMethodId\n incotermStatus incotermCode incotermVersion incotermAddress incotermDescription\n shippingLeadDays deliveryAdvice stale syncedAt warning resolvedAt\n remoteShippingMethodCode remoteShippingMethodName\n remoteIncotermCode remoteIncotermVersion remoteIncotermAddress remoteDeliveryDate\n remoteConfirmedAt remoteMismatch\n }\n\n }\n }\n";
59
140
  export declare const FAVORITE_VARIANT_IDS = "\n query FavoriteVariantIds {\n favoriteProductVariantIds\n }\n";
60
- export declare const MY_FAVORITES = "\n query MyFavorites($options: FavoriteListOptions) {\n myFavorites(options: $options) {\n items {\n id\n productVariantId\n createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n product {\n id name slug\n featuredAsset {\n source width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n totalItems\n }\n }\n";
141
+ export declare const MY_FAVORITES = "\n query MyFavorites($options: FavoriteListOptions) {\n myFavorites(options: $options) {\n items {\n id\n productVariantId\n createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n backorderAllowance\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n product {\n id name slug\n featuredAsset {\n source width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n totalItems\n }\n }\n";
61
142
  export declare const TOGGLE_FAVORITE = "\n mutation ToggleFavorite($productVariantId: ID!) {\n toggleFavorite(productVariantId: $productVariantId)\n }\n";
62
143
  export declare const REMOVE_FAVORITE = "\n mutation RemoveFavorite($productVariantId: ID!) {\n removeFavorite(productVariantId: $productVariantId)\n }\n";
63
144
  export declare const GET_ACTIVE_CHANNEL = "\n query ActiveChannel {\n activeChannel {\n id code\n defaultLanguageCode\n availableLanguageCodes\n defaultCurrencyCode\n availableCurrencyCodes\n \n customFields {\n businessName businessDescription\n logoAssetId darkLogoAssetId coverAssetId faviconAssetId\n websiteUrl primaryColor\n contactEmail contactPhone\n legalName vatNumber registrationNumber\n addressLine1 addressLine2 city postalCode province country\n socialLinks\n commercePathPrefix commercePathPrefixTranslations productPathSegment\n cdnDomain maintenanceMode\n urlLocaleStrategy urlLocalePrefixDefault\n twitterHandle defaultOgImageId llmsTxtEnabled\n storefrontUrl quotesEnabled\n returnsEnabled returnWindowDays\n taxDisplayDefault taxDisplayB2b taxExclusiveCountries\n }\n\n }\n }\n";
64
145
  export declare const PROPERTY_GROUPS = "\n query PropertyGroups {\n productPropertyGroups {\n id position\n translations { id languageCode name }\n properties {\n id slug fieldType isFilterable isRequired position\n config { options { value label } min max maxLength allowedCollectionIds filterableFieldSlugs }\n facetId\n fieldFacets { fieldSlug fieldType facetId }\n translations { id languageCode name helpText }\n }\n }\n }\n";
65
146
  export declare const PRODUCT_PROPERTIES = "\n query ProductProperties($productId: ID!) {\n productPropertyValues(productId: $productId) {\n group {\n id position\n translations { id languageCode name }\n properties {\n id slug fieldType isFilterable isRequired position\n config { options { value label } min max maxLength }\n facetId\n fieldFacets { fieldSlug fieldType facetId }\n translations { id languageCode name helpText }\n }\n }\n values { id propertyId languageCode value }\n }\n }\n";
66
- export declare const GET_PRODUCT_RECOMMENDATIONS = "\n query ProductRecommendations($productId: ID!, $groupSlug: String) {\n productRecommendations(productId: $productId, groupSlug: $groupSlug) {\n groupName\n groupSlug\n products {\n id name slug description\n featuredAsset {\n source name width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
147
+ export declare const GET_PRODUCT_RECOMMENDATIONS = "\n query ProductRecommendations($productId: ID!, $groupSlug: String) {\n productRecommendations(productId: $productId, groupSlug: $groupSlug) {\n groupName\n groupSlug\n products {\n id name slug description\n featuredAsset {\n source name width height\n customFields { altText }\n presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }\n }\n variants {\n id name sku\n price priceWithTax currencyCode stockLevel\n stockOnHand stockAllocated saleable\n incomingStock projectedSaleable nextExpectedArrival\n backorderAllowance\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n availabilityByLocation { locationId locationName inStock }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
67
148
  export declare const GET_EXCHANGE_RATES = "\n query ExchangeRates {\n exchangeRates {\n baseCurrency targetCurrency rate inverseRate rateDate\n }\n }\n";
68
149
  export declare const CONVERT_CURRENCY = "\n query ConvertCurrency($amount: String!, $from: String!, $to: String!) {\n convertCurrency(amount: $amount, fromCurrency: $from, toCurrency: $to) {\n \n originalAmount originalCurrency convertedAmount targetCurrency rate rateDate\n\n }\n }\n";
69
150
  export declare const GET_EXCHANGE_RATE = "\n query ExchangeRate($targetCurrency: String!) {\n exchangeRate(targetCurrency: $targetCurrency) {\n baseCurrency targetCurrency rate inverseRate rateDate\n }\n }\n";
@@ -76,9 +157,14 @@ export declare const MY_QUOTE: string;
76
157
  export declare const MY_QUOTE_LEGACY: string;
77
158
  export declare const CREATE_QUOTE_REQUEST: string;
78
159
  export declare const CREATE_QUOTE_REQUEST_LEGACY: string;
79
- export declare const ACCEPT_QUOTE = "\n mutation AcceptQuote($id: ID!) {\n acceptQuote(id: $id) { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
160
+ export declare const ACCEPT_QUOTE = "\n mutation AcceptQuote($id: ID!) {\n acceptQuote(id: $id) { \n id code state active\n createdAt orderPlacedAt\n totalQuantity\n subTotal subTotalWithTax\n shipping shippingWithTax\n total totalWithTax\n currencyCode\n lines {\n id quantity\n unitPrice unitPriceWithTax taxRate\n linePrice linePriceWithTax\n discountedLinePrice discountedLinePriceWithTax\n discounts { adjustmentSource type description amount amountWithTax }\n productVariant {\n id name sku saleable\n product { id name slug }\n options { id name group { name } }\n }\n featuredAsset { source presets { xs { url webpUrl } } }\n }\n discounts { adjustmentSource type description amount amountWithTax }\n taxSummary { description taxRate taxBase taxTotal }\n promotions { id name couponCode description }\n shippingLines { shippingMethod { id name code } priceWithTax }\n payments { id method amount state transactionId }\n shippingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n billingAddress { fullName company streetLine1 streetLine2 city province postalCode countryCode phoneNumber }\n customer { id firstName lastName emailAddress }\n couponCodes\n }\n }\n";
80
161
  export declare const CANCEL_MY_QUOTE: string;
81
162
  export declare const CANCEL_MY_QUOTE_LEGACY: string;
163
+ /**
164
+ * Single-roundtrip branding query. activeChannel + fontResources (with
165
+ * resolved file Assets) + brandingAssets for the channel-level logo, favicon,
166
+ * and cover IDs already on ctx.channel.customFields.
167
+ */
82
168
  export declare const GET_BRANDING = "\n query GetBranding($ids: [ID!]!) {\n activeChannel {\n id\n defaultLanguageCode\n availableLanguageCodes\n defaultCurrencyCode\n }\n fontResources {\n id\n identifier\n kind\n family\n weights\n files {\n id\n source\n preview\n mimeType\n }\n }\n brandingAssets(ids: $ids) {\n id\n source\n preview\n mimeType\n }\n }\n";
83
169
  export declare const ACTIVE_CHANNEL_ORDER_CONSTRAINTS = "\n query ActiveChannelOrderConstraints {\n activeChannelOrderConstraints {\n minOrderAmountGross\n minOrderAmountNet\n minOrderQuantity\n fulfillmentMinOrderNet\n currencyCode\n customerIsExempt\n }\n }\n";
84
170
  export declare const MY_ORDER_INVOICES = "\n query MyOrderInvoices($orderCode: String!) {\n myOrderInvoices(orderCode: $orderCode) {\n id invoiceNumber invoicedOn totalWithTax currencyCode languageCode createdAt\n }\n }\n";