@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
@@ -1,11 +1,25 @@
1
- import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Shipment } from './shipments';
4
4
  import type { LineItem } from './line_items';
5
5
  import type { StockItem } from './stock_items';
6
+ import type { Sku } from './skus';
7
+ import type { Version } from './versions';
6
8
  type StockLineItemRel = ResourceRel & {
7
9
  type: typeof StockLineItems.TYPE;
8
10
  };
11
+ type ShipmentRel = ResourceRel & {
12
+ type: 'shipments';
13
+ };
14
+ type LineItemRel = ResourceRel & {
15
+ type: 'line_items';
16
+ };
17
+ type StockItemRel = ResourceRel & {
18
+ type: 'stock_items';
19
+ };
20
+ type SkuRel = ResourceRel & {
21
+ type: 'skus';
22
+ };
9
23
  interface StockLineItem extends Resource {
10
24
  sku_code?: string;
11
25
  bundle_code?: string;
@@ -13,17 +27,43 @@ interface StockLineItem extends Resource {
13
27
  shipment?: Shipment;
14
28
  line_item?: LineItem;
15
29
  stock_item?: StockItem;
30
+ sku?: Sku;
31
+ versions?: Version[];
32
+ }
33
+ interface StockLineItemCreate extends ResourceCreate {
34
+ sku_code?: string;
35
+ quantity: number;
36
+ shipment?: ShipmentRel;
37
+ line_item?: LineItemRel;
38
+ stock_item?: StockItemRel;
39
+ sku?: SkuRel;
40
+ }
41
+ interface StockLineItemUpdate extends ResourceUpdate {
42
+ sku_code?: string;
43
+ quantity?: number;
44
+ _reserve_stock?: boolean;
45
+ _release_stock?: boolean;
46
+ _decrement_stock?: boolean;
47
+ shipment?: ShipmentRel;
48
+ line_item?: LineItemRel;
49
+ stock_item?: StockItemRel;
50
+ sku?: SkuRel;
16
51
  }
17
52
  declare class StockLineItems extends ApiResource {
18
53
  static readonly TYPE: 'stock_line_items';
19
54
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
55
+ create(resource: StockLineItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
20
56
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
57
+ update(resource: StockLineItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
58
+ delete(id: string, options?: ResourcesConfig): Promise<void>;
21
59
  shipment(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
22
60
  line_item(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
23
61
  stock_item(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
62
+ sku(stockLineItemId: string | StockLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
63
+ versions(stockLineItemId: string | StockLineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
24
64
  isStockLineItem(resource: any): resource is StockLineItem;
25
65
  relationship(id: string | ResourceId | null): StockLineItemRel;
26
66
  type(): string;
27
67
  }
28
68
  export default StockLineItems;
29
- export { StockLineItem };
69
+ export { StockLineItem, StockLineItemCreate, StockLineItemUpdate };
@@ -6,9 +6,18 @@ class StockLineItems extends resource_1.ApiResource {
6
6
  async list(params, options) {
7
7
  return this.resources.list({ type: StockLineItems.TYPE }, params, options);
8
8
  }
9
+ async create(resource, params, options) {
10
+ return this.resources.create(Object.assign(Object.assign({}, resource), { type: StockLineItems.TYPE }), params, options);
11
+ }
9
12
  async retrieve(id, params, options) {
10
13
  return this.resources.retrieve({ type: StockLineItems.TYPE, id }, params, options);
11
14
  }
15
+ async update(resource, params, options) {
16
+ return this.resources.update(Object.assign(Object.assign({}, resource), { type: StockLineItems.TYPE }), params, options);
17
+ }
18
+ async delete(id, options) {
19
+ await this.resources.delete({ type: StockLineItems.TYPE, id }, options);
20
+ }
12
21
  async shipment(stockLineItemId, params, options) {
13
22
  const _stockLineItemId = stockLineItemId.id || stockLineItemId;
14
23
  return this.resources.fetch({ type: 'shipments' }, `stock_line_items/${_stockLineItemId}/shipment`, params, options);
@@ -21,6 +30,14 @@ class StockLineItems extends resource_1.ApiResource {
21
30
  const _stockLineItemId = stockLineItemId.id || stockLineItemId;
22
31
  return this.resources.fetch({ type: 'stock_items' }, `stock_line_items/${_stockLineItemId}/stock_item`, params, options);
23
32
  }
33
+ async sku(stockLineItemId, params, options) {
34
+ const _stockLineItemId = stockLineItemId.id || stockLineItemId;
35
+ return this.resources.fetch({ type: 'skus' }, `stock_line_items/${_stockLineItemId}/sku`, params, options);
36
+ }
37
+ async versions(stockLineItemId, params, options) {
38
+ const _stockLineItemId = stockLineItemId.id || stockLineItemId;
39
+ return this.resources.fetch({ type: 'versions' }, `stock_line_items/${_stockLineItemId}/versions`, params, options);
40
+ }
24
41
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
25
42
  isStockLineItem(resource) {
26
43
  return resource.type && (resource.type === StockLineItems.TYPE);
@@ -6,6 +6,7 @@ import type { InventoryReturnLocation } from './inventory_return_locations';
6
6
  import type { StockItem } from './stock_items';
7
7
  import type { StockTransfer } from './stock_transfers';
8
8
  import type { Attachment } from './attachments';
9
+ import type { Version } from './versions';
9
10
  type StockLocationRel = ResourceRel & {
10
11
  type: typeof StockLocations.TYPE;
11
12
  };
@@ -15,6 +16,7 @@ type AddressRel = ResourceRel & {
15
16
  interface StockLocation extends Resource {
16
17
  number?: number;
17
18
  name?: string;
19
+ code?: string;
18
20
  label_format?: string;
19
21
  suppress_etd?: boolean;
20
22
  address?: Address;
@@ -23,15 +25,18 @@ interface StockLocation extends Resource {
23
25
  stock_items?: StockItem[];
24
26
  stock_transfers?: StockTransfer[];
25
27
  attachments?: Attachment[];
28
+ versions?: Version[];
26
29
  }
27
30
  interface StockLocationCreate extends ResourceCreate {
28
31
  name: string;
32
+ code?: string;
29
33
  label_format?: string;
30
34
  suppress_etd?: boolean;
31
35
  address: AddressRel;
32
36
  }
33
37
  interface StockLocationUpdate extends ResourceUpdate {
34
38
  name?: string;
39
+ code?: string;
35
40
  label_format?: string;
36
41
  suppress_etd?: boolean;
37
42
  address?: AddressRel;
@@ -49,6 +54,7 @@ declare class StockLocations extends ApiResource {
49
54
  stock_items(stockLocationId: string | StockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockItem>>;
50
55
  stock_transfers(stockLocationId: string | StockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
51
56
  attachments(stockLocationId: string | StockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
57
+ versions(stockLocationId: string | StockLocation, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
52
58
  isStockLocation(resource: any): resource is StockLocation;
53
59
  relationship(id: string | ResourceId | null): StockLocationRel;
54
60
  type(): string;
@@ -42,6 +42,10 @@ class StockLocations extends resource_1.ApiResource {
42
42
  const _stockLocationId = stockLocationId.id || stockLocationId;
43
43
  return this.resources.fetch({ type: 'attachments' }, `stock_locations/${_stockLocationId}/attachments`, params, options);
44
44
  }
45
+ async versions(stockLocationId, params, options) {
46
+ const _stockLocationId = stockLocationId.id || stockLocationId;
47
+ return this.resources.fetch({ type: 'versions' }, `stock_locations/${_stockLocationId}/versions`, params, options);
48
+ }
45
49
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
46
50
  isStockLocation(resource) {
47
51
  return resource.type && (resource.type === StockLocations.TYPE);
@@ -0,0 +1,49 @@
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { LineItem } from './line_items';
4
+ import type { Order } from './orders';
5
+ import type { StockItem } from './stock_items';
6
+ import type { ReservedStock } from './reserved_stocks';
7
+ import type { Sku } from './skus';
8
+ type StockReservationRel = ResourceRel & {
9
+ type: typeof StockReservations.TYPE;
10
+ };
11
+ type StockItemRel = ResourceRel & {
12
+ type: 'stock_items';
13
+ };
14
+ interface StockReservation extends Resource {
15
+ status?: string;
16
+ quantity?: number;
17
+ expires_at?: string;
18
+ line_item?: LineItem;
19
+ order?: Order;
20
+ stock_item?: StockItem;
21
+ reserved_stock?: ReservedStock;
22
+ sku?: Sku;
23
+ }
24
+ interface StockReservationCreate extends ResourceCreate {
25
+ quantity: number;
26
+ stock_item: StockItemRel;
27
+ }
28
+ interface StockReservationUpdate extends ResourceUpdate {
29
+ quantity?: number;
30
+ _pending?: boolean;
31
+ }
32
+ declare class StockReservations extends ApiResource {
33
+ static readonly TYPE: 'stock_reservations';
34
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
35
+ create(resource: StockReservationCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockReservation>;
36
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockReservation>;
37
+ update(resource: StockReservationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockReservation>;
38
+ delete(id: string, options?: ResourcesConfig): Promise<void>;
39
+ line_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
40
+ order(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
41
+ stock_item(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
42
+ reserved_stock(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReservedStock>;
43
+ sku(stockReservationId: string | StockReservation, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
44
+ isStockReservation(resource: any): resource is StockReservation;
45
+ relationship(id: string | ResourceId | null): StockReservationRel;
46
+ type(): string;
47
+ }
48
+ export default StockReservations;
49
+ export { StockReservation, StockReservationCreate, StockReservationUpdate };
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const resource_1 = require("../resource");
4
+ class StockReservations extends resource_1.ApiResource {
5
+ // static readonly PATH = 'stock_reservations'
6
+ async list(params, options) {
7
+ return this.resources.list({ type: StockReservations.TYPE }, params, options);
8
+ }
9
+ async create(resource, params, options) {
10
+ return this.resources.create(Object.assign(Object.assign({}, resource), { type: StockReservations.TYPE }), params, options);
11
+ }
12
+ async retrieve(id, params, options) {
13
+ return this.resources.retrieve({ type: StockReservations.TYPE, id }, params, options);
14
+ }
15
+ async update(resource, params, options) {
16
+ return this.resources.update(Object.assign(Object.assign({}, resource), { type: StockReservations.TYPE }), params, options);
17
+ }
18
+ async delete(id, options) {
19
+ await this.resources.delete({ type: StockReservations.TYPE, id }, options);
20
+ }
21
+ async line_item(stockReservationId, params, options) {
22
+ const _stockReservationId = stockReservationId.id || stockReservationId;
23
+ return this.resources.fetch({ type: 'line_items' }, `stock_reservations/${_stockReservationId}/line_item`, params, options);
24
+ }
25
+ async order(stockReservationId, params, options) {
26
+ const _stockReservationId = stockReservationId.id || stockReservationId;
27
+ return this.resources.fetch({ type: 'orders' }, `stock_reservations/${_stockReservationId}/order`, params, options);
28
+ }
29
+ async stock_item(stockReservationId, params, options) {
30
+ const _stockReservationId = stockReservationId.id || stockReservationId;
31
+ return this.resources.fetch({ type: 'stock_items' }, `stock_reservations/${_stockReservationId}/stock_item`, params, options);
32
+ }
33
+ async reserved_stock(stockReservationId, params, options) {
34
+ const _stockReservationId = stockReservationId.id || stockReservationId;
35
+ return this.resources.fetch({ type: 'reserved_stocks' }, `stock_reservations/${_stockReservationId}/reserved_stock`, params, options);
36
+ }
37
+ async sku(stockReservationId, params, options) {
38
+ const _stockReservationId = stockReservationId.id || stockReservationId;
39
+ return this.resources.fetch({ type: 'skus' }, `stock_reservations/${_stockReservationId}/sku`, params, options);
40
+ }
41
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
42
+ isStockReservation(resource) {
43
+ return resource.type && (resource.type === StockReservations.TYPE);
44
+ }
45
+ relationship(id) {
46
+ return ((id === null) || (typeof id === 'string')) ? { id, type: StockReservations.TYPE } : { id: id.id, type: StockReservations.TYPE };
47
+ }
48
+ type() {
49
+ return StockReservations.TYPE;
50
+ }
51
+ }
52
+ StockReservations.TYPE = 'stock_reservations';
53
+ exports.default = StockReservations;
@@ -5,6 +5,7 @@ import type { StockLocation } from './stock_locations';
5
5
  import type { Shipment } from './shipments';
6
6
  import type { LineItem } from './line_items';
7
7
  import type { Event } from './events';
8
+ import type { Version } from './versions';
8
9
  type StockTransferRel = ResourceRel & {
9
10
  type: typeof StockTransfers.TYPE;
10
11
  };
@@ -21,6 +22,7 @@ type LineItemRel = ResourceRel & {
21
22
  type: 'line_items';
22
23
  };
23
24
  interface StockTransfer extends Resource {
25
+ number?: string;
24
26
  sku_code?: string;
25
27
  status?: string;
26
28
  quantity?: number;
@@ -32,6 +34,7 @@ interface StockTransfer extends Resource {
32
34
  shipment?: Shipment;
33
35
  line_item?: LineItem;
34
36
  events?: Event[];
37
+ versions?: Version[];
35
38
  }
36
39
  interface StockTransferCreate extends ResourceCreate {
37
40
  sku_code?: string;
@@ -45,6 +48,7 @@ interface StockTransferCreate extends ResourceCreate {
45
48
  interface StockTransferUpdate extends ResourceUpdate {
46
49
  sku_code?: string;
47
50
  _upcoming?: boolean;
51
+ _on_hold?: boolean;
48
52
  _picking?: boolean;
49
53
  _in_transit?: boolean;
50
54
  _complete?: boolean;
@@ -66,6 +70,7 @@ declare class StockTransfers extends ApiResource {
66
70
  shipment(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
67
71
  line_item(stockTransferId: string | StockTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
68
72
  events(stockTransferId: string | StockTransfer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
73
+ versions(stockTransferId: string | StockTransfer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
69
74
  isStockTransfer(resource: any): resource is StockTransfer;
70
75
  relationship(id: string | ResourceId | null): StockTransferRel;
71
76
  type(): string;
@@ -42,6 +42,10 @@ class StockTransfers extends resource_1.ApiResource {
42
42
  const _stockTransferId = stockTransferId.id || stockTransferId;
43
43
  return this.resources.fetch({ type: 'events' }, `stock_transfers/${_stockTransferId}/events`, params, options);
44
44
  }
45
+ async versions(stockTransferId, params, options) {
46
+ const _stockTransferId = stockTransferId.id || stockTransferId;
47
+ return this.resources.fetch({ type: 'versions' }, `stock_transfers/${_stockTransferId}/versions`, params, options);
48
+ }
45
49
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
46
50
  isStockTransfer(resource) {
47
51
  return resource.type && (resource.type === StockTransfers.TYPE);
@@ -1,6 +1,7 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { PaymentMethod } from './payment_methods';
4
+ import type { Version } from './versions';
4
5
  import type { StripePayment } from './stripe_payments';
5
6
  type StripeGatewayRel = ResourceRel & {
6
7
  type: typeof StripeGateways.TYPE;
@@ -12,6 +13,7 @@ interface StripeGateway extends Resource {
12
13
  webhook_endpoint_secret?: string;
13
14
  webhook_endpoint_url?: string;
14
15
  payment_methods?: PaymentMethod[];
16
+ versions?: Version[];
15
17
  stripe_payments?: StripePayment[];
16
18
  }
17
19
  interface StripeGatewayCreate extends ResourceCreate {
@@ -32,6 +34,7 @@ declare class StripeGateways extends ApiResource {
32
34
  update(resource: StripeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripeGateway>;
33
35
  delete(id: string, options?: ResourcesConfig): Promise<void>;
34
36
  payment_methods(stripeGatewayId: string | StripeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
37
+ versions(stripeGatewayId: string | StripeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
35
38
  stripe_payments(stripeGatewayId: string | StripeGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StripePayment>>;
36
39
  isStripeGateway(resource: any): resource is StripeGateway;
37
40
  relationship(id: string | ResourceId | null): StripeGatewayRel;
@@ -22,6 +22,10 @@ class StripeGateways extends resource_1.ApiResource {
22
22
  const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
23
23
  return this.resources.fetch({ type: 'payment_methods' }, `stripe_gateways/${_stripeGatewayId}/payment_methods`, params, options);
24
24
  }
25
+ async versions(stripeGatewayId, params, options) {
26
+ const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
27
+ return this.resources.fetch({ type: 'versions' }, `stripe_gateways/${_stripeGatewayId}/versions`, params, options);
28
+ }
25
29
  async stripe_payments(stripeGatewayId, params, options) {
26
30
  const _stripeGatewayId = stripeGatewayId.id || stripeGatewayId;
27
31
  return this.resources.fetch({ type: 'stripe_payments' }, `stripe_gateways/${_stripeGatewayId}/stripe_payments`, params, options);
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Order } from './orders';
4
4
  import type { PaymentGateway } from './payment_gateways';
5
+ import type { Version } from './versions';
5
6
  type StripePaymentRel = ResourceRel & {
6
7
  type: typeof StripePayments.TYPE;
7
8
  };
@@ -9,6 +10,7 @@ type OrderRel = ResourceRel & {
9
10
  type: 'orders';
10
11
  };
11
12
  interface StripePayment extends Resource {
13
+ stripe_id?: string;
12
14
  client_secret?: string;
13
15
  publishable_key?: string;
14
16
  options?: object;
@@ -17,16 +19,25 @@ interface StripePayment extends Resource {
17
19
  intent_amount_cents?: number;
18
20
  intent_amount_float?: number;
19
21
  formatted_intent_amount?: string;
22
+ return_url?: string;
23
+ receipt_email?: string;
20
24
  payment_instrument?: object;
21
25
  order?: Order;
22
26
  payment_gateway?: PaymentGateway;
27
+ versions?: Version[];
23
28
  }
24
29
  interface StripePaymentCreate extends ResourceCreate {
30
+ stripe_id?: string;
31
+ client_secret?: string;
25
32
  options?: object;
33
+ return_url?: string;
34
+ receipt_email?: string;
26
35
  order: OrderRel;
27
36
  }
28
37
  interface StripePaymentUpdate extends ResourceUpdate {
29
38
  options?: object;
39
+ return_url?: string;
40
+ _update?: boolean;
30
41
  _refresh?: boolean;
31
42
  order?: OrderRel;
32
43
  }
@@ -39,6 +50,7 @@ declare class StripePayments extends ApiResource {
39
50
  delete(id: string, options?: ResourcesConfig): Promise<void>;
40
51
  order(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
41
52
  payment_gateway(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
53
+ versions(stripePaymentId: string | StripePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
42
54
  isStripePayment(resource: any): resource is StripePayment;
43
55
  relationship(id: string | ResourceId | null): StripePaymentRel;
44
56
  type(): string;
@@ -26,6 +26,10 @@ class StripePayments extends resource_1.ApiResource {
26
26
  const _stripePaymentId = stripePaymentId.id || stripePaymentId;
27
27
  return this.resources.fetch({ type: 'payment_gateways' }, `stripe_payments/${_stripePaymentId}/payment_gateway`, params, options);
28
28
  }
29
+ async versions(stripePaymentId, params, options) {
30
+ const _stripePaymentId = stripePaymentId.id || stripePaymentId;
31
+ return this.resources.fetch({ type: 'versions' }, `stripe_payments/${_stripePaymentId}/versions`, params, options);
32
+ }
29
33
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
30
34
  isStripePayment(resource) {
31
35
  return resource.type && (resource.type === StripePayments.TYPE);
@@ -0,0 +1,27 @@
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ type TagRel = ResourceRel & {
4
+ type: typeof Tags.TYPE;
5
+ };
6
+ interface Tag extends Resource {
7
+ name?: string;
8
+ }
9
+ interface TagCreate extends ResourceCreate {
10
+ name: string;
11
+ }
12
+ interface TagUpdate extends ResourceUpdate {
13
+ name?: string;
14
+ }
15
+ declare class Tags extends ApiResource {
16
+ static readonly TYPE: 'tags';
17
+ list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
18
+ create(resource: TagCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Tag>;
19
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Tag>;
20
+ update(resource: TagUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Tag>;
21
+ delete(id: string, options?: ResourcesConfig): Promise<void>;
22
+ isTag(resource: any): resource is Tag;
23
+ relationship(id: string | ResourceId | null): TagRel;
24
+ type(): string;
25
+ }
26
+ export default Tags;
27
+ export { Tag, TagCreate, TagUpdate };
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const resource_1 = require("../resource");
4
+ class Tags extends resource_1.ApiResource {
5
+ // static readonly PATH = 'tags'
6
+ async list(params, options) {
7
+ return this.resources.list({ type: Tags.TYPE }, params, options);
8
+ }
9
+ async create(resource, params, options) {
10
+ return this.resources.create(Object.assign(Object.assign({}, resource), { type: Tags.TYPE }), params, options);
11
+ }
12
+ async retrieve(id, params, options) {
13
+ return this.resources.retrieve({ type: Tags.TYPE, id }, params, options);
14
+ }
15
+ async update(resource, params, options) {
16
+ return this.resources.update(Object.assign(Object.assign({}, resource), { type: Tags.TYPE }), params, options);
17
+ }
18
+ async delete(id, options) {
19
+ await this.resources.delete({ type: Tags.TYPE, id }, options);
20
+ }
21
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
22
+ isTag(resource) {
23
+ return resource.type && (resource.type === Tags.TYPE);
24
+ }
25
+ relationship(id) {
26
+ return ((id === null) || (typeof id === 'string')) ? { id, type: Tags.TYPE } : { id: id.id, type: Tags.TYPE };
27
+ }
28
+ type() {
29
+ return Tags.TYPE;
30
+ }
31
+ }
32
+ Tags.TYPE = 'tags';
33
+ exports.default = Tags;
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListRe
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Market } from './markets';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  type TaxCalculatorRel = ResourceRel & {
6
7
  type: typeof TaxCalculators.TYPE;
7
8
  };
@@ -9,6 +10,7 @@ interface TaxCalculator extends Resource {
9
10
  name?: string;
10
11
  markets?: Market[];
11
12
  attachments?: Attachment[];
13
+ versions?: Version[];
12
14
  }
13
15
  declare class TaxCalculators extends ApiResource {
14
16
  static readonly TYPE: 'tax_calculators';
@@ -16,6 +18,7 @@ declare class TaxCalculators extends ApiResource {
16
18
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCalculator>;
17
19
  markets(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
18
20
  attachments(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
21
+ versions(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
19
22
  isTaxCalculator(resource: any): resource is TaxCalculator;
20
23
  relationship(id: string | ResourceId | null): TaxCalculatorRel;
21
24
  type(): string;
@@ -17,6 +17,10 @@ class TaxCalculators extends resource_1.ApiResource {
17
17
  const _taxCalculatorId = taxCalculatorId.id || taxCalculatorId;
18
18
  return this.resources.fetch({ type: 'attachments' }, `tax_calculators/${_taxCalculatorId}/attachments`, params, options);
19
19
  }
20
+ async versions(taxCalculatorId, params, options) {
21
+ const _taxCalculatorId = taxCalculatorId.id || taxCalculatorId;
22
+ return this.resources.fetch({ type: 'versions' }, `tax_calculators/${_taxCalculatorId}/versions`, params, options);
23
+ }
20
24
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
21
25
  isTaxCalculator(resource) {
22
26
  return resource.type && (resource.type === TaxCalculators.TYPE);
@@ -6,6 +6,7 @@ import type { TaxjarAccount } from './taxjar_accounts';
6
6
  import type { ManualTaxCalculator } from './manual_tax_calculators';
7
7
  import type { ExternalTaxCalculator } from './external_tax_calculators';
8
8
  import type { Attachment } from './attachments';
9
+ import type { Version } from './versions';
9
10
  type TaxCategoryRel = ResourceRel & {
10
11
  type: typeof TaxCategories.TYPE;
11
12
  };
@@ -30,6 +31,7 @@ interface TaxCategory extends Resource {
30
31
  sku?: Sku;
31
32
  tax_calculator?: AvalaraAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator;
32
33
  attachments?: Attachment[];
34
+ versions?: Version[];
33
35
  }
34
36
  interface TaxCategoryCreate extends ResourceCreate {
35
37
  code: string;
@@ -51,6 +53,7 @@ declare class TaxCategories extends ApiResource {
51
53
  delete(id: string, options?: ResourcesConfig): Promise<void>;
52
54
  sku(taxCategoryId: string | TaxCategory, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
53
55
  attachments(taxCategoryId: string | TaxCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
56
+ versions(taxCategoryId: string | TaxCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
54
57
  isTaxCategory(resource: any): resource is TaxCategory;
55
58
  relationship(id: string | ResourceId | null): TaxCategoryRel;
56
59
  type(): string;
@@ -26,6 +26,10 @@ class TaxCategories extends resource_1.ApiResource {
26
26
  const _taxCategoryId = taxCategoryId.id || taxCategoryId;
27
27
  return this.resources.fetch({ type: 'attachments' }, `tax_categories/${_taxCategoryId}/attachments`, params, options);
28
28
  }
29
+ async versions(taxCategoryId, params, options) {
30
+ const _taxCategoryId = taxCategoryId.id || taxCategoryId;
31
+ return this.resources.fetch({ type: 'versions' }, `tax_categories/${_taxCategoryId}/versions`, params, options);
32
+ }
29
33
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
30
34
  isTaxCategory(resource) {
31
35
  return resource.type && (resource.type === TaxCategories.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 { ManualTaxCalculator } from './manual_tax_calculators';
4
+ import type { Version } from './versions';
4
5
  type TaxRuleRel = ResourceRel & {
5
6
  type: typeof TaxRules.TYPE;
6
7
  };
@@ -22,6 +23,7 @@ interface TaxRule extends Resource {
22
23
  adjustment_taxable?: boolean;
23
24
  breakdown?: object;
24
25
  manual_tax_calculator?: ManualTaxCalculator;
26
+ versions?: Version[];
25
27
  }
26
28
  interface TaxRuleCreate extends ResourceCreate {
27
29
  name: string;
@@ -61,6 +63,7 @@ declare class TaxRules extends ApiResource {
61
63
  update(resource: TaxRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
62
64
  delete(id: string, options?: ResourcesConfig): Promise<void>;
63
65
  manual_tax_calculator(taxRuleId: string | TaxRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
66
+ versions(taxRuleId: string | TaxRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
64
67
  isTaxRule(resource: any): resource is TaxRule;
65
68
  relationship(id: string | ResourceId | null): TaxRuleRel;
66
69
  type(): string;
@@ -22,6 +22,10 @@ class TaxRules extends resource_1.ApiResource {
22
22
  const _taxRuleId = taxRuleId.id || taxRuleId;
23
23
  return this.resources.fetch({ type: 'manual_tax_calculators' }, `tax_rules/${_taxRuleId}/manual_tax_calculator`, params, options);
24
24
  }
25
+ async versions(taxRuleId, params, options) {
26
+ const _taxRuleId = taxRuleId.id || taxRuleId;
27
+ return this.resources.fetch({ type: 'versions' }, `tax_rules/${_taxRuleId}/versions`, params, options);
28
+ }
25
29
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
26
30
  isTaxRule(resource) {
27
31
  return resource.type && (resource.type === TaxRules.TYPE);
@@ -2,6 +2,7 @@ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig,
2
2
  import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import type { Market } from './markets';
4
4
  import type { Attachment } from './attachments';
5
+ import type { Version } from './versions';
5
6
  import type { TaxCategory } from './tax_categories';
6
7
  type TaxjarAccountRel = ResourceRel & {
7
8
  type: typeof TaxjarAccounts.TYPE;
@@ -13,6 +14,7 @@ interface TaxjarAccount extends Resource {
13
14
  name?: string;
14
15
  markets?: Market[];
15
16
  attachments?: Attachment[];
17
+ versions?: Version[];
16
18
  tax_categories?: TaxCategory[];
17
19
  }
18
20
  interface TaxjarAccountCreate extends ResourceCreate {
@@ -34,6 +36,7 @@ declare class TaxjarAccounts extends ApiResource {
34
36
  delete(id: string, options?: ResourcesConfig): Promise<void>;
35
37
  markets(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
36
38
  attachments(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
39
+ versions(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
37
40
  tax_categories(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
38
41
  isTaxjarAccount(resource: any): resource is TaxjarAccount;
39
42
  relationship(id: string | ResourceId | null): TaxjarAccountRel;
@@ -26,6 +26,10 @@ class TaxjarAccounts extends resource_1.ApiResource {
26
26
  const _taxjarAccountId = taxjarAccountId.id || taxjarAccountId;
27
27
  return this.resources.fetch({ type: 'attachments' }, `taxjar_accounts/${_taxjarAccountId}/attachments`, params, options);
28
28
  }
29
+ async versions(taxjarAccountId, params, options) {
30
+ const _taxjarAccountId = taxjarAccountId.id || taxjarAccountId;
31
+ return this.resources.fetch({ type: 'versions' }, `taxjar_accounts/${_taxjarAccountId}/versions`, params, options);
32
+ }
29
33
  async tax_categories(taxjarAccountId, params, options) {
30
34
  const _taxjarAccountId = taxjarAccountId.id || taxjarAccountId;
31
35
  return this.resources.fetch({ type: 'tax_categories' }, `taxjar_accounts/${_taxjarAccountId}/tax_categories`, params, options);