@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
@@ -2,19 +2,24 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Sku } from './skus';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  type ShippingCategoryRel = ResourceRel & {
6
7
  type: typeof ShippingCategories.TYPE;
7
8
  };
8
9
  interface ShippingCategory extends Resource {
9
10
  name?: string;
11
+ code?: string;
10
12
  skus?: Sku[];
11
13
  attachments?: Attachment[];
14
+ versions?: Version[];
12
15
  }
13
16
  interface ShippingCategoryCreate extends ResourceCreate {
14
17
  name: string;
18
+ code?: string;
15
19
  }
16
20
  interface ShippingCategoryUpdate extends ResourceUpdate {
17
21
  name?: string;
22
+ code?: string;
18
23
  }
19
24
  declare class ShippingCategories extends ApiResource {
20
25
  static readonly TYPE: 'shipping_categories';
@@ -25,6 +30,7 @@ declare class ShippingCategories extends ApiResource {
25
30
  delete(id: string, options?: ResourcesConfig): Promise<void>;
26
31
  skus(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
27
32
  attachments(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
33
+ versions(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
28
34
  isShippingCategory(resource: any): resource is ShippingCategory;
29
35
  relationship(id: string | ResourceId | null): ShippingCategoryRel;
30
36
  type(): string;
@@ -26,6 +26,10 @@ class ShippingCategories extends resource_1.ApiResource {
26
26
  const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
27
27
  return this.resources.fetch({ type: 'attachments' }, `shipping_categories/${_shippingCategoryId}/attachments`, params, options);
28
28
  }
29
+ async versions(shippingCategoryId, params, options) {
30
+ const _shippingCategoryId = shippingCategoryId.id || shippingCategoryId;
31
+ return this.resources.fetch({ type: 'versions' }, `shipping_categories/${_shippingCategoryId}/versions`, params, options);
32
+ }
29
33
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
30
34
  isShippingCategory(resource) {
31
35
  return resource.type && (resource.type === ShippingCategories.TYPE);
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListRe
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { ShippingMethod } from './shipping_methods';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  type ShippingMethodTierRel = ResourceRel & {
6
7
  type: typeof ShippingMethodTiers.TYPE;
7
8
  };
@@ -13,6 +14,7 @@ interface ShippingMethodTier extends Resource {
13
14
  formatted_price_amount?: string;
14
15
  shipping_method?: ShippingMethod;
15
16
  attachments?: Attachment[];
17
+ versions?: Version[];
16
18
  }
17
19
  declare class ShippingMethodTiers extends ApiResource {
18
20
  static readonly TYPE: 'shipping_method_tiers';
@@ -20,6 +22,7 @@ declare class ShippingMethodTiers extends ApiResource {
20
22
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethodTier>;
21
23
  shipping_method(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
22
24
  attachments(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
25
+ versions(shippingMethodTierId: string | ShippingMethodTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
23
26
  isShippingMethodTier(resource: any): resource is ShippingMethodTier;
24
27
  relationship(id: string | ResourceId | null): ShippingMethodTierRel;
25
28
  type(): string;
@@ -17,6 +17,10 @@ class ShippingMethodTiers extends resource_1.ApiResource {
17
17
  const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
18
18
  return this.resources.fetch({ type: 'attachments' }, `shipping_method_tiers/${_shippingMethodTierId}/attachments`, params, options);
19
19
  }
20
+ async versions(shippingMethodTierId, params, options) {
21
+ const _shippingMethodTierId = shippingMethodTierId.id || shippingMethodTierId;
22
+ return this.resources.fetch({ type: 'versions' }, `shipping_method_tiers/${_shippingMethodTierId}/versions`, params, options);
23
+ }
20
24
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
21
25
  isShippingMethodTier(resource) {
22
26
  return resource.type && (resource.type === ShippingMethodTiers.TYPE);
@@ -8,6 +8,7 @@ import type { DeliveryLeadTime } from './delivery_lead_times';
8
8
  import type { ShippingMethodTier } from './shipping_method_tiers';
9
9
  import type { ShippingWeightTier } from './shipping_weight_tiers';
10
10
  import type { Attachment } from './attachments';
11
+ import type { Version } from './versions';
11
12
  type ShippingMethodRel = ResourceRel & {
12
13
  type: typeof ShippingMethods.TYPE;
13
14
  };
@@ -30,6 +31,7 @@ interface ShippingMethod extends Resource {
30
31
  name?: string;
31
32
  scheme?: string;
32
33
  currency_code?: string;
34
+ external_prices_url?: string;
33
35
  disabled_at?: string;
34
36
  price_amount_cents?: number;
35
37
  price_amount_float?: number;
@@ -37,6 +39,7 @@ interface ShippingMethod extends Resource {
37
39
  free_over_amount_cents?: number;
38
40
  free_over_amount_float?: number;
39
41
  formatted_free_over_amount?: string;
42
+ use_subtotal?: boolean;
40
43
  price_amount_for_shipment_cents?: number;
41
44
  price_amount_for_shipment_float?: number;
42
45
  formatted_price_amount_for_shipment?: string;
@@ -51,13 +54,18 @@ interface ShippingMethod extends Resource {
51
54
  shipping_method_tiers?: ShippingMethodTier[];
52
55
  shipping_weight_tiers?: ShippingWeightTier[];
53
56
  attachments?: Attachment[];
57
+ versions?: Version[];
54
58
  }
55
59
  interface ShippingMethodCreate extends ResourceCreate {
56
60
  name: string;
57
61
  scheme?: string;
58
62
  currency_code?: string;
63
+ external_prices_url?: string;
64
+ _disable?: boolean;
65
+ _enable?: boolean;
59
66
  price_amount_cents: number;
60
67
  free_over_amount_cents?: number;
68
+ use_subtotal?: boolean;
61
69
  min_weight?: number;
62
70
  max_weight?: number;
63
71
  unit_of_weight?: string;
@@ -71,10 +79,12 @@ interface ShippingMethodUpdate extends ResourceUpdate {
71
79
  name?: string;
72
80
  scheme?: string;
73
81
  currency_code?: string;
82
+ external_prices_url?: string;
74
83
  _disable?: boolean;
75
84
  _enable?: boolean;
76
85
  price_amount_cents?: number;
77
86
  free_over_amount_cents?: number;
87
+ use_subtotal?: boolean;
78
88
  min_weight?: number;
79
89
  max_weight?: number;
80
90
  unit_of_weight?: string;
@@ -99,6 +109,7 @@ declare class ShippingMethods extends ApiResource {
99
109
  shipping_method_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethodTier>>;
100
110
  shipping_weight_tiers(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingWeightTier>>;
101
111
  attachments(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
112
+ versions(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
102
113
  isShippingMethod(resource: any): resource is ShippingMethod;
103
114
  relationship(id: string | ResourceId | null): ShippingMethodRel;
104
115
  type(): string;
@@ -50,6 +50,10 @@ class ShippingMethods extends resource_1.ApiResource {
50
50
  const _shippingMethodId = shippingMethodId.id || shippingMethodId;
51
51
  return this.resources.fetch({ type: 'attachments' }, `shipping_methods/${_shippingMethodId}/attachments`, params, options);
52
52
  }
53
+ async versions(shippingMethodId, params, options) {
54
+ const _shippingMethodId = shippingMethodId.id || shippingMethodId;
55
+ return this.resources.fetch({ type: 'versions' }, `shipping_methods/${_shippingMethodId}/versions`, params, options);
56
+ }
53
57
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
54
58
  isShippingMethod(resource) {
55
59
  return resource.type && (resource.type === ShippingMethods.TYPE);
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { ShippingMethod } from './shipping_methods';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  type ShippingWeightTierRel = ResourceRel & {
6
7
  type: typeof ShippingWeightTiers.TYPE;
7
8
  };
@@ -16,6 +17,7 @@ interface ShippingWeightTier extends Resource {
16
17
  formatted_price_amount?: string;
17
18
  shipping_method?: ShippingMethod;
18
19
  attachments?: Attachment[];
20
+ versions?: Version[];
19
21
  }
20
22
  interface ShippingWeightTierCreate extends ResourceCreate {
21
23
  name: string;
@@ -38,6 +40,7 @@ declare class ShippingWeightTiers extends ApiResource {
38
40
  delete(id: string, options?: ResourcesConfig): Promise<void>;
39
41
  shipping_method(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
40
42
  attachments(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
43
+ versions(shippingWeightTierId: string | ShippingWeightTier, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
41
44
  isShippingWeightTier(resource: any): resource is ShippingWeightTier;
42
45
  relationship(id: string | ResourceId | null): ShippingWeightTierRel;
43
46
  type(): string;
@@ -26,6 +26,10 @@ class ShippingWeightTiers extends resource_1.ApiResource {
26
26
  const _shippingWeightTierId = shippingWeightTierId.id || shippingWeightTierId;
27
27
  return this.resources.fetch({ type: 'attachments' }, `shipping_weight_tiers/${_shippingWeightTierId}/attachments`, params, options);
28
28
  }
29
+ async versions(shippingWeightTierId, params, options) {
30
+ const _shippingWeightTierId = shippingWeightTierId.id || shippingWeightTierId;
31
+ return this.resources.fetch({ type: 'versions' }, `shipping_weight_tiers/${_shippingWeightTierId}/versions`, params, options);
32
+ }
29
33
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
30
34
  isShippingWeightTier(resource) {
31
35
  return resource.type && (resource.type === ShippingWeightTiers.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 { Attachment } from './attachments';
4
+ import type { Version } from './versions';
4
5
  type ShippingZoneRel = ResourceRel & {
5
6
  type: typeof ShippingZones.TYPE;
6
7
  };
@@ -13,6 +14,7 @@ interface ShippingZone extends Resource {
13
14
  zip_code_regex?: string;
14
15
  not_zip_code_regex?: string;
15
16
  attachments?: Attachment[];
17
+ versions?: Version[];
16
18
  }
17
19
  interface ShippingZoneCreate extends ResourceCreate {
18
20
  name: string;
@@ -40,6 +42,7 @@ declare class ShippingZones extends ApiResource {
40
42
  update(resource: ShippingZoneUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
41
43
  delete(id: string, options?: ResourcesConfig): Promise<void>;
42
44
  attachments(shippingZoneId: string | ShippingZone, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
45
+ versions(shippingZoneId: string | ShippingZone, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
43
46
  isShippingZone(resource: any): resource is ShippingZone;
44
47
  relationship(id: string | ResourceId | null): ShippingZoneRel;
45
48
  type(): string;
@@ -22,6 +22,10 @@ class ShippingZones extends resource_1.ApiResource {
22
22
  const _shippingZoneId = shippingZoneId.id || shippingZoneId;
23
23
  return this.resources.fetch({ type: 'attachments' }, `shipping_zones/${_shippingZoneId}/attachments`, params, options);
24
24
  }
25
+ async versions(shippingZoneId, params, options) {
26
+ const _shippingZoneId = shippingZoneId.id || shippingZoneId;
27
+ return this.resources.fetch({ type: 'versions' }, `shipping_zones/${_shippingZoneId}/versions`, params, options);
28
+ }
25
29
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
26
30
  isShippingZone(resource) {
27
31
  return resource.type && (resource.type === ShippingZones.TYPE);
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { SkuList } from './sku_lists';
4
4
  import type { Sku } from './skus';
5
+ import type { Version } from './versions';
5
6
  type SkuListItemRel = ResourceRel & {
6
7
  type: typeof SkuListItems.TYPE;
7
8
  };
@@ -17,6 +18,7 @@ interface SkuListItem extends Resource {
17
18
  quantity?: number;
18
19
  sku_list?: SkuList;
19
20
  sku?: Sku;
21
+ versions?: Version[];
20
22
  }
21
23
  interface SkuListItemCreate extends ResourceCreate {
22
24
  position?: number;
@@ -39,6 +41,7 @@ declare class SkuListItems extends ApiResource {
39
41
  delete(id: string, options?: ResourcesConfig): Promise<void>;
40
42
  sku_list(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
41
43
  sku(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
44
+ versions(skuListItemId: string | SkuListItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
42
45
  isSkuListItem(resource: any): resource is SkuListItem;
43
46
  relationship(id: string | ResourceId | null): SkuListItemRel;
44
47
  type(): string;
@@ -26,6 +26,10 @@ class SkuListItems extends resource_1.ApiResource {
26
26
  const _skuListItemId = skuListItemId.id || skuListItemId;
27
27
  return this.resources.fetch({ type: 'skus' }, `sku_list_items/${_skuListItemId}/sku`, params, options);
28
28
  }
29
+ async versions(skuListItemId, params, options) {
30
+ const _skuListItemId = skuListItemId.id || skuListItemId;
31
+ return this.resources.fetch({ type: 'versions' }, `sku_list_items/${_skuListItemId}/versions`, params, options);
32
+ }
29
33
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
30
34
  isSkuListItem(resource) {
31
35
  return resource.type && (resource.type === SkuListItems.TYPE);
@@ -2,10 +2,12 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { PercentageDiscountPromotion } from './percentage_discount_promotions';
4
4
  import type { FreeShippingPromotion } from './free_shipping_promotions';
5
+ import type { BuyXPayYPromotion } from './buy_x_pay_y_promotions';
5
6
  import type { FreeGiftPromotion } from './free_gift_promotions';
6
7
  import type { FixedPricePromotion } from './fixed_price_promotions';
7
8
  import type { ExternalPromotion } from './external_promotions';
8
9
  import type { FixedAmountPromotion } from './fixed_amount_promotions';
10
+ import type { Version } from './versions';
9
11
  import type { SkuList } from './sku_lists';
10
12
  import type { Sku } from './skus';
11
13
  type SkuListPromotionRuleRel = ResourceRel & {
@@ -17,6 +19,9 @@ type PercentageDiscountPromotionRel = ResourceRel & {
17
19
  type FreeShippingPromotionRel = ResourceRel & {
18
20
  type: 'free_shipping_promotions';
19
21
  };
22
+ type BuyXPayYPromotionRel = ResourceRel & {
23
+ type: 'buy_x_pay_y_promotions';
24
+ };
20
25
  type FreeGiftPromotionRel = ResourceRel & {
21
26
  type: 'free_gift_promotions';
22
27
  };
@@ -35,20 +40,21 @@ type SkuListRel = ResourceRel & {
35
40
  interface SkuListPromotionRule extends Resource {
36
41
  all_skus?: boolean;
37
42
  min_quantity?: number;
38
- promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion;
43
+ promotion?: PercentageDiscountPromotion | FreeShippingPromotion | BuyXPayYPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion;
44
+ versions?: Version[];
39
45
  sku_list?: SkuList;
40
46
  skus?: Sku[];
41
47
  }
42
48
  interface SkuListPromotionRuleCreate extends ResourceCreate {
43
49
  all_skus?: boolean;
44
50
  min_quantity?: number;
45
- promotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
51
+ promotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
46
52
  sku_list?: SkuListRel;
47
53
  }
48
54
  interface SkuListPromotionRuleUpdate extends ResourceUpdate {
49
55
  all_skus?: boolean;
50
56
  min_quantity?: number;
51
- promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
57
+ promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | BuyXPayYPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
52
58
  sku_list?: SkuListRel;
53
59
  }
54
60
  declare class SkuListPromotionRules extends ApiResource {
@@ -58,6 +64,7 @@ declare class SkuListPromotionRules extends ApiResource {
58
64
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
59
65
  update(resource: SkuListPromotionRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
60
66
  delete(id: string, options?: ResourcesConfig): Promise<void>;
67
+ versions(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
61
68
  sku_list(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
62
69
  skus(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
63
70
  isSkuListPromotionRule(resource: any): resource is SkuListPromotionRule;
@@ -18,6 +18,10 @@ class SkuListPromotionRules extends resource_1.ApiResource {
18
18
  async delete(id, options) {
19
19
  await this.resources.delete({ type: SkuListPromotionRules.TYPE, id }, options);
20
20
  }
21
+ async versions(skuListPromotionRuleId, params, options) {
22
+ const _skuListPromotionRuleId = skuListPromotionRuleId.id || skuListPromotionRuleId;
23
+ return this.resources.fetch({ type: 'versions' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/versions`, params, options);
24
+ }
21
25
  async sku_list(skuListPromotionRuleId, params, options) {
22
26
  const _skuListPromotionRuleId = skuListPromotionRuleId.id || skuListPromotionRuleId;
23
27
  return this.resources.fetch({ type: 'sku_lists' }, `sku_list_promotion_rules/${_skuListPromotionRuleId}/sku_list`, params, options);
@@ -5,6 +5,7 @@ import type { Sku } from './skus';
5
5
  import type { SkuListItem } from './sku_list_items';
6
6
  import type { Bundle } from './bundles';
7
7
  import type { Attachment } from './attachments';
8
+ import type { Version } from './versions';
8
9
  type SkuListRel = ResourceRel & {
9
10
  type: typeof SkuLists.TYPE;
10
11
  };
@@ -23,6 +24,7 @@ interface SkuList extends Resource {
23
24
  sku_list_items?: SkuListItem[];
24
25
  bundles?: Bundle[];
25
26
  attachments?: Attachment[];
27
+ versions?: Version[];
26
28
  }
27
29
  interface SkuListCreate extends ResourceCreate {
28
30
  name: string;
@@ -52,6 +54,7 @@ declare class SkuLists extends ApiResource {
52
54
  sku_list_items(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuListItem>>;
53
55
  bundles(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Bundle>>;
54
56
  attachments(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
57
+ versions(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
55
58
  isSkuList(resource: any): resource is SkuList;
56
59
  relationship(id: string | ResourceId | null): SkuListRel;
57
60
  type(): string;
@@ -38,6 +38,10 @@ class SkuLists extends resource_1.ApiResource {
38
38
  const _skuListId = skuListId.id || skuListId;
39
39
  return this.resources.fetch({ type: 'attachments' }, `sku_lists/${_skuListId}/attachments`, params, options);
40
40
  }
41
+ async versions(skuListId, params, options) {
42
+ const _skuListId = skuListId.id || skuListId;
43
+ return this.resources.fetch({ type: 'versions' }, `sku_lists/${_skuListId}/versions`, params, options);
44
+ }
41
45
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
42
46
  isSkuList(resource) {
43
47
  return resource.type && (resource.type === SkuLists.TYPE);
@@ -2,12 +2,18 @@ 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 { Event } from './events';
6
+ import type { Tag } from './tags';
7
+ import type { Version } from './versions';
5
8
  type SkuOptionRel = ResourceRel & {
6
9
  type: typeof SkuOptions.TYPE;
7
10
  };
8
11
  type MarketRel = ResourceRel & {
9
12
  type: 'markets';
10
13
  };
14
+ type TagRel = ResourceRel & {
15
+ type: 'tags';
16
+ };
11
17
  interface SkuOption extends Resource {
12
18
  name?: string;
13
19
  currency_code?: string;
@@ -20,6 +26,9 @@ interface SkuOption extends Resource {
20
26
  sku_code_regex?: string;
21
27
  market?: Market;
22
28
  attachments?: Attachment[];
29
+ events?: Event[];
30
+ tags?: Tag[];
31
+ versions?: Version[];
23
32
  }
24
33
  interface SkuOptionCreate extends ResourceCreate {
25
34
  name: string;
@@ -29,6 +38,7 @@ interface SkuOptionCreate extends ResourceCreate {
29
38
  delay_hours?: number;
30
39
  sku_code_regex?: string;
31
40
  market?: MarketRel;
41
+ tags?: TagRel[];
32
42
  }
33
43
  interface SkuOptionUpdate extends ResourceUpdate {
34
44
  name?: string;
@@ -38,6 +48,7 @@ interface SkuOptionUpdate extends ResourceUpdate {
38
48
  delay_hours?: number;
39
49
  sku_code_regex?: string;
40
50
  market?: MarketRel;
51
+ tags?: TagRel[];
41
52
  }
42
53
  declare class SkuOptions extends ApiResource {
43
54
  static readonly TYPE: 'sku_options';
@@ -48,6 +59,9 @@ declare class SkuOptions extends ApiResource {
48
59
  delete(id: string, options?: ResourcesConfig): Promise<void>;
49
60
  market(skuOptionId: string | SkuOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
50
61
  attachments(skuOptionId: string | SkuOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
62
+ events(skuOptionId: string | SkuOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
63
+ tags(skuOptionId: string | SkuOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
64
+ versions(skuOptionId: string | SkuOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
51
65
  isSkuOption(resource: any): resource is SkuOption;
52
66
  relationship(id: string | ResourceId | null): SkuOptionRel;
53
67
  type(): string;
@@ -26,6 +26,18 @@ class SkuOptions extends resource_1.ApiResource {
26
26
  const _skuOptionId = skuOptionId.id || skuOptionId;
27
27
  return this.resources.fetch({ type: 'attachments' }, `sku_options/${_skuOptionId}/attachments`, params, options);
28
28
  }
29
+ async events(skuOptionId, params, options) {
30
+ const _skuOptionId = skuOptionId.id || skuOptionId;
31
+ return this.resources.fetch({ type: 'events' }, `sku_options/${_skuOptionId}/events`, params, options);
32
+ }
33
+ async tags(skuOptionId, params, options) {
34
+ const _skuOptionId = skuOptionId.id || skuOptionId;
35
+ return this.resources.fetch({ type: 'tags' }, `sku_options/${_skuOptionId}/tags`, params, options);
36
+ }
37
+ async versions(skuOptionId, params, options) {
38
+ const _skuOptionId = skuOptionId.id || skuOptionId;
39
+ return this.resources.fetch({ type: 'versions' }, `sku_options/${_skuOptionId}/versions`, params, options);
40
+ }
29
41
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
30
42
  isSkuOption(resource) {
31
43
  return resource.type && (resource.type === SkuOptions.TYPE);
@@ -3,15 +3,22 @@ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { ShippingCategory } from './shipping_categories';
4
4
  import type { Price } from './prices';
5
5
  import type { StockItem } from './stock_items';
6
+ import type { StockReservation } from './stock_reservations';
6
7
  import type { DeliveryLeadTime } from './delivery_lead_times';
7
8
  import type { SkuOption } from './sku_options';
8
9
  import type { Attachment } from './attachments';
10
+ import type { Event } from './events';
11
+ import type { Tag } from './tags';
12
+ import type { Version } from './versions';
9
13
  type SkuRel = ResourceRel & {
10
14
  type: typeof Skus.TYPE;
11
15
  };
12
16
  type ShippingCategoryRel = ResourceRel & {
13
17
  type: 'shipping_categories';
14
18
  };
19
+ type TagRel = ResourceRel & {
20
+ type: 'tags';
21
+ };
15
22
  interface Sku extends Resource {
16
23
  code?: string;
17
24
  name?: string;
@@ -27,9 +34,13 @@ interface Sku extends Resource {
27
34
  shipping_category?: ShippingCategory;
28
35
  prices?: Price[];
29
36
  stock_items?: StockItem[];
37
+ stock_reservations?: StockReservation[];
30
38
  delivery_lead_times?: DeliveryLeadTime[];
31
39
  sku_options?: SkuOption[];
32
40
  attachments?: Attachment[];
41
+ events?: Event[];
42
+ tags?: Tag[];
43
+ versions?: Version[];
33
44
  }
34
45
  interface SkuCreate extends ResourceCreate {
35
46
  code: string;
@@ -43,6 +54,7 @@ interface SkuCreate extends ResourceCreate {
43
54
  do_not_ship?: boolean;
44
55
  do_not_track?: boolean;
45
56
  shipping_category: ShippingCategoryRel;
57
+ tags?: TagRel[];
46
58
  }
47
59
  interface SkuUpdate extends ResourceUpdate {
48
60
  code?: string;
@@ -56,6 +68,7 @@ interface SkuUpdate extends ResourceUpdate {
56
68
  do_not_ship?: boolean;
57
69
  do_not_track?: boolean;
58
70
  shipping_category?: ShippingCategoryRel;
71
+ tags?: TagRel[];
59
72
  }
60
73
  declare class Skus extends ApiResource {
61
74
  static readonly TYPE: 'skus';
@@ -67,9 +80,13 @@ declare class Skus extends ApiResource {
67
80
  shipping_category(skuId: string | Sku, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
68
81
  prices(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Price>>;
69
82
  stock_items(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockItem>>;
83
+ stock_reservations(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
70
84
  delivery_lead_times(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<DeliveryLeadTime>>;
71
85
  sku_options(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuOption>>;
72
86
  attachments(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
87
+ events(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
88
+ tags(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
89
+ versions(skuId: string | Sku, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
73
90
  isSku(resource: any): resource is Sku;
74
91
  relationship(id: string | ResourceId | null): SkuRel;
75
92
  type(): string;
@@ -30,6 +30,10 @@ class Skus extends resource_1.ApiResource {
30
30
  const _skuId = skuId.id || skuId;
31
31
  return this.resources.fetch({ type: 'stock_items' }, `skus/${_skuId}/stock_items`, params, options);
32
32
  }
33
+ async stock_reservations(skuId, params, options) {
34
+ const _skuId = skuId.id || skuId;
35
+ return this.resources.fetch({ type: 'stock_reservations' }, `skus/${_skuId}/stock_reservations`, params, options);
36
+ }
33
37
  async delivery_lead_times(skuId, params, options) {
34
38
  const _skuId = skuId.id || skuId;
35
39
  return this.resources.fetch({ type: 'delivery_lead_times' }, `skus/${_skuId}/delivery_lead_times`, params, options);
@@ -42,6 +46,18 @@ class Skus extends resource_1.ApiResource {
42
46
  const _skuId = skuId.id || skuId;
43
47
  return this.resources.fetch({ type: 'attachments' }, `skus/${_skuId}/attachments`, params, options);
44
48
  }
49
+ async events(skuId, params, options) {
50
+ const _skuId = skuId.id || skuId;
51
+ return this.resources.fetch({ type: 'events' }, `skus/${_skuId}/events`, params, options);
52
+ }
53
+ async tags(skuId, params, options) {
54
+ const _skuId = skuId.id || skuId;
55
+ return this.resources.fetch({ type: 'tags' }, `skus/${_skuId}/tags`, params, options);
56
+ }
57
+ async versions(skuId, params, options) {
58
+ const _skuId = skuId.id || skuId;
59
+ return this.resources.fetch({ type: 'versions' }, `skus/${_skuId}/versions`, params, options);
60
+ }
45
61
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
46
62
  isSku(resource) {
47
63
  return resource.type && (resource.type === Skus.TYPE);
@@ -2,7 +2,10 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { StockLocation } from './stock_locations';
4
4
  import type { Sku } from './skus';
5
+ import type { ReservedStock } from './reserved_stocks';
6
+ import type { StockReservation } from './stock_reservations';
5
7
  import type { Attachment } from './attachments';
8
+ import type { Version } from './versions';
6
9
  type StockItemRel = ResourceRel & {
7
10
  type: typeof StockItems.TYPE;
8
11
  };
@@ -17,7 +20,10 @@ interface StockItem extends Resource {
17
20
  quantity?: number;
18
21
  stock_location?: StockLocation;
19
22
  sku?: Sku;
23
+ reserved_stock?: ReservedStock;
24
+ stock_reservations?: StockReservation[];
20
25
  attachments?: Attachment[];
26
+ versions?: Version[];
21
27
  }
22
28
  interface StockItemCreate extends ResourceCreate {
23
29
  sku_code?: string;
@@ -40,7 +46,10 @@ declare class StockItems extends ApiResource {
40
46
  delete(id: string, options?: ResourcesConfig): Promise<void>;
41
47
  stock_location(stockItemId: string | StockItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
42
48
  sku(stockItemId: string | StockItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
49
+ reserved_stock(stockItemId: string | StockItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReservedStock>;
50
+ stock_reservations(stockItemId: string | StockItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
43
51
  attachments(stockItemId: string | StockItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
52
+ versions(stockItemId: string | StockItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
44
53
  isStockItem(resource: any): resource is StockItem;
45
54
  relationship(id: string | ResourceId | null): StockItemRel;
46
55
  type(): string;
@@ -26,10 +26,22 @@ class StockItems extends resource_1.ApiResource {
26
26
  const _stockItemId = stockItemId.id || stockItemId;
27
27
  return this.resources.fetch({ type: 'skus' }, `stock_items/${_stockItemId}/sku`, params, options);
28
28
  }
29
+ async reserved_stock(stockItemId, params, options) {
30
+ const _stockItemId = stockItemId.id || stockItemId;
31
+ return this.resources.fetch({ type: 'reserved_stocks' }, `stock_items/${_stockItemId}/reserved_stock`, params, options);
32
+ }
33
+ async stock_reservations(stockItemId, params, options) {
34
+ const _stockItemId = stockItemId.id || stockItemId;
35
+ return this.resources.fetch({ type: 'stock_reservations' }, `stock_items/${_stockItemId}/stock_reservations`, params, options);
36
+ }
29
37
  async attachments(stockItemId, params, options) {
30
38
  const _stockItemId = stockItemId.id || stockItemId;
31
39
  return this.resources.fetch({ type: 'attachments' }, `stock_items/${_stockItemId}/attachments`, params, options);
32
40
  }
41
+ async versions(stockItemId, params, options) {
42
+ const _stockItemId = stockItemId.id || stockItemId;
43
+ return this.resources.fetch({ type: 'versions' }, `stock_items/${_stockItemId}/versions`, params, options);
44
+ }
33
45
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
34
46
  isStockItem(resource) {
35
47
  return resource.type && (resource.type === StockItems.TYPE);