@sixtyninecommerce/client 0.23.1 → 0.25.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 (299) hide show
  1. package/README.md +25 -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/index.d.ts +17 -1
  41. package/dist/commerce/index.d.ts.map +1 -1
  42. package/dist/commerce/pickup-location-parser.d.ts +18 -0
  43. package/dist/commerce/pickup-location-parser.d.ts.map +1 -1
  44. package/dist/commerce/pickup-location-parser.js +28 -0
  45. package/dist/commerce/pickup-location-parser.js.map +1 -1
  46. package/dist/commerce/placement-error.d.ts +52 -0
  47. package/dist/commerce/placement-error.d.ts.map +1 -1
  48. package/dist/commerce/placement-error.js +87 -0
  49. package/dist/commerce/placement-error.js.map +1 -1
  50. package/dist/commerce/products.d.ts +48 -0
  51. package/dist/commerce/products.d.ts.map +1 -1
  52. package/dist/commerce/products.js +95 -2
  53. package/dist/commerce/products.js.map +1 -1
  54. package/dist/commerce/queries.d.ts +114 -27
  55. package/dist/commerce/queries.d.ts.map +1 -1
  56. package/dist/commerce/queries.js +219 -1
  57. package/dist/commerce/queries.js.map +1 -1
  58. package/dist/commerce/quotes.js +33 -0
  59. package/dist/commerce/quotes.js.map +1 -1
  60. package/dist/commerce/saved-lists.d.ts +7 -7
  61. package/dist/commerce/saved-lists.d.ts.map +1 -1
  62. package/dist/commerce/saved-lists.js +1 -1
  63. package/dist/commerce/search.js +3 -0
  64. package/dist/commerce/search.js.map +1 -1
  65. package/dist/commerce/shipping.js +3 -3
  66. package/dist/commerce/shipping.js.map +1 -1
  67. package/dist/commerce/stock-notifications.d.ts +11 -0
  68. package/dist/commerce/stock-notifications.d.ts.map +1 -1
  69. package/dist/commerce/stock-notifications.js +11 -0
  70. package/dist/commerce/stock-notifications.js.map +1 -1
  71. package/dist/commerce/subscriptions.d.ts +32 -8
  72. package/dist/commerce/subscriptions.d.ts.map +1 -1
  73. package/dist/commerce/subscriptions.js +90 -2
  74. package/dist/commerce/subscriptions.js.map +1 -1
  75. package/dist/commerce/vat-validation.js +4 -4
  76. package/dist/commerce/vat-validation.js.map +1 -1
  77. package/dist/constants.d.ts +31 -0
  78. package/dist/constants.d.ts.map +1 -1
  79. package/dist/constants.js +32 -0
  80. package/dist/constants.js.map +1 -1
  81. package/dist/content/asset-urls.d.ts +50 -0
  82. package/dist/content/asset-urls.d.ts.map +1 -1
  83. package/dist/content/asset-urls.js +92 -0
  84. package/dist/content/asset-urls.js.map +1 -1
  85. package/dist/content/assets.d.ts +15 -0
  86. package/dist/content/assets.d.ts.map +1 -1
  87. package/dist/content/assets.js +15 -0
  88. package/dist/content/assets.js.map +1 -1
  89. package/dist/content/collection-pages.d.ts +5 -0
  90. package/dist/content/collection-pages.d.ts.map +1 -1
  91. package/dist/content/collection-pages.js +8 -0
  92. package/dist/content/collection-pages.js.map +1 -1
  93. package/dist/content/collections.d.ts +14 -0
  94. package/dist/content/collections.d.ts.map +1 -1
  95. package/dist/content/collections.js +16 -0
  96. package/dist/content/collections.js.map +1 -1
  97. package/dist/content/filtered-products.d.ts +18 -0
  98. package/dist/content/filtered-products.d.ts.map +1 -1
  99. package/dist/content/filtered-products.js +16 -0
  100. package/dist/content/filtered-products.js.map +1 -1
  101. package/dist/content/form-field-types.d.ts +6 -0
  102. package/dist/content/form-field-types.d.ts.map +1 -1
  103. package/dist/content/form-field-types.js +12 -0
  104. package/dist/content/form-field-types.js.map +1 -1
  105. package/dist/content/forms.d.ts +16 -0
  106. package/dist/content/forms.d.ts.map +1 -1
  107. package/dist/content/forms.js +23 -0
  108. package/dist/content/forms.js.map +1 -1
  109. package/dist/content/items.d.ts +26 -0
  110. package/dist/content/items.d.ts.map +1 -1
  111. package/dist/content/items.js +33 -0
  112. package/dist/content/items.js.map +1 -1
  113. package/dist/content/resolve.js +6 -0
  114. package/dist/content/resolve.js.map +1 -1
  115. package/dist/content/sitemap.d.ts +5 -0
  116. package/dist/content/sitemap.d.ts.map +1 -1
  117. package/dist/content/sitemap.js +5 -0
  118. package/dist/content/sitemap.js.map +1 -1
  119. package/dist/core/context.js +6 -0
  120. package/dist/core/context.js.map +1 -1
  121. package/dist/core/headers.js +2 -0
  122. package/dist/core/headers.js.map +1 -1
  123. package/dist/core/http.d.ts +8 -0
  124. package/dist/core/http.d.ts.map +1 -1
  125. package/dist/core/http.js +89 -1
  126. package/dist/core/http.js.map +1 -1
  127. package/dist/credit/credit-status.js +2 -2
  128. package/dist/credit/credit-status.js.map +1 -1
  129. package/dist/credit/payment-terms.js +2 -2
  130. package/dist/credit/payment-terms.js.map +1 -1
  131. package/dist/currency/exchange.d.ts +11 -0
  132. package/dist/currency/exchange.d.ts.map +1 -1
  133. package/dist/currency/exchange.js +11 -0
  134. package/dist/currency/exchange.js.map +1 -1
  135. package/dist/errors.d.ts +50 -2
  136. package/dist/errors.d.ts.map +1 -1
  137. package/dist/errors.js +50 -3
  138. package/dist/errors.js.map +1 -1
  139. package/dist/events/envelope.d.ts +36 -0
  140. package/dist/events/envelope.d.ts.map +1 -1
  141. package/dist/events/envelope.js +12 -0
  142. package/dist/events/envelope.js.map +1 -1
  143. package/dist/events/index.d.ts +13 -0
  144. package/dist/events/index.d.ts.map +1 -1
  145. package/dist/events/index.js +13 -0
  146. package/dist/events/index.js.map +1 -1
  147. package/dist/events/payloads.d.ts +19 -0
  148. package/dist/events/payloads.d.ts.map +1 -1
  149. package/dist/events/payloads.js +12 -0
  150. package/dist/events/payloads.js.map +1 -1
  151. package/dist/index.d.ts +8 -1
  152. package/dist/index.d.ts.map +1 -1
  153. package/dist/index.js +7 -0
  154. package/dist/index.js.map +1 -1
  155. package/dist/media/index.js +2 -0
  156. package/dist/media/index.js.map +1 -1
  157. package/dist/media/urls.d.ts +52 -0
  158. package/dist/media/urls.d.ts.map +1 -1
  159. package/dist/media/urls.js +38 -0
  160. package/dist/media/urls.js.map +1 -1
  161. package/dist/media/video.d.ts +16 -0
  162. package/dist/media/video.d.ts.map +1 -1
  163. package/dist/media/video.js +16 -0
  164. package/dist/media/video.js.map +1 -1
  165. package/dist/next/artifact-handler.d.ts +22 -0
  166. package/dist/next/artifact-handler.d.ts.map +1 -1
  167. package/dist/next/artifact-handler.js +22 -0
  168. package/dist/next/artifact-handler.js.map +1 -1
  169. package/dist/next/event-revalidate-handler.d.ts +67 -0
  170. package/dist/next/event-revalidate-handler.d.ts.map +1 -1
  171. package/dist/next/event-revalidate-handler.js +48 -0
  172. package/dist/next/event-revalidate-handler.js.map +1 -1
  173. package/dist/next/index.d.ts +6 -0
  174. package/dist/next/index.d.ts.map +1 -1
  175. package/dist/next/index.js +6 -0
  176. package/dist/next/index.js.map +1 -1
  177. package/dist/next/json-ld.d.ts +9 -0
  178. package/dist/next/json-ld.d.ts.map +1 -1
  179. package/dist/next/json-ld.js +9 -0
  180. package/dist/next/json-ld.js.map +1 -1
  181. package/dist/next/metadata.d.ts +18 -0
  182. package/dist/next/metadata.d.ts.map +1 -1
  183. package/dist/next/metadata.js +21 -0
  184. package/dist/next/metadata.js.map +1 -1
  185. package/dist/next/redirect-middleware.d.ts +39 -0
  186. package/dist/next/redirect-middleware.d.ts.map +1 -1
  187. package/dist/next/redirect-middleware.js +32 -0
  188. package/dist/next/redirect-middleware.js.map +1 -1
  189. package/dist/next/revalidate-handler.d.ts +30 -0
  190. package/dist/next/revalidate-handler.d.ts.map +1 -1
  191. package/dist/next/revalidate-handler.js +22 -0
  192. package/dist/next/revalidate-handler.js.map +1 -1
  193. package/dist/order-scope.d.ts +27 -0
  194. package/dist/order-scope.d.ts.map +1 -1
  195. package/dist/order-scope.js +29 -0
  196. package/dist/order-scope.js.map +1 -1
  197. package/dist/pricing/format.d.ts +17 -0
  198. package/dist/pricing/format.d.ts.map +1 -1
  199. package/dist/pricing/format.js +19 -0
  200. package/dist/pricing/format.js.map +1 -1
  201. package/dist/pricing/index.d.ts +8 -1
  202. package/dist/pricing/index.d.ts.map +1 -1
  203. package/dist/pricing/index.js +18 -2
  204. package/dist/pricing/index.js.map +1 -1
  205. package/dist/pricing/tax-display.d.ts +77 -0
  206. package/dist/pricing/tax-display.d.ts.map +1 -1
  207. package/dist/pricing/tax-display.js +85 -0
  208. package/dist/pricing/tax-display.js.map +1 -1
  209. package/dist/pricing/tiers.d.ts +9 -0
  210. package/dist/pricing/tiers.d.ts.map +1 -1
  211. package/dist/pricing/tiers.js +9 -0
  212. package/dist/pricing/tiers.js.map +1 -1
  213. package/dist/pricing/validation.d.ts +56 -1
  214. package/dist/pricing/validation.d.ts.map +1 -1
  215. package/dist/pricing/validation.js +61 -0
  216. package/dist/pricing/validation.js.map +1 -1
  217. package/dist/redirects/index.d.ts +1 -0
  218. package/dist/redirects/index.d.ts.map +1 -1
  219. package/dist/redirects/index.js +1 -0
  220. package/dist/redirects/index.js.map +1 -1
  221. package/dist/redirects/store.d.ts +20 -0
  222. package/dist/redirects/store.d.ts.map +1 -1
  223. package/dist/redirects/store.js +57 -0
  224. package/dist/redirects/store.js.map +1 -1
  225. package/dist/redirects/types.d.ts +24 -0
  226. package/dist/redirects/types.d.ts.map +1 -1
  227. package/dist/redirects/types.js +1 -0
  228. package/dist/redirects/types.js.map +1 -1
  229. package/dist/revalidation/event-plan.d.ts +48 -0
  230. package/dist/revalidation/event-plan.d.ts.map +1 -1
  231. package/dist/revalidation/event-plan.js +61 -0
  232. package/dist/revalidation/event-plan.js.map +1 -1
  233. package/dist/revalidation/event-verify.d.ts +25 -0
  234. package/dist/revalidation/event-verify.d.ts.map +1 -1
  235. package/dist/revalidation/event-verify.js +27 -0
  236. package/dist/revalidation/event-verify.js.map +1 -1
  237. package/dist/revalidation/types.d.ts +20 -0
  238. package/dist/revalidation/types.d.ts.map +1 -1
  239. package/dist/revalidation/types.js +10 -0
  240. package/dist/revalidation/types.js.map +1 -1
  241. package/dist/revalidation/url-context.d.ts +25 -0
  242. package/dist/revalidation/url-context.d.ts.map +1 -1
  243. package/dist/revalidation/url-context.js +17 -0
  244. package/dist/revalidation/url-context.js.map +1 -1
  245. package/dist/revalidation/verify.d.ts +8 -0
  246. package/dist/revalidation/verify.d.ts.map +1 -1
  247. package/dist/revalidation/verify.js +8 -0
  248. package/dist/revalidation/verify.js.map +1 -1
  249. package/dist/seo/ai.d.ts +17 -0
  250. package/dist/seo/ai.d.ts.map +1 -1
  251. package/dist/seo/ai.js +12 -0
  252. package/dist/seo/ai.js.map +1 -1
  253. package/dist/seo/alternates.js +13 -0
  254. package/dist/seo/alternates.js.map +1 -1
  255. package/dist/seo/artifacts.d.ts +13 -0
  256. package/dist/seo/artifacts.d.ts.map +1 -1
  257. package/dist/seo/artifacts.js +19 -0
  258. package/dist/seo/artifacts.js.map +1 -1
  259. package/dist/seo/canonical.d.ts +15 -0
  260. package/dist/seo/canonical.d.ts.map +1 -1
  261. package/dist/seo/canonical.js +24 -0
  262. package/dist/seo/canonical.js.map +1 -1
  263. package/dist/seo/index.js +6 -0
  264. package/dist/seo/index.js.map +1 -1
  265. package/dist/seo/json-ld.d.ts +13 -0
  266. package/dist/seo/json-ld.d.ts.map +1 -1
  267. package/dist/seo/json-ld.js +32 -0
  268. package/dist/seo/json-ld.js.map +1 -1
  269. package/dist/seo/locale-tag.d.ts +31 -0
  270. package/dist/seo/locale-tag.d.ts.map +1 -1
  271. package/dist/seo/locale-tag.js +31 -0
  272. package/dist/seo/locale-tag.js.map +1 -1
  273. package/dist/seo/meta-tags.d.ts +29 -0
  274. package/dist/seo/meta-tags.d.ts.map +1 -1
  275. package/dist/seo/meta-tags.js +28 -0
  276. package/dist/seo/meta-tags.js.map +1 -1
  277. package/dist/seo/metadata-parser.d.ts +24 -0
  278. package/dist/seo/metadata-parser.d.ts.map +1 -1
  279. package/dist/seo/metadata-parser.js +38 -0
  280. package/dist/seo/metadata-parser.js.map +1 -1
  281. package/dist/seo/metadata-types.d.ts +16 -0
  282. package/dist/seo/metadata-types.d.ts.map +1 -1
  283. package/dist/seo/product-path.d.ts +96 -0
  284. package/dist/seo/product-path.d.ts.map +1 -1
  285. package/dist/seo/product-path.js +96 -0
  286. package/dist/seo/product-path.js.map +1 -1
  287. package/dist/seo/robots.d.ts +17 -0
  288. package/dist/seo/robots.d.ts.map +1 -1
  289. package/dist/seo/robots.js +12 -0
  290. package/dist/seo/robots.js.map +1 -1
  291. package/dist/seo/types.d.ts +39 -0
  292. package/dist/seo/types.d.ts.map +1 -1
  293. package/dist/seo/url-builder.d.ts +31 -0
  294. package/dist/seo/url-builder.d.ts.map +1 -1
  295. package/dist/seo/url-builder.js +36 -0
  296. package/dist/seo/url-builder.js.map +1 -1
  297. package/dist/types.d.ts +1283 -2
  298. package/dist/types.d.ts.map +1 -1
  299. package/package.json +1 -1
@@ -1,3 +1,10 @@
1
+ // --- Product Queries ---
2
+ /**
3
+ * Fragment for `Product.metadata` (vendure-plugin-product-metadata). The
4
+ * server already picks the active-language translation and composes
5
+ * `metaRobots` + `resolvedBotDirectives` — the SDK only needs to validate +
6
+ * type-narrow the JSON-scalar fields at the boundary.
7
+ */
1
8
  const PRODUCT_METADATA_FRAGMENT = `
2
9
  metadata {
3
10
  seoTitle seoDescription canonicalUrl
@@ -51,6 +58,7 @@ export const GET_PRODUCT = `
51
58
  price priceWithTax currencyCode stockLevel
52
59
  stockOnHand stockAllocated saleable
53
60
  incomingStock projectedSaleable nextExpectedArrival
61
+ backorderAllowance
54
62
  priceListName retailPrice retailPriceWithTax taxRateApplied { value }
55
63
  priceTiers { minQuantity price priceWithTax discountLabel }
56
64
  availabilityByLocation { locationId locationName inStock }
@@ -109,6 +117,7 @@ export const GET_PRODUCT_BY_ID = `
109
117
  price priceWithTax currencyCode stockLevel
110
118
  stockOnHand stockAllocated saleable
111
119
  incomingStock projectedSaleable nextExpectedArrival
120
+ backorderAllowance
112
121
  priceListName retailPrice retailPriceWithTax taxRateApplied { value }
113
122
  priceTiers { minQuantity price priceWithTax discountLabel }
114
123
  availabilityByLocation { locationId locationName inStock }
@@ -156,6 +165,7 @@ export const LIST_PRODUCTS = `
156
165
  price priceWithTax currencyCode stockLevel
157
166
  stockOnHand stockAllocated saleable
158
167
  incomingStock projectedSaleable nextExpectedArrival
168
+ backorderAllowance
159
169
  priceListName retailPrice retailPriceWithTax taxRateApplied { value }
160
170
  priceTiers { minQuantity price priceWithTax discountLabel }
161
171
  availabilityByLocation { locationId locationName inStock }
@@ -174,6 +184,86 @@ export const LIST_PRODUCTS = `
174
184
  }
175
185
  }
176
186
  `;
187
+ /**
188
+ * The card selection: what a product GRID tile renders, and nothing else.
189
+ *
190
+ * `LIST_PRODUCTS` above asks for detail-page data on every row. The costly part
191
+ * is NOT the byte count — it is the per-product and per-VARIANT field resolvers
192
+ * behind it, which turn one listing request into four figures of SQL statements.
193
+ *
194
+ * Dropped here, and why each is safe for a tile:
195
+ * - `availabilityByLocation` — one `stock_level` query PER VARIANT
196
+ * (vendure-plugin-stock-transfer); per-warehouse availability is a
197
+ * detail-page concern.
198
+ * - `stockOnHand` / `stockAllocated` — raw operational numbers a tile never
199
+ * shows, and another read per variant.
200
+ * - `incomingStock` / `projectedSaleable` / `nextExpectedArrival` — restock
201
+ * data, gated to B2B customer groups and only rendered on a detail page.
202
+ * - `description`, including the per-language copy inside `translations` —
203
+ * the single biggest contributor to the payload, and nothing a tile shows.
204
+ *
205
+ * KEPT, each for a concrete reason — do not "tidy" these away:
206
+ * - `saleable` + `backorderAllowance` + `enabled` — storefronts gate
207
+ * orderability on `saleable == null || saleable > 0 || backorderAllowance > 0`;
208
+ * dropping them changes which products look buyable. `backorderAllowance`
209
+ * is not free on a tenant that enabled backorders: for a signed-in buyer
210
+ * whose group may backorder, an `incoming` or `limited` variant costs an
211
+ * incoming-stock read and a ledger read per variant (a `deny` variant —
212
+ * the default everywhere — and an anonymous visitor cost neither). A grid
213
+ * that must not label a backorderable SKU "out of stock" pays that either
214
+ * way: asking for it in a second document would cost the same.
215
+ * - The whole `collections { … parent … translations … customFields }` block
216
+ * and `translations { languageCode name slug }` — `pickCanonicalRoot` /
217
+ * `isUserFacingRoot` (src/seo) derive a product's canonical URL from
218
+ * `customFields.isCanonical` + `parent.slug` + `position`, and its localized
219
+ * slug from the translations. A card row still satisfies `ProductForSeo`
220
+ * structurally, so omitting these does not fail to compile — it silently
221
+ * hands every product the FLAT path. Note these cost bytes, not queries:
222
+ * Vendure resolves `Product.collections` in one query per product whichever
223
+ * subfields are asked for.
224
+ * - `priceTiers` — the SDK's own `getPriceDisplay()` reads
225
+ * `variant.priceTiers?.length ? … : null`, so an ABSENT ladder is
226
+ * indistinguishable from "this variant has no tiers": a tile would quietly
227
+ * show the base price while the detail page and the cart show the tier
228
+ * price. It is also free of DB cost — the price-list plugin resolves tiers
229
+ * from an in-memory map filled during price application, not a query.
230
+ * - `sku`, `priceListName`, `retailPrice(WithTax)`, variant `customFields`
231
+ * (purchase constraints shown as "per 6") and `facetValues` (tiles derive
232
+ * producer/vintage/volume and filter tags from them).
233
+ *
234
+ * Reached with `getProducts(..., { detail: 'card' })`. The default stays
235
+ * `LIST_PRODUCTS`, so no existing caller changes behaviour.
236
+ */
237
+ export const LIST_PRODUCT_CARDS = `
238
+ query ListProductCards($options: ProductListOptions) {
239
+ products(options: $options) {
240
+ items {
241
+ id name slug enabled
242
+ featuredAsset {
243
+ source name width height
244
+ customFields { altText }
245
+ presets { xs { url webpUrl } m { url webpUrl } l { url webpUrl } }
246
+ }
247
+ variants {
248
+ id name sku
249
+ price priceWithTax currencyCode stockLevel saleable backorderAllowance
250
+ priceListName retailPrice retailPriceWithTax taxRateApplied { value }
251
+ priceTiers { minQuantity price priceWithTax discountLabel }
252
+ customFields { minOrderQuantity salesUnit position }
253
+ }
254
+ facetValues { id name code facet { id name code } }
255
+ translations { languageCode name slug }
256
+ collections {
257
+ id name slug position
258
+ parent { id slug }
259
+ translations { languageCode name slug }
260
+ customFields { isRoutable isCanonical }
261
+ }
262
+ }
263
+ totalItems
264
+ }
265
+ }
266
+ `;
177
267
  export const LIST_FACETS = `
178
268
  query ListFacets {
179
269
  facets {
@@ -185,6 +275,7 @@ export const LIST_FACETS = `
185
275
  }
186
276
  }
187
277
  `;
278
+ // --- Collection Queries ---
188
279
  export const LIST_COLLECTIONS = `
189
280
  query ListCollections($options: CollectionListOptions) {
190
281
  collections(options: $options) {
@@ -202,6 +293,7 @@ export const LIST_COLLECTIONS = `
202
293
  }
203
294
  }
204
295
  `;
296
+ /** The collection-detail selection, shared by the slug and the id lookup. */
205
297
  const COLLECTION_DETAIL_FIELDS = `
206
298
  id name slug description position
207
299
  featuredAsset {
@@ -244,6 +336,7 @@ const COLLECTION_DETAIL_FIELDS = `
244
336
  price priceWithTax currencyCode stockLevel
245
337
  stockOnHand stockAllocated saleable
246
338
  incomingStock projectedSaleable nextExpectedArrival
339
+ backorderAllowance
247
340
  priceListName retailPrice retailPriceWithTax taxRateApplied { value }
248
341
  priceTiers { minQuantity price priceWithTax discountLabel }
249
342
  availabilityByLocation { locationId locationName inStock }
@@ -262,6 +355,7 @@ export const GET_COLLECTION_BY_ID = `
262
355
  collection(id: $id) {${COLLECTION_DETAIL_FIELDS} }
263
356
  }
264
357
  `;
358
+ // --- Search Query ---
265
359
  export const SEARCH_PRODUCTS = `
266
360
  query SearchProducts($input: SearchInput!) {
267
361
  search(input: $input) {
@@ -279,6 +373,10 @@ export const SEARCH_PRODUCTS = `
279
373
  }
280
374
  }
281
375
  `;
376
+ // --- Cart Mutations ---
377
+ // Shared selection set for full Order objects. Used by ACTIVE_ORDER, ADD_TO_CART,
378
+ // ADJUST_ORDER_LINE, REMOVE_ORDER_LINE, APPLY_COUPON, REMOVE_COUPON, ORDER_BY_CODE.
379
+ // Keep in one place so adding fields (e.g. discounts) lands everywhere consistently.
282
380
  const ORDER_FIELDS = `
283
381
  id code state active
284
382
  createdAt orderPlacedAt
@@ -294,7 +392,7 @@ const ORDER_FIELDS = `
294
392
  discountedLinePrice discountedLinePriceWithTax
295
393
  discounts { adjustmentSource type description amount amountWithTax }
296
394
  productVariant {
297
- id name sku
395
+ id name sku saleable
298
396
  product { id name slug }
299
397
  options { id name group { name } }
300
398
  }
@@ -310,6 +408,19 @@ const ORDER_FIELDS = `
310
408
  customer { id firstName lastName emailAddress }
311
409
  couponCodes
312
410
  `;
411
+ /**
412
+ * Fulfillment/tracking selection for placed orders. Kept out of ORDER_FIELDS
413
+ * so cart mutations don't pay for it — active carts have no fulfillments.
414
+ * `trackingCode` feeds `trackShipment(barcode, postalCode)`.
415
+ *
416
+ * `externalShipments` is the carrier-agnostic list pushed by an external
417
+ * fulfilment system, and is the right thing to render for tracking: one
418
+ * fulfilment can cover SEVERAL parcels, which a single `trackingCode` cannot
419
+ * express. Render `reference` as a link when `isLink` is true and as a text block
420
+ * otherwise — a pallet carrier's reference or ex-works pickup instructions are
421
+ * prose, not URLs. The flag is derived server-side so the storefront never has
422
+ * to guess.
423
+ */
313
424
  const ORDER_FULFILLMENTS_FRAGMENT = `
314
425
  fulfillments {
315
426
  id state method trackingCode createdAt updatedAt
@@ -319,6 +430,7 @@ const ORDER_FULFILLMENTS_FRAGMENT = `
319
430
  carrier reference isLink shippedAt deliveryNumber
320
431
  }
321
432
  `;
433
+ /** Immutable payment condition captured when a placed order was accepted. */
322
434
  const ORDER_PAYMENT_TERMS_FRAGMENT = `
323
435
  paymentTerms {
324
436
  source managedExternally status
@@ -329,6 +441,7 @@ const ORDER_PAYMENT_TERMS_FRAGMENT = `
329
441
  resolvedAt remoteConditionCode remoteConfirmedAt remoteMismatch
330
442
  }
331
443
  `;
444
+ /** Immutable delivery terms captured when a placed order was accepted. */
332
445
  const ORDER_DELIVERY_TERMS_FRAGMENT = `
333
446
  deliveryTerms {
334
447
  source managedExternally status shippingMethodStatus policyStatus summary selectionSource
@@ -343,6 +456,12 @@ const ORDER_DELIVERY_TERMS_FRAGMENT = `
343
456
  remoteConfirmedAt remoteMismatch
344
457
  }
345
458
  `;
459
+ /**
460
+ * Order-history list-item selection (customer order history). Enriched beyond a
461
+ * bare line count so a storefront can render thumbnails + per-line totals
462
+ * without a follow-up fetch. Shared by GET_CURRENT_CUSTOMER and
463
+ * GET_CUSTOMER_ORDERS — both map to OrderSummary.
464
+ */
346
465
  const ORDER_SUMMARY_FIELDS = `
347
466
  id code state total totalWithTax currencyCode createdAt
348
467
  lines {
@@ -356,6 +475,16 @@ const ORDER_SUMMARY_FIELDS = `
356
475
  ${ORDER_PAYMENT_TERMS_FRAGMENT}
357
476
  ${ORDER_DELIVERY_TERMS_FRAGMENT}
358
477
  `;
478
+ /**
479
+ * The structured half of a placement rejection, selected wherever the Shop API
480
+ * can answer one.
481
+ *
482
+ * Storefronts used to keyword-match `transitionError` — operator English that
483
+ * is re-worded per merchant and translated. `code` is the stable thing to
484
+ * branch on and `customerMessage` is safe to render as-is; the metadata fields
485
+ * are populated per code and null otherwise, so selecting all of them costs
486
+ * one flat response object and saves a second round of documents per feature.
487
+ */
359
488
  const PLACEMENT_FIELDS = `
360
489
  code
361
490
  customerMessage
@@ -378,6 +507,15 @@ const PLACEMENT_FIELDS = `
378
507
  }
379
508
  details { field code message }
380
509
  `;
510
+ /**
511
+ * WHICH line an `InsufficientStockError` is about.
512
+ *
513
+ * Core answers `quantityAvailable` and the whole order, which is not enough to
514
+ * mark a row: with several lines in flight the shopper is told "not enough
515
+ * stock" about nothing in particular. Every field is nullable and best-effort
516
+ * — an error raised outside the overridden cart mutations answers null to all
517
+ * of them. `inputIndex` is only ever non-null inside `addItemsToOrder`.
518
+ */
381
519
  const INSUFFICIENT_STOCK_FIELDS = `
382
520
  errorCode message quantityAvailable
383
521
  productVariantId orderLineId sku productName productVariantName
@@ -441,6 +579,11 @@ export const REMOVE_ALL_ORDER_LINES = `
441
579
  }
442
580
  }
443
581
  `;
582
+ /**
583
+ * Bulk add (favourite-box bundles). `addItemsToOrder` returns
584
+ * UpdateMultipleOrderItemsResult: a single resulting Order plus a per-input
585
+ * `errorResults` list — partial success is possible, so surface both.
586
+ */
444
587
  export const ADD_ITEMS_TO_CART = `
445
588
  mutation AddItemsToCart($inputs: [AddItemInput!]!) {
446
589
  addItemsToOrder(inputs: $inputs) {
@@ -455,6 +598,7 @@ export const ADD_ITEMS_TO_CART = `
455
598
  }
456
599
  }
457
600
  `;
601
+ // --- Checkout Mutations ---
458
602
  export const SET_CUSTOMER = `
459
603
  mutation SetCustomer($input: CreateCustomerInput!) {
460
604
  setCustomerForOrder(input: $input) {
@@ -539,6 +683,23 @@ export const TRANSITION_TO_ARRANGING_PAYMENT = `
539
683
  }
540
684
  }
541
685
  `;
686
+ /**
687
+ * Record how the buyer intends to pay AND re-price the order in one round trip.
688
+ *
689
+ * The re-price is the reason this is a mutation of its own rather than a
690
+ * `setOrderCustomFields` call: the engine only applies promotions that key on
691
+ * the intent when the order is recalculated, and `setOrderCustomFields` does not
692
+ * recalculate. The returned Order is therefore already the one to render —
693
+ * `discounts`, `promotions` and `totalWithTax` include (or no longer include)
694
+ * the pay-now discount.
695
+ *
696
+ * `customFields { paymentIntent }` is selected HERE and nowhere else, and that
697
+ * is deliberate. Putting it in the shared `ORDER_FIELDS` would make every order
698
+ * query and cart mutation in this client fail GraphQL validation against an
699
+ * engine that predates the field — one missing feature would take the whole cart
700
+ * down. Confined to this document, only the call that needs the field is
701
+ * coupled to an engine that has it.
702
+ */
542
703
  export const SET_PAYMENT_INTENT = `
543
704
  mutation SetOrderPaymentIntent($intent: OrderPaymentIntent!) {
544
705
  setOrderPaymentIntent(intent: $intent) {
@@ -576,6 +737,7 @@ export const ADD_PAYMENT = `
576
737
  }
577
738
  }
578
739
  `;
740
+ // --- Carrier-agnostic pickup locations (vendure-plugin-myparcel Phase 6) ---
579
741
  const PICKUP_LOCATION_FIELDS = `
580
742
  provider
581
743
  carrier
@@ -624,11 +786,13 @@ export const SET_ACTIVE_ORDER_PICKUP_LOCATION = `
624
786
  }
625
787
  }
626
788
  `;
789
+ // --- Stripe (@vendure-community/stripe-plugin) ---
627
790
  export const CREATE_STRIPE_PAYMENT_INTENT = `
628
791
  mutation CreateStripePaymentIntent {
629
792
  createStripePaymentIntent
630
793
  }
631
794
  `;
795
+ // --- Mollie (@vendure-community/mollie-plugin) ---
632
796
  export const MOLLIE_PAYMENT_METHODS = `
633
797
  query MolliePaymentMethods($input: MolliePaymentMethodsInput!) {
634
798
  molliePaymentMethods(input: $input) {
@@ -670,6 +834,7 @@ export const SYNC_MOLLIE_PAYMENT_STATUS = `
670
834
  }
671
835
  }
672
836
  `;
837
+ // --- Customer Queries/Mutations ---
673
838
  export const LOGIN = `
674
839
  mutation Login($email: String!, $password: String!) {
675
840
  login(username: $email, password: $password) {
@@ -721,6 +886,7 @@ export const GET_CUSTOMER_ORDERS = `
721
886
  orders(options: $options) {
722
887
  items {
723
888
  ${ORDER_SUMMARY_FIELDS}
889
+ lines { id backorderedQuantity }
724
890
  }
725
891
  totalItems
726
892
  }
@@ -732,6 +898,7 @@ export const LOGOUT = `
732
898
  logout { success }
733
899
  }
734
900
  `;
901
+ // --- Customer Account Management ---
735
902
  export const UPDATE_CUSTOMER = `
736
903
  mutation UpdateCustomer($input: UpdateCustomerInput!) {
737
904
  updateCustomer(input: $input) {
@@ -808,6 +975,8 @@ export const REQUEST_EMAIL_UPDATE = `
808
975
  ... on InvalidCredentialsError { errorCode message }
809
976
  ... on EmailAddressConflictError { errorCode message }
810
977
  ... on NativeAuthStrategyError { errorCode message }
978
+ ... on EmailChangeRateLimitedError { errorCode message retryAfterSeconds }
979
+ ... on ErrorResult { errorCode message }
811
980
  }
812
981
  }
813
982
  `;
@@ -842,6 +1011,7 @@ export const REFRESH_VERIFICATION = `
842
1011
  }
843
1012
  }
844
1013
  `;
1014
+ // --- Address Management ---
845
1015
  export const CREATE_ADDRESS = `
846
1016
  mutation CreateAddress($input: CreateAddressInput!) {
847
1017
  createCustomerAddress(input: $input) {
@@ -867,6 +1037,7 @@ export const DELETE_ADDRESS = `
867
1037
  }
868
1038
  }
869
1039
  `;
1040
+ // --- Utility Queries ---
870
1041
  export const AVAILABLE_COUNTRIES = `
871
1042
  query AvailableCountries {
872
1043
  availableCountries {
@@ -874,16 +1045,27 @@ export const AVAILABLE_COUNTRIES = `
874
1045
  }
875
1046
  }
876
1047
  `;
1048
+ /**
1049
+ * `lines { backorderedQuantity }` is selected HERE and on `GET_CUSTOMER_ORDERS`,
1050
+ * and nowhere else — the same rule `customFields { paymentIntent }` follows
1051
+ * below. In the shared `ORDER_FIELDS` fragment it would make every cart read
1052
+ * and mutation fail validation against an engine that predates the backorders
1053
+ * plugin, taking the whole cart down for a field a cart line never carries a
1054
+ * value for (the stamp is written at placement). GraphQL merges this `lines`
1055
+ * selection with the fragment's, so the line still comes back whole.
1056
+ */
877
1057
  export const ORDER_BY_CODE = `
878
1058
  query OrderByCode($code: String!) {
879
1059
  orderByCode(code: $code) {
880
1060
  ${ORDER_FIELDS}
1061
+ lines { id backorderedQuantity }
881
1062
  ${ORDER_FULFILLMENTS_FRAGMENT}
882
1063
  ${ORDER_PAYMENT_TERMS_FRAGMENT}
883
1064
  ${ORDER_DELIVERY_TERMS_FRAGMENT}
884
1065
  }
885
1066
  }
886
1067
  `;
1068
+ // --- Favorites ---
887
1069
  export const FAVORITE_VARIANT_IDS = `
888
1070
  query FavoriteVariantIds {
889
1071
  favoriteProductVariantIds
@@ -901,6 +1083,7 @@ export const MY_FAVORITES = `
901
1083
  price priceWithTax currencyCode stockLevel
902
1084
  stockOnHand stockAllocated saleable
903
1085
  incomingStock projectedSaleable nextExpectedArrival
1086
+ backorderAllowance
904
1087
  priceListName retailPrice retailPriceWithTax taxRateApplied { value }
905
1088
  priceTiers { minQuantity price priceWithTax discountLabel }
906
1089
  availabilityByLocation { locationId locationName inStock }
@@ -930,6 +1113,13 @@ export const REMOVE_FAVORITE = `
930
1113
  removeFavorite(productVariantId: $productVariantId)
931
1114
  }
932
1115
  `;
1116
+ /**
1117
+ * Storefront-visible Channel customFields. Vendure's `ChannelCustomFields`
1118
+ * GraphQL type requires a sub-selection — querying `customFields` without
1119
+ * one returns 400. Keep this list aligned with `ChannelCustomFields`
1120
+ * in types.ts and the `public: true` Channel customFields configured on
1121
+ * the Vendure side.
1122
+ */
933
1123
  const CHANNEL_CUSTOM_FIELDS_FRAGMENT = `
934
1124
  customFields {
935
1125
  businessName businessDescription
@@ -960,6 +1150,7 @@ export const GET_ACTIVE_CHANNEL = `
960
1150
  }
961
1151
  }
962
1152
  `;
1153
+ // --- Product Properties ---
963
1154
  export const PROPERTY_GROUPS = `
964
1155
  query PropertyGroups {
965
1156
  productPropertyGroups {
@@ -993,6 +1184,7 @@ export const PRODUCT_PROPERTIES = `
993
1184
  }
994
1185
  }
995
1186
  `;
1187
+ // --- Product Recommendations ---
996
1188
  export const GET_PRODUCT_RECOMMENDATIONS = `
997
1189
  query ProductRecommendations($productId: ID!, $groupSlug: String) {
998
1190
  productRecommendations(productId: $productId, groupSlug: $groupSlug) {
@@ -1010,6 +1202,7 @@ export const GET_PRODUCT_RECOMMENDATIONS = `
1010
1202
  price priceWithTax currencyCode stockLevel
1011
1203
  stockOnHand stockAllocated saleable
1012
1204
  incomingStock projectedSaleable nextExpectedArrival
1205
+ backorderAllowance
1013
1206
  priceListName retailPrice retailPriceWithTax taxRateApplied { value }
1014
1207
  priceTiers { minQuantity price priceWithTax discountLabel }
1015
1208
  availabilityByLocation { locationId locationName inStock }
@@ -1019,6 +1212,7 @@ export const GET_PRODUCT_RECOMMENDATIONS = `
1019
1212
  }
1020
1213
  }
1021
1214
  `;
1215
+ // --- Exchange Rates ---
1022
1216
  export const GET_EXCHANGE_RATES = `
1023
1217
  query ExchangeRates {
1024
1218
  exchangeRates {
@@ -1026,6 +1220,7 @@ export const GET_EXCHANGE_RATES = `
1026
1220
  }
1027
1221
  }
1028
1222
  `;
1223
+ // Shared selection for the exchange-rates plugin's ConvertedAmount type.
1029
1224
  const CONVERTED_AMOUNT_FIELDS = `
1030
1225
  originalAmount originalCurrency convertedAmount targetCurrency rate rateDate
1031
1226
  `;
@@ -1064,6 +1259,16 @@ export const CONVERT_TO_MULTIPLE = `
1064
1259
  }
1065
1260
  }
1066
1261
  `;
1262
+ // --- B2B Quotes ---
1263
+ /**
1264
+ * Per-line tax + product identity. These fields reach the Shop API with the
1265
+ * `vendure-plugin-quotes` release that introduced them, and the SDK can be
1266
+ * upgraded before a tenant's Vendure is: an older server rejects the WHOLE
1267
+ * document at validation ("Cannot query field ..."), taking the quote page
1268
+ * down rather than dropping a column. So every quote document has a legacy
1269
+ * twin without them, and `createQuotesMethods` retries with it once — see
1270
+ * the fallback there. Keep the twins identical apart from this line.
1271
+ */
1067
1272
  const QUOTE_LINE_TAX_FIELDS = 'productName sku taxRate unitPriceWithTax lineTotal lineTotalWithTax';
1068
1273
  const quoteFields = (lineTaxFields) => `
1069
1274
  id code channelId customerId currencyCode status
@@ -1113,6 +1318,11 @@ export const ACCEPT_QUOTE = `
1113
1318
  `;
1114
1319
  export const CANCEL_MY_QUOTE = cancelMyQuoteDocument(QUOTE_FIELDS);
1115
1320
  export const CANCEL_MY_QUOTE_LEGACY = cancelMyQuoteDocument(QUOTE_FIELDS_LEGACY);
1321
+ /**
1322
+ * Single-roundtrip branding query. activeChannel + fontResources (with
1323
+ * resolved file Assets) + brandingAssets for the channel-level logo, favicon,
1324
+ * and cover IDs already on ctx.channel.customFields.
1325
+ */
1116
1326
  export const GET_BRANDING = `
1117
1327
  query GetBranding($ids: [ID!]!) {
1118
1328
  activeChannel {
@@ -1142,6 +1352,7 @@ export const GET_BRANDING = `
1142
1352
  }
1143
1353
  }
1144
1354
  `;
1355
+ // --- Order constraints (inline order-constraints plugin) ---
1145
1356
  export const ACTIVE_CHANNEL_ORDER_CONSTRAINTS = `
1146
1357
  query ActiveChannelOrderConstraints {
1147
1358
  activeChannelOrderConstraints {
@@ -1154,6 +1365,7 @@ export const ACTIVE_CHANNEL_ORDER_CONSTRAINTS = `
1154
1365
  }
1155
1366
  }
1156
1367
  `;
1368
+ // --- Customer invoices (vendure-plugin-order-documents shop surface) ---
1157
1369
  export const MY_ORDER_INVOICES = `
1158
1370
  query MyOrderInvoices($orderCode: String!) {
1159
1371
  myOrderInvoices(orderCode: $orderCode) {
@@ -1168,6 +1380,12 @@ export const MY_INVOICE_PDF = `
1168
1380
  }
1169
1381
  }
1170
1382
  `;
1383
+ // --- Order returns (vendure-plugin-returns shop surface) ---
1384
+ /**
1385
+ * Shared selection set for customer-facing OrderReturn objects. The Shop API
1386
+ * never exposes the admin-only fields (`adminNote`, `history`) — do not add
1387
+ * them here. Money values are Int minor units.
1388
+ */
1171
1389
  const RETURN_FIELDS = `
1172
1390
  id code state
1173
1391
  orderId orderCode currencyCode
@@ -1 +1 @@
1
- {"version":3,"file":"queries.js","sourceRoot":"","sources":["../../src/commerce/queries.ts"],"names":[],"mappings":"AAQA,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAsDnB,yBAAyB;;;CAGhC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAsDzB,yBAAyB;;;CAGhC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC5B,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;CAU1B,CAAC;AAIF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;CAgB/B,CAAC;AAGF,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDhC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;+BAEC,wBAAwB;;CAEtD,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG;;2BAET,wBAAwB;;CAElD,CAAC;AAIF,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;CAgB9B,CAAC;AAOF,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BpB,CAAC;AAeF,MAAM,2BAA2B,GAAG;;;;;;;;CAQnC,CAAC;AAGF,MAAM,4BAA4B,GAAG;;;;;;;;;CASpC,CAAC;AA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;;;;;;;;;;;CAarB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;;;gBAGV,aAAa;;;;CAI5B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;;0BAEC,aAAa;;CAEtC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;UAcpB,aAAa;;CAEtB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG;;gCAEA,aAAa;;CAE5C,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;CAWzC,CAAC"}
@@ -1,5 +1,21 @@
1
1
  import { StorefrontError } from '../errors.js';
2
2
  import { ACCEPT_QUOTE, CANCEL_MY_QUOTE, CANCEL_MY_QUOTE_LEGACY, CREATE_QUOTE_REQUEST, CREATE_QUOTE_REQUEST_LEGACY, MY_QUOTE, MY_QUOTE_LEGACY, MY_QUOTES, MY_QUOTES_LEGACY, } from './queries.js';
3
+ /**
4
+ * Whether a Shop API failure is "this Vendure does not know that field yet",
5
+ * as opposed to a transient failure that must not be papered over.
6
+ *
7
+ * Two spellings, because the message is not always preserved: graphql-js
8
+ * answers a validation rejection with HTTP 400, and the HTTP client turns any
9
+ * non-ok response into `Vendure Shop API returned 400` before it parses the
10
+ * body; when the body IS parsed, the message is graphql-js's standard
11
+ * `Cannot query field "x" on type "y"`. (Same two spellings the plugins
12
+ * service matches for its own compat fallback.)
13
+ *
14
+ * Everything else — a timeout, a 5xx from a rolling restart, a connection
15
+ * reset, a GraphQL error that is not a validation rejection — deliberately
16
+ * does NOT match: degrading on those would hide an outage behind silently
17
+ * missing fields.
18
+ */
3
19
  function isUnknownFieldRejection(error) {
4
20
  if (!(error instanceof StorefrontError))
5
21
  return false;
@@ -7,7 +23,22 @@ function isUnknownFieldRejection(error) {
7
23
  /Cannot query field/i.test(error.message));
8
24
  }
9
25
  export function createQuotesMethods(http) {
26
+ /**
27
+ * Latched once a server has proved it predates the per-line tax + identity
28
+ * fields, so the downgrade costs one rejected request per client instance
29
+ * rather than one per call. Never un-latches: a client is short-lived
30
+ * relative to a deploy, and re-probing every call would put a guaranteed
31
+ * failure in front of every quote page.
32
+ */
10
33
  let quoteFieldsUnsupported = false;
34
+ /**
35
+ * Send `document`, and if this server rejects it for selecting a field it
36
+ * does not have, send `legacyDocument` instead — the same query without the
37
+ * six per-line tax/identity fields, which then arrive `undefined`.
38
+ *
39
+ * Safe for the mutations too: a document rejected at VALIDATION never
40
+ * executed, so nothing was created twice.
41
+ */
11
42
  async function withQuoteFieldFallback(document, legacyDocument, variables) {
12
43
  if (quoteFieldsUnsupported)
13
44
  return http.graphql(legacyDocument, variables);
@@ -18,6 +49,8 @@ export function createQuotesMethods(http) {
18
49
  if (!isUnknownFieldRejection(error))
19
50
  throw error;
20
51
  const data = await http.graphql(legacyDocument, variables);
52
+ // Latch only once the legacy shape actually worked — if it fails the
53
+ // same way, the rejection was never about these fields.
21
54
  quoteFieldsUnsupported = true;
22
55
  return data;
23
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"quotes.js","sourceRoot":"","sources":["../../src/commerce/quotes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAQ/C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,2BAA2B,EAC3B,QAAQ,EACR,eAAe,EACf,SAAS,EACT,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAkBtB,SAAS,uBAAuB,CAAC,KAAc;IAC7C,IAAI,CAAC,CAAC,KAAK,YAAY,eAAe,CAAC;QAAE,OAAO,KAAK,CAAC;IACtD,OAAO,CACL,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,+BAA+B,CAAC;QACvD,qBAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAC1C,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAgB;IAQlD,IAAI,sBAAsB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AC;YACF,OAAO,IAAI,CAAC,aAAa,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import type { HttpClient } from '../core/http.js';
2
2
  import type { SavedList } from '../types.js';
3
- export declare const MY_SAVED_LISTS = "\n query MySavedLists {\n mySavedLists { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
4
- export declare const MY_SAVED_LIST = "\n query MySavedList($id: ID!) {\n mySavedList(id: $id) { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
5
- export declare const CREATE_SAVED_LIST = "\n mutation CreateSavedList($name: String!) {\n createSavedList(name: $name) { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
6
- export declare const RENAME_SAVED_LIST = "\n mutation RenameSavedList($id: ID!, $name: String!) {\n renameSavedList(id: $id, name: $name) { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
3
+ export declare const MY_SAVED_LISTS = "\n query MySavedLists {\n mySavedLists { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable backorderAllowance\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
4
+ export declare const MY_SAVED_LIST = "\n query MySavedList($id: ID!) {\n mySavedList(id: $id) { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable backorderAllowance\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
5
+ export declare const CREATE_SAVED_LIST = "\n mutation CreateSavedList($name: String!) {\n createSavedList(name: $name) { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable backorderAllowance\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
6
+ export declare const RENAME_SAVED_LIST = "\n mutation RenameSavedList($id: ID!, $name: String!) {\n renameSavedList(id: $id, name: $name) { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable backorderAllowance\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
7
7
  export declare const DELETE_SAVED_LIST = "\n mutation DeleteSavedList($id: ID!) {\n deleteSavedList(id: $id)\n }\n";
8
- export declare const ADD_ITEM_TO_SAVED_LIST = "\n mutation AddItemToSavedList($listId: ID!, $variantId: ID!, $quantity: Int!) {\n addItemToSavedList(listId: $listId, variantId: $variantId, quantity: $quantity) { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
9
- export declare const UPDATE_SAVED_LIST_ITEM = "\n mutation UpdateSavedListItem($listId: ID!, $variantId: ID!, $quantity: Int!) {\n updateSavedListItem(listId: $listId, variantId: $variantId, quantity: $quantity) { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
10
- export declare const REMOVE_ITEM_FROM_SAVED_LIST = "\n mutation RemoveItemFromSavedList($listId: ID!, $variantId: ID!) {\n removeItemFromSavedList(listId: $listId, variantId: $variantId) { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
8
+ export declare const ADD_ITEM_TO_SAVED_LIST = "\n mutation AddItemToSavedList($listId: ID!, $variantId: ID!, $quantity: Int!) {\n addItemToSavedList(listId: $listId, variantId: $variantId, quantity: $quantity) { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable backorderAllowance\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
9
+ export declare const UPDATE_SAVED_LIST_ITEM = "\n mutation UpdateSavedListItem($listId: ID!, $variantId: ID!, $quantity: Int!) {\n updateSavedListItem(listId: $listId, variantId: $variantId, quantity: $quantity) { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable backorderAllowance\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
10
+ export declare const REMOVE_ITEM_FROM_SAVED_LIST = "\n mutation RemoveItemFromSavedList($listId: ID!, $variantId: ID!) {\n removeItemFromSavedList(listId: $listId, variantId: $variantId) { \n id name createdAt updatedAt\n items {\n id productVariantId quantity position createdAt\n productVariant {\n id name sku\n price priceWithTax currencyCode stockLevel saleable backorderAllowance\n incomingStock projectedSaleable nextExpectedArrival\n priceListName retailPrice retailPriceWithTax taxRateApplied { value }\n priceTiers { minQuantity price priceWithTax discountLabel }\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n product {\n id name slug\n featuredAsset {\n source\n presets { xs { url webpUrl } }\n }\n }\n options { id name group { name } }\n customFields { minOrderQuantity salesUnit position }\n }\n }\n }\n }\n";
11
11
  export declare function createSavedListsMethods(http: HttpClient): {
12
12
  getMySavedLists(): Promise<SavedList[]>;
13
13
  getMySavedList(id: string): Promise<SavedList | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"saved-lists.d.ts","sourceRoot":"","sources":["../../src/commerce/saved-lists.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA6B7C,eAAO,MAAM,cAAc,qyBAI1B,CAAC;AAEF,eAAO,MAAM,aAAa,szBAIzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,20BAI7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,81BAI7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,kFAI7B,CAAC;AAEF,eAAO,MAAM,sBAAsB,i6BAIlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,m6BAIlC,CAAC;AAEF,eAAO,MAAM,2BAA2B,q4BAIvC,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,UAAU;uBAE3B,OAAO,CAAC,SAAS,EAAE,CAAC;uBAKpB,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;0BAK/B,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;wBAK7B,MAAM,QAAQ,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;wBAQzC,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;+BAMzC,MAAM,aACH,MAAM,YACP,MAAM,GACf,OAAO,CAAC,SAAS,CAAC;gCAUX,MAAM,aACH,MAAM,YACP,MAAM,GACf,OAAO,CAAC,SAAS,CAAC;oCASiB,MAAM,aAAa,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;EAQvF"}
1
+ {"version":3,"file":"saved-lists.d.ts","sourceRoot":"","sources":["../../src/commerce/saved-lists.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA6B7C,eAAO,MAAM,cAAc,wzBAI1B,CAAC;AAEF,eAAO,MAAM,aAAa,y0BAIzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,81BAI7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,i3BAI7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,kFAI7B,CAAC;AAEF,eAAO,MAAM,sBAAsB,o7BAIlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,s7BAIlC,CAAC;AAEF,eAAO,MAAM,2BAA2B,w5BAIvC,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,UAAU;uBAE3B,OAAO,CAAC,SAAS,EAAE,CAAC;uBAKpB,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC;0BAK/B,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;wBAK7B,MAAM,QAAQ,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;wBAQzC,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;+BAMzC,MAAM,aACH,MAAM,YACP,MAAM,GACf,OAAO,CAAC,SAAS,CAAC;gCAUX,MAAM,aACH,MAAM,YACP,MAAM,GACf,OAAO,CAAC,SAAS,CAAC;oCASiB,MAAM,aAAa,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;EAQvF"}
@@ -4,7 +4,7 @@ const LIST_FIELDS = `
4
4
  id productVariantId quantity position createdAt
5
5
  productVariant {
6
6
  id name sku
7
- price priceWithTax currencyCode stockLevel saleable
7
+ price priceWithTax currencyCode stockLevel saleable backorderAllowance
8
8
  incomingStock projectedSaleable nextExpectedArrival
9
9
  priceListName retailPrice retailPriceWithTax taxRateApplied { value }
10
10
  priceTiers { minQuantity price priceWithTax discountLabel }