@commercelayer/sdk 5.12.4 → 5.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/lib/cjs/api.d.ts +11 -2
  2. package/lib/cjs/api.js +4 -1
  3. package/lib/cjs/commercelayer.d.ts +4 -3
  4. package/lib/cjs/commercelayer.js +6 -1
  5. package/lib/cjs/config.js +3 -1
  6. package/lib/cjs/model.d.ts +1 -0
  7. package/lib/cjs/resource.d.ts +1 -1
  8. package/lib/cjs/resource.js +6 -0
  9. package/lib/cjs/resources/addresses.d.ts +3 -0
  10. package/lib/cjs/resources/addresses.js +4 -0
  11. package/lib/cjs/resources/adjustments.d.ts +5 -2
  12. package/lib/cjs/resources/adjustments.js +4 -0
  13. package/lib/cjs/resources/adyen_gateways.d.ts +3 -0
  14. package/lib/cjs/resources/adyen_gateways.js +4 -0
  15. package/lib/cjs/resources/adyen_payments.d.ts +5 -2
  16. package/lib/cjs/resources/adyen_payments.js +4 -0
  17. package/lib/cjs/resources/authorizations.d.ts +3 -0
  18. package/lib/cjs/resources/authorizations.js +4 -0
  19. package/lib/cjs/resources/avalara_accounts.d.ts +3 -0
  20. package/lib/cjs/resources/avalara_accounts.js +4 -0
  21. package/lib/cjs/resources/axerve_gateways.d.ts +4 -0
  22. package/lib/cjs/resources/axerve_gateways.js +4 -0
  23. package/lib/cjs/resources/axerve_payments.d.ts +5 -2
  24. package/lib/cjs/resources/axerve_payments.js +4 -0
  25. package/lib/cjs/resources/billing_info_validation_rules.d.ts +3 -0
  26. package/lib/cjs/resources/billing_info_validation_rules.js +4 -0
  27. package/lib/cjs/resources/braintree_gateways.d.ts +3 -0
  28. package/lib/cjs/resources/braintree_gateways.js +4 -0
  29. package/lib/cjs/resources/braintree_payments.d.ts +5 -2
  30. package/lib/cjs/resources/braintree_payments.js +4 -0
  31. package/lib/cjs/resources/bundles.d.ts +3 -0
  32. package/lib/cjs/resources/bundles.js +4 -0
  33. package/lib/cjs/resources/captures.d.ts +3 -0
  34. package/lib/cjs/resources/captures.js +4 -0
  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 +5 -2
  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 +3 -0
  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 +3 -0
  48. package/lib/cjs/resources/coupons.js +4 -0
  49. package/lib/cjs/resources/customer_addresses.d.ts +3 -0
  50. package/lib/cjs/resources/customer_addresses.js +4 -0
  51. package/lib/cjs/resources/customer_groups.d.ts +3 -0
  52. package/lib/cjs/resources/customer_groups.js +4 -0
  53. package/lib/cjs/resources/customer_payment_sources.d.ts +8 -13
  54. package/lib/cjs/resources/customer_payment_sources.js +4 -0
  55. package/lib/cjs/resources/customer_subscriptions.d.ts +3 -0
  56. package/lib/cjs/resources/customer_subscriptions.js +4 -0
  57. package/lib/cjs/resources/delivery_lead_times.d.ts +3 -0
  58. package/lib/cjs/resources/delivery_lead_times.js +4 -0
  59. package/lib/cjs/resources/external_gateways.d.ts +3 -0
  60. package/lib/cjs/resources/external_gateways.js +4 -0
  61. package/lib/cjs/resources/external_payments.d.ts +5 -2
  62. package/lib/cjs/resources/external_payments.js +4 -0
  63. package/lib/cjs/resources/external_promotions.d.ts +3 -0
  64. package/lib/cjs/resources/external_promotions.js +4 -0
  65. package/lib/cjs/resources/external_tax_calculators.d.ts +3 -0
  66. package/lib/cjs/resources/external_tax_calculators.js +4 -0
  67. package/lib/cjs/resources/fixed_amount_promotions.d.ts +3 -0
  68. package/lib/cjs/resources/fixed_amount_promotions.js +4 -0
  69. package/lib/cjs/resources/fixed_price_promotions.d.ts +3 -0
  70. package/lib/cjs/resources/fixed_price_promotions.js +4 -0
  71. package/lib/cjs/resources/free_gift_promotions.d.ts +3 -0
  72. package/lib/cjs/resources/free_gift_promotions.js +4 -0
  73. package/lib/cjs/resources/free_shipping_promotions.d.ts +3 -0
  74. package/lib/cjs/resources/free_shipping_promotions.js +4 -0
  75. package/lib/cjs/resources/gift_card_recipients.d.ts +3 -0
  76. package/lib/cjs/resources/gift_card_recipients.js +4 -0
  77. package/lib/cjs/resources/gift_cards.d.ts +3 -0
  78. package/lib/cjs/resources/gift_cards.js +4 -0
  79. package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -0
  80. package/lib/cjs/resources/in_stock_subscriptions.js +4 -0
  81. package/lib/cjs/resources/inventory_models.d.ts +3 -0
  82. package/lib/cjs/resources/inventory_models.js +4 -0
  83. package/lib/cjs/resources/inventory_return_locations.d.ts +5 -2
  84. package/lib/cjs/resources/inventory_return_locations.js +4 -0
  85. package/lib/cjs/resources/inventory_stock_locations.d.ts +5 -2
  86. package/lib/cjs/resources/inventory_stock_locations.js +4 -0
  87. package/lib/cjs/resources/klarna_gateways.d.ts +3 -0
  88. package/lib/cjs/resources/klarna_gateways.js +4 -0
  89. package/lib/cjs/resources/klarna_payments.d.ts +5 -2
  90. package/lib/cjs/resources/klarna_payments.js +4 -0
  91. package/lib/cjs/resources/manual_gateways.d.ts +3 -0
  92. package/lib/cjs/resources/manual_gateways.js +4 -0
  93. package/lib/cjs/resources/manual_tax_calculators.d.ts +3 -0
  94. package/lib/cjs/resources/manual_tax_calculators.js +4 -0
  95. package/lib/cjs/resources/markets.d.ts +3 -0
  96. package/lib/cjs/resources/markets.js +4 -0
  97. package/lib/cjs/resources/merchants.d.ts +3 -0
  98. package/lib/cjs/resources/merchants.js +4 -0
  99. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +5 -2
  100. package/lib/cjs/resources/order_amount_promotion_rules.js +4 -0
  101. package/lib/cjs/resources/order_subscription_items.d.ts +3 -0
  102. package/lib/cjs/resources/order_subscription_items.js +4 -0
  103. package/lib/cjs/resources/order_subscriptions.d.ts +3 -0
  104. package/lib/cjs/resources/order_subscriptions.js +4 -0
  105. package/lib/cjs/resources/order_validation_rules.d.ts +3 -0
  106. package/lib/cjs/resources/order_validation_rules.js +4 -0
  107. package/lib/cjs/resources/orders.d.ts +8 -2
  108. package/lib/cjs/resources/orders.js +4 -0
  109. package/lib/cjs/resources/packages.d.ts +3 -0
  110. package/lib/cjs/resources/packages.js +4 -0
  111. package/lib/cjs/resources/parcel_line_items.d.ts +5 -2
  112. package/lib/cjs/resources/parcel_line_items.js +4 -0
  113. package/lib/cjs/resources/parcels.d.ts +3 -0
  114. package/lib/cjs/resources/parcels.js +4 -0
  115. package/lib/cjs/resources/payment_gateways.d.ts +3 -0
  116. package/lib/cjs/resources/payment_gateways.js +4 -0
  117. package/lib/cjs/resources/payment_methods.d.ts +3 -0
  118. package/lib/cjs/resources/payment_methods.js +4 -0
  119. package/lib/cjs/resources/paypal_gateways.d.ts +3 -0
  120. package/lib/cjs/resources/paypal_gateways.js +4 -0
  121. package/lib/cjs/resources/paypal_payments.d.ts +5 -2
  122. package/lib/cjs/resources/paypal_payments.js +4 -0
  123. package/lib/cjs/resources/percentage_discount_promotions.d.ts +3 -0
  124. package/lib/cjs/resources/percentage_discount_promotions.js +4 -0
  125. package/lib/cjs/resources/price_frequency_tiers.d.ts +3 -0
  126. package/lib/cjs/resources/price_frequency_tiers.js +4 -0
  127. package/lib/cjs/resources/price_lists.d.ts +3 -0
  128. package/lib/cjs/resources/price_lists.js +4 -0
  129. package/lib/cjs/resources/price_tiers.d.ts +3 -0
  130. package/lib/cjs/resources/price_tiers.js +4 -0
  131. package/lib/cjs/resources/price_volume_tiers.d.ts +3 -0
  132. package/lib/cjs/resources/price_volume_tiers.js +4 -0
  133. package/lib/cjs/resources/prices.d.ts +3 -0
  134. package/lib/cjs/resources/prices.js +4 -0
  135. package/lib/cjs/resources/promotion_rules.d.ts +5 -1
  136. package/lib/cjs/resources/promotion_rules.js +4 -0
  137. package/lib/cjs/resources/promotions.d.ts +3 -0
  138. package/lib/cjs/resources/promotions.js +4 -0
  139. package/lib/cjs/resources/refunds.d.ts +3 -0
  140. package/lib/cjs/resources/refunds.js +4 -0
  141. package/lib/cjs/resources/returns.d.ts +3 -0
  142. package/lib/cjs/resources/returns.js +4 -0
  143. package/lib/cjs/resources/satispay_gateways.d.ts +3 -0
  144. package/lib/cjs/resources/satispay_gateways.js +4 -0
  145. package/lib/cjs/resources/satispay_payments.d.ts +6 -2
  146. package/lib/cjs/resources/satispay_payments.js +4 -0
  147. package/lib/cjs/resources/shipments.d.ts +3 -0
  148. package/lib/cjs/resources/shipments.js +4 -0
  149. package/lib/cjs/resources/shipping_categories.d.ts +3 -0
  150. package/lib/cjs/resources/shipping_categories.js +4 -0
  151. package/lib/cjs/resources/shipping_method_tiers.d.ts +3 -0
  152. package/lib/cjs/resources/shipping_method_tiers.js +4 -0
  153. package/lib/cjs/resources/shipping_methods.d.ts +3 -0
  154. package/lib/cjs/resources/shipping_methods.js +4 -0
  155. package/lib/cjs/resources/shipping_weight_tiers.d.ts +3 -0
  156. package/lib/cjs/resources/shipping_weight_tiers.js +4 -0
  157. package/lib/cjs/resources/shipping_zones.d.ts +3 -0
  158. package/lib/cjs/resources/shipping_zones.js +4 -0
  159. package/lib/cjs/resources/sku_list_items.d.ts +5 -2
  160. package/lib/cjs/resources/sku_list_items.js +4 -0
  161. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +3 -0
  162. package/lib/cjs/resources/sku_list_promotion_rules.js +4 -0
  163. package/lib/cjs/resources/sku_lists.d.ts +3 -0
  164. package/lib/cjs/resources/sku_lists.js +4 -0
  165. package/lib/cjs/resources/sku_options.d.ts +3 -0
  166. package/lib/cjs/resources/sku_options.js +4 -0
  167. package/lib/cjs/resources/skus.d.ts +3 -0
  168. package/lib/cjs/resources/skus.js +4 -0
  169. package/lib/cjs/resources/stock_items.d.ts +3 -0
  170. package/lib/cjs/resources/stock_items.js +4 -0
  171. package/lib/cjs/resources/stock_line_items.d.ts +5 -2
  172. package/lib/cjs/resources/stock_line_items.js +4 -0
  173. package/lib/cjs/resources/stock_locations.d.ts +3 -0
  174. package/lib/cjs/resources/stock_locations.js +4 -0
  175. package/lib/cjs/resources/stock_transfers.d.ts +3 -0
  176. package/lib/cjs/resources/stock_transfers.js +4 -0
  177. package/lib/cjs/resources/stripe_gateways.d.ts +3 -0
  178. package/lib/cjs/resources/stripe_gateways.js +4 -0
  179. package/lib/cjs/resources/stripe_payments.d.ts +8 -2
  180. package/lib/cjs/resources/stripe_payments.js +4 -0
  181. package/lib/cjs/resources/tax_calculators.d.ts +3 -0
  182. package/lib/cjs/resources/tax_calculators.js +4 -0
  183. package/lib/cjs/resources/tax_categories.d.ts +3 -0
  184. package/lib/cjs/resources/tax_categories.js +4 -0
  185. package/lib/cjs/resources/tax_rules.d.ts +5 -2
  186. package/lib/cjs/resources/tax_rules.js +4 -0
  187. package/lib/cjs/resources/taxjar_accounts.d.ts +3 -0
  188. package/lib/cjs/resources/taxjar_accounts.js +4 -0
  189. package/lib/cjs/resources/transactions.d.ts +3 -0
  190. package/lib/cjs/resources/transactions.js +4 -0
  191. package/lib/cjs/resources/versions.d.ts +22 -0
  192. package/lib/cjs/resources/versions.js +16 -0
  193. package/lib/cjs/resources/voids.d.ts +3 -0
  194. package/lib/cjs/resources/voids.js +4 -0
  195. package/lib/cjs/resources/webhooks.d.ts +3 -0
  196. package/lib/cjs/resources/webhooks.js +4 -0
  197. package/lib/cjs/resources/wire_transfers.d.ts +5 -2
  198. package/lib/cjs/resources/wire_transfers.js +4 -0
  199. package/lib/cjs/util.d.ts +1 -1
  200. package/lib/esm/api.d.ts +11 -2
  201. package/lib/esm/api.js +2 -0
  202. package/lib/esm/commercelayer.d.ts +4 -3
  203. package/lib/esm/commercelayer.js +6 -1
  204. package/lib/esm/config.js +3 -1
  205. package/lib/esm/model.d.ts +1 -0
  206. package/lib/esm/resource.d.ts +1 -1
  207. package/lib/esm/resource.js +6 -0
  208. package/lib/esm/resources/addresses.d.ts +3 -0
  209. package/lib/esm/resources/addresses.js +4 -0
  210. package/lib/esm/resources/adjustments.d.ts +5 -2
  211. package/lib/esm/resources/adjustments.js +4 -0
  212. package/lib/esm/resources/adyen_gateways.d.ts +3 -0
  213. package/lib/esm/resources/adyen_gateways.js +4 -0
  214. package/lib/esm/resources/adyen_payments.d.ts +5 -2
  215. package/lib/esm/resources/adyen_payments.js +4 -0
  216. package/lib/esm/resources/authorizations.d.ts +3 -0
  217. package/lib/esm/resources/authorizations.js +4 -0
  218. package/lib/esm/resources/avalara_accounts.d.ts +3 -0
  219. package/lib/esm/resources/avalara_accounts.js +4 -0
  220. package/lib/esm/resources/axerve_gateways.d.ts +4 -0
  221. package/lib/esm/resources/axerve_gateways.js +4 -0
  222. package/lib/esm/resources/axerve_payments.d.ts +5 -2
  223. package/lib/esm/resources/axerve_payments.js +4 -0
  224. package/lib/esm/resources/billing_info_validation_rules.d.ts +3 -0
  225. package/lib/esm/resources/billing_info_validation_rules.js +4 -0
  226. package/lib/esm/resources/braintree_gateways.d.ts +3 -0
  227. package/lib/esm/resources/braintree_gateways.js +4 -0
  228. package/lib/esm/resources/braintree_payments.d.ts +5 -2
  229. package/lib/esm/resources/braintree_payments.js +4 -0
  230. package/lib/esm/resources/bundles.d.ts +3 -0
  231. package/lib/esm/resources/bundles.js +4 -0
  232. package/lib/esm/resources/captures.d.ts +3 -0
  233. package/lib/esm/resources/captures.js +4 -0
  234. package/lib/esm/resources/carrier_accounts.d.ts +3 -0
  235. package/lib/esm/resources/carrier_accounts.js +4 -0
  236. package/lib/esm/resources/checkout_com_gateways.d.ts +3 -0
  237. package/lib/esm/resources/checkout_com_gateways.js +4 -0
  238. package/lib/esm/resources/checkout_com_payments.d.ts +5 -2
  239. package/lib/esm/resources/checkout_com_payments.js +4 -0
  240. package/lib/esm/resources/cleanups.d.ts +3 -0
  241. package/lib/esm/resources/cleanups.js +4 -0
  242. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +3 -0
  243. package/lib/esm/resources/coupon_codes_promotion_rules.js +4 -0
  244. package/lib/esm/resources/coupon_recipients.d.ts +3 -0
  245. package/lib/esm/resources/coupon_recipients.js +4 -0
  246. package/lib/esm/resources/coupons.d.ts +3 -0
  247. package/lib/esm/resources/coupons.js +4 -0
  248. package/lib/esm/resources/customer_addresses.d.ts +3 -0
  249. package/lib/esm/resources/customer_addresses.js +4 -0
  250. package/lib/esm/resources/customer_groups.d.ts +3 -0
  251. package/lib/esm/resources/customer_groups.js +4 -0
  252. package/lib/esm/resources/customer_payment_sources.d.ts +8 -13
  253. package/lib/esm/resources/customer_payment_sources.js +4 -0
  254. package/lib/esm/resources/customer_subscriptions.d.ts +3 -0
  255. package/lib/esm/resources/customer_subscriptions.js +4 -0
  256. package/lib/esm/resources/delivery_lead_times.d.ts +3 -0
  257. package/lib/esm/resources/delivery_lead_times.js +4 -0
  258. package/lib/esm/resources/external_gateways.d.ts +3 -0
  259. package/lib/esm/resources/external_gateways.js +4 -0
  260. package/lib/esm/resources/external_payments.d.ts +5 -2
  261. package/lib/esm/resources/external_payments.js +4 -0
  262. package/lib/esm/resources/external_promotions.d.ts +3 -0
  263. package/lib/esm/resources/external_promotions.js +4 -0
  264. package/lib/esm/resources/external_tax_calculators.d.ts +3 -0
  265. package/lib/esm/resources/external_tax_calculators.js +4 -0
  266. package/lib/esm/resources/fixed_amount_promotions.d.ts +3 -0
  267. package/lib/esm/resources/fixed_amount_promotions.js +4 -0
  268. package/lib/esm/resources/fixed_price_promotions.d.ts +3 -0
  269. package/lib/esm/resources/fixed_price_promotions.js +4 -0
  270. package/lib/esm/resources/free_gift_promotions.d.ts +3 -0
  271. package/lib/esm/resources/free_gift_promotions.js +4 -0
  272. package/lib/esm/resources/free_shipping_promotions.d.ts +3 -0
  273. package/lib/esm/resources/free_shipping_promotions.js +4 -0
  274. package/lib/esm/resources/gift_card_recipients.d.ts +3 -0
  275. package/lib/esm/resources/gift_card_recipients.js +4 -0
  276. package/lib/esm/resources/gift_cards.d.ts +3 -0
  277. package/lib/esm/resources/gift_cards.js +4 -0
  278. package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -0
  279. package/lib/esm/resources/in_stock_subscriptions.js +4 -0
  280. package/lib/esm/resources/inventory_models.d.ts +3 -0
  281. package/lib/esm/resources/inventory_models.js +4 -0
  282. package/lib/esm/resources/inventory_return_locations.d.ts +5 -2
  283. package/lib/esm/resources/inventory_return_locations.js +4 -0
  284. package/lib/esm/resources/inventory_stock_locations.d.ts +5 -2
  285. package/lib/esm/resources/inventory_stock_locations.js +4 -0
  286. package/lib/esm/resources/klarna_gateways.d.ts +3 -0
  287. package/lib/esm/resources/klarna_gateways.js +4 -0
  288. package/lib/esm/resources/klarna_payments.d.ts +5 -2
  289. package/lib/esm/resources/klarna_payments.js +4 -0
  290. package/lib/esm/resources/manual_gateways.d.ts +3 -0
  291. package/lib/esm/resources/manual_gateways.js +4 -0
  292. package/lib/esm/resources/manual_tax_calculators.d.ts +3 -0
  293. package/lib/esm/resources/manual_tax_calculators.js +4 -0
  294. package/lib/esm/resources/markets.d.ts +3 -0
  295. package/lib/esm/resources/markets.js +4 -0
  296. package/lib/esm/resources/merchants.d.ts +3 -0
  297. package/lib/esm/resources/merchants.js +4 -0
  298. package/lib/esm/resources/order_amount_promotion_rules.d.ts +5 -2
  299. package/lib/esm/resources/order_amount_promotion_rules.js +4 -0
  300. package/lib/esm/resources/order_subscription_items.d.ts +3 -0
  301. package/lib/esm/resources/order_subscription_items.js +4 -0
  302. package/lib/esm/resources/order_subscriptions.d.ts +3 -0
  303. package/lib/esm/resources/order_subscriptions.js +4 -0
  304. package/lib/esm/resources/order_validation_rules.d.ts +3 -0
  305. package/lib/esm/resources/order_validation_rules.js +4 -0
  306. package/lib/esm/resources/orders.d.ts +8 -2
  307. package/lib/esm/resources/orders.js +4 -0
  308. package/lib/esm/resources/packages.d.ts +3 -0
  309. package/lib/esm/resources/packages.js +4 -0
  310. package/lib/esm/resources/parcel_line_items.d.ts +5 -2
  311. package/lib/esm/resources/parcel_line_items.js +4 -0
  312. package/lib/esm/resources/parcels.d.ts +3 -0
  313. package/lib/esm/resources/parcels.js +4 -0
  314. package/lib/esm/resources/payment_gateways.d.ts +3 -0
  315. package/lib/esm/resources/payment_gateways.js +4 -0
  316. package/lib/esm/resources/payment_methods.d.ts +3 -0
  317. package/lib/esm/resources/payment_methods.js +4 -0
  318. package/lib/esm/resources/paypal_gateways.d.ts +3 -0
  319. package/lib/esm/resources/paypal_gateways.js +4 -0
  320. package/lib/esm/resources/paypal_payments.d.ts +5 -2
  321. package/lib/esm/resources/paypal_payments.js +4 -0
  322. package/lib/esm/resources/percentage_discount_promotions.d.ts +3 -0
  323. package/lib/esm/resources/percentage_discount_promotions.js +4 -0
  324. package/lib/esm/resources/price_frequency_tiers.d.ts +3 -0
  325. package/lib/esm/resources/price_frequency_tiers.js +4 -0
  326. package/lib/esm/resources/price_lists.d.ts +3 -0
  327. package/lib/esm/resources/price_lists.js +4 -0
  328. package/lib/esm/resources/price_tiers.d.ts +3 -0
  329. package/lib/esm/resources/price_tiers.js +4 -0
  330. package/lib/esm/resources/price_volume_tiers.d.ts +3 -0
  331. package/lib/esm/resources/price_volume_tiers.js +4 -0
  332. package/lib/esm/resources/prices.d.ts +3 -0
  333. package/lib/esm/resources/prices.js +4 -0
  334. package/lib/esm/resources/promotion_rules.d.ts +5 -1
  335. package/lib/esm/resources/promotion_rules.js +4 -0
  336. package/lib/esm/resources/promotions.d.ts +3 -0
  337. package/lib/esm/resources/promotions.js +4 -0
  338. package/lib/esm/resources/refunds.d.ts +3 -0
  339. package/lib/esm/resources/refunds.js +4 -0
  340. package/lib/esm/resources/returns.d.ts +3 -0
  341. package/lib/esm/resources/returns.js +4 -0
  342. package/lib/esm/resources/satispay_gateways.d.ts +3 -0
  343. package/lib/esm/resources/satispay_gateways.js +4 -0
  344. package/lib/esm/resources/satispay_payments.d.ts +6 -2
  345. package/lib/esm/resources/satispay_payments.js +4 -0
  346. package/lib/esm/resources/shipments.d.ts +3 -0
  347. package/lib/esm/resources/shipments.js +4 -0
  348. package/lib/esm/resources/shipping_categories.d.ts +3 -0
  349. package/lib/esm/resources/shipping_categories.js +4 -0
  350. package/lib/esm/resources/shipping_method_tiers.d.ts +3 -0
  351. package/lib/esm/resources/shipping_method_tiers.js +4 -0
  352. package/lib/esm/resources/shipping_methods.d.ts +3 -0
  353. package/lib/esm/resources/shipping_methods.js +4 -0
  354. package/lib/esm/resources/shipping_weight_tiers.d.ts +3 -0
  355. package/lib/esm/resources/shipping_weight_tiers.js +4 -0
  356. package/lib/esm/resources/shipping_zones.d.ts +3 -0
  357. package/lib/esm/resources/shipping_zones.js +4 -0
  358. package/lib/esm/resources/sku_list_items.d.ts +5 -2
  359. package/lib/esm/resources/sku_list_items.js +4 -0
  360. package/lib/esm/resources/sku_list_promotion_rules.d.ts +3 -0
  361. package/lib/esm/resources/sku_list_promotion_rules.js +4 -0
  362. package/lib/esm/resources/sku_lists.d.ts +3 -0
  363. package/lib/esm/resources/sku_lists.js +4 -0
  364. package/lib/esm/resources/sku_options.d.ts +3 -0
  365. package/lib/esm/resources/sku_options.js +4 -0
  366. package/lib/esm/resources/skus.d.ts +3 -0
  367. package/lib/esm/resources/skus.js +4 -0
  368. package/lib/esm/resources/stock_items.d.ts +3 -0
  369. package/lib/esm/resources/stock_items.js +4 -0
  370. package/lib/esm/resources/stock_line_items.d.ts +5 -2
  371. package/lib/esm/resources/stock_line_items.js +4 -0
  372. package/lib/esm/resources/stock_locations.d.ts +3 -0
  373. package/lib/esm/resources/stock_locations.js +4 -0
  374. package/lib/esm/resources/stock_transfers.d.ts +3 -0
  375. package/lib/esm/resources/stock_transfers.js +4 -0
  376. package/lib/esm/resources/stripe_gateways.d.ts +3 -0
  377. package/lib/esm/resources/stripe_gateways.js +4 -0
  378. package/lib/esm/resources/stripe_payments.d.ts +8 -2
  379. package/lib/esm/resources/stripe_payments.js +4 -0
  380. package/lib/esm/resources/tax_calculators.d.ts +3 -0
  381. package/lib/esm/resources/tax_calculators.js +4 -0
  382. package/lib/esm/resources/tax_categories.d.ts +3 -0
  383. package/lib/esm/resources/tax_categories.js +4 -0
  384. package/lib/esm/resources/tax_rules.d.ts +5 -2
  385. package/lib/esm/resources/tax_rules.js +4 -0
  386. package/lib/esm/resources/taxjar_accounts.d.ts +3 -0
  387. package/lib/esm/resources/taxjar_accounts.js +4 -0
  388. package/lib/esm/resources/transactions.d.ts +3 -0
  389. package/lib/esm/resources/transactions.js +4 -0
  390. package/lib/esm/resources/versions.d.ts +22 -0
  391. package/lib/esm/resources/versions.js +14 -0
  392. package/lib/esm/resources/voids.d.ts +3 -0
  393. package/lib/esm/resources/voids.js +4 -0
  394. package/lib/esm/resources/webhooks.d.ts +3 -0
  395. package/lib/esm/resources/webhooks.js +4 -0
  396. package/lib/esm/resources/wire_transfers.d.ts +5 -2
  397. package/lib/esm/resources/wire_transfers.js +4 -0
  398. package/lib/esm/util.d.ts +1 -1
  399. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  400. package/lib/tsconfig.tsbuildinfo +1 -1
  401. package/package.json +10 -10
@@ -1,6 +1,6 @@
1
1
  import { ApiResource } from '../resource';
2
- import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
3
- import type { QueryParamsRetrieve } from '../query';
2
+ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
+ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Customer, CustomerType } from './customers';
5
5
  import type { AdyenPayment, AdyenPaymentType } from './adyen_payments';
6
6
  import type { AxervePayment, AxervePaymentType } from './axerve_payments';
@@ -8,10 +8,9 @@ import type { BraintreePayment, BraintreePaymentType } from './braintree_payment
8
8
  import type { CheckoutComPayment, CheckoutComPaymentType } from './checkout_com_payments';
9
9
  import type { ExternalPayment, ExternalPaymentType } from './external_payments';
10
10
  import type { KlarnaPayment, KlarnaPaymentType } from './klarna_payments';
11
- import type { PaypalPayment, PaypalPaymentType } from './paypal_payments';
12
11
  import type { SatispayPayment, SatispayPaymentType } from './satispay_payments';
13
12
  import type { StripePayment, StripePaymentType } from './stripe_payments';
14
- import type { WireTransfer, WireTransferType } from './wire_transfers';
13
+ import type { Version } from './versions';
15
14
  type CustomerPaymentSourceType = 'customer_payment_sources';
16
15
  type CustomerPaymentSourceRel = ResourceRel & {
17
16
  type: CustomerPaymentSourceType;
@@ -37,33 +36,28 @@ type ExternalPaymentRel = ResourceRel & {
37
36
  type KlarnaPaymentRel = ResourceRel & {
38
37
  type: KlarnaPaymentType;
39
38
  };
40
- type PaypalPaymentRel = ResourceRel & {
41
- type: PaypalPaymentType;
42
- };
43
39
  type SatispayPaymentRel = ResourceRel & {
44
40
  type: SatispayPaymentType;
45
41
  };
46
42
  type StripePaymentRel = ResourceRel & {
47
43
  type: StripePaymentType;
48
44
  };
49
- type WireTransferRel = ResourceRel & {
50
- type: WireTransferType;
51
- };
52
45
  interface CustomerPaymentSource extends Resource {
53
46
  readonly type: CustomerPaymentSourceType;
54
47
  name?: string | null;
55
48
  customer_token?: string | null;
56
49
  payment_source_token?: string | null;
57
50
  customer?: Customer | null;
58
- payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | PaypalPayment | SatispayPayment | StripePayment | WireTransfer | null;
51
+ payment_source?: AdyenPayment | AxervePayment | BraintreePayment | CheckoutComPayment | ExternalPayment | KlarnaPayment | SatispayPayment | StripePayment | null;
52
+ versions?: Version[] | null;
59
53
  }
60
54
  interface CustomerPaymentSourceCreate extends ResourceCreate {
61
55
  customer: CustomerRel;
62
- payment_source: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel;
56
+ payment_source: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | SatispayPaymentRel | StripePaymentRel;
63
57
  }
64
58
  interface CustomerPaymentSourceUpdate extends ResourceUpdate {
65
59
  customer?: CustomerRel | null;
66
- payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | PaypalPaymentRel | SatispayPaymentRel | StripePaymentRel | WireTransferRel | null;
60
+ payment_source?: AdyenPaymentRel | AxervePaymentRel | BraintreePaymentRel | CheckoutComPaymentRel | ExternalPaymentRel | KlarnaPaymentRel | SatispayPaymentRel | StripePaymentRel | null;
67
61
  }
68
62
  declare class CustomerPaymentSources extends ApiResource<CustomerPaymentSource> {
69
63
  static readonly TYPE: CustomerPaymentSourceType;
@@ -71,6 +65,7 @@ declare class CustomerPaymentSources extends ApiResource<CustomerPaymentSource>
71
65
  update(resource: CustomerPaymentSourceUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
72
66
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
73
67
  customer(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
68
+ versions(customerPaymentSourceId: string | CustomerPaymentSource, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
74
69
  isCustomerPaymentSource(resource: any): resource is CustomerPaymentSource;
75
70
  relationship(id: string | ResourceId | null): CustomerPaymentSourceRel;
76
71
  type(): CustomerPaymentSourceType;
@@ -13,6 +13,10 @@ class CustomerPaymentSources extends ApiResource {
13
13
  const _customerPaymentSourceId = customerPaymentSourceId.id || customerPaymentSourceId;
14
14
  return this.resources.fetch({ type: 'customers' }, `customer_payment_sources/${_customerPaymentSourceId}/customer`, params, options);
15
15
  }
16
+ async versions(customerPaymentSourceId, params, options) {
17
+ const _customerPaymentSourceId = customerPaymentSourceId.id || customerPaymentSourceId;
18
+ return this.resources.fetch({ type: 'versions' }, `customer_payment_sources/${_customerPaymentSourceId}/versions`, params, options);
19
+ }
16
20
  isCustomerPaymentSource(resource) {
17
21
  return resource.type && (resource.type === CustomerPaymentSources.TYPE);
18
22
  }
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Customer } from './customers';
5
5
  import type { Event } from './events';
6
+ import type { Version } from './versions';
6
7
  type CustomerSubscriptionType = 'customer_subscriptions';
7
8
  type CustomerSubscriptionRel = ResourceRel & {
8
9
  type: CustomerSubscriptionType;
@@ -12,6 +13,7 @@ interface CustomerSubscription extends Resource {
12
13
  customer_email: string;
13
14
  customer?: Customer | null;
14
15
  events?: Event[] | null;
16
+ versions?: Version[] | null;
15
17
  }
16
18
  interface CustomerSubscriptionCreate extends ResourceCreate {
17
19
  customer_email: string;
@@ -24,6 +26,7 @@ declare class CustomerSubscriptions extends ApiResource<CustomerSubscription> {
24
26
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
25
27
  customer(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
26
28
  events(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
29
+ versions(customerSubscriptionId: string | CustomerSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
27
30
  isCustomerSubscription(resource: any): resource is CustomerSubscription;
28
31
  relationship(id: string | ResourceId | null): CustomerSubscriptionRel;
29
32
  type(): CustomerSubscriptionType;
@@ -17,6 +17,10 @@ class CustomerSubscriptions extends ApiResource {
17
17
  const _customerSubscriptionId = customerSubscriptionId.id || customerSubscriptionId;
18
18
  return this.resources.fetch({ type: 'events' }, `customer_subscriptions/${_customerSubscriptionId}/events`, params, options);
19
19
  }
20
+ async versions(customerSubscriptionId, params, options) {
21
+ const _customerSubscriptionId = customerSubscriptionId.id || customerSubscriptionId;
22
+ return this.resources.fetch({ type: 'versions' }, `customer_subscriptions/${_customerSubscriptionId}/versions`, params, options);
23
+ }
20
24
  isCustomerSubscription(resource) {
21
25
  return resource.type && (resource.type === CustomerSubscriptions.TYPE);
22
26
  }
@@ -4,6 +4,7 @@ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { StockLocation, StockLocationType } from './stock_locations';
5
5
  import type { ShippingMethod, ShippingMethodType } from './shipping_methods';
6
6
  import type { Attachment } from './attachments';
7
+ import type { Version } from './versions';
7
8
  type DeliveryLeadTimeType = 'delivery_lead_times';
8
9
  type DeliveryLeadTimeRel = ResourceRel & {
9
10
  type: DeliveryLeadTimeType;
@@ -23,6 +24,7 @@ interface DeliveryLeadTime extends Resource {
23
24
  stock_location?: StockLocation | null;
24
25
  shipping_method?: ShippingMethod | null;
25
26
  attachments?: Attachment[] | null;
27
+ versions?: Version[] | null;
26
28
  }
27
29
  interface DeliveryLeadTimeCreate extends ResourceCreate {
28
30
  min_hours: number;
@@ -44,6 +46,7 @@ declare class DeliveryLeadTimes extends ApiResource<DeliveryLeadTime> {
44
46
  stock_location(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
45
47
  shipping_method(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
46
48
  attachments(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
49
+ versions(deliveryLeadTimeId: string | DeliveryLeadTime, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
47
50
  isDeliveryLeadTime(resource: any): resource is DeliveryLeadTime;
48
51
  relationship(id: string | ResourceId | null): DeliveryLeadTimeRel;
49
52
  type(): DeliveryLeadTimeType;
@@ -21,6 +21,10 @@ class DeliveryLeadTimes extends ApiResource {
21
21
  const _deliveryLeadTimeId = deliveryLeadTimeId.id || deliveryLeadTimeId;
22
22
  return this.resources.fetch({ type: 'attachments' }, `delivery_lead_times/${_deliveryLeadTimeId}/attachments`, params, options);
23
23
  }
24
+ async versions(deliveryLeadTimeId, params, options) {
25
+ const _deliveryLeadTimeId = deliveryLeadTimeId.id || deliveryLeadTimeId;
26
+ return this.resources.fetch({ type: 'versions' }, `delivery_lead_times/${_deliveryLeadTimeId}/versions`, params, options);
27
+ }
24
28
  isDeliveryLeadTime(resource) {
25
29
  return resource.type && (resource.type === DeliveryLeadTimes.TYPE);
26
30
  }
@@ -2,6 +2,7 @@ import { ApiResource } from '../resource';
2
2
  import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { PaymentMethod } from './payment_methods';
5
+ import type { Version } from './versions';
5
6
  import type { ExternalPayment } from './external_payments';
6
7
  type ExternalGatewayType = 'external_gateways';
7
8
  type ExternalGatewayRel = ResourceRel & {
@@ -17,6 +18,7 @@ interface ExternalGateway extends Resource {
17
18
  refund_url?: string | null;
18
19
  token_url?: string | null;
19
20
  payment_methods?: PaymentMethod[] | null;
21
+ versions?: Version[] | null;
20
22
  external_payments?: ExternalPayment[] | null;
21
23
  }
22
24
  interface ExternalGatewayCreate extends ResourceCreate {
@@ -41,6 +43,7 @@ declare class ExternalGateways extends ApiResource<ExternalGateway> {
41
43
  update(resource: ExternalGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ExternalGateway>;
42
44
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
43
45
  payment_methods(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
46
+ versions(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
44
47
  external_payments(externalGatewayId: string | ExternalGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ExternalPayment>>;
45
48
  isExternalGateway(resource: any): resource is ExternalGateway;
46
49
  relationship(id: string | ResourceId | null): ExternalGatewayRel;
@@ -13,6 +13,10 @@ class ExternalGateways extends ApiResource {
13
13
  const _externalGatewayId = externalGatewayId.id || externalGatewayId;
14
14
  return this.resources.fetch({ type: 'payment_methods' }, `external_gateways/${_externalGatewayId}/payment_methods`, params, options);
15
15
  }
16
+ async versions(externalGatewayId, params, options) {
17
+ const _externalGatewayId = externalGatewayId.id || externalGatewayId;
18
+ return this.resources.fetch({ type: 'versions' }, `external_gateways/${_externalGatewayId}/versions`, params, options);
19
+ }
16
20
  async external_payments(externalGatewayId, params, options) {
17
21
  const _externalGatewayId = externalGatewayId.id || externalGatewayId;
18
22
  return this.resources.fetch({ type: 'external_payments' }, `external_gateways/${_externalGatewayId}/external_payments`, params, options);
@@ -1,9 +1,10 @@
1
1
  import { ApiResource } from '../resource';
2
- import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
3
- import type { QueryParamsRetrieve } from '../query';
2
+ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
+ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Order, OrderType } from './orders';
5
5
  import type { PaymentGateway } from './payment_gateways';
6
6
  import type { CustomerPaymentSource } from './customer_payment_sources';
7
+ import type { Version } from './versions';
7
8
  type ExternalPaymentType = 'external_payments';
8
9
  type ExternalPaymentRel = ResourceRel & {
9
10
  type: ExternalPaymentType;
@@ -19,6 +20,7 @@ interface ExternalPayment extends Resource {
19
20
  order?: Order | null;
20
21
  payment_gateway?: PaymentGateway | null;
21
22
  wallet?: CustomerPaymentSource | null;
23
+ versions?: Version[] | null;
22
24
  }
23
25
  interface ExternalPaymentCreate extends ResourceCreate {
24
26
  payment_source_token: string;
@@ -37,6 +39,7 @@ declare class ExternalPayments extends ApiResource<ExternalPayment> {
37
39
  order(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
38
40
  payment_gateway(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
39
41
  wallet(externalPaymentId: string | ExternalPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CustomerPaymentSource>;
42
+ versions(externalPaymentId: string | ExternalPayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
40
43
  isExternalPayment(resource: any): resource is ExternalPayment;
41
44
  relationship(id: string | ResourceId | null): ExternalPaymentRel;
42
45
  type(): ExternalPaymentType;
@@ -21,6 +21,10 @@ class ExternalPayments extends ApiResource {
21
21
  const _externalPaymentId = externalPaymentId.id || externalPaymentId;
22
22
  return this.resources.fetch({ type: 'customer_payment_sources' }, `external_payments/${_externalPaymentId}/wallet`, params, options);
23
23
  }
24
+ async versions(externalPaymentId, params, options) {
25
+ const _externalPaymentId = externalPaymentId.id || externalPaymentId;
26
+ return this.resources.fetch({ type: 'versions' }, `external_payments/${_externalPaymentId}/versions`, params, options);
27
+ }
24
28
  isExternalPayment(resource) {
25
29
  return resource.type && (resource.type === ExternalPayments.TYPE);
26
30
  }
@@ -10,6 +10,7 @@ import type { SkuList } from './sku_lists';
10
10
  import type { Attachment } from './attachments';
11
11
  import type { Event } from './events';
12
12
  import type { Tag, TagType } from './tags';
13
+ import type { Version } from './versions';
13
14
  type ExternalPromotionType = 'external_promotions';
14
15
  type ExternalPromotionRel = ResourceRel & {
15
16
  type: ExternalPromotionType;
@@ -52,6 +53,7 @@ interface ExternalPromotion extends Resource {
52
53
  attachments?: Attachment[] | null;
53
54
  events?: Event[] | null;
54
55
  tags?: Tag[] | null;
56
+ versions?: Version[] | null;
55
57
  }
56
58
  interface ExternalPromotionCreate extends ResourceCreate {
57
59
  name: string;
@@ -94,6 +96,7 @@ declare class ExternalPromotions extends ApiResource<ExternalPromotion> {
94
96
  attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
95
97
  events(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
96
98
  tags(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
99
+ versions(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
97
100
  isExternalPromotion(resource: any): resource is ExternalPromotion;
98
101
  relationship(id: string | ResourceId | null): ExternalPromotionRel;
99
102
  type(): ExternalPromotionType;
@@ -41,6 +41,10 @@ class ExternalPromotions extends ApiResource {
41
41
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
42
42
  return this.resources.fetch({ type: 'tags' }, `external_promotions/${_externalPromotionId}/tags`, params, options);
43
43
  }
44
+ async versions(externalPromotionId, params, options) {
45
+ const _externalPromotionId = externalPromotionId.id || externalPromotionId;
46
+ return this.resources.fetch({ type: 'versions' }, `external_promotions/${_externalPromotionId}/versions`, params, options);
47
+ }
44
48
  isExternalPromotion(resource) {
45
49
  return resource.type && (resource.type === ExternalPromotions.TYPE);
46
50
  }
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Market } from './markets';
5
5
  import type { Attachment } from './attachments';
6
+ import type { Version } from './versions';
6
7
  type ExternalTaxCalculatorType = 'external_tax_calculators';
7
8
  type ExternalTaxCalculatorRel = ResourceRel & {
8
9
  type: ExternalTaxCalculatorType;
@@ -14,6 +15,7 @@ interface ExternalTaxCalculator extends Resource {
14
15
  shared_secret: string;
15
16
  markets?: Market[] | null;
16
17
  attachments?: Attachment[] | null;
18
+ versions?: Version[] | null;
17
19
  }
18
20
  interface ExternalTaxCalculatorCreate extends ResourceCreate {
19
21
  name: string;
@@ -30,6 +32,7 @@ declare class ExternalTaxCalculators extends ApiResource<ExternalTaxCalculator>
30
32
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
31
33
  markets(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
32
34
  attachments(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
35
+ versions(externalTaxCalculatorId: string | ExternalTaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
33
36
  isExternalTaxCalculator(resource: any): resource is ExternalTaxCalculator;
34
37
  relationship(id: string | ResourceId | null): ExternalTaxCalculatorRel;
35
38
  type(): ExternalTaxCalculatorType;
@@ -17,6 +17,10 @@ class ExternalTaxCalculators extends ApiResource {
17
17
  const _externalTaxCalculatorId = externalTaxCalculatorId.id || externalTaxCalculatorId;
18
18
  return this.resources.fetch({ type: 'attachments' }, `external_tax_calculators/${_externalTaxCalculatorId}/attachments`, params, options);
19
19
  }
20
+ async versions(externalTaxCalculatorId, params, options) {
21
+ const _externalTaxCalculatorId = externalTaxCalculatorId.id || externalTaxCalculatorId;
22
+ return this.resources.fetch({ type: 'versions' }, `external_tax_calculators/${_externalTaxCalculatorId}/versions`, params, options);
23
+ }
20
24
  isExternalTaxCalculator(resource) {
21
25
  return resource.type && (resource.type === ExternalTaxCalculators.TYPE);
22
26
  }
@@ -10,6 +10,7 @@ import type { SkuList } from './sku_lists';
10
10
  import type { Attachment } from './attachments';
11
11
  import type { Event } from './events';
12
12
  import type { Tag, TagType } from './tags';
13
+ import type { Version } from './versions';
13
14
  type FixedAmountPromotionType = 'fixed_amount_promotions';
14
15
  type FixedAmountPromotionRel = ResourceRel & {
15
16
  type: FixedAmountPromotionType;
@@ -53,6 +54,7 @@ interface FixedAmountPromotion extends Resource {
53
54
  attachments?: Attachment[] | null;
54
55
  events?: Event[] | null;
55
56
  tags?: Tag[] | null;
57
+ versions?: Version[] | null;
56
58
  }
57
59
  interface FixedAmountPromotionCreate extends ResourceCreate {
58
60
  name: string;
@@ -95,6 +97,7 @@ declare class FixedAmountPromotions extends ApiResource<FixedAmountPromotion> {
95
97
  attachments(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
96
98
  events(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
97
99
  tags(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
100
+ versions(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
98
101
  isFixedAmountPromotion(resource: any): resource is FixedAmountPromotion;
99
102
  relationship(id: string | ResourceId | null): FixedAmountPromotionRel;
100
103
  type(): FixedAmountPromotionType;
@@ -41,6 +41,10 @@ class FixedAmountPromotions extends ApiResource {
41
41
  const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
42
42
  return this.resources.fetch({ type: 'tags' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/tags`, params, options);
43
43
  }
44
+ async versions(fixedAmountPromotionId, params, options) {
45
+ const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
46
+ return this.resources.fetch({ type: 'versions' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/versions`, params, options);
47
+ }
44
48
  isFixedAmountPromotion(resource) {
45
49
  return resource.type && (resource.type === FixedAmountPromotions.TYPE);
46
50
  }
@@ -10,6 +10,7 @@ import type { SkuList, SkuListType } from './sku_lists';
10
10
  import type { Attachment } from './attachments';
11
11
  import type { Event } from './events';
12
12
  import type { Tag, TagType } from './tags';
13
+ import type { Version } from './versions';
13
14
  import type { Sku } from './skus';
14
15
  type FixedPricePromotionType = 'fixed_price_promotions';
15
16
  type FixedPricePromotionRel = ResourceRel & {
@@ -57,6 +58,7 @@ interface FixedPricePromotion extends Resource {
57
58
  attachments?: Attachment[] | null;
58
59
  events?: Event[] | null;
59
60
  tags?: Tag[] | null;
61
+ versions?: Version[] | null;
60
62
  skus?: Sku[] | null;
61
63
  }
62
64
  interface FixedPricePromotionCreate extends ResourceCreate {
@@ -102,6 +104,7 @@ declare class FixedPricePromotions extends ApiResource<FixedPricePromotion> {
102
104
  attachments(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
103
105
  events(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
104
106
  tags(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
107
+ versions(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
105
108
  skus(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
106
109
  isFixedPricePromotion(resource: any): resource is FixedPricePromotion;
107
110
  relationship(id: string | ResourceId | null): FixedPricePromotionRel;
@@ -41,6 +41,10 @@ class FixedPricePromotions extends ApiResource {
41
41
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
42
42
  return this.resources.fetch({ type: 'tags' }, `fixed_price_promotions/${_fixedPricePromotionId}/tags`, params, options);
43
43
  }
44
+ async versions(fixedPricePromotionId, params, options) {
45
+ const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
46
+ return this.resources.fetch({ type: 'versions' }, `fixed_price_promotions/${_fixedPricePromotionId}/versions`, params, options);
47
+ }
44
48
  async skus(fixedPricePromotionId, params, options) {
45
49
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
46
50
  return this.resources.fetch({ type: 'skus' }, `fixed_price_promotions/${_fixedPricePromotionId}/skus`, params, options);
@@ -10,6 +10,7 @@ import type { SkuList, SkuListType } from './sku_lists';
10
10
  import type { Attachment } from './attachments';
11
11
  import type { Event } from './events';
12
12
  import type { Tag, TagType } from './tags';
13
+ import type { Version } from './versions';
13
14
  import type { Sku } from './skus';
14
15
  type FreeGiftPromotionType = 'free_gift_promotions';
15
16
  type FreeGiftPromotionRel = ResourceRel & {
@@ -55,6 +56,7 @@ interface FreeGiftPromotion extends Resource {
55
56
  attachments?: Attachment[] | null;
56
57
  events?: Event[] | null;
57
58
  tags?: Tag[] | null;
59
+ versions?: Version[] | null;
58
60
  skus?: Sku[] | null;
59
61
  }
60
62
  interface FreeGiftPromotionCreate extends ResourceCreate {
@@ -100,6 +102,7 @@ declare class FreeGiftPromotions extends ApiResource<FreeGiftPromotion> {
100
102
  attachments(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
101
103
  events(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
102
104
  tags(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
105
+ versions(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
103
106
  skus(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
104
107
  isFreeGiftPromotion(resource: any): resource is FreeGiftPromotion;
105
108
  relationship(id: string | ResourceId | null): FreeGiftPromotionRel;
@@ -41,6 +41,10 @@ class FreeGiftPromotions extends ApiResource {
41
41
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
42
42
  return this.resources.fetch({ type: 'tags' }, `free_gift_promotions/${_freeGiftPromotionId}/tags`, params, options);
43
43
  }
44
+ async versions(freeGiftPromotionId, params, options) {
45
+ const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
46
+ return this.resources.fetch({ type: 'versions' }, `free_gift_promotions/${_freeGiftPromotionId}/versions`, params, options);
47
+ }
44
48
  async skus(freeGiftPromotionId, params, options) {
45
49
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
46
50
  return this.resources.fetch({ type: 'skus' }, `free_gift_promotions/${_freeGiftPromotionId}/skus`, params, options);
@@ -10,6 +10,7 @@ import type { SkuList } from './sku_lists';
10
10
  import type { Attachment } from './attachments';
11
11
  import type { Event } from './events';
12
12
  import type { Tag, TagType } from './tags';
13
+ import type { Version } from './versions';
13
14
  type FreeShippingPromotionType = 'free_shipping_promotions';
14
15
  type FreeShippingPromotionRel = ResourceRel & {
15
16
  type: FreeShippingPromotionType;
@@ -50,6 +51,7 @@ interface FreeShippingPromotion extends Resource {
50
51
  attachments?: Attachment[] | null;
51
52
  events?: Event[] | null;
52
53
  tags?: Tag[] | null;
54
+ versions?: Version[] | null;
53
55
  }
54
56
  interface FreeShippingPromotionCreate extends ResourceCreate {
55
57
  name: string;
@@ -90,6 +92,7 @@ declare class FreeShippingPromotions extends ApiResource<FreeShippingPromotion>
90
92
  attachments(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
91
93
  events(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
92
94
  tags(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
95
+ versions(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
93
96
  isFreeShippingPromotion(resource: any): resource is FreeShippingPromotion;
94
97
  relationship(id: string | ResourceId | null): FreeShippingPromotionRel;
95
98
  type(): FreeShippingPromotionType;
@@ -41,6 +41,10 @@ class FreeShippingPromotions extends ApiResource {
41
41
  const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
42
42
  return this.resources.fetch({ type: 'tags' }, `free_shipping_promotions/${_freeShippingPromotionId}/tags`, params, options);
43
43
  }
44
+ async versions(freeShippingPromotionId, params, options) {
45
+ const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
46
+ return this.resources.fetch({ type: 'versions' }, `free_shipping_promotions/${_freeShippingPromotionId}/versions`, params, options);
47
+ }
44
48
  isFreeShippingPromotion(resource) {
45
49
  return resource.type && (resource.type === FreeShippingPromotions.TYPE);
46
50
  }
@@ -3,6 +3,7 @@ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesCon
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Customer, CustomerType } from './customers';
5
5
  import type { Attachment } from './attachments';
6
+ import type { Version } from './versions';
6
7
  type GiftCardRecipientType = 'gift_card_recipients';
7
8
  type GiftCardRecipientRel = ResourceRel & {
8
9
  type: GiftCardRecipientType;
@@ -17,6 +18,7 @@ interface GiftCardRecipient extends Resource {
17
18
  last_name?: string | null;
18
19
  customer?: Customer | null;
19
20
  attachments?: Attachment[] | null;
21
+ versions?: Version[] | null;
20
22
  }
21
23
  interface GiftCardRecipientCreate extends ResourceCreate {
22
24
  email: string;
@@ -37,6 +39,7 @@ declare class GiftCardRecipients extends ApiResource<GiftCardRecipient> {
37
39
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
38
40
  customer(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
39
41
  attachments(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
42
+ versions(giftCardRecipientId: string | GiftCardRecipient, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
40
43
  isGiftCardRecipient(resource: any): resource is GiftCardRecipient;
41
44
  relationship(id: string | ResourceId | null): GiftCardRecipientRel;
42
45
  type(): GiftCardRecipientType;
@@ -17,6 +17,10 @@ class GiftCardRecipients extends ApiResource {
17
17
  const _giftCardRecipientId = giftCardRecipientId.id || giftCardRecipientId;
18
18
  return this.resources.fetch({ type: 'attachments' }, `gift_card_recipients/${_giftCardRecipientId}/attachments`, params, options);
19
19
  }
20
+ async versions(giftCardRecipientId, params, options) {
21
+ const _giftCardRecipientId = giftCardRecipientId.id || giftCardRecipientId;
22
+ return this.resources.fetch({ type: 'versions' }, `gift_card_recipients/${_giftCardRecipientId}/versions`, params, options);
23
+ }
20
24
  isGiftCardRecipient(resource) {
21
25
  return resource.type && (resource.type === GiftCardRecipients.TYPE);
22
26
  }
@@ -6,6 +6,7 @@ import type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recip
6
6
  import type { Attachment } from './attachments';
7
7
  import type { Event } from './events';
8
8
  import type { Tag, TagType } from './tags';
9
+ import type { Version } from './versions';
9
10
  type GiftCardType = 'gift_cards';
10
11
  type GiftCardRel = ResourceRel & {
11
12
  type: GiftCardType;
@@ -44,6 +45,7 @@ interface GiftCard extends Resource {
44
45
  attachments?: Attachment[] | null;
45
46
  events?: Event[] | null;
46
47
  tags?: Tag[] | null;
48
+ versions?: Version[] | null;
47
49
  }
48
50
  interface GiftCardCreate extends ResourceCreate {
49
51
  code?: string | null;
@@ -86,6 +88,7 @@ declare class GiftCards extends ApiResource<GiftCard> {
86
88
  attachments(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
87
89
  events(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
88
90
  tags(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
91
+ versions(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
89
92
  _purchase(id: string | GiftCard, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCard>;
90
93
  _activate(id: string | GiftCard, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCard>;
91
94
  _deactivate(id: string | GiftCard, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCard>;
@@ -29,6 +29,10 @@ class GiftCards extends ApiResource {
29
29
  const _giftCardId = giftCardId.id || giftCardId;
30
30
  return this.resources.fetch({ type: 'tags' }, `gift_cards/${_giftCardId}/tags`, params, options);
31
31
  }
32
+ async versions(giftCardId, params, options) {
33
+ const _giftCardId = giftCardId.id || giftCardId;
34
+ return this.resources.fetch({ type: 'versions' }, `gift_cards/${_giftCardId}/versions`, params, options);
35
+ }
32
36
  async _purchase(id, params, options) {
33
37
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: GiftCards.TYPE, _purchase: true }, params, options);
34
38
  }
@@ -5,6 +5,7 @@ import type { Market, MarketType } from './markets';
5
5
  import type { Customer, CustomerType } from './customers';
6
6
  import type { Sku, SkuType } from './skus';
7
7
  import type { Event } from './events';
8
+ import type { Version } from './versions';
8
9
  type InStockSubscriptionType = 'in_stock_subscriptions';
9
10
  type InStockSubscriptionRel = ResourceRel & {
10
11
  type: InStockSubscriptionType;
@@ -28,6 +29,7 @@ interface InStockSubscription extends Resource {
28
29
  customer?: Customer | null;
29
30
  sku?: Sku | null;
30
31
  events?: Event[] | null;
32
+ versions?: Version[] | null;
31
33
  }
32
34
  interface InStockSubscriptionCreate extends ResourceCreate {
33
35
  customer_email?: string | null;
@@ -55,6 +57,7 @@ declare class InStockSubscriptions extends ApiResource<InStockSubscription> {
55
57
  customer(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
56
58
  sku(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
57
59
  events(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
60
+ versions(inStockSubscriptionId: string | InStockSubscription, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
58
61
  _activate(id: string | InStockSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InStockSubscription>;
59
62
  _deactivate(id: string | InStockSubscription, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<InStockSubscription>;
60
63
  isInStockSubscription(resource: any): resource is InStockSubscription;
@@ -25,6 +25,10 @@ class InStockSubscriptions extends ApiResource {
25
25
  const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
26
26
  return this.resources.fetch({ type: 'events' }, `in_stock_subscriptions/${_inStockSubscriptionId}/events`, params, options);
27
27
  }
28
+ async versions(inStockSubscriptionId, params, options) {
29
+ const _inStockSubscriptionId = inStockSubscriptionId.id || inStockSubscriptionId;
30
+ return this.resources.fetch({ type: 'versions' }, `in_stock_subscriptions/${_inStockSubscriptionId}/versions`, params, options);
31
+ }
28
32
  async _activate(id, params, options) {
29
33
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: InStockSubscriptions.TYPE, _activate: true }, params, options);
30
34
  }
@@ -4,6 +4,7 @@ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { InventoryStockLocation } from './inventory_stock_locations';
5
5
  import type { InventoryReturnLocation } from './inventory_return_locations';
6
6
  import type { Attachment } from './attachments';
7
+ import type { Version } from './versions';
7
8
  type InventoryModelType = 'inventory_models';
8
9
  type InventoryModelRel = ResourceRel & {
9
10
  type: InventoryModelType;
@@ -17,6 +18,7 @@ interface InventoryModel extends Resource {
17
18
  inventory_stock_locations?: InventoryStockLocation[] | null;
18
19
  inventory_return_locations?: InventoryReturnLocation[] | null;
19
20
  attachments?: Attachment[] | null;
21
+ versions?: Version[] | null;
20
22
  }
21
23
  interface InventoryModelCreate extends ResourceCreate {
22
24
  name: string;
@@ -38,6 +40,7 @@ declare class InventoryModels extends ApiResource<InventoryModel> {
38
40
  inventory_stock_locations(inventoryModelId: string | InventoryModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>>;
39
41
  inventory_return_locations(inventoryModelId: string | InventoryModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>>;
40
42
  attachments(inventoryModelId: string | InventoryModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
43
+ versions(inventoryModelId: string | InventoryModel, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
41
44
  isInventoryModel(resource: any): resource is InventoryModel;
42
45
  relationship(id: string | ResourceId | null): InventoryModelRel;
43
46
  type(): InventoryModelType;
@@ -21,6 +21,10 @@ class InventoryModels extends ApiResource {
21
21
  const _inventoryModelId = inventoryModelId.id || inventoryModelId;
22
22
  return this.resources.fetch({ type: 'attachments' }, `inventory_models/${_inventoryModelId}/attachments`, params, options);
23
23
  }
24
+ async versions(inventoryModelId, params, options) {
25
+ const _inventoryModelId = inventoryModelId.id || inventoryModelId;
26
+ return this.resources.fetch({ type: 'versions' }, `inventory_models/${_inventoryModelId}/versions`, params, options);
27
+ }
24
28
  isInventoryModel(resource) {
25
29
  return resource.type && (resource.type === InventoryModels.TYPE);
26
30
  }