@commercelayer/sdk 4.27.1 → 4.28.1

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 (443) hide show
  1. package/lib/cjs/api.d.ts +10 -3
  2. package/lib/cjs/api.js +25 -4
  3. package/lib/cjs/commercelayer.d.ts +9 -2
  4. package/lib/cjs/commercelayer.js +8 -1
  5. package/lib/cjs/model.d.ts +10 -3
  6. package/lib/cjs/resource.d.ts +7 -9
  7. package/lib/cjs/resources/addresses.d.ts +14 -0
  8. package/lib/cjs/resources/addresses.js +12 -0
  9. package/lib/cjs/resources/adjustments.d.ts +3 -0
  10. package/lib/cjs/resources/adjustments.js +4 -0
  11. package/lib/cjs/resources/adyen_gateways.d.ts +5 -2
  12. package/lib/cjs/resources/adyen_gateways.js +4 -0
  13. package/lib/cjs/resources/adyen_payments.d.ts +3 -0
  14. package/lib/cjs/resources/adyen_payments.js +4 -0
  15. package/lib/cjs/resources/authorizations.d.ts +9 -3
  16. package/lib/cjs/resources/authorizations.js +12 -4
  17. package/lib/cjs/resources/avalara_accounts.d.ts +9 -6
  18. package/lib/cjs/resources/avalara_accounts.js +4 -0
  19. package/lib/cjs/resources/axerve_gateways.d.ts +4 -0
  20. package/lib/cjs/resources/axerve_gateways.js +4 -0
  21. package/lib/cjs/resources/axerve_payments.d.ts +9 -0
  22. package/lib/cjs/resources/axerve_payments.js +4 -0
  23. package/lib/cjs/resources/billing_info_validation_rules.d.ts +3 -0
  24. package/lib/cjs/resources/billing_info_validation_rules.js +4 -0
  25. package/lib/cjs/resources/braintree_gateways.d.ts +3 -0
  26. package/lib/cjs/resources/braintree_gateways.js +4 -0
  27. package/lib/cjs/resources/braintree_payments.d.ts +3 -0
  28. package/lib/cjs/resources/braintree_payments.js +4 -0
  29. package/lib/cjs/resources/bundles.d.ts +16 -2
  30. package/lib/cjs/resources/bundles.js +12 -0
  31. package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +134 -0
  32. package/lib/cjs/resources/buy_x_pay_y_promotions.js +81 -0
  33. package/lib/cjs/resources/captures.d.ts +9 -3
  34. package/lib/cjs/resources/captures.js +12 -4
  35. package/lib/cjs/resources/carrier_accounts.d.ts +3 -0
  36. package/lib/cjs/resources/carrier_accounts.js +4 -0
  37. package/lib/cjs/resources/checkout_com_gateways.d.ts +3 -0
  38. package/lib/cjs/resources/checkout_com_gateways.js +4 -0
  39. package/lib/cjs/resources/checkout_com_payments.d.ts +3 -0
  40. package/lib/cjs/resources/checkout_com_payments.js +4 -0
  41. package/lib/cjs/resources/cleanups.d.ts +3 -0
  42. package/lib/cjs/resources/cleanups.js +4 -0
  43. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +10 -3
  44. package/lib/cjs/resources/coupon_codes_promotion_rules.js +4 -0
  45. package/lib/cjs/resources/coupon_recipients.d.ts +3 -0
  46. package/lib/cjs/resources/coupon_recipients.js +4 -0
  47. package/lib/cjs/resources/coupons.d.ts +26 -1
  48. package/lib/cjs/resources/coupons.js +16 -0
  49. package/lib/cjs/resources/custom_promotion_rules.d.ts +61 -0
  50. package/lib/cjs/resources/custom_promotion_rules.js +37 -0
  51. package/lib/cjs/resources/customer_addresses.d.ts +5 -0
  52. package/lib/cjs/resources/customer_addresses.js +4 -0
  53. package/lib/cjs/resources/customer_groups.d.ts +3 -0
  54. package/lib/cjs/resources/customer_groups.js +4 -0
  55. package/lib/cjs/resources/customer_payment_sources.d.ts +18 -11
  56. package/lib/cjs/resources/customer_payment_sources.js +8 -0
  57. package/lib/cjs/resources/customer_subscriptions.d.ts +3 -0
  58. package/lib/cjs/resources/customer_subscriptions.js +4 -0
  59. package/lib/cjs/resources/customers.d.ts +9 -0
  60. package/lib/cjs/resources/customers.js +4 -0
  61. package/lib/cjs/resources/delivery_lead_times.d.ts +3 -0
  62. package/lib/cjs/resources/delivery_lead_times.js +4 -0
  63. package/lib/cjs/resources/external_gateways.d.ts +3 -0
  64. package/lib/cjs/resources/external_gateways.js +4 -0
  65. package/lib/cjs/resources/external_payments.d.ts +3 -0
  66. package/lib/cjs/resources/external_payments.js +4 -0
  67. package/lib/cjs/resources/external_promotions.d.ts +45 -6
  68. package/lib/cjs/resources/external_promotions.js +24 -0
  69. package/lib/cjs/resources/external_tax_calculators.d.ts +3 -0
  70. package/lib/cjs/resources/external_tax_calculators.js +4 -0
  71. package/lib/cjs/resources/fixed_amount_promotions.d.ts +45 -6
  72. package/lib/cjs/resources/fixed_amount_promotions.js +24 -0
  73. package/lib/cjs/resources/fixed_price_promotions.d.ts +37 -9
  74. package/lib/cjs/resources/fixed_price_promotions.js +18 -2
  75. package/lib/cjs/resources/free_gift_promotions.d.ts +37 -9
  76. package/lib/cjs/resources/free_gift_promotions.js +18 -2
  77. package/lib/cjs/resources/free_shipping_promotions.d.ts +42 -6
  78. package/lib/cjs/resources/free_shipping_promotions.js +20 -0
  79. package/lib/cjs/resources/gift_card_recipients.d.ts +3 -0
  80. package/lib/cjs/resources/gift_card_recipients.js +4 -0
  81. package/lib/cjs/resources/gift_cards.d.ts +11 -0
  82. package/lib/cjs/resources/gift_cards.js +8 -0
  83. package/lib/cjs/resources/imports.d.ts +1 -3
  84. package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -0
  85. package/lib/cjs/resources/in_stock_subscriptions.js +4 -0
  86. package/lib/cjs/resources/inventory_models.d.ts +12 -0
  87. package/lib/cjs/resources/inventory_models.js +4 -0
  88. package/lib/cjs/resources/inventory_return_locations.d.ts +3 -0
  89. package/lib/cjs/resources/inventory_return_locations.js +4 -0
  90. package/lib/cjs/resources/inventory_stock_locations.d.ts +3 -0
  91. package/lib/cjs/resources/inventory_stock_locations.js +4 -0
  92. package/lib/cjs/resources/klarna_gateways.d.ts +3 -0
  93. package/lib/cjs/resources/klarna_gateways.js +4 -0
  94. package/lib/cjs/resources/klarna_payments.d.ts +3 -0
  95. package/lib/cjs/resources/klarna_payments.js +4 -0
  96. package/lib/cjs/resources/line_item_options.d.ts +11 -0
  97. package/lib/cjs/resources/line_item_options.js +8 -0
  98. package/lib/cjs/resources/line_items.d.ts +30 -0
  99. package/lib/cjs/resources/line_items.js +16 -0
  100. package/lib/cjs/resources/manual_gateways.d.ts +3 -0
  101. package/lib/cjs/resources/manual_gateways.js +4 -0
  102. package/lib/cjs/resources/manual_tax_calculators.d.ts +3 -0
  103. package/lib/cjs/resources/manual_tax_calculators.js +4 -0
  104. package/lib/cjs/resources/markets.d.ts +8 -0
  105. package/lib/cjs/resources/markets.js +4 -0
  106. package/lib/cjs/resources/merchants.d.ts +3 -0
  107. package/lib/cjs/resources/merchants.js +4 -0
  108. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +13 -3
  109. package/lib/cjs/resources/order_amount_promotion_rules.js +4 -0
  110. package/lib/cjs/resources/order_subscription_items.d.ts +7 -0
  111. package/lib/cjs/resources/order_subscription_items.js +4 -0
  112. package/lib/cjs/resources/order_subscriptions.d.ts +4 -0
  113. package/lib/cjs/resources/order_subscriptions.js +4 -0
  114. package/lib/cjs/resources/order_validation_rules.d.ts +3 -0
  115. package/lib/cjs/resources/order_validation_rules.js +4 -0
  116. package/lib/cjs/resources/orders.d.ts +50 -6
  117. package/lib/cjs/resources/orders.js +32 -0
  118. package/lib/cjs/resources/organization.d.ts +4 -4
  119. package/lib/cjs/resources/packages.d.ts +3 -0
  120. package/lib/cjs/resources/packages.js +4 -0
  121. package/lib/cjs/resources/parcel_line_items.d.ts +4 -1
  122. package/lib/cjs/resources/parcel_line_items.js +4 -0
  123. package/lib/cjs/resources/parcels.d.ts +9 -3
  124. package/lib/cjs/resources/parcels.js +4 -0
  125. package/lib/cjs/resources/payment_gateways.d.ts +3 -0
  126. package/lib/cjs/resources/payment_gateways.js +4 -0
  127. package/lib/cjs/resources/payment_methods.d.ts +9 -1
  128. package/lib/cjs/resources/payment_methods.js +4 -0
  129. package/lib/cjs/resources/payment_options.d.ts +43 -0
  130. package/lib/cjs/resources/payment_options.js +41 -0
  131. package/lib/cjs/resources/paypal_gateways.d.ts +3 -0
  132. package/lib/cjs/resources/paypal_gateways.js +4 -0
  133. package/lib/cjs/resources/paypal_payments.d.ts +3 -0
  134. package/lib/cjs/resources/paypal_payments.js +4 -0
  135. package/lib/cjs/resources/percentage_discount_promotions.d.ts +37 -9
  136. package/lib/cjs/resources/percentage_discount_promotions.js +18 -2
  137. package/lib/cjs/resources/price_frequency_tiers.d.ts +3 -0
  138. package/lib/cjs/resources/price_frequency_tiers.js +4 -0
  139. package/lib/cjs/resources/price_lists.d.ts +6 -0
  140. package/lib/cjs/resources/price_lists.js +4 -0
  141. package/lib/cjs/resources/price_tiers.d.ts +3 -0
  142. package/lib/cjs/resources/price_tiers.js +4 -0
  143. package/lib/cjs/resources/price_volume_tiers.d.ts +3 -0
  144. package/lib/cjs/resources/price_volume_tiers.js +4 -0
  145. package/lib/cjs/resources/prices.d.ts +4 -1
  146. package/lib/cjs/resources/prices.js +4 -0
  147. package/lib/cjs/resources/promotion_rules.d.ts +5 -1
  148. package/lib/cjs/resources/promotion_rules.js +4 -0
  149. package/lib/cjs/resources/promotions.d.ts +18 -0
  150. package/lib/cjs/resources/promotions.js +20 -0
  151. package/lib/cjs/resources/refunds.d.ts +9 -3
  152. package/lib/cjs/resources/refunds.js +10 -2
  153. package/lib/cjs/resources/reserved_stocks.d.ts +27 -0
  154. package/lib/cjs/resources/reserved_stocks.js +36 -0
  155. package/lib/cjs/resources/return_line_items.d.ts +2 -1
  156. package/lib/cjs/resources/returns.d.ts +11 -0
  157. package/lib/cjs/resources/returns.js +8 -0
  158. package/lib/cjs/resources/satispay_gateways.d.ts +6 -0
  159. package/lib/cjs/resources/satispay_gateways.js +4 -0
  160. package/lib/cjs/resources/satispay_payments.d.ts +11 -3
  161. package/lib/cjs/resources/satispay_payments.js +4 -0
  162. package/lib/cjs/resources/shipments.d.ts +49 -2
  163. package/lib/cjs/resources/shipments.js +18 -0
  164. package/lib/cjs/resources/shipping_categories.d.ts +6 -0
  165. package/lib/cjs/resources/shipping_categories.js +4 -0
  166. package/lib/cjs/resources/shipping_method_tiers.d.ts +3 -0
  167. package/lib/cjs/resources/shipping_method_tiers.js +4 -0
  168. package/lib/cjs/resources/shipping_methods.d.ts +11 -0
  169. package/lib/cjs/resources/shipping_methods.js +4 -0
  170. package/lib/cjs/resources/shipping_weight_tiers.d.ts +3 -0
  171. package/lib/cjs/resources/shipping_weight_tiers.js +4 -0
  172. package/lib/cjs/resources/shipping_zones.d.ts +3 -0
  173. package/lib/cjs/resources/shipping_zones.js +4 -0
  174. package/lib/cjs/resources/sku_list_items.d.ts +3 -0
  175. package/lib/cjs/resources/sku_list_items.js +4 -0
  176. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +10 -3
  177. package/lib/cjs/resources/sku_list_promotion_rules.js +4 -0
  178. package/lib/cjs/resources/sku_lists.d.ts +3 -0
  179. package/lib/cjs/resources/sku_lists.js +4 -0
  180. package/lib/cjs/resources/sku_options.d.ts +14 -0
  181. package/lib/cjs/resources/sku_options.js +12 -0
  182. package/lib/cjs/resources/skus.d.ts +17 -0
  183. package/lib/cjs/resources/skus.js +16 -0
  184. package/lib/cjs/resources/stock_items.d.ts +9 -0
  185. package/lib/cjs/resources/stock_items.js +12 -0
  186. package/lib/cjs/resources/stock_line_items.d.ts +42 -2
  187. package/lib/cjs/resources/stock_line_items.js +17 -0
  188. package/lib/cjs/resources/stock_locations.d.ts +6 -0
  189. package/lib/cjs/resources/stock_locations.js +4 -0
  190. package/lib/cjs/resources/stock_reservations.d.ts +49 -0
  191. package/lib/cjs/resources/stock_reservations.js +53 -0
  192. package/lib/cjs/resources/stock_transfers.d.ts +5 -0
  193. package/lib/cjs/resources/stock_transfers.js +4 -0
  194. package/lib/cjs/resources/stripe_gateways.d.ts +3 -0
  195. package/lib/cjs/resources/stripe_gateways.js +4 -0
  196. package/lib/cjs/resources/stripe_payments.d.ts +12 -0
  197. package/lib/cjs/resources/stripe_payments.js +4 -0
  198. package/lib/cjs/resources/tags.d.ts +27 -0
  199. package/lib/cjs/resources/tags.js +33 -0
  200. package/lib/cjs/resources/tax_calculators.d.ts +3 -0
  201. package/lib/cjs/resources/tax_calculators.js +4 -0
  202. package/lib/cjs/resources/tax_categories.d.ts +3 -0
  203. package/lib/cjs/resources/tax_categories.js +4 -0
  204. package/lib/cjs/resources/tax_rules.d.ts +3 -0
  205. package/lib/cjs/resources/tax_rules.js +4 -0
  206. package/lib/cjs/resources/taxjar_accounts.d.ts +3 -0
  207. package/lib/cjs/resources/taxjar_accounts.js +4 -0
  208. package/lib/cjs/resources/transactions.d.ts +9 -0
  209. package/lib/cjs/resources/transactions.js +12 -0
  210. package/lib/cjs/resources/versions.d.ts +22 -0
  211. package/lib/cjs/resources/versions.js +24 -0
  212. package/lib/cjs/resources/voids.d.ts +9 -3
  213. package/lib/cjs/resources/voids.js +10 -2
  214. package/lib/cjs/resources/webhooks.d.ts +8 -0
  215. package/lib/cjs/resources/webhooks.js +4 -0
  216. package/lib/cjs/resources/wire_transfers.d.ts +3 -0
  217. package/lib/cjs/resources/wire_transfers.js +4 -0
  218. package/lib/cjs/util.d.ts +1 -0
  219. package/lib/esm/api.d.ts +10 -3
  220. package/lib/esm/api.js +15 -1
  221. package/lib/esm/commercelayer.d.ts +9 -2
  222. package/lib/esm/commercelayer.js +8 -1
  223. package/lib/esm/model.d.ts +10 -3
  224. package/lib/esm/resource.d.ts +7 -9
  225. package/lib/esm/resources/addresses.d.ts +14 -0
  226. package/lib/esm/resources/addresses.js +12 -0
  227. package/lib/esm/resources/adjustments.d.ts +3 -0
  228. package/lib/esm/resources/adjustments.js +4 -0
  229. package/lib/esm/resources/adyen_gateways.d.ts +5 -2
  230. package/lib/esm/resources/adyen_gateways.js +4 -0
  231. package/lib/esm/resources/adyen_payments.d.ts +3 -0
  232. package/lib/esm/resources/adyen_payments.js +4 -0
  233. package/lib/esm/resources/authorizations.d.ts +9 -3
  234. package/lib/esm/resources/authorizations.js +12 -4
  235. package/lib/esm/resources/avalara_accounts.d.ts +9 -6
  236. package/lib/esm/resources/avalara_accounts.js +4 -0
  237. package/lib/esm/resources/axerve_gateways.d.ts +4 -0
  238. package/lib/esm/resources/axerve_gateways.js +4 -0
  239. package/lib/esm/resources/axerve_payments.d.ts +9 -0
  240. package/lib/esm/resources/axerve_payments.js +4 -0
  241. package/lib/esm/resources/billing_info_validation_rules.d.ts +3 -0
  242. package/lib/esm/resources/billing_info_validation_rules.js +4 -0
  243. package/lib/esm/resources/braintree_gateways.d.ts +3 -0
  244. package/lib/esm/resources/braintree_gateways.js +4 -0
  245. package/lib/esm/resources/braintree_payments.d.ts +3 -0
  246. package/lib/esm/resources/braintree_payments.js +4 -0
  247. package/lib/esm/resources/bundles.d.ts +16 -2
  248. package/lib/esm/resources/bundles.js +12 -0
  249. package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +134 -0
  250. package/lib/esm/resources/buy_x_pay_y_promotions.js +79 -0
  251. package/lib/esm/resources/captures.d.ts +9 -3
  252. package/lib/esm/resources/captures.js +12 -4
  253. package/lib/esm/resources/carrier_accounts.d.ts +3 -0
  254. package/lib/esm/resources/carrier_accounts.js +4 -0
  255. package/lib/esm/resources/checkout_com_gateways.d.ts +3 -0
  256. package/lib/esm/resources/checkout_com_gateways.js +4 -0
  257. package/lib/esm/resources/checkout_com_payments.d.ts +3 -0
  258. package/lib/esm/resources/checkout_com_payments.js +4 -0
  259. package/lib/esm/resources/cleanups.d.ts +3 -0
  260. package/lib/esm/resources/cleanups.js +4 -0
  261. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +10 -3
  262. package/lib/esm/resources/coupon_codes_promotion_rules.js +4 -0
  263. package/lib/esm/resources/coupon_recipients.d.ts +3 -0
  264. package/lib/esm/resources/coupon_recipients.js +4 -0
  265. package/lib/esm/resources/coupons.d.ts +26 -1
  266. package/lib/esm/resources/coupons.js +16 -0
  267. package/lib/esm/resources/custom_promotion_rules.d.ts +61 -0
  268. package/lib/esm/resources/custom_promotion_rules.js +35 -0
  269. package/lib/esm/resources/customer_addresses.d.ts +5 -0
  270. package/lib/esm/resources/customer_addresses.js +4 -0
  271. package/lib/esm/resources/customer_groups.d.ts +3 -0
  272. package/lib/esm/resources/customer_groups.js +4 -0
  273. package/lib/esm/resources/customer_payment_sources.d.ts +18 -11
  274. package/lib/esm/resources/customer_payment_sources.js +8 -0
  275. package/lib/esm/resources/customer_subscriptions.d.ts +3 -0
  276. package/lib/esm/resources/customer_subscriptions.js +4 -0
  277. package/lib/esm/resources/customers.d.ts +9 -0
  278. package/lib/esm/resources/customers.js +4 -0
  279. package/lib/esm/resources/delivery_lead_times.d.ts +3 -0
  280. package/lib/esm/resources/delivery_lead_times.js +4 -0
  281. package/lib/esm/resources/external_gateways.d.ts +3 -0
  282. package/lib/esm/resources/external_gateways.js +4 -0
  283. package/lib/esm/resources/external_payments.d.ts +3 -0
  284. package/lib/esm/resources/external_payments.js +4 -0
  285. package/lib/esm/resources/external_promotions.d.ts +45 -6
  286. package/lib/esm/resources/external_promotions.js +24 -0
  287. package/lib/esm/resources/external_tax_calculators.d.ts +3 -0
  288. package/lib/esm/resources/external_tax_calculators.js +4 -0
  289. package/lib/esm/resources/fixed_amount_promotions.d.ts +45 -6
  290. package/lib/esm/resources/fixed_amount_promotions.js +24 -0
  291. package/lib/esm/resources/fixed_price_promotions.d.ts +37 -9
  292. package/lib/esm/resources/fixed_price_promotions.js +18 -2
  293. package/lib/esm/resources/free_gift_promotions.d.ts +37 -9
  294. package/lib/esm/resources/free_gift_promotions.js +18 -2
  295. package/lib/esm/resources/free_shipping_promotions.d.ts +42 -6
  296. package/lib/esm/resources/free_shipping_promotions.js +20 -0
  297. package/lib/esm/resources/gift_card_recipients.d.ts +3 -0
  298. package/lib/esm/resources/gift_card_recipients.js +4 -0
  299. package/lib/esm/resources/gift_cards.d.ts +11 -0
  300. package/lib/esm/resources/gift_cards.js +8 -0
  301. package/lib/esm/resources/imports.d.ts +1 -3
  302. package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -0
  303. package/lib/esm/resources/in_stock_subscriptions.js +4 -0
  304. package/lib/esm/resources/inventory_models.d.ts +12 -0
  305. package/lib/esm/resources/inventory_models.js +4 -0
  306. package/lib/esm/resources/inventory_return_locations.d.ts +3 -0
  307. package/lib/esm/resources/inventory_return_locations.js +4 -0
  308. package/lib/esm/resources/inventory_stock_locations.d.ts +3 -0
  309. package/lib/esm/resources/inventory_stock_locations.js +4 -0
  310. package/lib/esm/resources/klarna_gateways.d.ts +3 -0
  311. package/lib/esm/resources/klarna_gateways.js +4 -0
  312. package/lib/esm/resources/klarna_payments.d.ts +3 -0
  313. package/lib/esm/resources/klarna_payments.js +4 -0
  314. package/lib/esm/resources/line_item_options.d.ts +11 -0
  315. package/lib/esm/resources/line_item_options.js +8 -0
  316. package/lib/esm/resources/line_items.d.ts +30 -0
  317. package/lib/esm/resources/line_items.js +16 -0
  318. package/lib/esm/resources/manual_gateways.d.ts +3 -0
  319. package/lib/esm/resources/manual_gateways.js +4 -0
  320. package/lib/esm/resources/manual_tax_calculators.d.ts +3 -0
  321. package/lib/esm/resources/manual_tax_calculators.js +4 -0
  322. package/lib/esm/resources/markets.d.ts +8 -0
  323. package/lib/esm/resources/markets.js +4 -0
  324. package/lib/esm/resources/merchants.d.ts +3 -0
  325. package/lib/esm/resources/merchants.js +4 -0
  326. package/lib/esm/resources/order_amount_promotion_rules.d.ts +13 -3
  327. package/lib/esm/resources/order_amount_promotion_rules.js +4 -0
  328. package/lib/esm/resources/order_subscription_items.d.ts +7 -0
  329. package/lib/esm/resources/order_subscription_items.js +4 -0
  330. package/lib/esm/resources/order_subscriptions.d.ts +4 -0
  331. package/lib/esm/resources/order_subscriptions.js +4 -0
  332. package/lib/esm/resources/order_validation_rules.d.ts +3 -0
  333. package/lib/esm/resources/order_validation_rules.js +4 -0
  334. package/lib/esm/resources/orders.d.ts +50 -6
  335. package/lib/esm/resources/orders.js +32 -0
  336. package/lib/esm/resources/organization.d.ts +4 -4
  337. package/lib/esm/resources/packages.d.ts +3 -0
  338. package/lib/esm/resources/packages.js +4 -0
  339. package/lib/esm/resources/parcel_line_items.d.ts +4 -1
  340. package/lib/esm/resources/parcel_line_items.js +4 -0
  341. package/lib/esm/resources/parcels.d.ts +9 -3
  342. package/lib/esm/resources/parcels.js +4 -0
  343. package/lib/esm/resources/payment_gateways.d.ts +3 -0
  344. package/lib/esm/resources/payment_gateways.js +4 -0
  345. package/lib/esm/resources/payment_methods.d.ts +9 -1
  346. package/lib/esm/resources/payment_methods.js +4 -0
  347. package/lib/esm/resources/payment_options.d.ts +43 -0
  348. package/lib/esm/resources/payment_options.js +39 -0
  349. package/lib/esm/resources/paypal_gateways.d.ts +3 -0
  350. package/lib/esm/resources/paypal_gateways.js +4 -0
  351. package/lib/esm/resources/paypal_payments.d.ts +3 -0
  352. package/lib/esm/resources/paypal_payments.js +4 -0
  353. package/lib/esm/resources/percentage_discount_promotions.d.ts +37 -9
  354. package/lib/esm/resources/percentage_discount_promotions.js +18 -2
  355. package/lib/esm/resources/price_frequency_tiers.d.ts +3 -0
  356. package/lib/esm/resources/price_frequency_tiers.js +4 -0
  357. package/lib/esm/resources/price_lists.d.ts +6 -0
  358. package/lib/esm/resources/price_lists.js +4 -0
  359. package/lib/esm/resources/price_tiers.d.ts +3 -0
  360. package/lib/esm/resources/price_tiers.js +4 -0
  361. package/lib/esm/resources/price_volume_tiers.d.ts +3 -0
  362. package/lib/esm/resources/price_volume_tiers.js +4 -0
  363. package/lib/esm/resources/prices.d.ts +4 -1
  364. package/lib/esm/resources/prices.js +4 -0
  365. package/lib/esm/resources/promotion_rules.d.ts +5 -1
  366. package/lib/esm/resources/promotion_rules.js +4 -0
  367. package/lib/esm/resources/promotions.d.ts +18 -0
  368. package/lib/esm/resources/promotions.js +20 -0
  369. package/lib/esm/resources/refunds.d.ts +9 -3
  370. package/lib/esm/resources/refunds.js +10 -2
  371. package/lib/esm/resources/reserved_stocks.d.ts +27 -0
  372. package/lib/esm/resources/reserved_stocks.js +34 -0
  373. package/lib/esm/resources/return_line_items.d.ts +2 -1
  374. package/lib/esm/resources/returns.d.ts +11 -0
  375. package/lib/esm/resources/returns.js +8 -0
  376. package/lib/esm/resources/satispay_gateways.d.ts +6 -0
  377. package/lib/esm/resources/satispay_gateways.js +4 -0
  378. package/lib/esm/resources/satispay_payments.d.ts +11 -3
  379. package/lib/esm/resources/satispay_payments.js +4 -0
  380. package/lib/esm/resources/shipments.d.ts +49 -2
  381. package/lib/esm/resources/shipments.js +18 -0
  382. package/lib/esm/resources/shipping_categories.d.ts +6 -0
  383. package/lib/esm/resources/shipping_categories.js +4 -0
  384. package/lib/esm/resources/shipping_method_tiers.d.ts +3 -0
  385. package/lib/esm/resources/shipping_method_tiers.js +4 -0
  386. package/lib/esm/resources/shipping_methods.d.ts +11 -0
  387. package/lib/esm/resources/shipping_methods.js +4 -0
  388. package/lib/esm/resources/shipping_weight_tiers.d.ts +3 -0
  389. package/lib/esm/resources/shipping_weight_tiers.js +4 -0
  390. package/lib/esm/resources/shipping_zones.d.ts +3 -0
  391. package/lib/esm/resources/shipping_zones.js +4 -0
  392. package/lib/esm/resources/sku_list_items.d.ts +3 -0
  393. package/lib/esm/resources/sku_list_items.js +4 -0
  394. package/lib/esm/resources/sku_list_promotion_rules.d.ts +10 -3
  395. package/lib/esm/resources/sku_list_promotion_rules.js +4 -0
  396. package/lib/esm/resources/sku_lists.d.ts +3 -0
  397. package/lib/esm/resources/sku_lists.js +4 -0
  398. package/lib/esm/resources/sku_options.d.ts +14 -0
  399. package/lib/esm/resources/sku_options.js +12 -0
  400. package/lib/esm/resources/skus.d.ts +17 -0
  401. package/lib/esm/resources/skus.js +16 -0
  402. package/lib/esm/resources/stock_items.d.ts +9 -0
  403. package/lib/esm/resources/stock_items.js +12 -0
  404. package/lib/esm/resources/stock_line_items.d.ts +42 -2
  405. package/lib/esm/resources/stock_line_items.js +17 -0
  406. package/lib/esm/resources/stock_locations.d.ts +6 -0
  407. package/lib/esm/resources/stock_locations.js +4 -0
  408. package/lib/esm/resources/stock_reservations.d.ts +49 -0
  409. package/lib/esm/resources/stock_reservations.js +51 -0
  410. package/lib/esm/resources/stock_transfers.d.ts +5 -0
  411. package/lib/esm/resources/stock_transfers.js +4 -0
  412. package/lib/esm/resources/stripe_gateways.d.ts +3 -0
  413. package/lib/esm/resources/stripe_gateways.js +4 -0
  414. package/lib/esm/resources/stripe_payments.d.ts +12 -0
  415. package/lib/esm/resources/stripe_payments.js +4 -0
  416. package/lib/esm/resources/tags.d.ts +27 -0
  417. package/lib/esm/resources/tags.js +31 -0
  418. package/lib/esm/resources/tax_calculators.d.ts +3 -0
  419. package/lib/esm/resources/tax_calculators.js +4 -0
  420. package/lib/esm/resources/tax_categories.d.ts +3 -0
  421. package/lib/esm/resources/tax_categories.js +4 -0
  422. package/lib/esm/resources/tax_rules.d.ts +3 -0
  423. package/lib/esm/resources/tax_rules.js +4 -0
  424. package/lib/esm/resources/taxjar_accounts.d.ts +3 -0
  425. package/lib/esm/resources/taxjar_accounts.js +4 -0
  426. package/lib/esm/resources/transactions.d.ts +9 -0
  427. package/lib/esm/resources/transactions.js +12 -0
  428. package/lib/esm/resources/versions.d.ts +22 -0
  429. package/lib/esm/resources/versions.js +22 -0
  430. package/lib/esm/resources/voids.d.ts +9 -3
  431. package/lib/esm/resources/voids.js +10 -2
  432. package/lib/esm/resources/webhooks.d.ts +8 -0
  433. package/lib/esm/resources/webhooks.js +4 -0
  434. package/lib/esm/resources/wire_transfers.d.ts +3 -0
  435. package/lib/esm/resources/wire_transfers.js +4 -0
  436. package/lib/esm/util.d.ts +1 -0
  437. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  438. package/lib/tsconfig.tsbuildinfo +1 -1
  439. package/package.json +25 -25
  440. package/lib/cjs/micro.d.ts +0 -4
  441. package/lib/cjs/micro.js +0 -13
  442. package/lib/esm/micro.d.ts +0 -4
  443. package/lib/esm/micro.js +0 -7
@@ -3,6 +3,7 @@ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Customer } from './customers';
4
4
  import type { Market } from './markets';
5
5
  import type { Attachment } from './attachments';
6
+ import type { Version } from './versions';
6
7
  type CustomerGroupRel = ResourceRel & {
7
8
  type: typeof CustomerGroups.TYPE;
8
9
  };
@@ -11,6 +12,7 @@ interface CustomerGroup extends Resource {
11
12
  customers?: Customer[];
12
13
  markets?: Market[];
13
14
  attachments?: Attachment[];
15
+ versions?: Version[];
14
16
  }
15
17
  interface CustomerGroupCreate extends ResourceCreate {
16
18
  name: string;
@@ -28,6 +30,7 @@ declare class CustomerGroups extends ApiResource {
28
30
  customers(customerGroupId: string | CustomerGroup, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Customer>>;
29
31
  markets(customerGroupId: string | CustomerGroup, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
30
32
  attachments(customerGroupId: string | CustomerGroup, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
33
+ versions(customerGroupId: string | CustomerGroup, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
31
34
  isCustomerGroup(resource: any): resource is CustomerGroup;
32
35
  relationship(id: string | ResourceId | null): CustomerGroupRel;
33
36
  type(): string;
@@ -30,6 +30,10 @@ class CustomerGroups extends resource_1.ApiResource {
30
30
  const _customerGroupId = customerGroupId.id || customerGroupId;
31
31
  return this.resources.fetch({ type: 'attachments' }, `customer_groups/${_customerGroupId}/attachments`, params, options);
32
32
  }
33
+ async versions(customerGroupId, params, options) {
34
+ const _customerGroupId = customerGroupId.id || customerGroupId;
35
+ return this.resources.fetch({ type: 'versions' }, `customer_groups/${_customerGroupId}/versions`, params, options);
36
+ }
33
37
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
34
38
  isCustomerGroup(resource) {
35
39
  return resource.type && (resource.type === CustomerGroups.TYPE);
@@ -1,22 +1,25 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Customer } from './customers';
4
+ import type { PaymentMethod } from './payment_methods';
4
5
  import type { AdyenPayment } from './adyen_payments';
5
6
  import type { AxervePayment } from './axerve_payments';
6
7
  import type { BraintreePayment } from './braintree_payments';
7
8
  import type { CheckoutComPayment } from './checkout_com_payments';
8
9
  import type { ExternalPayment } from './external_payments';
9
10
  import type { KlarnaPayment } from './klarna_payments';
10
- import type { PaypalPayment } from './paypal_payments';
11
11
  import type { SatispayPayment } from './satispay_payments';
12
12
  import type { StripePayment } from './stripe_payments';
13
- import type { WireTransfer } from './wire_transfers';
13
+ import type { Version } from './versions';
14
14
  type CustomerPaymentSourceRel = ResourceRel & {
15
15
  type: typeof CustomerPaymentSources.TYPE;
16
16
  };
17
17
  type CustomerRel = ResourceRel & {
18
18
  type: 'customers';
19
19
  };
20
+ type PaymentMethodRel = ResourceRel & {
21
+ type: 'payment_methods';
22
+ };
20
23
  type AdyenPaymentRel = ResourceRel & {
21
24
  type: 'adyen_payments';
22
25
  };
@@ -35,32 +38,34 @@ type ExternalPaymentRel = ResourceRel & {
35
38
  type KlarnaPaymentRel = ResourceRel & {
36
39
  type: 'klarna_payments';
37
40
  };
38
- type PaypalPaymentRel = ResourceRel & {
39
- type: 'paypal_payments';
40
- };
41
41
  type SatispayPaymentRel = ResourceRel & {
42
42
  type: 'satispay_payments';
43
43
  };
44
44
  type StripePaymentRel = ResourceRel & {
45
45
  type: 'stripe_payments';
46
46
  };
47
- type WireTransferRel = ResourceRel & {
48
- type: 'wire_transfers';
49
- };
50
47
  interface CustomerPaymentSource extends Resource {
51
48
  name?: string;
52
49
  customer_token?: string;
53
50
  payment_source_token?: string;
54
51
  customer?: Customer;
55
- payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer;
52
+ payment_method?: PaymentMethod;
53
+ payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | SatispayPayment | StripePayment;
54
+ versions?: Version[];
56
55
  }
57
56
  interface CustomerPaymentSourceCreate extends ResourceCreate {
57
+ customer_token?: string;
58
+ payment_source_token?: string;
58
59
  customer: CustomerRel;
59
- payment_source: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel;
60
+ payment_method?: PaymentMethodRel;
61
+ payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | SatispayPaymentRel | StripePaymentRel;
60
62
  }
61
63
  interface CustomerPaymentSourceUpdate extends ResourceUpdate {
64
+ customer_token?: string;
65
+ payment_source_token?: string;
62
66
  customer?: CustomerRel;
63
- payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel;
67
+ payment_method?: PaymentMethodRel;
68
+ payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | SatispayPaymentRel | StripePaymentRel;
64
69
  }
65
70
  declare class CustomerPaymentSources extends ApiResource {
66
71
  static readonly TYPE: 'customer_payment_sources';
@@ -70,6 +75,8 @@ declare class CustomerPaymentSources extends ApiResource {
70
75
  update(resource: CustomerPaymentSourceUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
71
76
  delete(id: string, options?: ResourcesConfig): Promise<void>;
72
77
  customer(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
78
+ payment_method(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentMethod>;
79
+ versions(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
73
80
  isCustomerPaymentSource(resource: any): resource is CustomerPaymentSource;
74
81
  relationship(id: string | ResourceId | null): CustomerPaymentSourceRel;
75
82
  type(): string;
@@ -22,6 +22,14 @@ class CustomerPaymentSources extends resource_1.ApiResource {
22
22
  const _customerPaymentSourceId = customerPaymentSourceId.id || customerPaymentSourceId;
23
23
  return this.resources.fetch({ type: 'customers' }, `customer_payment_sources/${_customerPaymentSourceId}/customer`, params, options);
24
24
  }
25
+ async payment_method(customerPaymentSourceId, params, options) {
26
+ const _customerPaymentSourceId = customerPaymentSourceId.id || customerPaymentSourceId;
27
+ return this.resources.fetch({ type: 'payment_methods' }, `customer_payment_sources/${_customerPaymentSourceId}/payment_method`, params, options);
28
+ }
29
+ async versions(customerPaymentSourceId, params, options) {
30
+ const _customerPaymentSourceId = customerPaymentSourceId.id || customerPaymentSourceId;
31
+ return this.resources.fetch({ type: 'versions' }, `customer_payment_sources/${_customerPaymentSourceId}/versions`, params, options);
32
+ }
25
33
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
26
34
  isCustomerPaymentSource(resource) {
27
35
  return resource.type && (resource.type === CustomerPaymentSources.TYPE);
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Customer } from './customers';
4
4
  import type { Event } from './events';
5
+ import type { Version } from './versions';
5
6
  type CustomerSubscriptionRel = ResourceRel & {
6
7
  type: typeof CustomerSubscriptions.TYPE;
7
8
  };
@@ -9,6 +10,7 @@ interface CustomerSubscription extends Resource {
9
10
  customer_email?: string;
10
11
  customer?: Customer;
11
12
  events?: Event[];
13
+ versions?: Version[];
12
14
  }
13
15
  interface CustomerSubscriptionCreate extends ResourceCreate {
14
16
  customer_email: string;
@@ -23,6 +25,7 @@ declare class CustomerSubscriptions extends ApiResource {
23
25
  delete(id: string, options?: ResourcesConfig): Promise<void>;
24
26
  customer(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
25
27
  events(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
28
+ versions(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
26
29
  isCustomerSubscription(resource: any): resource is CustomerSubscription;
27
30
  relationship(id: string | ResourceId | null): CustomerSubscriptionRel;
28
31
  type(): string;
@@ -26,6 +26,10 @@ class CustomerSubscriptions extends resource_1.ApiResource {
26
26
  const _customerSubscriptionId = customerSubscriptionId.id || customerSubscriptionId;
27
27
  return this.resources.fetch({ type: 'events' }, `customer_subscriptions/${_customerSubscriptionId}/events`, params, options);
28
28
  }
29
+ async versions(customerSubscriptionId, params, options) {
30
+ const _customerSubscriptionId = customerSubscriptionId.id || customerSubscriptionId;
31
+ return this.resources.fetch({ type: 'versions' }, `customer_subscriptions/${_customerSubscriptionId}/versions`, params, options);
32
+ }
29
33
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
30
34
  isCustomerSubscription(resource) {
31
35
  return resource.type && (resource.type === CustomerSubscriptions.TYPE);
@@ -10,16 +10,21 @@ import type { Return } from './returns';
10
10
  import type { SkuList } from './sku_lists';
11
11
  import type { Attachment } from './attachments';
12
12
  import type { Event } from './events';
13
+ import type { Tag } from './tags';
13
14
  type CustomerRel = ResourceRel & {
14
15
  type: typeof Customers.TYPE;
15
16
  };
16
17
  type CustomerGroupRel = ResourceRel & {
17
18
  type: 'customer_groups';
18
19
  };
20
+ type TagRel = ResourceRel & {
21
+ type: 'tags';
22
+ };
19
23
  interface Customer extends Resource {
20
24
  email?: string;
21
25
  status?: string;
22
26
  has_password?: boolean;
27
+ total_orders_count?: number;
23
28
  customer_group?: CustomerGroup;
24
29
  customer_addresses?: CustomerAddress[];
25
30
  customer_payment_sources?: CustomerPaymentSource[];
@@ -30,16 +35,19 @@ interface Customer extends Resource {
30
35
  sku_lists?: SkuList[];
31
36
  attachments?: Attachment[];
32
37
  events?: Event[];
38
+ tags?: Tag[];
33
39
  }
34
40
  interface CustomerCreate extends ResourceCreate {
35
41
  email: string;
36
42
  password?: string;
37
43
  customer_group?: CustomerGroupRel;
44
+ tags?: TagRel[];
38
45
  }
39
46
  interface CustomerUpdate extends ResourceUpdate {
40
47
  email?: string;
41
48
  password?: string;
42
49
  customer_group?: CustomerGroupRel;
50
+ tags?: TagRel[];
43
51
  }
44
52
  declare class Customers extends ApiResource {
45
53
  static readonly TYPE: 'customers';
@@ -58,6 +66,7 @@ declare class Customers extends ApiResource {
58
66
  sku_lists(customerId: string | Customer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuList>>;
59
67
  attachments(customerId: string | Customer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
60
68
  events(customerId: string | Customer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
69
+ tags(customerId: string | Customer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
61
70
  isCustomer(resource: any): resource is Customer;
62
71
  relationship(id: string | ResourceId | null): CustomerRel;
63
72
  type(): string;
@@ -58,6 +58,10 @@ class Customers extends resource_1.ApiResource {
58
58
  const _customerId = customerId.id || customerId;
59
59
  return this.resources.fetch({ type: 'events' }, `customers/${_customerId}/events`, params, options);
60
60
  }
61
+ async tags(customerId, params, options) {
62
+ const _customerId = customerId.id || customerId;
63
+ return this.resources.fetch({ type: 'tags' }, `customers/${_customerId}/tags`, params, options);
64
+ }
61
65
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
62
66
  isCustomer(resource) {
63
67
  return resource.type && (resource.type === Customers.TYPE);
@@ -3,6 +3,7 @@ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { StockLocation } from './stock_locations';
4
4
  import type { ShippingMethod } from './shipping_methods';
5
5
  import type { Attachment } from './attachments';
6
+ import type { Version } from './versions';
6
7
  type DeliveryLeadTimeRel = ResourceRel & {
7
8
  type: typeof DeliveryLeadTimes.TYPE;
8
9
  };
@@ -20,6 +21,7 @@ interface DeliveryLeadTime extends Resource {
20
21
  stock_location?: StockLocation;
21
22
  shipping_method?: ShippingMethod;
22
23
  attachments?: Attachment[];
24
+ versions?: Version[];
23
25
  }
24
26
  interface DeliveryLeadTimeCreate extends ResourceCreate {
25
27
  min_hours: number;
@@ -43,6 +45,7 @@ declare class DeliveryLeadTimes extends ApiResource {
43
45
  stock_location(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
44
46
  shipping_method(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
45
47
  attachments(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
48
+ versions(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
46
49
  isDeliveryLeadTime(resource: any): resource is DeliveryLeadTime;
47
50
  relationship(id: string | ResourceId | null): DeliveryLeadTimeRel;
48
51
  type(): string;
@@ -30,6 +30,10 @@ class DeliveryLeadTimes extends resource_1.ApiResource {
30
30
  const _deliveryLeadTimeId = deliveryLeadTimeId.id || deliveryLeadTimeId;
31
31
  return this.resources.fetch({ type: 'attachments' }, `delivery_lead_times/${_deliveryLeadTimeId}/attachments`, params, options);
32
32
  }
33
+ async versions(deliveryLeadTimeId, params, options) {
34
+ const _deliveryLeadTimeId = deliveryLeadTimeId.id || deliveryLeadTimeId;
35
+ return this.resources.fetch({ type: 'versions' }, `delivery_lead_times/${_deliveryLeadTimeId}/versions`, params, options);
36
+ }
33
37
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
34
38
  isDeliveryLeadTime(resource) {
35
39
  return resource.type && (resource.type === DeliveryLeadTimes.TYPE);
@@ -1,6 +1,7 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { PaymentMethod } from './payment_methods';
4
+ import type { Version } from './versions';
4
5
  import type { ExternalPayment } from './external_payments';
5
6
  type ExternalGatewayRel = ResourceRel & {
6
7
  type: typeof ExternalGateways.TYPE;
@@ -14,6 +15,7 @@ interface ExternalGateway extends Resource {
14
15
  refund_url?: string;
15
16
  token_url?: string;
16
17
  payment_methods?: PaymentMethod[];
18
+ versions?: Version[];
17
19
  external_payments?: ExternalPayment[];
18
20
  }
19
21
  interface ExternalGatewayCreate extends ResourceCreate {
@@ -40,6 +42,7 @@ declare class ExternalGateways extends ApiResource {
40
42
  update(resource: ExternalGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
41
43
  delete(id: string, options?: ResourcesConfig): Promise<void>;
42
44
  payment_methods(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
45
+ versions(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
43
46
  external_payments(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalPayment>>;
44
47
  isExternalGateway(resource: any): resource is ExternalGateway;
45
48
  relationship(id: string | ResourceId | null): ExternalGatewayRel;
@@ -22,6 +22,10 @@ class ExternalGateways extends resource_1.ApiResource {
22
22
  const _externalGatewayId = externalGatewayId.id || externalGatewayId;
23
23
  return this.resources.fetch({ type: 'payment_methods' }, `external_gateways/${_externalGatewayId}/payment_methods`, params, options);
24
24
  }
25
+ async versions(externalGatewayId, params, options) {
26
+ const _externalGatewayId = externalGatewayId.id || externalGatewayId;
27
+ return this.resources.fetch({ type: 'versions' }, `external_gateways/${_externalGatewayId}/versions`, params, options);
28
+ }
25
29
  async external_payments(externalGatewayId, params, options) {
26
30
  const _externalGatewayId = externalGatewayId.id || externalGatewayId;
27
31
  return this.resources.fetch({ type: 'external_payments' }, `external_gateways/${_externalGatewayId}/external_payments`, params, options);
@@ -3,6 +3,7 @@ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Order } from './orders';
4
4
  import type { PaymentGateway } from './payment_gateways';
5
5
  import type { CustomerPaymentSource } from './customer_payment_sources';
6
+ import type { Version } from './versions';
6
7
  type ExternalPaymentRel = ResourceRel & {
7
8
  type: typeof ExternalPayments.TYPE;
8
9
  };
@@ -16,6 +17,7 @@ interface ExternalPayment extends Resource {
16
17
  order?: Order;
17
18
  payment_gateway?: PaymentGateway;
18
19
  wallet?: CustomerPaymentSource;
20
+ versions?: Version[];
19
21
  }
20
22
  interface ExternalPaymentCreate extends ResourceCreate {
21
23
  payment_source_token: string;
@@ -36,6 +38,7 @@ declare class ExternalPayments extends ApiResource {
36
38
  order(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
37
39
  payment_gateway(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
38
40
  wallet(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
41
+ versions(externalPaymentId: string | ExternalPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
39
42
  isExternalPayment(resource: any): resource is ExternalPayment;
40
43
  relationship(id: string | ResourceId | null): ExternalPaymentRel;
41
44
  type(): string;
@@ -30,6 +30,10 @@ class ExternalPayments extends resource_1.ApiResource {
30
30
  const _externalPaymentId = externalPaymentId.id || externalPaymentId;
31
31
  return this.resources.fetch({ type: 'customer_payment_sources' }, `external_payments/${_externalPaymentId}/wallet`, params, options);
32
32
  }
33
+ async versions(externalPaymentId, params, options) {
34
+ const _externalPaymentId = externalPaymentId.id || externalPaymentId;
35
+ return this.resources.fetch({ type: 'versions' }, `external_payments/${_externalPaymentId}/versions`, params, options);
36
+ }
33
37
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
34
38
  isExternalPayment(resource) {
35
39
  return resource.type && (resource.type === ExternalPayments.TYPE);
@@ -5,17 +5,20 @@ import type { PromotionRule } from './promotion_rules';
5
5
  import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
6
6
  import type { SkuListPromotionRule } from './sku_list_promotion_rules';
7
7
  import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
8
+ import type { CustomPromotionRule } from './custom_promotion_rules';
9
+ import type { SkuList } from './sku_lists';
10
+ import type { Coupon } from './coupons';
8
11
  import type { Attachment } from './attachments';
9
12
  import type { Event } from './events';
13
+ import type { Tag } from './tags';
14
+ import type { Version } from './versions';
15
+ import type { Sku } from './skus';
10
16
  type ExternalPromotionRel = ResourceRel & {
11
17
  type: typeof ExternalPromotions.TYPE;
12
18
  };
13
19
  type MarketRel = ResourceRel & {
14
20
  type: 'markets';
15
21
  };
16
- type PromotionRuleRel = ResourceRel & {
17
- type: 'promotion_rules';
18
- };
19
22
  type OrderAmountPromotionRuleRel = ResourceRel & {
20
23
  type: 'order_amount_promotion_rules';
21
24
  };
@@ -25,14 +28,26 @@ type SkuListPromotionRuleRel = ResourceRel & {
25
28
  type CouponCodesPromotionRuleRel = ResourceRel & {
26
29
  type: 'coupon_codes_promotion_rules';
27
30
  };
31
+ type CustomPromotionRuleRel = ResourceRel & {
32
+ type: 'custom_promotion_rules';
33
+ };
34
+ type SkuListRel = ResourceRel & {
35
+ type: 'sku_lists';
36
+ };
37
+ type TagRel = ResourceRel & {
38
+ type: 'tags';
39
+ };
28
40
  interface ExternalPromotion extends Resource {
29
41
  name?: string;
30
42
  currency_code?: string;
43
+ exclusive?: boolean;
44
+ priority?: number;
31
45
  starts_at?: string;
32
46
  expires_at?: string;
33
47
  total_usage_limit?: number;
34
48
  total_usage_count?: number;
35
49
  active?: boolean;
50
+ disabled_at?: string;
36
51
  promotion_url?: string;
37
52
  shared_secret?: string;
38
53
  market?: Market;
@@ -40,34 +55,52 @@ interface ExternalPromotion extends Resource {
40
55
  order_amount_promotion_rule?: OrderAmountPromotionRule;
41
56
  sku_list_promotion_rule?: SkuListPromotionRule;
42
57
  coupon_codes_promotion_rule?: CouponCodesPromotionRule;
58
+ custom_promotion_rule?: CustomPromotionRule;
59
+ sku_list?: SkuList;
60
+ coupons?: Coupon[];
43
61
  attachments?: Attachment[];
44
62
  events?: Event[];
63
+ tags?: Tag[];
64
+ versions?: Version[];
65
+ skus?: Sku[];
45
66
  }
46
67
  interface ExternalPromotionCreate extends ResourceCreate {
47
68
  name: string;
48
69
  currency_code?: string;
70
+ exclusive?: boolean;
71
+ priority?: number;
49
72
  starts_at: string;
50
73
  expires_at: string;
51
- total_usage_limit: number;
74
+ total_usage_limit?: number;
75
+ _disable?: boolean;
76
+ _enable?: boolean;
52
77
  promotion_url: string;
53
78
  market?: MarketRel;
54
- promotion_rules?: PromotionRuleRel[];
55
79
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
56
80
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
57
81
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
82
+ custom_promotion_rule?: CustomPromotionRuleRel;
83
+ sku_list?: SkuListRel;
84
+ tags?: TagRel[];
58
85
  }
59
86
  interface ExternalPromotionUpdate extends ResourceUpdate {
60
87
  name?: string;
61
88
  currency_code?: string;
89
+ exclusive?: boolean;
90
+ priority?: number;
62
91
  starts_at?: string;
63
92
  expires_at?: string;
64
93
  total_usage_limit?: number;
94
+ _disable?: boolean;
95
+ _enable?: boolean;
65
96
  promotion_url?: string;
66
97
  market?: MarketRel;
67
- promotion_rules?: PromotionRuleRel[];
68
98
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel;
69
99
  sku_list_promotion_rule?: SkuListPromotionRuleRel;
70
100
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel;
101
+ custom_promotion_rule?: CustomPromotionRuleRel;
102
+ sku_list?: SkuListRel;
103
+ tags?: TagRel[];
71
104
  }
72
105
  declare class ExternalPromotions extends ApiResource {
73
106
  static readonly TYPE: 'external_promotions';
@@ -80,8 +113,14 @@ declare class ExternalPromotions extends ApiResource {
80
113
  order_amount_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
81
114
  sku_list_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
82
115
  coupon_codes_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
116
+ custom_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomPromotionRule>;
117
+ sku_list(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
118
+ coupons(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Coupon>>;
83
119
  attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
84
120
  events(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
121
+ tags(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
122
+ versions(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
123
+ skus(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
85
124
  isExternalPromotion(resource: any): resource is ExternalPromotion;
86
125
  relationship(id: string | ResourceId | null): ExternalPromotionRel;
87
126
  type(): string;
@@ -34,6 +34,18 @@ class ExternalPromotions extends resource_1.ApiResource {
34
34
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
35
35
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `external_promotions/${_externalPromotionId}/coupon_codes_promotion_rule`, params, options);
36
36
  }
37
+ async custom_promotion_rule(externalPromotionId, params, options) {
38
+ const _externalPromotionId = externalPromotionId.id || externalPromotionId;
39
+ return this.resources.fetch({ type: 'custom_promotion_rules' }, `external_promotions/${_externalPromotionId}/custom_promotion_rule`, params, options);
40
+ }
41
+ async sku_list(externalPromotionId, params, options) {
42
+ const _externalPromotionId = externalPromotionId.id || externalPromotionId;
43
+ return this.resources.fetch({ type: 'sku_lists' }, `external_promotions/${_externalPromotionId}/sku_list`, params, options);
44
+ }
45
+ async coupons(externalPromotionId, params, options) {
46
+ const _externalPromotionId = externalPromotionId.id || externalPromotionId;
47
+ return this.resources.fetch({ type: 'coupons' }, `external_promotions/${_externalPromotionId}/coupons`, params, options);
48
+ }
37
49
  async attachments(externalPromotionId, params, options) {
38
50
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
39
51
  return this.resources.fetch({ type: 'attachments' }, `external_promotions/${_externalPromotionId}/attachments`, params, options);
@@ -42,6 +54,18 @@ class ExternalPromotions extends resource_1.ApiResource {
42
54
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
43
55
  return this.resources.fetch({ type: 'events' }, `external_promotions/${_externalPromotionId}/events`, params, options);
44
56
  }
57
+ async tags(externalPromotionId, params, options) {
58
+ const _externalPromotionId = externalPromotionId.id || externalPromotionId;
59
+ return this.resources.fetch({ type: 'tags' }, `external_promotions/${_externalPromotionId}/tags`, params, options);
60
+ }
61
+ async versions(externalPromotionId, params, options) {
62
+ const _externalPromotionId = externalPromotionId.id || externalPromotionId;
63
+ return this.resources.fetch({ type: 'versions' }, `external_promotions/${_externalPromotionId}/versions`, params, options);
64
+ }
65
+ async skus(externalPromotionId, params, options) {
66
+ const _externalPromotionId = externalPromotionId.id || externalPromotionId;
67
+ return this.resources.fetch({ type: 'skus' }, `external_promotions/${_externalPromotionId}/skus`, params, options);
68
+ }
45
69
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
46
70
  isExternalPromotion(resource) {
47
71
  return resource.type && (resource.type === ExternalPromotions.TYPE);
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Market } from './markets';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  type ExternalTaxCalculatorRel = ResourceRel & {
6
7
  type: typeof ExternalTaxCalculators.TYPE;
7
8
  };
@@ -11,6 +12,7 @@ interface ExternalTaxCalculator extends Resource {
11
12
  shared_secret?: string;
12
13
  markets?: Market[];
13
14
  attachments?: Attachment[];
15
+ versions?: Version[];
14
16
  }
15
17
  interface ExternalTaxCalculatorCreate extends ResourceCreate {
16
18
  name: string;
@@ -29,6 +31,7 @@ declare class ExternalTaxCalculators extends ApiResource {
29
31
  delete(id: string, options?: ResourcesConfig): Promise<void>;
30
32
  markets(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
31
33
  attachments(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
34
+ versions(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
32
35
  isExternalTaxCalculator(resource: any): resource is ExternalTaxCalculator;
33
36
  relationship(id: string | ResourceId | null): ExternalTaxCalculatorRel;
34
37
  type(): string;
@@ -26,6 +26,10 @@ class ExternalTaxCalculators extends resource_1.ApiResource {
26
26
  const _externalTaxCalculatorId = externalTaxCalculatorId.id || externalTaxCalculatorId;
27
27
  return this.resources.fetch({ type: 'attachments' }, `external_tax_calculators/${_externalTaxCalculatorId}/attachments`, params, options);
28
28
  }
29
+ async versions(externalTaxCalculatorId, params, options) {
30
+ const _externalTaxCalculatorId = externalTaxCalculatorId.id || externalTaxCalculatorId;
31
+ return this.resources.fetch({ type: 'versions' }, `external_tax_calculators/${_externalTaxCalculatorId}/versions`, params, options);
32
+ }
29
33
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
30
34
  isExternalTaxCalculator(resource) {
31
35
  return resource.type && (resource.type === ExternalTaxCalculators.TYPE);