@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 +1 @@
1
- {"version":3,"file":"payment-terms.js","sourceRoot":"","sources":["../../src/credit/payment-terms.ts"],"names":[],"mappings":"AAGA,MAAM,6BAA6B,GAAiB;;;;;;;;;;;;;;;;;;;CAmBnD,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAiB;;uBAEvB,6BAA6B;;CAEnD,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,IAAgB;IACxD,OAAO;QACL,KAAK,CAAC,eAAe,CAAC,OAAwB;YAC5C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAC7B,gBAAgB,EAChB,SAAS,EACT,OAAO,CACR,CAAC;YACF,OAAO,IAAI,CAAC,cAAc,CAAC;QAC7B,CAAC;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"payment-terms.js","sourceRoot":"","sources":["../../src/credit/payment-terms.ts"],"names":[],"mappings":"AAGA,MAAM,6BAA6B,GAAG,aAAa,CAAC;;;;;;;;;;;;;;;;;;;CAmBnD,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;;uBAEvB,6BAA6B;;CAEnD,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,IAAgB;IACxD,OAAO;QACL,KAAK,CAAC,eAAe,CAAC,OAAwB;YAC5C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAC7B,gBAAgB,EAChB,SAAS,EACT,OAAO,CACR,CAAC;YACF,OAAO,IAAI,CAAC,cAAc,CAAC;QAC7B,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -2,10 +2,21 @@ import type { HttpClient } from '../core/http.js';
2
2
  import type { BulkConversionResult, ConvertedAmount, ExchangeRate } from '../types.js';
3
3
  export declare function createExchangeMethods(http: HttpClient): {
4
4
  getExchangeRates(): Promise<ExchangeRate[]>;
5
+ /**
6
+ * Current rate for a single base→target pair. `null` when no rate is
7
+ * stored for that currency.
8
+ */
5
9
  getExchangeRate(targetCurrency: string): Promise<ExchangeRate | null>;
6
10
  convertCurrency(amount: string, fromCurrency: string, toCurrency: string): Promise<ConvertedAmount>;
11
+ /** Convert an amount from the base currency (EUR) to a target currency. */
7
12
  convertFromBase(amount: string, targetCurrency: string): Promise<ConvertedAmount>;
13
+ /** Convert an amount from a source currency to the base currency (EUR). */
8
14
  convertToBase(amount: string, sourceCurrency: string): Promise<ConvertedAmount>;
15
+ /**
16
+ * Convert one amount into several currencies in a single roundtrip —
17
+ * e.g. a currency-switcher dropdown showing the price in every
18
+ * available currency.
19
+ */
9
20
  convertToMultiple(amount: string, fromCurrency: string, toCurrencies: string[]): Promise<BulkConversionResult[]>;
10
21
  };
11
22
  //# sourceMappingURL=exchange.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exchange.d.ts","sourceRoot":"","sources":["../../src/currency/exchange.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU;wBAExB,OAAO,CAAC,YAAY,EAAE,CAAC;oCASX,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;4BAQjE,MAAM,gBACA,MAAM,cACR,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC;4BAUG,MAAM,kBAAkB,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;0BAS3D,MAAM,kBAAkB,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;8BAc3E,MAAM,gBACA,MAAM,gBACN,MAAM,EAAE,GACrB,OAAO,CAAC,oBAAoB,EAAE,CAAC;EAQrC"}
1
+ {"version":3,"file":"exchange.d.ts","sourceRoot":"","sources":["../../src/currency/exchange.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEvF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,UAAU;wBAExB,OAAO,CAAC,YAAY,EAAE,CAAC;IAKjD;;;OAGG;oCACmC,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;4BAQjE,MAAM,gBACA,MAAM,cACR,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC;IAS3B,2EAA2E;4BAC7C,MAAM,kBAAkB,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAQvF,2EAA2E;0BAC/C,MAAM,kBAAkB,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAQrF;;;;OAIG;8BAEO,MAAM,gBACA,MAAM,gBACN,MAAM,EAAE,GACrB,OAAO,CAAC,oBAAoB,EAAE,CAAC;EAQrC"}
@@ -5,6 +5,10 @@ export function createExchangeMethods(http) {
5
5
  const data = await http.graphql(GET_EXCHANGE_RATES);
6
6
  return data.exchangeRates;
7
7
  },
8
+ /**
9
+ * Current rate for a single base→target pair. `null` when no rate is
10
+ * stored for that currency.
11
+ */
8
12
  async getExchangeRate(targetCurrency) {
9
13
  const data = await http.graphql(GET_EXCHANGE_RATE, {
10
14
  targetCurrency,
@@ -19,6 +23,7 @@ export function createExchangeMethods(http) {
19
23
  });
20
24
  return data.convertCurrency;
21
25
  },
26
+ /** Convert an amount from the base currency (EUR) to a target currency. */
22
27
  async convertFromBase(amount, targetCurrency) {
23
28
  const data = await http.graphql(CONVERT_FROM_BASE, {
24
29
  amount,
@@ -26,6 +31,7 @@ export function createExchangeMethods(http) {
26
31
  });
27
32
  return data.convertFromBase;
28
33
  },
34
+ /** Convert an amount from a source currency to the base currency (EUR). */
29
35
  async convertToBase(amount, sourceCurrency) {
30
36
  const data = await http.graphql(CONVERT_TO_BASE, {
31
37
  amount,
@@ -33,6 +39,11 @@ export function createExchangeMethods(http) {
33
39
  });
34
40
  return data.convertToBase;
35
41
  },
42
+ /**
43
+ * Convert one amount into several currencies in a single roundtrip —
44
+ * e.g. a currency-switcher dropdown showing the price in every
45
+ * available currency.
46
+ */
36
47
  async convertToMultiple(amount, fromCurrency, toCurrencies) {
37
48
  const data = await http.graphql(CONVERT_TO_MULTIPLE, { amount, from: fromCurrency, to: toCurrencies });
38
49
  return data.convertToMultiple;
@@ -1 +1 @@
1
- {"version":3,"file":"exchange.js","sourceRoot":"","sources":["../../src/currency/exchange.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAIhC,MAAM,UAAU,qBAAqB,CAAC,IAAgB;IACpD,OAAO;QACL,KAAK,CAAC,gBAAgB;YACpB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAoC,kBAAkB,CAAC,CAAC;YACvF,OAAO,IAAI,CAAC,aAAa,CAAC;QAC5B,CAAC;QAMD,KAAK,CAAC,eAAe,CAAC,cAAsB;YAC1C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAwC,iBAAiB,EAAE;gBACxF,cAAc;aACf,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,YAAY,CAAC;QAC3B,CAAC;QAED,KAAK,CAAC,eAAe,CACnB,MAAc,EACd,YAAoB,EACpB,UAAkB;YAElB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAuC,gBAAgB,EAAE;gBACtF,MAAM;gBACN,IAAI,EAAE,YAAY;gBAClB,EAAE,EAAE,UAAU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I,GAAG,MAAM,IAAI,CAAC,OAAO,CAAwC,iBAAiB,EAAE;gBACxF,cAAc;aACf,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,YAAY,CAAC;QAC3B,CAAC;QAED,KAAK,CAAC,eAAe,CACnB,MAAc,EACd,YAAoB,EACpB,UAAkB;YAElB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAuC,gBAAgB,EAAE;gBACtF,MAAM;gBACN,IAAI,EAAE,YAAY;gBAClB,EAAE,EAAE,UAAU;aACf,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,eAAe,CAAC;QAC9B,CAAC;QAED,2EAA2E;QAC3E,KAAK,CAAC,eAAe,CAAC,MAAc,EAAE,cAAsB;YAC1D,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAuC,iBAAiB,EAAE;gBACvF,MAAM;gBACN,cAAc;aACf,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,eAAe,CAAC;QAC9B,CAAC;QAED,2EAA2E;QAC3E,KAAK,CAAC,aAAa,CAAC,MAAc,EAAE,cAAsB;YACxD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAqC,eAAe,EAAE;gBACnF,MAAM;gBACN,cAAc;aACf,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,aAAa,CAAC;QAC5B,CAAC;QAED;;;;WAIG;QACH,KAAK,CAAC,iBAAiB,CACrB,MAAc,EACd,YAAoB,EACpB,YAAsB;YAEtB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAC7B,mBAAmB,EACnB,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,CACjD,CAAC;YACF,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAChC,CAAC;KACF,CAAC;AACJ,CAAC"}
package/dist/errors.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { PlacementRejection, PlacementRejectionCode, PlacementRejectionLine } from './types.js';
2
2
  export type ServiceName = 'vendure' | 'cms' | 'plugins';
3
+ /** Field-level validation error returned by the CMS (e.g. form submit). */
3
4
  export interface FieldError {
4
5
  field: string;
5
6
  code?: string;
@@ -9,10 +10,17 @@ export declare class StorefrontError extends Error {
9
10
  readonly service: ServiceName;
10
11
  readonly statusCode?: number | undefined;
11
12
  readonly errorCode?: string | undefined;
13
+ /** Field-level details parsed from a structured error response. */
12
14
  readonly details?: FieldError[] | undefined;
15
+ /** Seconds to wait before retrying, parsed from a 429 response. */
13
16
  readonly retryAfterSeconds?: number | undefined;
14
- constructor(message: string, service: ServiceName, statusCode?: number | undefined, errorCode?: string | undefined, details?: FieldError[] | undefined, retryAfterSeconds?: number | undefined);
17
+ constructor(message: string, service: ServiceName, statusCode?: number | undefined, errorCode?: string | undefined,
18
+ /** Field-level details parsed from a structured error response. */
19
+ details?: FieldError[] | undefined,
20
+ /** Seconds to wait before retrying, parsed from a 429 response. */
21
+ retryAfterSeconds?: number | undefined);
15
22
  }
23
+ /** The structured half of a refusal, hoisted out of the GraphQL ErrorResult. */
16
24
  export interface MutationErrorPlacementInfo {
17
25
  code?: PlacementRejectionCode | (string & {});
18
26
  placement?: PlacementRejection;
@@ -20,9 +28,49 @@ export interface MutationErrorPlacementInfo {
20
28
  }
21
29
  export declare class MutationError extends StorefrontError {
22
30
  readonly fields?: Record<string, unknown> | undefined;
31
+ /**
32
+ * WHY the order/payment was refused, as a stable value to branch on.
33
+ *
34
+ * This is NOT `errorCode` — that names the GraphQL ErrorResult type
35
+ * (`ORDER_STATE_TRANSITION_ERROR`, `PAYMENT_DECLINED_ERROR`), which is the
36
+ * same for every reason a placement can fail. `code` is the reason itself
37
+ * (`ORDER_MINIMUM_AMOUNT_NOT_MET`, `PAYMENT_TERMS_UNAVAILABLE`, …).
38
+ *
39
+ * `undefined` when the refusal carries no structured detail — a core
40
+ * state-machine error, or an engine older than the placement-rejection
41
+ * schema. Fall back to `message`, and always give a `switch` a `default:`:
42
+ * codes are append-only and an unrecognised one is passed through as-is —
43
+ * which is why the type is widened past the union rather than pretending an
44
+ * exhaustive `switch` can cover it.
45
+ */
23
46
  readonly code?: PlacementRejectionCode | (string & {});
47
+ /**
48
+ * The full structured payload: `customerMessage`, the affected `lines`, and
49
+ * the per-code metadata (`requiredAmount`, `requiredQuantity`, `salesUnit`,
50
+ * …). `undefined` for cart-level stock refusals, which carry no envelope —
51
+ * `code` and `lines` are synthesized there from the error's own fields.
52
+ */
24
53
  readonly placement?: PlacementRejection;
54
+ /**
55
+ * The lines the refusal is about, whatever the source: `placement.lines`
56
+ * when there is an envelope, otherwise synthesized from an
57
+ * `InsufficientStockError`'s own identity fields. Empty/undefined means the
58
+ * refusal is about the order as a whole.
59
+ *
60
+ * In a bulk add (`addItemsToCart`) this is the union across EVERY failing
61
+ * input, in input order — `fields` describes only the first one, so `lines`
62
+ * is what marks every row the shopper has to fix.
63
+ */
25
64
  readonly lines?: PlacementRejectionLine[];
26
- constructor(errorCode: string, message: string, fields?: Record<string, unknown> | undefined, structured?: MutationErrorPlacementInfo);
65
+ constructor(errorCode: string,
66
+ /**
67
+ * Already resolved to the best available prose: the shopper-safe
68
+ * `placement.customerMessage` when there is one, else a vetted reason
69
+ * field (`transitionError` / `interceptorError`), else the ErrorResult's
70
+ * generic `message`. `paymentErrorMessage` is NOT in that walk — PSP/ERP
71
+ * decline text is operator-facing and stays on
72
+ * `fields.paymentErrorMessage`.
73
+ */
74
+ message: string, fields?: Record<string, unknown> | undefined, structured?: MutationErrorPlacementInfo);
27
75
  }
28
76
  //# sourceMappingURL=errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;AAGxD,MAAM,WAAW,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ASG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAC;gBAGxC,SAAS,EAAE,MAAM;IACjB;;;;;;;OAOG;IACH,OAAO,EAAE,MAAM,EACC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA,EAChD,UAAU,CAAC,EAAE,0BAA0B;CAY1C"}
package/dist/errors.js CHANGED
@@ -4,7 +4,11 @@ export class StorefrontError extends Error {
4
4
  errorCode;
5
5
  details;
6
6
  retryAfterSeconds;
7
- constructor(message, service, statusCode, errorCode, details, retryAfterSeconds) {
7
+ constructor(message, service, statusCode, errorCode,
8
+ /** Field-level details parsed from a structured error response. */
9
+ details,
10
+ /** Seconds to wait before retrying, parsed from a 429 response. */
11
+ retryAfterSeconds) {
8
12
  super(message);
9
13
  this.service = service;
10
14
  this.statusCode = statusCode;
@@ -16,11 +20,54 @@ export class StorefrontError extends Error {
16
20
  }
17
21
  export class MutationError extends StorefrontError {
18
22
  fields;
23
+ /**
24
+ * WHY the order/payment was refused, as a stable value to branch on.
25
+ *
26
+ * This is NOT `errorCode` — that names the GraphQL ErrorResult type
27
+ * (`ORDER_STATE_TRANSITION_ERROR`, `PAYMENT_DECLINED_ERROR`), which is the
28
+ * same for every reason a placement can fail. `code` is the reason itself
29
+ * (`ORDER_MINIMUM_AMOUNT_NOT_MET`, `PAYMENT_TERMS_UNAVAILABLE`, …).
30
+ *
31
+ * `undefined` when the refusal carries no structured detail — a core
32
+ * state-machine error, or an engine older than the placement-rejection
33
+ * schema. Fall back to `message`, and always give a `switch` a `default:`:
34
+ * codes are append-only and an unrecognised one is passed through as-is —
35
+ * which is why the type is widened past the union rather than pretending an
36
+ * exhaustive `switch` can cover it.
37
+ */
19
38
  code;
39
+ /**
40
+ * The full structured payload: `customerMessage`, the affected `lines`, and
41
+ * the per-code metadata (`requiredAmount`, `requiredQuantity`, `salesUnit`,
42
+ * …). `undefined` for cart-level stock refusals, which carry no envelope —
43
+ * `code` and `lines` are synthesized there from the error's own fields.
44
+ */
20
45
  placement;
46
+ /**
47
+ * The lines the refusal is about, whatever the source: `placement.lines`
48
+ * when there is an envelope, otherwise synthesized from an
49
+ * `InsufficientStockError`'s own identity fields. Empty/undefined means the
50
+ * refusal is about the order as a whole.
51
+ *
52
+ * In a bulk add (`addItemsToCart`) this is the union across EVERY failing
53
+ * input, in input order — `fields` describes only the first one, so `lines`
54
+ * is what marks every row the shopper has to fix.
55
+ */
21
56
  lines;
22
- constructor(errorCode, message, fields, structured) {
23
- super(message, 'vendure', undefined, errorCode);
57
+ constructor(errorCode,
58
+ /**
59
+ * Already resolved to the best available prose: the shopper-safe
60
+ * `placement.customerMessage` when there is one, else a vetted reason
61
+ * field (`transitionError` / `interceptorError`), else the ErrorResult's
62
+ * generic `message`. `paymentErrorMessage` is NOT in that walk — PSP/ERP
63
+ * decline text is operator-facing and stays on
64
+ * `fields.paymentErrorMessage`.
65
+ */
66
+ message, fields, structured) {
67
+ // A rate-limited result (email change, magic link) carries its wait hint
68
+ // as `retryAfterSeconds`; surface it where a 429 puts it.
69
+ const retryAfterSeconds = typeof fields?.retryAfterSeconds === 'number' ? fields.retryAfterSeconds : undefined;
70
+ super(message, 'vendure', undefined, errorCode, undefined, retryAfterSeconds);
24
71
  this.fields = fields;
25
72
  this.name = 'MutationError';
26
73
  this.code = structured?.code;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAeA,MAAM,OAAO,eAAgB,SAAQ,KAAK;IAGtB;IACA;IACA;IAEA;IAEA;IARlB,YACE,OAAe,EACC,OAAoB,EACpB,UAAmB,EACnB,SAAkB,EAElB,OAAsB,EAEtB,iBAA0B;QAE1C,KAAK,CAAC,OAAO,CAAC,CAAC;QARC,YAAO,GAAP,OAAO,CAAa;QACpB,eAAU,GAAV,UAAU,CAAS;QACnB,cAAS,GAAT,SAAS,CAAS;QAElB,YAAO,GAAP,OAAO,CAAe;QAE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;;;;OASG;IACM,KAAK,CAA4B;IAE1C,YACE,SAAiB;IACjB;;;;;;;OAOG;IACH,OAAe,EACC,MAAgC,EAChD,UAAuC;QAEvC,yEAAyE;QACzE,0DAA0D;QAC1D,MAAM,iBAAiB,GACrB,OAAO,MAAM,EAAE,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,CAAC;QACvF,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAC;QAP9D,WAAM,GAAN,MAAM,CAA0B;QAQhD,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,UAAU,EAAE,IAAI,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,UAAU,EAAE,SAAS,CAAC;QACvC,IAAI,CAAC,KAAK,GAAG,UAAU,EAAE,KAAK,CAAC;IACjC,CAAC;CACF"}
@@ -1,24 +1,60 @@
1
+ /** What the event is about. `id` is the aggregate's id in its own service. */
1
2
  export interface EventAggregateRef {
2
3
  readonly type: string;
3
4
  readonly id: string | null;
4
5
  }
6
+ /**
7
+ * The exact JSON shape delivered to a webhook endpoint and served by the pull feed.
8
+ *
9
+ * Two fields are deliberately distinct and are the subtlest part of the contract:
10
+ *
11
+ * - `occurred_at` — when the event HAPPENED. Immutable.
12
+ * - `delivered_at` — when THIS delivery attempt was signed. Restamped on every attempt, and
13
+ * ABSENT on the pull feed. Check a replay window against this and only this; a pull
14
+ * response has none, because it can serve up to 90 days of history and the authenticated
15
+ * request is the freshness proof instead.
16
+ *
17
+ * Dedupe on `id`, which is stable across every attempt of one event, and NOT on
18
+ * `channel_code` for tenancy — closing a store renames its code.
19
+ *
20
+ * You will receive `schema_version`s your build does not know: the contract is append-only
21
+ * within a version and a new version is a new number, so skip what you cannot read and keep
22
+ * going. Skipping still advances your cursor.
23
+ */
5
24
  export interface PlatformEventEnvelope<TData = Record<string, unknown>> {
25
+ /** Stable per event, identical across every delivery attempt. Your idempotency key. */
6
26
  readonly id: string;
7
27
  readonly type: string;
28
+ /** Payload contract version for `type`. */
8
29
  readonly schema_version: number;
9
30
  readonly channel_code: string;
31
+ /** ISO-8601 UTC. When it happened. NEVER restamped. */
10
32
  readonly occurred_at: string;
33
+ /** ISO-8601 UTC. When this attempt was signed. Absent on the pull feed. */
11
34
  readonly delivered_at?: string;
35
+ /** Monotonic within `(channel, aggregate)`. Lets you detect gaps and reorder. */
12
36
  readonly sequence: number;
13
37
  readonly aggregate: EventAggregateRef;
38
+ /** W3C trace id tying this event to the action that caused it. */
14
39
  readonly trace_id: string | null;
15
40
  readonly data: TData;
16
41
  }
42
+ /** One page of the pull feed. */
17
43
  export interface PlatformEventPage<TData = Record<string, unknown>> {
18
44
  readonly items: PlatformEventEnvelope<TData>[];
45
+ /**
46
+ * Where to resume. Always usable — it is never null, even when you are caught up, so
47
+ * store it after every poll. Storing nothing would restart you from the beginning.
48
+ */
19
49
  readonly next_cursor: string;
50
+ /** More RIGHT NOW. `false` does not mean end of stream; a tail feed has no end. */
20
51
  readonly has_next: boolean;
52
+ /**
53
+ * `false` means events above your position were destroyed by retention before you read
54
+ * them, or that you started from the beginning of what survives rather than from a cursor.
55
+ */
21
56
  readonly complete: boolean;
57
+ /** What your `types` filter resolved to. A family wildcard widens as the catalog grows. */
22
58
  readonly types: readonly string[];
23
59
  }
24
60
  //# sourceMappingURL=envelope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/events/envelope.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAoBD,MAAM,WAAW,qBAAqB,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAA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,IAAI,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,uDAAuD;IACvD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,2EAA2E;IAC3E,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,iFAAiF;IACjF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,iBAAiB,CAAC;IACtC,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;CACtB;AAED,iCAAiC;AACjC,MAAM,WAAW,iBAAiB,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAChE,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;IAC/C;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,mFAAmF;IACnF,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,2FAA2F;IAC3F,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC"}
@@ -1,2 +1,14 @@
1
+ // @sixtynine-shim event-envelope v1
2
+ // CANONICAL COPY: packages/shared/src/events/shims/event-envelope.ts — the published SDK
3
+ // (@sixtyninecommerce/client) carries a byte-identical copy as
4
+ // packages/storefront-client/src/events/envelope.ts. It cannot import this package: the
5
+ // SDK declares no dependencies and takes commerce-shared as a devDependency only, so a
6
+ // `workspace:*` import would pass every local gate (dep-check reads dist/) and break every
7
+ // external `npm i`. packages/shared's shim-drift spec fails when a copy diverges; edit the
8
+ // canonical file, then re-copy.
9
+ //
10
+ // TYPES ONLY. The catalog's event-type union is deliberately NOT shipped: reproducing it
11
+ // means reproducing the @ts-expect-error guard that fails the build when the union collapses
12
+ // to `string`, and a copy that re-exports the type instead disarms that guard silently.
1
13
  export {};
2
14
  //# sourceMappingURL=envelope.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"envelope.js","sourceRoot":"","sources":["../../src/events/envelope.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"envelope.js","sourceRoot":"","sources":["../../src/events/envelope.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,yFAAyF;AACzF,+DAA+D;AAC/D,wFAAwF;AACxF,uFAAuF;AACvF,2FAA2F;AAC3F,2FAA2F;AAC3F,gCAAgC;AAChC,EAAE;AACF,yFAAyF;AACzF,6FAA6F;AAC7F,wFAAwF"}
@@ -1,3 +1,16 @@
1
+ /**
2
+ * Platform events: the envelope you receive, how to verify a webhook, and the
3
+ * revalidation a storefront-facing event calls for.
4
+ *
5
+ * Two surfaces deliver the same envelope. A **webhook** POST is signed — verify
6
+ * `X-Webhook-Signature` against the RAW request body, before parsing, with the secret shown
7
+ * once when the subscription was created (`verifyEventDelivery` does that and checks the
8
+ * `delivered_at` replay window). The **pull feed** (`GET /events` on the plugins
9
+ * API, with an API token holding `ReadPlatformEvents`) carries no signature and no
10
+ * `delivered_at`: the authenticated request is the freshness proof, and a feed serving 90
11
+ * days of history would put every row outside any replay window you could sensibly set.
12
+ * `planRevalidation` works on envelopes from either surface.
13
+ */
1
14
  export { collectionCacheTag, productCacheTag, SEO_ARTIFACT_TAG } from '../cache-tags.js';
2
15
  export type { RevalidationDegradedReason, RevalidationPlan, RevalidationPlanOptions, RevalidationSkipReason, } from '../revalidation/event-plan.js';
3
16
  export { EventPayloadError, planRevalidation } from '../revalidation/event-plan.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,kBAAkB,EAAE,eA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C;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,mBAAmB,eAAe,CAAC"}
@@ -1,3 +1,16 @@
1
+ /**
2
+ * Platform events: the envelope you receive, how to verify a webhook, and the
3
+ * revalidation a storefront-facing event calls for.
4
+ *
5
+ * Two surfaces deliver the same envelope. A **webhook** POST is signed — verify
6
+ * `X-Webhook-Signature` against the RAW request body, before parsing, with the secret shown
7
+ * once when the subscription was created (`verifyEventDelivery` does that and checks the
8
+ * `delivered_at` replay window). The **pull feed** (`GET /events` on the plugins
9
+ * API, with an API token holding `ReadPlatformEvents`) carries no signature and no
10
+ * `delivered_at`: the authenticated request is the freshness proof, and a feed serving 90
11
+ * days of history would put every row outside any replay window you could sensibly set.
12
+ * `planRevalidation` works on envelopes from either surface.
13
+ */
1
14
  export { collectionCacheTag, productCacheTag, SEO_ARTIFACT_TAG } from '../cache-tags.js';
2
15
  export { EventPayloadError, planRevalidation } from '../revalidation/event-plan.js';
3
16
  export { verifyEventDelivery } from '../revalidation/event-verify.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAOzF,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAMtE,OAAO,EACL,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAOzF,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAMtE,OAAO,EACL,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,8 +1,12 @@
1
1
  export type ContentItemStatusV1 = 'draft' | 'published' | 'archived' | 'removed';
2
2
  export type ContentChangeClass = 'slug' | 'translated_slug' | 'parent' | 'position' | 'values';
3
+ /** One locale's stored path for a CMS item. */
3
4
  export type ContentPathV1 = {
5
+ /** Vendure's raw spelling — `en`, `nl`, `en_GB` with an underscore. */
4
6
  language_code: string;
7
+ /** Channel-relative, locale-unprefixed (`/blog/hello`). `null`: no URL in this locale. */
5
8
  path: string | null;
9
+ /** The path before this change when it moved; `null` when it did not. */
6
10
  previous_path: string | null;
7
11
  };
8
12
  export type ContentItemBaseV1 = {
@@ -11,20 +15,26 @@ export type ContentItemBaseV1 = {
11
15
  collection_slug: string;
12
16
  status: ContentItemStatusV1;
13
17
  is_published: boolean;
18
+ /** Names the `paths` entry every locale WITHOUT its own entry falls back to. */
14
19
  default_language_code: string;
20
+ /** Default-language entry always present and first; one entry per translated locale. */
15
21
  paths: ContentPathV1[];
22
+ /** True when locale entries were dropped: revalidate more broadly. */
16
23
  paths_truncated: boolean;
17
24
  };
18
25
  export type ContentPublishedV1 = ContentItemBaseV1;
19
26
  export type ContentUnpublishedV1 = ContentItemBaseV1;
20
27
  export type ContentUpdatedV1 = ContentItemBaseV1 & {
28
+ /** Which keys the mutation INPUT carried — a hint, never a diff. */
21
29
  changed: ContentChangeClass[];
22
30
  };
23
31
  export type ContentCollectionChangeClass = 'name' | 'slug' | 'description' | 'singleton' | 'hierarchical' | 'title_field' | 'page_values' | 'fields';
24
32
  export type ContentCollectionBaseV1 = {
25
33
  collection_id: string | null;
26
34
  collection_slug: string;
35
+ /** The index page's path, channel-relative and locale-unprefixed; `null`: no index page. */
27
36
  base_path: string | null;
37
+ /** The base path before this change when it moved — every item path moved with it. */
28
38
  previous_base_path: string | null;
29
39
  };
30
40
  export type ContentCollectionCreatedV1 = ContentCollectionBaseV1;
@@ -50,6 +60,7 @@ export type CollectionStateV1 = {
50
60
  };
51
61
  export type CollectionEntityChangeBaseV1 = CollectionStateV1 & {
52
62
  collection_id: string | null;
63
+ /** `null` means the event carried no input (core's `move()`) — never the quieter case. */
53
64
  changed: CollectionChangeClass[] | null;
54
65
  translation_language_codes: string[];
55
66
  translation_language_codes_truncated: boolean;
@@ -63,6 +74,7 @@ export type CollectionAffectedScopeV1 = 'changed' | 'membership';
63
74
  export type CollectionMembershipChangedV1 = {
64
75
  collection_id: string | null;
65
76
  affected_scope: CollectionAffectedScopeV1;
77
+ /** VARIANT ids, capped; a sample, never an enumeration. */
66
78
  affected_variant_ids: string[];
67
79
  affected_variant_ids_truncated: boolean;
68
80
  is_private: boolean;
@@ -72,11 +84,14 @@ export type UrlLocaleStrategyV1 = 'path-prefix' | 'subdomain' | 'none';
72
84
  export type ChannelUrlSettingClass = 'storefront_url' | 'url_locale_strategy' | 'url_locale_prefix_default' | 'commerce_path_prefix' | 'commerce_path_prefix_translations' | 'product_path_segment' | 'default_language' | 'available_languages';
73
85
  export type ChannelPathPrefixV1 = {
74
86
  language_code: string;
87
+ /** `''` means "no prefix in this language"; an absent entry falls back to the default. */
75
88
  path_prefix: string;
76
89
  };
90
+ /** The channel's complete URL rule set AFTER the change. */
77
91
  export type ChannelUrlSettingsChangedV1 = {
78
92
  channel_id: string | null;
79
93
  changed: ChannelUrlSettingClass[];
94
+ /** Trailing slashes removed; `null` when unset. */
80
95
  storefront_url: string | null;
81
96
  url_locale_strategy: UrlLocaleStrategyV1;
82
97
  url_locale_prefix_default: boolean;
@@ -94,6 +109,7 @@ export type SeoPathChangeV1 = {
94
109
  entity_type: SeoPathEntityTypeV1;
95
110
  entity_id: string;
96
111
  language_code: string;
112
+ /** Channel-relative, locale-unprefixed; the commerce prefix is ALREADY applied. */
97
113
  path: string;
98
114
  };
99
115
  export type SeoPathsChangedV1 = {
@@ -126,11 +142,14 @@ export type ProductVariantPriceChangedV1 = {
126
142
  product_id: string | null;
127
143
  sku: string;
128
144
  currency_code: string;
145
+ /** Minor units, net of tax. */
129
146
  price: number;
147
+ /** Minor units, gross. */
130
148
  price_with_tax: number;
131
149
  changed_currency_codes: string[];
132
150
  changed_currency_codes_truncated: boolean;
133
151
  };
152
+ /** Payload per event type, version 1, for every type `createEventRevalidateHandler` acts on. */
134
153
  export interface RevalidationPayloadByTypeV1 {
135
154
  'content.published': ContentPublishedV1;
136
155
  'content.updated': ContentUpdatedV1;
@@ -1 +1 @@
1
- {"version":3,"file":"payloads.d.ts","sourceRoot":"","sources":["../../src/events/payloads.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;AAEjF,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,iBAAiB,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;AAG/F,MAAM,MAAM,aAAa,GAAG;IAE1B,aAAa,EAAE,MAAM,CAAC;IAEtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,YAAY,EAAE,OAAO,CAAC;IAEtB,qBAAqB,EAAE,MAAM,CAAC;IAE9B,KAAK,EAAE,a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;IACzD,8BAA8B,EAAE,oBAAoB,CAAC;IACrD,oBAAoB,EAAE,mBAAmB,CAAC;IAC1C,oBAAoB,EAAE,mBAAmB,CAAC;IAC1C,oBAAoB,EAAE,mBAAmB,CAAC;IAC1C,+BAA+B,EAAE,6BAA6B,CAAC;IAC/D,8BAA8B,EAAE,2BAA2B,CAAC;IAC5D,mBAAmB,EAAE,iBAAiB,CAAC;IACvC,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,iBAAiB,EAAE,gBAAgB,CAAC;IACpC,+BAA+B,EAAE,4BAA4B,CAAC;CAC/D;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,2BAA2B,CAAC"}
@@ -1,2 +1,14 @@
1
+ // @sixtynine-shim revalidation-payloads v1
2
+ // CANONICAL COPY: packages/shared/src/events/shims/revalidation-payloads.ts — the published SDK
3
+ // (@sixtyninecommerce/client) carries a byte-identical copy as
4
+ // packages/storefront-client/src/events/payloads.ts, for the same reason as event-envelope.ts:
5
+ // the SDK cannot import this private package at runtime or from its emitted .d.ts.
6
+ // packages/shared's shim-drift spec fails when a copy diverges, and fails typecheck when a
7
+ // type here stops being structurally identical to its source in packages/shared/src/events/
8
+ // payloads/. Edit the source contract first, mirror it here, then re-copy.
9
+ //
10
+ // TYPES ONLY, and only the families a storefront revalidator reads. The runtime key tuples and
11
+ // vocabularies stay in the platform: a published copy of them could not be fixed in a consumer's
12
+ // node_modules.
1
13
  export {};
2
14
  //# sourceMappingURL=payloads.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"payloads.js","sourceRoot":"","sources":["../../src/events/payloads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"payloads.js","sourceRoot":"","sources":["../../src/events/payloads.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,gGAAgG;AAChG,+DAA+D;AAC/D,+FAA+F;AAC/F,mFAAmF;AACnF,2FAA2F;AAC3F,4FAA4F;AAC5F,2EAA2E;AAC3E,EAAE;AACF,+FAA+F;AAC/F,iGAAiG;AACjG,gBAAgB"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,10 @@
1
+ /**
2
+ * @sixtyninecommerce/client — JS/TS SDK for sixtynine-commerce storefronts.
3
+ *
4
+ * Start here: `createStorefrontClient({ storeCode, cdnUrl })`.
5
+ * See the subpath exports for pricing helpers (`/pricing`) and media URL
6
+ * builders (`/media`).
7
+ */
1
8
  export { cacheTagsForRoute, collectionCacheTag, productCacheTag, SEO_ARTIFACT_TAG, } from './cache-tags.js';
2
9
  export { createStorefrontClient } from './client.js';
3
10
  export { DEFAULT_CMS_URL, DEFAULT_PLUGINS_URL, DEFAULT_VENDURE_URL, ORDER_SCOPE_HEADER, RESERVED_STOREFRONT_PATHS, type ReservedStorefrontPath, SHOP_API_PATH, } from './constants.js';
@@ -9,5 +16,5 @@ export { orderScopeMatches } from './order-scope.js';
9
16
  export { createRedirectStore, normalizeLookupPath, REDIRECT_STATUS_CODES, type RedirectMatch, type RedirectRule, type RedirectSnapshot, type RedirectStatusCode, type RedirectStore, type RedirectStoreConfig, } from './redirects/index.js';
10
17
  export type { AiSummaryInput, BotDirective, BreadcrumbOverrideEntry, CmsItemMetadata, CmsMetaTagsInput, CmsSeoExtras, CollectionForSeo, CollectionMetadata, CollectionMetaTagsInput, CollectionSeoExtras, CommonSeoMetadata, HreflangLink, HreflangLinkTag, HreflangOverrideEntry, LlmsTxtEntryInput, MetaRobots, MetaRobotsFollowDirective, MetaRobotsIndexDirective, MetaRobotsMaxImagePreview, MetaTagsEntityInput, MetaTagsResult, OpenGraphTag, PerBotDirectives, ProductForSeo, ProductMetadata, ProductMetadataAi, ProductMetadataSocial, ProductMetadataTwitter, ProductMetaTagsInput, ProductSeoExtras, QAPair, RawCmsSeo, RawCollectionSeo, RawProductMetadata, RobotsMetaTag, RobotsXRobotsHeader, SeoEntityInput, SeoMeta, SeoModule, SocialOgType, TwitterCardType, TwitterTag, UrlLocaleStrategy, UrlStrategyConfig, } from './seo/index.js';
11
18
  export { buildUrl, DEFAULT_PRODUCT_PATH_SEGMENT, isUserFacingRoot, normalizeProductPathSegment, parseCmsItemMetadata, parseCollectionMetadata, parseProductMetadata, pickCanonicalRootIndex, readUrlStrategy, robotsFromFlags, } from './seo/index.js';
12
- export type { ActiveChannel, AddressInput, AgeVerificationStatus, Asset, AssetPresetSize, AssetPresets, B2bCreditStatus, BrandingAssetRef, BrandingContact, BrandingFontResource, BrandingIdentity, BrandingInfo, BrandingLegal, BrandingLegalAddress, BrandingSocialLinks, BrandingStorefrontConfig, BrandingTheme, Breadcrumb, CacheTagResolver, ChannelInfo, CmsAsset, CmsAssetTranslation, Collection, CollectionDetail, CollectionFieldDefinition, CollectionListOptions, CollectionPageValues, CollectionProductListOptions, CollectionProductSummary, CollectionProductVariant, CommerceModule, ContentItemSummary, ContentItemWithFields, ContentModule, ContentQueryOptions, ContentSearchHit, ContentSearchQuery, ContentSearchResult, ContentStrings, ConvertedAmount, Country, CreateMolliePaymentIntentInput, CreateQuoteRequestInput, CreateReviewInput, CreateReviewResult, CreditBalanceSource, CreditModule, CurrencyModule, Customer, CustomerAddress, CustomerDeliveryTerms, CustomerGroup, CustomerInput, CustomerPaymentTerms, CustomerPriceList, CustomerReturn, CustomerReturnEligibility, CustomerReturnLine, CustomerReturnList, CustomerReturnListOptions, CustomerReturnReasonCode, CustomerReturnSettlementMethod, CustomerReturnState, CustomerSubscription, CustomerSubscriptionStatus, DeliveryAdvice, DeliveryOption, DeliveryOptionsInput, DeliverySelectionSource, DeliveryTermsStatus, DeliveryTimeFrame, DisplayPrice, DropOffPoint, DropOffPointInput, ExchangeRate, Facet, FacetValue, FacetValueFilterInput, FavoriteItem, FavoriteVariant, FormDefinition, FormField, FormFieldTypeConstraint, FormFieldTypeDescriptor, FormFieldTypeRegistry, FormListOptions, FormListResult, FormSlugRule, FormSlugRules, FormSubmissionResult, FormSummary, FormTranslation, LoginResult, MediaModule, Menu, MenuItem, MollieOrderStatusResult, MolliePaymentIntentResult, MolliePaymentMethod, MolliePaymentMethodAmount, MolliePaymentMethodsInput, MyPaymentMandate, NavigationModule, OptionGroup, Order, OrderAddress, OrderCustomFields, OrderDeliveryTermsSnapshot, OrderedMollieMethod, OrderLine, OrderListOptions, OrderPayment, OrderPaymentIntent, OrderPaymentIntentValue, OrderPaymentTermsSnapshot, OrderScope, OrderSummary, OrderValidationError, OrderValidationResult, PaginatedList, PaymentInput, PaymentMethod, PaymentTermsClassification, PaymentTermsStatus, PlacementRejection, PlacementRejectionCode, PlacementRejectionDetail, PlacementRejectionLine, PresetName, PriceDisplay, PriceTier, PricingModule, Product, ProductListOptions, ProductOption, ProductPropertyGroupValues, ProductPropertyRecord, ProductReview, ProductSummary, ProductVariant, Property, PropertyConfig, PropertyFieldFacet, PropertyGroup, PropertyGroupTranslation, PropertyTranslation, PropertyValue, PublicProductDocument, Quote, QuoteLine, QuoteList, QuoteListOptions, QuoteStatus, RecommendedProductGroup, RegisterInput, RequestOptions, RequestReturnInput, RequestReturnLineInput, ResolvedContent, ResolvedRoute, ResolvedTaxDisplay, ResponsiveImageData, RetryConfig, ReturnableOrderLine, ReviewAttribute, ReviewAttributeAggregation, ReviewChannelConfig, ReviewListOptions, ReviewMediaUploadResult, ReviewRatingDistribution, ReviewRatingSummary, RouteEntry, RoutesResponse, SavedList, SavedListItem, SearchFacetValue, SearchInput, SearchResult, SearchResultItem, SetupPaymentMandateResult, ShipmentTrackingHistoryEntry, ShipmentTrackingInfo, ShippingLine, ShippingMethod, SitemapEntry, StoreContext, StorefrontClient, StorefrontClientConfig, StripePaymentIntentResult, SubscriptionPlanPublic, TaxDisplayB2bMode, TaxDisplayDefault, TaxDisplayInputs, TaxDisplayMode, TaxDisplayPolicy, TierTableEntry, UpdateAddressInput, UpdateCustomerInput, UpdateReviewInput, VariantPriceData, VatValidationResult, VendureAssetDescriptionTranslation, } from './types.js';
19
+ export type { ActiveChannel, AddressInput, AgeVerificationStatus, Asset, AssetPresetSize, AssetPresets, B2bCreditStatus, BrandingAssetRef, BrandingContact, BrandingFontResource, BrandingIdentity, BrandingInfo, BrandingLegal, BrandingLegalAddress, BrandingSocialLinks, BrandingStorefrontConfig, BrandingTheme, Breadcrumb, CacheTagResolver, ChannelInfo, CmsAsset, CmsAssetTranslation, Collection, CollectionDetail, CollectionFieldDefinition, CollectionListOptions, CollectionPageValues, CollectionProductListOptions, CollectionProductSummary, CollectionProductVariant, CommerceModule, ContentItemSummary, ContentItemWithFields, ContentModule, ContentQueryOptions, ContentSearchHit, ContentSearchQuery, ContentSearchResult, ContentStrings, ConvertedAmount, Country, CreateMolliePaymentIntentInput, CreateQuoteRequestInput, CreateReviewInput, CreateReviewResult, CreditBalanceSource, CreditModule, CurrencyModule, Customer, CustomerAddress, CustomerDeliveryTerms, CustomerGroup, CustomerInput, CustomerPaymentTerms, CustomerPriceList, CustomerReturn, CustomerReturnEligibility, CustomerReturnLine, CustomerReturnList, CustomerReturnListOptions, CustomerReturnReasonCode, CustomerReturnSettlementMethod, CustomerReturnState, CustomerSubscription, CustomerSubscriptionStatus, DeliveryAdvice, DeliveryOption, DeliveryOptionsInput, DeliverySelectionSource, DeliveryTermsStatus, DeliveryTimeFrame, DisplayPrice, DropOffPoint, DropOffPointInput, ExchangeRate, Facet, FacetValue, FacetValueFilterInput, FavoriteItem, FavoriteVariant, FormDefinition, FormField, FormFieldTypeConstraint, FormFieldTypeDescriptor, FormFieldTypeRegistry, FormListOptions, FormListResult, FormSlugRule, FormSlugRules, FormSubmissionResult, FormSummary, FormTranslation, LoginResult, MediaModule, Menu, MenuItem, MollieOrderStatusResult, MolliePaymentIntentResult, MolliePaymentMethod, MolliePaymentMethodAmount, MolliePaymentMethodsInput, MyPaymentMandate, NavigationModule, OptionGroup, Order, OrderAddress, OrderCustomFields, OrderDeliveryTermsSnapshot, OrderedMollieMethod, OrderLine, OrderListOptions, OrderPayment, OrderPaymentIntent, OrderPaymentIntentValue, OrderPaymentTermsSnapshot, OrderScope, OrderSummary, OrderValidationError, OrderValidationResult, PaginatedList, PaymentInput, PaymentMethod, PaymentTermsClassification, PaymentTermsStatus, PlacementRejection, PlacementRejectionCode, PlacementRejectionDetail, PlacementRejectionLine, PresetName, PriceDisplay, PriceTier, PricingModule, Product, ProductListOptions, ProductOption, ProductPropertyGroupValues, ProductPropertyRecord, ProductReview, ProductSummary, ProductVariant, Property, PropertyConfig, PropertyFieldFacet, PropertyGroup, PropertyGroupTranslation, PropertyTranslation, PropertyValue, PublicProductDocument, Quote, QuoteLine, QuoteList, QuoteListOptions, QuoteStatus, RecommendedProductGroup, RegisterInput, RequestOptions, RequestReturnInput, RequestReturnLineInput, ResolvedContent, ResolvedRoute, ResolvedTaxDisplay, ResponsiveImageData, RetryConfig, ReturnableOrderLine, ReviewAttribute, ReviewAttributeAggregation, ReviewChannelConfig, ReviewListOptions, ReviewMediaUploadResult, ReviewRatingDistribution, ReviewRatingSummary, RouteEntry, RoutesResponse, SavedList, SavedListItem, SearchFacetValue, SearchInput, SearchResult, SearchResultItem, SetupPaymentMandateResult, ShipmentTrackingHistoryEntry, ShipmentTrackingInfo, ShippingLine, ShippingMethod, SitemapEntry, StoreContext, StorefrontClient, StorefrontClientConfig, StripePaymentIntentResult, SubscriptionAllowedAction, SubscriptionChangePreview, SubscriptionFirstChargeTiming, SubscriptionLifecycleAction, SubscriptionLifecycleCommand, SubscriptionPaymentActionInput, SubscriptionPlanPublic, SubscriptionProduct, SubscriptionPurchaseInput, SubscriptionPurchasePreview, SubscriptionPurchaseResult, SubscriptionUpcomingPayment, TaxDisplayB2bMode, TaxDisplayDefault, TaxDisplayInputs, TaxDisplayMode, TaxDisplayPolicy, TierTableEntry, UpdateAddressInput, UpdateCustomerInput, UpdateReviewInput, VariantPriceData, VatValidationResult, VendureAssetDescriptionTranslation, } from './types.js';
13
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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EACf,aAAa,EACb,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EAEnB,eAAe,EACf,0BAA0B,EAC1B,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,WAAW,EAEX,YAAY,EACZ,gBAAgB,EAChB,yBAAyB,EACzB,4BAA4B,EAC5B,oBAAoB,EACpB,YAAY,EACZ,cAAc,EAEd,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EAEtB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAEhB,mBAAmB,EACnB,kCAAkC,GACnC,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EACzB,KAAK,sBAAsB,EAC3B,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,2BAA2B,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,GAC3B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAE,aAA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EAC3B,0BAA0B,EAC1B,2BAA2B,EAE3B,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAEhB,mBAAmB,EACnB,kCAAkC,GACnC,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,10 @@
1
+ /**
2
+ * @sixtyninecommerce/client — JS/TS SDK for sixtynine-commerce storefronts.
3
+ *
4
+ * Start here: `createStorefrontClient({ storeCode, cdnUrl })`.
5
+ * See the subpath exports for pricing helpers (`/pricing`) and media URL
6
+ * builders (`/media`).
7
+ */
1
8
  export { cacheTagsForRoute, collectionCacheTag, productCacheTag, SEO_ARTIFACT_TAG, } from './cache-tags.js';
2
9
  export { createStorefrontClient } from './client.js';
3
10
  export { DEFAULT_CMS_URL, DEFAULT_PLUGINS_URL, DEFAULT_VENDURE_URL, ORDER_SCOPE_HEADER, RESERVED_STOREFRONT_PATHS, SHOP_API_PATH, } from './constants.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EAEzB,aAAa,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,2BAA2B,GAG5B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,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,eAAe,EACf,eAAe,GAChB,MAAM,gBAAgB,CAAC"}
@@ -6,6 +6,8 @@ export function createMediaModule(ctx) {
6
6
  return {
7
7
  assetUrl: resolveUrl,
8
8
  getFullUrl(asset) {
9
+ // resolveUrl already handles channel-prefix stripping, empty input and
10
+ // already-absolute passthrough — feed it the raw source key.
9
11
  return resolveUrl(asset.source);
10
12
  },
11
13
  getPresetUrl(asset, preset, format) {