@ecomiq/core 0.1.9 → 1.1.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 (278) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -2
  3. package/dist/_virtual/_rolldown/runtime-C6LprzCP.cjs +22 -0
  4. package/dist/api.cjs +117 -102
  5. package/dist/api.d.cts +33 -37
  6. package/dist/api.d.ts +33 -37
  7. package/dist/api.js +116 -100
  8. package/dist/client.cjs +499 -1676
  9. package/dist/client.d.cts +156 -15
  10. package/dist/client.d.ts +156 -15
  11. package/dist/client.js +500 -1675
  12. package/dist/index.cjs +344 -2092
  13. package/dist/index.d.cts +54 -1127
  14. package/dist/index.d.ts +54 -1127
  15. package/dist/index.js +53 -1895
  16. package/dist/libs/bounded-read-cache-Abmb5VnJ.js +41 -0
  17. package/dist/libs/bounded-read-cache-D4644LJo.cjs +41 -0
  18. package/dist/libs/catalog-link-key-B7l5KZsF.js +9 -0
  19. package/dist/libs/catalog-link-key-CZTHJBGD.cjs +9 -0
  20. package/dist/libs/catalog-link-key.d.cts +2 -0
  21. package/dist/libs/catalog-link-key.d.ts +2 -0
  22. package/dist/libs/graphql-_6Y8lR_Q.js +49 -0
  23. package/dist/libs/graphql-selection-Cj51WkJn.cjs +21 -0
  24. package/dist/libs/graphql-selection-H1RMh6VD.js +21 -0
  25. package/dist/libs/graphql-selection.d.cts +3 -0
  26. package/dist/libs/graphql-selection.d.ts +3 -0
  27. package/dist/libs/graphql-wJH7HaQU.cjs +50 -0
  28. package/dist/libs/graphql.d.cts +24 -0
  29. package/dist/libs/graphql.d.ts +24 -0
  30. package/dist/models/amounts-cKBCecl7.js +5 -0
  31. package/dist/models/amounts-lmg89eJQ.cjs +4 -0
  32. package/dist/models/articles-C-4JvT2Z.js +27 -0
  33. package/dist/models/articles-xHCXLKDK.cjs +30 -0
  34. package/dist/models/articles.d.cts +46 -0
  35. package/dist/models/articles.d.ts +46 -0
  36. package/dist/models/catalog-links-BzJeyBy4.js +80 -0
  37. package/dist/models/catalog-links-c4LADGf_.cjs +88 -0
  38. package/dist/models/catalog-links.d.cts +39 -0
  39. package/dist/models/catalog-links.d.ts +39 -0
  40. package/dist/models/categories-CKkJY8_P.js +42 -0
  41. package/dist/models/categories-DZ5i5kwi.cjs +45 -0
  42. package/dist/models/categories.d.cts +54 -0
  43. package/dist/models/categories.d.ts +54 -0
  44. package/dist/models/collections.cjs +13 -22
  45. package/dist/models/collections.d.cts +23 -56
  46. package/dist/models/collections.d.ts +23 -56
  47. package/dist/models/collections.js +12 -20
  48. package/dist/models/complaint-book-D5INpuI2.cjs +64 -0
  49. package/dist/models/complaint-book-QpQZe7Xl.js +58 -0
  50. package/dist/models/complaint-book.d.cts +71 -0
  51. package/dist/models/complaint-book.d.ts +71 -0
  52. package/dist/models/customer-address.cjs +39 -38
  53. package/dist/models/customer-address.d.cts +59 -158
  54. package/dist/models/customer-address.d.ts +59 -158
  55. package/dist/models/customer-address.js +38 -36
  56. package/dist/models/customer-order.cjs +183 -142
  57. package/dist/models/customer-order.d.cts +474 -857
  58. package/dist/models/customer-order.d.ts +474 -857
  59. package/dist/models/customer-order.js +180 -141
  60. package/dist/models/customer-profile.cjs +121 -118
  61. package/dist/models/customer-profile.d.cts +89 -174
  62. package/dist/models/customer-profile.d.ts +89 -174
  63. package/dist/models/customer-profile.js +121 -116
  64. package/dist/models/customer-registration-C13knqyv.js +28 -0
  65. package/dist/models/customer-registration-EZ0yZgGr.cjs +31 -0
  66. package/dist/models/customer-registration.d.cts +66 -0
  67. package/dist/models/customer-registration.d.ts +66 -0
  68. package/dist/models/customer-session-BiX0TXhO.js +41 -0
  69. package/dist/models/customer-session-JeQiC8Yx.cjs +45 -0
  70. package/dist/models/customer-session.d.cts +61 -0
  71. package/dist/models/customer-session.d.ts +61 -0
  72. package/dist/models/geo.cjs +52 -49
  73. package/dist/models/geo.d.cts +141 -270
  74. package/dist/models/geo.d.ts +141 -270
  75. package/dist/models/geo.js +51 -47
  76. package/dist/models/ids.cjs +8 -11
  77. package/dist/models/ids.d.cts +7 -10
  78. package/dist/models/ids.d.ts +7 -10
  79. package/dist/models/ids.js +7 -9
  80. package/dist/models/order-draft-C-2WRbjl.cjs +41 -0
  81. package/dist/models/order-draft-CSIWRIV0.js +39 -0
  82. package/dist/models/order-draft.d.cts +69 -0
  83. package/dist/models/order-draft.d.ts +69 -0
  84. package/dist/models/order-review--xGlZKtS.cjs +18 -0
  85. package/dist/models/order-review-egGeCaqB.js +17 -0
  86. package/dist/models/order-review.d.cts +22 -0
  87. package/dist/models/order-review.d.ts +22 -0
  88. package/dist/models/order-status-CS_OeSPY.cjs +66 -0
  89. package/dist/models/order-status-CgaLkU0M.js +60 -0
  90. package/dist/models/order-status.d.cts +307 -0
  91. package/dist/models/order-status.d.ts +307 -0
  92. package/dist/models/payment-methods--VUUZpMz.js +17 -0
  93. package/dist/models/payment-methods-CmK08zBM.cjs +19 -0
  94. package/dist/models/payment-methods.d.cts +28 -0
  95. package/dist/models/payment-methods.d.ts +28 -0
  96. package/dist/models/personalization-BPFmkdJ0.js +69 -0
  97. package/dist/models/personalization-CQosKg8O.cjs +77 -0
  98. package/dist/models/personalization.d.cts +83 -0
  99. package/dist/models/personalization.d.ts +83 -0
  100. package/dist/models/products.cjs +218 -194
  101. package/dist/models/products.d.cts +646 -1353
  102. package/dist/models/products.d.ts +646 -1353
  103. package/dist/models/products.js +214 -187
  104. package/dist/models/search.cjs +13 -23
  105. package/dist/models/search.d.cts +21 -51
  106. package/dist/models/search.d.ts +21 -51
  107. package/dist/models/search.js +12 -21
  108. package/dist/models/sellers.cjs +44 -0
  109. package/dist/models/sellers.d.cts +82 -0
  110. package/dist/models/sellers.d.ts +82 -0
  111. package/dist/models/sellers.js +38 -0
  112. package/dist/models/settings.cjs +205 -236
  113. package/dist/models/settings.d.cts +853 -6940
  114. package/dist/models/settings.d.ts +853 -6940
  115. package/dist/models/settings.js +213 -239
  116. package/dist/models/storefront-cart.cjs +152 -118
  117. package/dist/models/storefront-cart.d.cts +277 -706
  118. package/dist/models/storefront-cart.d.ts +277 -706
  119. package/dist/models/storefront-cart.js +148 -117
  120. package/dist/models/storefront-checkout.cjs +212 -297
  121. package/dist/models/storefront-checkout.d.cts +672 -2449
  122. package/dist/models/storefront-checkout.d.ts +672 -2449
  123. package/dist/models/storefront-checkout.js +208 -297
  124. package/dist/models/storefront-reviews.cjs +58 -43
  125. package/dist/models/storefront-reviews.d.cts +71 -139
  126. package/dist/models/storefront-reviews.d.ts +71 -139
  127. package/dist/models/storefront-reviews.js +55 -42
  128. package/dist/models/tracking-CiIAhQW0.js +33 -0
  129. package/dist/models/tracking-wNyzQ6Bp.cjs +36 -0
  130. package/dist/models/tracking.d.cts +26 -0
  131. package/dist/models/tracking.d.ts +26 -0
  132. package/dist/models/urls-B0ZODOwH.cjs +35 -0
  133. package/dist/models/urls-Dt_dTt4Q.js +33 -0
  134. package/dist/models/urls.d.cts +233 -0
  135. package/dist/models/urls.d.ts +233 -0
  136. package/dist/redirects.cjs +113 -0
  137. package/dist/redirects.d.cts +11 -0
  138. package/dist/redirects.d.ts +11 -0
  139. package/dist/redirects.js +108 -0
  140. package/dist/services/article.service-DBsOvflH.js +10 -0
  141. package/dist/services/article.service-zmTkbbPV.cjs +11 -0
  142. package/dist/services/article.service.d.cts +4 -0
  143. package/dist/services/article.service.d.ts +4 -0
  144. package/dist/services/cart.service-B0D8s6jI.cjs +37 -0
  145. package/dist/services/cart.service-yMCz9oQP.js +33 -0
  146. package/dist/services/cart.service.d.cts +572 -0
  147. package/dist/services/cart.service.d.ts +572 -0
  148. package/dist/services/catalog-link.service-BQ2d-EPX.js +8 -0
  149. package/dist/services/catalog-link.service-DiB-OVjn.cjs +8 -0
  150. package/dist/services/category.service-8tieYX2r.js +6 -0
  151. package/dist/services/category.service-BsSJZV2B.cjs +6 -0
  152. package/dist/services/checkout.service-CC-3tm2y.js +60 -0
  153. package/dist/services/checkout.service-CG8KrDNY.cjs +69 -0
  154. package/dist/services/checkout.service.d.cts +475 -0
  155. package/dist/services/checkout.service.d.ts +475 -0
  156. package/dist/services/collection.service-C4QETpuI.js +11 -0
  157. package/dist/services/collection.service-DHGN3rhs.cjs +12 -0
  158. package/dist/services/complaint-book.service-C7TxltQe.cjs +13 -0
  159. package/dist/services/complaint-book.service-DXiVyKdD.js +12 -0
  160. package/dist/services/complaint-book.service.d.cts +4 -0
  161. package/dist/services/complaint-book.service.d.ts +4 -0
  162. package/dist/services/customer-address.service-Ca4qla_R.cjs +51 -0
  163. package/dist/services/customer-address.service-xEThx7cQ.js +47 -0
  164. package/dist/services/customer-address.service.d.cts +19 -0
  165. package/dist/services/customer-address.service.d.ts +19 -0
  166. package/dist/services/customer-order.service-DLGgT0xa.cjs +54 -0
  167. package/dist/services/customer-order.service-qHoRBuyX.js +51 -0
  168. package/dist/services/customer-order.service.d.cts +34 -0
  169. package/dist/services/customer-order.service.d.ts +34 -0
  170. package/dist/services/customer-registration.service-C3BNyCHP.cjs +10 -0
  171. package/dist/services/customer-registration.service-CxcWD2hf.js +9 -0
  172. package/dist/services/customer-registration.service.d.cts +5 -0
  173. package/dist/services/customer-registration.service.d.ts +5 -0
  174. package/dist/services/customer-session.service-4YgfbWRB.js +16 -0
  175. package/dist/services/customer-session.service-Bd8pLC2v.cjs +19 -0
  176. package/dist/services/customer.service-BM0NrOxP.cjs +26 -0
  177. package/dist/services/customer.service-BoU6l2-R.js +25 -0
  178. package/dist/services/customer.service.d.cts +10 -0
  179. package/dist/services/customer.service.d.ts +10 -0
  180. package/dist/services/geo.service-C32R7N8W.js +39 -0
  181. package/dist/services/geo.service-JeTT3Wun.cjs +42 -0
  182. package/dist/services/geo.service.d.cts +10 -0
  183. package/dist/services/geo.service.d.ts +10 -0
  184. package/dist/services/layout.service-BkvLzl1g.cjs +50 -0
  185. package/dist/services/layout.service-DmbeMOkK.js +50 -0
  186. package/dist/services/layout.service.d.cts +9 -0
  187. package/dist/services/layout.service.d.ts +9 -0
  188. package/dist/services/order-draft.service-B0VcmWhn.js +13 -0
  189. package/dist/services/order-draft.service-Dlu6eEkV.cjs +14 -0
  190. package/dist/services/order-draft.service.d.cts +4 -0
  191. package/dist/services/order-draft.service.d.ts +4 -0
  192. package/dist/services/order-review.service-BEr-FB6_.cjs +11 -0
  193. package/dist/services/order-review.service-PdBPUsxE.js +11 -0
  194. package/dist/services/order-review.service.d.cts +7 -0
  195. package/dist/services/order-review.service.d.ts +7 -0
  196. package/dist/services/order-status.service-Cn7dsaJo.cjs +26 -0
  197. package/dist/services/order-status.service-MC9hVpP-.js +23 -0
  198. package/dist/services/order-status.service.d.cts +16 -0
  199. package/dist/services/order-status.service.d.ts +16 -0
  200. package/dist/services/page.service-CWhWCjMQ.js +7 -0
  201. package/dist/services/page.service-DmCSeMiR.cjs +7 -0
  202. package/dist/services/page.service.d.cts +4 -0
  203. package/dist/services/page.service.d.ts +4 -0
  204. package/dist/services/payment-method.service-CEt_nB4R.cjs +7 -0
  205. package/dist/services/payment-method.service-CjKbAsOh.js +7 -0
  206. package/dist/services/payment-method.service.d.cts +4 -0
  207. package/dist/services/payment-method.service.d.ts +4 -0
  208. package/dist/services/product.service-B05Qmbuh.js +35 -0
  209. package/dist/services/product.service-B7OFZWB1.cjs +37 -0
  210. package/dist/services/product.service.d.cts +256 -0
  211. package/dist/services/product.service.d.ts +256 -0
  212. package/dist/services/review.service-CO2icjpu.cjs +46 -0
  213. package/dist/services/review.service-De1YkhFp.js +43 -0
  214. package/dist/services/review.service.d.cts +28 -0
  215. package/dist/services/review.service.d.ts +28 -0
  216. package/dist/services/search.service-Bx1zbTHJ.cjs +10 -0
  217. package/dist/services/search.service-DSBMhaSY.js +10 -0
  218. package/dist/services/search.service.d.cts +9 -0
  219. package/dist/services/search.service.d.ts +9 -0
  220. package/dist/services/seller.service-D11WHhbC.cjs +10 -0
  221. package/dist/services/seller.service-DUptDTv4.js +9 -0
  222. package/dist/services/seller.service.d.cts +42 -0
  223. package/dist/services/seller.service.d.ts +42 -0
  224. package/dist/services/tracking.service-CPK1B69N.js +11 -0
  225. package/dist/services/tracking.service-DqOoi8qr.cjs +11 -0
  226. package/dist/services/tracking.service.d.cts +7 -0
  227. package/dist/services/tracking.service.d.ts +7 -0
  228. package/dist/services/url.service-B-nC14Ue.cjs +19 -0
  229. package/dist/services/url.service-CLW0Tc7S.js +18 -0
  230. package/dist/storefront-cache-revision.cjs +23 -0
  231. package/dist/storefront-cache-revision.d.cts +16 -0
  232. package/dist/storefront-cache-revision.d.ts +16 -0
  233. package/dist/storefront-cache-revision.js +17 -0
  234. package/dist/storefront-routes.cjs +14 -0
  235. package/dist/storefront-routes.d.cts +11 -0
  236. package/dist/storefront-routes.d.ts +11 -0
  237. package/dist/storefront-routes.js +12 -0
  238. package/dist/utils-CDEC5xcY.cjs +139 -0
  239. package/dist/utils-DK7qa54o.js +136 -0
  240. package/dist/utils.d.cts +3 -0
  241. package/dist/utils.d.ts +3 -0
  242. package/dist/video-links-CbRO0m8V.js +47 -0
  243. package/dist/video-links-ClryQjPH.cjs +47 -0
  244. package/dist/video-links.d.cts +7 -0
  245. package/dist/video-links.d.ts +7 -0
  246. package/package.json +28 -11
  247. package/dist/api.cjs.map +0 -1
  248. package/dist/api.js.map +0 -1
  249. package/dist/client-Ba1r_uiO.d.ts +0 -195
  250. package/dist/client-Cqcnv2tC.d.cts +0 -195
  251. package/dist/client.cjs.map +0 -1
  252. package/dist/client.js.map +0 -1
  253. package/dist/index.cjs.map +0 -1
  254. package/dist/index.js.map +0 -1
  255. package/dist/models/collections.cjs.map +0 -1
  256. package/dist/models/collections.js.map +0 -1
  257. package/dist/models/customer-address.cjs.map +0 -1
  258. package/dist/models/customer-address.js.map +0 -1
  259. package/dist/models/customer-order.cjs.map +0 -1
  260. package/dist/models/customer-order.js.map +0 -1
  261. package/dist/models/customer-profile.cjs.map +0 -1
  262. package/dist/models/customer-profile.js.map +0 -1
  263. package/dist/models/geo.cjs.map +0 -1
  264. package/dist/models/geo.js.map +0 -1
  265. package/dist/models/ids.cjs.map +0 -1
  266. package/dist/models/ids.js.map +0 -1
  267. package/dist/models/products.cjs.map +0 -1
  268. package/dist/models/products.js.map +0 -1
  269. package/dist/models/search.cjs.map +0 -1
  270. package/dist/models/search.js.map +0 -1
  271. package/dist/models/settings.cjs.map +0 -1
  272. package/dist/models/settings.js.map +0 -1
  273. package/dist/models/storefront-cart.cjs.map +0 -1
  274. package/dist/models/storefront-cart.js.map +0 -1
  275. package/dist/models/storefront-checkout.cjs.map +0 -1
  276. package/dist/models/storefront-checkout.js.map +0 -1
  277. package/dist/models/storefront-reviews.cjs.map +0 -1
  278. package/dist/models/storefront-reviews.js.map +0 -1
@@ -0,0 +1,69 @@
1
+ const require_models_storefront_cart = require("../models/storefront-cart.cjs");
2
+ const require_models_storefront_checkout = require("../models/storefront-checkout.cjs");
3
+ // src/services/checkout.service.ts
4
+ /** GET /v1/carts/{cartToken}/checkout */
5
+ async function getCartCheckout(api, params) {
6
+ const input = require_models_storefront_checkout.CartCheckoutReadParamsSchema.parse(params);
7
+ return api.get(`carts/${encodeURIComponent(input.cartToken)}/checkout`, require_models_storefront_checkout.CartCheckoutReadResponseSchema);
8
+ }
9
+ /** GET /v1/carts/{cartToken}/shipping-options?postalCode= */
10
+ async function getShippingOptions(api, params) {
11
+ const input = require_models_storefront_checkout.GetShippingOptionsParamsSchema.parse(params);
12
+ return api.get(`carts/${encodeURIComponent(input.cartToken)}/shipping-options`, require_models_storefront_checkout.ShippingOptionsResponseSchema, { query: { postalCode: input.postalCode } });
13
+ }
14
+ /** PUT /v1/carts/{cartToken}/shipping-method */
15
+ async function putCartShippingMethod(api, params) {
16
+ const { cartToken, ...body } = require_models_storefront_checkout.PutShippingMethodParamsSchema.parse(params);
17
+ return api.request("PUT", `carts/${encodeURIComponent(cartToken)}/shipping-method`, require_models_storefront_cart.StorefrontCartSchema, { body });
18
+ }
19
+ async function putCartPaymentMethod(api, params) {
20
+ const { cartToken, ...body } = require_models_storefront_checkout.PutCartPaymentMethodParamsSchema.parse(params);
21
+ return api.request("PUT", `carts/${encodeURIComponent(cartToken)}/payment-method`, require_models_storefront_cart.StorefrontCartSchema, { body });
22
+ }
23
+ /** PATCH /v1/carts/{cartToken}/buyer */
24
+ async function patchCartBuyer(api, params) {
25
+ const { cartToken, ...body } = require_models_storefront_checkout.CartBuyerParamsSchema.parse(params);
26
+ return api.request("PATCH", `carts/${encodeURIComponent(cartToken)}/buyer`, require_models_storefront_cart.StorefrontCartSchema, { body });
27
+ }
28
+ /** PATCH /v1/carts/{cartToken}/addresses */
29
+ async function patchCartAddresses(api, params) {
30
+ const { cartToken, shippingAddress, billingAddress } = require_models_storefront_checkout.CartAddressesParamsSchema.parse(params);
31
+ return api.request("PATCH", `carts/${encodeURIComponent(cartToken)}/addresses`, require_models_storefront_cart.StorefrontCartSchema, { body: {
32
+ shippingAddress,
33
+ billingAddress
34
+ } });
35
+ }
36
+ /** POST /v1/carts/{cartToken}/checkout */
37
+ async function checkoutCart(api, params, options = {}) {
38
+ const { cartToken, ...body } = require_models_storefront_checkout.CartCheckoutParamsSchema.parse(params);
39
+ return api.post(`carts/${encodeURIComponent(cartToken)}/checkout`, body, require_models_storefront_checkout.CartCheckoutResponseSchema, options);
40
+ }
41
+ /** POST /v1/carts/{cartToken}/payment-receipt (multipart) */
42
+ async function uploadPaymentReceipt(api, params) {
43
+ const cartToken = require_models_storefront_checkout.CartCheckoutReadParamsSchema.shape.cartToken.parse(params.cartToken);
44
+ if (!(params.file instanceof Blob)) throw new TypeError("uploadPaymentReceipt requiere un archivo (Blob/File)");
45
+ const form = new FormData();
46
+ const name = params.fileName ?? (params.file instanceof File ? params.file.name : "receipt");
47
+ form.append("file", params.file, name);
48
+ return api.postForm(`carts/${encodeURIComponent(cartToken)}/payment-receipt`, form, require_models_storefront_checkout.CartPaymentReceiptResponseSchema);
49
+ }
50
+ /** POST /v1/carts/{cartToken}/promotion-codes */
51
+ async function addCartPromotionCode(api, params) {
52
+ const input = require_models_storefront_checkout.CartPromotionCodeParamsSchema.parse(params);
53
+ return api.post(`carts/${encodeURIComponent(input.cartToken)}/promotion-codes`, { code: input.code }, require_models_storefront_cart.StorefrontCartSchema);
54
+ }
55
+ /** DELETE /v1/carts/{cartToken}/promotion-codes/{code} */
56
+ async function removeCartPromotionCode(api, params) {
57
+ const input = require_models_storefront_checkout.CartPromotionCodeParamsSchema.parse(params);
58
+ return api.request("DELETE", `carts/${encodeURIComponent(input.cartToken)}/promotion-codes/${encodeURIComponent(input.code)}`, require_models_storefront_cart.StorefrontCartSchema);
59
+ }
60
+ exports.addCartPromotionCode = addCartPromotionCode;
61
+ exports.checkoutCart = checkoutCart;
62
+ exports.getCartCheckout = getCartCheckout;
63
+ exports.getShippingOptions = getShippingOptions;
64
+ exports.patchCartAddresses = patchCartAddresses;
65
+ exports.patchCartBuyer = patchCartBuyer;
66
+ exports.putCartPaymentMethod = putCartPaymentMethod;
67
+ exports.putCartShippingMethod = putCartShippingMethod;
68
+ exports.removeCartPromotionCode = removeCartPromotionCode;
69
+ exports.uploadPaymentReceipt = uploadPaymentReceipt;
@@ -0,0 +1,475 @@
1
+ import { Api } from "../api.cjs";
2
+ import { CustomerRequestOptions } from "./customer.service.cjs";
3
+ import { StorefrontCart } from "../models/storefront-cart.cjs";
4
+ import { CartAddressesParams, CartBuyerParams, CartCheckoutParams, CartCheckoutReadParams, CartCheckoutReadResponse, CartCheckoutResponse, CartPaymentReceiptResponse, CartPromotionCodeParams, GetShippingOptionsParams, PutCartPaymentMethodParams, PutShippingMethodParams, ShippingOptionsResponse, UploadPaymentReceiptParams } from "../models/storefront-checkout.cjs";
5
+ /** GET /v1/carts/{cartToken}/checkout */
6
+ export declare function getCartCheckout(api: Api, params: CartCheckoutReadParams): Promise<CartCheckoutReadResponse>;
7
+ /** GET /v1/carts/{cartToken}/shipping-options?postalCode= */
8
+ export declare function getShippingOptions(api: Api, params: GetShippingOptionsParams): Promise<ShippingOptionsResponse>;
9
+ /** PUT /v1/carts/{cartToken}/shipping-method */
10
+ export declare function putCartShippingMethod(api: Api, params: PutShippingMethodParams): Promise<{
11
+ id: string;
12
+ token: string;
13
+ cartNumber: string;
14
+ email: string | null;
15
+ phone: string | null;
16
+ firstName: string | null;
17
+ lastName: string | null;
18
+ currencyCode: string;
19
+ status: "abandoned" | "cancelled" | "completed" | "expired" | "failed" | "inProgress" | "pending";
20
+ completedAt: string | null;
21
+ shippingAddress: {
22
+ name: string | null;
23
+ address1: string;
24
+ city: string;
25
+ countryCode: string;
26
+ company: string | null;
27
+ address2: string | null;
28
+ department?: string | null | undefined;
29
+ province: string | null;
30
+ postalCode: string | null;
31
+ district: string | null;
32
+ phone: string | null;
33
+ latitude: number | null;
34
+ longitude: number | null;
35
+ } | null;
36
+ billingAddress: {
37
+ name: string | null;
38
+ address1: string;
39
+ city: string;
40
+ countryCode: string;
41
+ company: string | null;
42
+ address2: string | null;
43
+ department?: string | null | undefined;
44
+ province: string | null;
45
+ postalCode: string | null;
46
+ district: string | null;
47
+ phone: string | null;
48
+ latitude: number | null;
49
+ longitude: number | null;
50
+ } | null;
51
+ promotionCodes: string[];
52
+ items: {
53
+ id: string;
54
+ productId: string | null;
55
+ title: string;
56
+ variantLabel: string | null;
57
+ productHandle: string | null;
58
+ productUrl: string | null;
59
+ thumbnail: string | null;
60
+ quantity: number;
61
+ variantId: string | null;
62
+ variantSku: string | null;
63
+ unitPrice: number;
64
+ compareAtUnitPrice: number | null;
65
+ bundleItems: {
66
+ productId: string;
67
+ variantId: string;
68
+ productName: string;
69
+ variantName: string | null;
70
+ sku: string | null;
71
+ brand: string | null;
72
+ imageUrl: string | null;
73
+ quantity: number;
74
+ }[];
75
+ requiresShipping: boolean;
76
+ sellerId: string | null;
77
+ sellerName: string | null;
78
+ orderBumpId: string | null;
79
+ modifiers: {
80
+ modifierGroupId: string;
81
+ modifierGroupName: string;
82
+ modifierOptionId: string | null;
83
+ modifierOptionName: string | null;
84
+ value: string | null;
85
+ quantity: number;
86
+ priceDelta: number;
87
+ }[];
88
+ }[];
89
+ shippingMethods: {
90
+ id: string;
91
+ shippingMethodId: string | null;
92
+ rateId: string | null;
93
+ name: string;
94
+ description: string | null;
95
+ type: "express" | "localDelivery" | "pickup" | "regular" | "sameDay";
96
+ target: "automatic" | "location" | "pickupPoint";
97
+ targetId: string | null;
98
+ fulfillmentLocationId: string | null;
99
+ total: number;
100
+ estimatedDays: number | null;
101
+ scheduledDate: string | null;
102
+ scheduledTime: string | null;
103
+ serviceCode: string | null;
104
+ sellerId: string | null;
105
+ shippingProfileId: string | null;
106
+ }[];
107
+ paymentMethodCode: string | null;
108
+ totals: {
109
+ subtotal: number;
110
+ discountTotal: number;
111
+ shippingOriginalTotal: number;
112
+ shippingTotal: number;
113
+ taxTotal: number;
114
+ warrantyTotal: number;
115
+ total: number;
116
+ };
117
+ invoiceType: "invoice" | "receipt" | "ticket";
118
+ identificationType: string | null;
119
+ identificationCountryCode?: string | null | undefined;
120
+ identificationNumber: string | null;
121
+ entityTaxId: string | null;
122
+ entityName: string | null;
123
+ }>;
124
+ export declare function putCartPaymentMethod(api: Api, params: PutCartPaymentMethodParams): Promise<StorefrontCart>;
125
+ /** PATCH /v1/carts/{cartToken}/buyer */
126
+ export declare function patchCartBuyer(api: Api, params: CartBuyerParams): Promise<{
127
+ id: string;
128
+ token: string;
129
+ cartNumber: string;
130
+ email: string | null;
131
+ phone: string | null;
132
+ firstName: string | null;
133
+ lastName: string | null;
134
+ currencyCode: string;
135
+ status: "abandoned" | "cancelled" | "completed" | "expired" | "failed" | "inProgress" | "pending";
136
+ completedAt: string | null;
137
+ shippingAddress: {
138
+ name: string | null;
139
+ address1: string;
140
+ city: string;
141
+ countryCode: string;
142
+ company: string | null;
143
+ address2: string | null;
144
+ department?: string | null | undefined;
145
+ province: string | null;
146
+ postalCode: string | null;
147
+ district: string | null;
148
+ phone: string | null;
149
+ latitude: number | null;
150
+ longitude: number | null;
151
+ } | null;
152
+ billingAddress: {
153
+ name: string | null;
154
+ address1: string;
155
+ city: string;
156
+ countryCode: string;
157
+ company: string | null;
158
+ address2: string | null;
159
+ department?: string | null | undefined;
160
+ province: string | null;
161
+ postalCode: string | null;
162
+ district: string | null;
163
+ phone: string | null;
164
+ latitude: number | null;
165
+ longitude: number | null;
166
+ } | null;
167
+ promotionCodes: string[];
168
+ items: {
169
+ id: string;
170
+ productId: string | null;
171
+ title: string;
172
+ variantLabel: string | null;
173
+ productHandle: string | null;
174
+ productUrl: string | null;
175
+ thumbnail: string | null;
176
+ quantity: number;
177
+ variantId: string | null;
178
+ variantSku: string | null;
179
+ unitPrice: number;
180
+ compareAtUnitPrice: number | null;
181
+ bundleItems: {
182
+ productId: string;
183
+ variantId: string;
184
+ productName: string;
185
+ variantName: string | null;
186
+ sku: string | null;
187
+ brand: string | null;
188
+ imageUrl: string | null;
189
+ quantity: number;
190
+ }[];
191
+ requiresShipping: boolean;
192
+ sellerId: string | null;
193
+ sellerName: string | null;
194
+ orderBumpId: string | null;
195
+ modifiers: {
196
+ modifierGroupId: string;
197
+ modifierGroupName: string;
198
+ modifierOptionId: string | null;
199
+ modifierOptionName: string | null;
200
+ value: string | null;
201
+ quantity: number;
202
+ priceDelta: number;
203
+ }[];
204
+ }[];
205
+ shippingMethods: {
206
+ id: string;
207
+ shippingMethodId: string | null;
208
+ rateId: string | null;
209
+ name: string;
210
+ description: string | null;
211
+ type: "express" | "localDelivery" | "pickup" | "regular" | "sameDay";
212
+ target: "automatic" | "location" | "pickupPoint";
213
+ targetId: string | null;
214
+ fulfillmentLocationId: string | null;
215
+ total: number;
216
+ estimatedDays: number | null;
217
+ scheduledDate: string | null;
218
+ scheduledTime: string | null;
219
+ serviceCode: string | null;
220
+ sellerId: string | null;
221
+ shippingProfileId: string | null;
222
+ }[];
223
+ paymentMethodCode: string | null;
224
+ totals: {
225
+ subtotal: number;
226
+ discountTotal: number;
227
+ shippingOriginalTotal: number;
228
+ shippingTotal: number;
229
+ taxTotal: number;
230
+ warrantyTotal: number;
231
+ total: number;
232
+ };
233
+ invoiceType: "invoice" | "receipt" | "ticket";
234
+ identificationType: string | null;
235
+ identificationCountryCode?: string | null | undefined;
236
+ identificationNumber: string | null;
237
+ entityTaxId: string | null;
238
+ entityName: string | null;
239
+ }>;
240
+ /** PATCH /v1/carts/{cartToken}/addresses */
241
+ export declare function patchCartAddresses(api: Api, params: CartAddressesParams): Promise<StorefrontCart>;
242
+ /** POST /v1/carts/{cartToken}/checkout */
243
+ export declare function checkoutCart(api: Api, params: CartCheckoutParams, options?: CustomerRequestOptions): Promise<CartCheckoutResponse>;
244
+ /** POST /v1/carts/{cartToken}/payment-receipt (multipart) */
245
+ export declare function uploadPaymentReceipt(api: Api, params: UploadPaymentReceiptParams): Promise<CartPaymentReceiptResponse>;
246
+ /** POST /v1/carts/{cartToken}/promotion-codes */
247
+ export declare function addCartPromotionCode(api: Api, params: CartPromotionCodeParams): Promise<{
248
+ id: string;
249
+ token: string;
250
+ cartNumber: string;
251
+ email: string | null;
252
+ phone: string | null;
253
+ firstName: string | null;
254
+ lastName: string | null;
255
+ currencyCode: string;
256
+ status: "abandoned" | "cancelled" | "completed" | "expired" | "failed" | "inProgress" | "pending";
257
+ completedAt: string | null;
258
+ shippingAddress: {
259
+ name: string | null;
260
+ address1: string;
261
+ city: string;
262
+ countryCode: string;
263
+ company: string | null;
264
+ address2: string | null;
265
+ department?: string | null | undefined;
266
+ province: string | null;
267
+ postalCode: string | null;
268
+ district: string | null;
269
+ phone: string | null;
270
+ latitude: number | null;
271
+ longitude: number | null;
272
+ } | null;
273
+ billingAddress: {
274
+ name: string | null;
275
+ address1: string;
276
+ city: string;
277
+ countryCode: string;
278
+ company: string | null;
279
+ address2: string | null;
280
+ department?: string | null | undefined;
281
+ province: string | null;
282
+ postalCode: string | null;
283
+ district: string | null;
284
+ phone: string | null;
285
+ latitude: number | null;
286
+ longitude: number | null;
287
+ } | null;
288
+ promotionCodes: string[];
289
+ items: {
290
+ id: string;
291
+ productId: string | null;
292
+ title: string;
293
+ variantLabel: string | null;
294
+ productHandle: string | null;
295
+ productUrl: string | null;
296
+ thumbnail: string | null;
297
+ quantity: number;
298
+ variantId: string | null;
299
+ variantSku: string | null;
300
+ unitPrice: number;
301
+ compareAtUnitPrice: number | null;
302
+ bundleItems: {
303
+ productId: string;
304
+ variantId: string;
305
+ productName: string;
306
+ variantName: string | null;
307
+ sku: string | null;
308
+ brand: string | null;
309
+ imageUrl: string | null;
310
+ quantity: number;
311
+ }[];
312
+ requiresShipping: boolean;
313
+ sellerId: string | null;
314
+ sellerName: string | null;
315
+ orderBumpId: string | null;
316
+ modifiers: {
317
+ modifierGroupId: string;
318
+ modifierGroupName: string;
319
+ modifierOptionId: string | null;
320
+ modifierOptionName: string | null;
321
+ value: string | null;
322
+ quantity: number;
323
+ priceDelta: number;
324
+ }[];
325
+ }[];
326
+ shippingMethods: {
327
+ id: string;
328
+ shippingMethodId: string | null;
329
+ rateId: string | null;
330
+ name: string;
331
+ description: string | null;
332
+ type: "express" | "localDelivery" | "pickup" | "regular" | "sameDay";
333
+ target: "automatic" | "location" | "pickupPoint";
334
+ targetId: string | null;
335
+ fulfillmentLocationId: string | null;
336
+ total: number;
337
+ estimatedDays: number | null;
338
+ scheduledDate: string | null;
339
+ scheduledTime: string | null;
340
+ serviceCode: string | null;
341
+ sellerId: string | null;
342
+ shippingProfileId: string | null;
343
+ }[];
344
+ paymentMethodCode: string | null;
345
+ totals: {
346
+ subtotal: number;
347
+ discountTotal: number;
348
+ shippingOriginalTotal: number;
349
+ shippingTotal: number;
350
+ taxTotal: number;
351
+ warrantyTotal: number;
352
+ total: number;
353
+ };
354
+ invoiceType: "invoice" | "receipt" | "ticket";
355
+ identificationType: string | null;
356
+ identificationCountryCode?: string | null | undefined;
357
+ identificationNumber: string | null;
358
+ entityTaxId: string | null;
359
+ entityName: string | null;
360
+ }>;
361
+ /** DELETE /v1/carts/{cartToken}/promotion-codes/{code} */
362
+ export declare function removeCartPromotionCode(api: Api, params: CartPromotionCodeParams): Promise<{
363
+ id: string;
364
+ token: string;
365
+ cartNumber: string;
366
+ email: string | null;
367
+ phone: string | null;
368
+ firstName: string | null;
369
+ lastName: string | null;
370
+ currencyCode: string;
371
+ status: "abandoned" | "cancelled" | "completed" | "expired" | "failed" | "inProgress" | "pending";
372
+ completedAt: string | null;
373
+ shippingAddress: {
374
+ name: string | null;
375
+ address1: string;
376
+ city: string;
377
+ countryCode: string;
378
+ company: string | null;
379
+ address2: string | null;
380
+ department?: string | null | undefined;
381
+ province: string | null;
382
+ postalCode: string | null;
383
+ district: string | null;
384
+ phone: string | null;
385
+ latitude: number | null;
386
+ longitude: number | null;
387
+ } | null;
388
+ billingAddress: {
389
+ name: string | null;
390
+ address1: string;
391
+ city: string;
392
+ countryCode: string;
393
+ company: string | null;
394
+ address2: string | null;
395
+ department?: string | null | undefined;
396
+ province: string | null;
397
+ postalCode: string | null;
398
+ district: string | null;
399
+ phone: string | null;
400
+ latitude: number | null;
401
+ longitude: number | null;
402
+ } | null;
403
+ promotionCodes: string[];
404
+ items: {
405
+ id: string;
406
+ productId: string | null;
407
+ title: string;
408
+ variantLabel: string | null;
409
+ productHandle: string | null;
410
+ productUrl: string | null;
411
+ thumbnail: string | null;
412
+ quantity: number;
413
+ variantId: string | null;
414
+ variantSku: string | null;
415
+ unitPrice: number;
416
+ compareAtUnitPrice: number | null;
417
+ bundleItems: {
418
+ productId: string;
419
+ variantId: string;
420
+ productName: string;
421
+ variantName: string | null;
422
+ sku: string | null;
423
+ brand: string | null;
424
+ imageUrl: string | null;
425
+ quantity: number;
426
+ }[];
427
+ requiresShipping: boolean;
428
+ sellerId: string | null;
429
+ sellerName: string | null;
430
+ orderBumpId: string | null;
431
+ modifiers: {
432
+ modifierGroupId: string;
433
+ modifierGroupName: string;
434
+ modifierOptionId: string | null;
435
+ modifierOptionName: string | null;
436
+ value: string | null;
437
+ quantity: number;
438
+ priceDelta: number;
439
+ }[];
440
+ }[];
441
+ shippingMethods: {
442
+ id: string;
443
+ shippingMethodId: string | null;
444
+ rateId: string | null;
445
+ name: string;
446
+ description: string | null;
447
+ type: "express" | "localDelivery" | "pickup" | "regular" | "sameDay";
448
+ target: "automatic" | "location" | "pickupPoint";
449
+ targetId: string | null;
450
+ fulfillmentLocationId: string | null;
451
+ total: number;
452
+ estimatedDays: number | null;
453
+ scheduledDate: string | null;
454
+ scheduledTime: string | null;
455
+ serviceCode: string | null;
456
+ sellerId: string | null;
457
+ shippingProfileId: string | null;
458
+ }[];
459
+ paymentMethodCode: string | null;
460
+ totals: {
461
+ subtotal: number;
462
+ discountTotal: number;
463
+ shippingOriginalTotal: number;
464
+ shippingTotal: number;
465
+ taxTotal: number;
466
+ warrantyTotal: number;
467
+ total: number;
468
+ };
469
+ invoiceType: "invoice" | "receipt" | "ticket";
470
+ identificationType: string | null;
471
+ identificationCountryCode?: string | null | undefined;
472
+ identificationNumber: string | null;
473
+ entityTaxId: string | null;
474
+ entityName: string | null;
475
+ }>;