@commercelayer/sdk 5.12.5 → 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,8 +1,9 @@
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
+ import type { Version } from './versions';
6
7
  type StripePaymentType = 'stripe_payments';
7
8
  type StripePaymentRel = ResourceRel & {
8
9
  type: StripePaymentType;
@@ -20,16 +21,20 @@ interface StripePayment extends Resource {
20
21
  intent_amount_cents: number;
21
22
  intent_amount_float?: number | null;
22
23
  formatted_intent_amount?: string | null;
24
+ return_url?: string | null;
23
25
  payment_instrument?: Record<string, any> | null;
24
26
  order?: Order | null;
25
27
  payment_gateway?: PaymentGateway | null;
28
+ versions?: Version[] | null;
26
29
  }
27
30
  interface StripePaymentCreate extends ResourceCreate {
28
31
  options?: Record<string, any> | null;
32
+ return_url?: string | null;
29
33
  order: OrderRel;
30
34
  }
31
35
  interface StripePaymentUpdate extends ResourceUpdate {
32
36
  options?: Record<string, any> | null;
37
+ return_url?: string | null;
33
38
  _update?: boolean | null;
34
39
  _refresh?: boolean | null;
35
40
  order?: OrderRel | null;
@@ -41,6 +46,7 @@ declare class StripePayments extends ApiResource<StripePayment> {
41
46
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
42
47
  order(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
43
48
  payment_gateway(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
49
+ versions(stripePaymentId: string | StripePayment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
44
50
  _update(id: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
45
51
  _refresh(id: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
46
52
  isStripePayment(resource: any): resource is StripePayment;
@@ -17,6 +17,10 @@ class StripePayments extends ApiResource {
17
17
  const _stripePaymentId = stripePaymentId.id || stripePaymentId;
18
18
  return this.resources.fetch({ type: 'payment_gateways' }, `stripe_payments/${_stripePaymentId}/payment_gateway`, params, options);
19
19
  }
20
+ async versions(stripePaymentId, params, options) {
21
+ const _stripePaymentId = stripePaymentId.id || stripePaymentId;
22
+ return this.resources.fetch({ type: 'versions' }, `stripe_payments/${_stripePaymentId}/versions`, params, options);
23
+ }
20
24
  async _update(id, params, options) {
21
25
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: StripePayments.TYPE, _update: true }, params, options);
22
26
  }
@@ -3,6 +3,7 @@ import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse }
3
3
  import type { 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 TaxCalculatorType = 'tax_calculators';
7
8
  type TaxCalculatorRel = ResourceRel & {
8
9
  type: TaxCalculatorType;
@@ -12,11 +13,13 @@ interface TaxCalculator extends Resource {
12
13
  name: string;
13
14
  markets?: Market[] | null;
14
15
  attachments?: Attachment[] | null;
16
+ versions?: Version[] | null;
15
17
  }
16
18
  declare class TaxCalculators extends ApiResource<TaxCalculator> {
17
19
  static readonly TYPE: TaxCalculatorType;
18
20
  markets(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
19
21
  attachments(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
22
+ versions(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
20
23
  isTaxCalculator(resource: any): resource is TaxCalculator;
21
24
  relationship(id: string | ResourceId | null): TaxCalculatorRel;
22
25
  type(): TaxCalculatorType;
@@ -8,6 +8,10 @@ class TaxCalculators extends ApiResource {
8
8
  const _taxCalculatorId = taxCalculatorId.id || taxCalculatorId;
9
9
  return this.resources.fetch({ type: 'attachments' }, `tax_calculators/${_taxCalculatorId}/attachments`, params, options);
10
10
  }
11
+ async versions(taxCalculatorId, params, options) {
12
+ const _taxCalculatorId = taxCalculatorId.id || taxCalculatorId;
13
+ return this.resources.fetch({ type: 'versions' }, `tax_calculators/${_taxCalculatorId}/versions`, params, options);
14
+ }
11
15
  isTaxCalculator(resource) {
12
16
  return resource.type && (resource.type === TaxCalculators.TYPE);
13
17
  }
@@ -7,6 +7,7 @@ import type { TaxjarAccount, TaxjarAccountType } from './taxjar_accounts';
7
7
  import type { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators';
8
8
  import type { ExternalTaxCalculator, ExternalTaxCalculatorType } from './external_tax_calculators';
9
9
  import type { Attachment } from './attachments';
10
+ import type { Version } from './versions';
10
11
  type TaxCategoryType = 'tax_categories';
11
12
  type TaxCategoryRel = ResourceRel & {
12
13
  type: TaxCategoryType;
@@ -33,6 +34,7 @@ interface TaxCategory extends Resource {
33
34
  sku?: Sku | null;
34
35
  tax_calculator?: AvalaraAccount | TaxjarAccount | ManualTaxCalculator | ExternalTaxCalculator | null;
35
36
  attachments?: Attachment[] | null;
37
+ versions?: Version[] | null;
36
38
  }
37
39
  interface TaxCategoryCreate extends ResourceCreate {
38
40
  code: string;
@@ -52,6 +54,7 @@ declare class TaxCategories extends ApiResource<TaxCategory> {
52
54
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
53
55
  sku(taxCategoryId: string | TaxCategory, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
54
56
  attachments(taxCategoryId: string | TaxCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
57
+ versions(taxCategoryId: string | TaxCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
55
58
  isTaxCategory(resource: any): resource is TaxCategory;
56
59
  relationship(id: string | ResourceId | null): TaxCategoryRel;
57
60
  type(): TaxCategoryType;
@@ -17,6 +17,10 @@ class TaxCategories extends ApiResource {
17
17
  const _taxCategoryId = taxCategoryId.id || taxCategoryId;
18
18
  return this.resources.fetch({ type: 'attachments' }, `tax_categories/${_taxCategoryId}/attachments`, params, options);
19
19
  }
20
+ async versions(taxCategoryId, params, options) {
21
+ const _taxCategoryId = taxCategoryId.id || taxCategoryId;
22
+ return this.resources.fetch({ type: 'versions' }, `tax_categories/${_taxCategoryId}/versions`, params, options);
23
+ }
20
24
  isTaxCategory(resource) {
21
25
  return resource.type && (resource.type === TaxCategories.TYPE);
22
26
  }
@@ -1,7 +1,8 @@
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 { ManualTaxCalculator, ManualTaxCalculatorType } from './manual_tax_calculators';
5
+ import type { Version } from './versions';
5
6
  type TaxRuleType = 'tax_rules';
6
7
  type TaxRuleRel = ResourceRel & {
7
8
  type: TaxRuleType;
@@ -25,6 +26,7 @@ interface TaxRule extends Resource {
25
26
  adjustment_taxable?: boolean | null;
26
27
  breakdown?: Record<string, any> | null;
27
28
  manual_tax_calculator?: ManualTaxCalculator | null;
29
+ versions?: Version[] | null;
28
30
  }
29
31
  interface TaxRuleCreate extends ResourceCreate {
30
32
  name: string;
@@ -62,6 +64,7 @@ declare class TaxRules extends ApiResource<TaxRule> {
62
64
  update(resource: TaxRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
63
65
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
64
66
  manual_tax_calculator(taxRuleId: string | TaxRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
67
+ versions(taxRuleId: string | TaxRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
65
68
  isTaxRule(resource: any): resource is TaxRule;
66
69
  relationship(id: string | ResourceId | null): TaxRuleRel;
67
70
  type(): TaxRuleType;
@@ -13,6 +13,10 @@ class TaxRules extends ApiResource {
13
13
  const _taxRuleId = taxRuleId.id || taxRuleId;
14
14
  return this.resources.fetch({ type: 'manual_tax_calculators' }, `tax_rules/${_taxRuleId}/manual_tax_calculator`, params, options);
15
15
  }
16
+ async versions(taxRuleId, params, options) {
17
+ const _taxRuleId = taxRuleId.id || taxRuleId;
18
+ return this.resources.fetch({ type: 'versions' }, `tax_rules/${_taxRuleId}/versions`, params, options);
19
+ }
16
20
  isTaxRule(resource) {
17
21
  return resource.type && (resource.type === TaxRules.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 { Market } from './markets';
5
5
  import type { Attachment } from './attachments';
6
+ import type { Version } from './versions';
6
7
  import type { TaxCategory, TaxCategoryType } from './tax_categories';
7
8
  type TaxjarAccountType = 'taxjar_accounts';
8
9
  type TaxjarAccountRel = ResourceRel & {
@@ -16,6 +17,7 @@ interface TaxjarAccount extends Resource {
16
17
  name: string;
17
18
  markets?: Market[] | null;
18
19
  attachments?: Attachment[] | null;
20
+ versions?: Version[] | null;
19
21
  tax_categories?: TaxCategory[] | null;
20
22
  }
21
23
  interface TaxjarAccountCreate extends ResourceCreate {
@@ -35,6 +37,7 @@ declare class TaxjarAccounts extends ApiResource<TaxjarAccount> {
35
37
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
36
38
  markets(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
37
39
  attachments(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
40
+ versions(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
38
41
  tax_categories(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
39
42
  isTaxjarAccount(resource: any): resource is TaxjarAccount;
40
43
  relationship(id: string | ResourceId | null): TaxjarAccountRel;
@@ -17,6 +17,10 @@ class TaxjarAccounts extends ApiResource {
17
17
  const _taxjarAccountId = taxjarAccountId.id || taxjarAccountId;
18
18
  return this.resources.fetch({ type: 'attachments' }, `taxjar_accounts/${_taxjarAccountId}/attachments`, params, options);
19
19
  }
20
+ async versions(taxjarAccountId, params, options) {
21
+ const _taxjarAccountId = taxjarAccountId.id || taxjarAccountId;
22
+ return this.resources.fetch({ type: 'versions' }, `taxjar_accounts/${_taxjarAccountId}/versions`, params, options);
23
+ }
20
24
  async tax_categories(taxjarAccountId, params, options) {
21
25
  const _taxjarAccountId = taxjarAccountId.id || taxjarAccountId;
22
26
  return this.resources.fetch({ type: 'tax_categories' }, `taxjar_accounts/${_taxjarAccountId}/tax_categories`, params, options);
@@ -3,6 +3,7 @@ import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse }
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Order } from './orders';
5
5
  import type { Attachment } from './attachments';
6
+ import type { Version } from './versions';
6
7
  type TransactionType = 'transactions';
7
8
  type TransactionRel = ResourceRel & {
8
9
  type: TransactionType;
@@ -22,11 +23,13 @@ interface Transaction extends Resource {
22
23
  gateway_transaction_id?: string | null;
23
24
  order?: Order | null;
24
25
  attachments?: Attachment[] | null;
26
+ versions?: Version[] | null;
25
27
  }
26
28
  declare class Transactions extends ApiResource<Transaction> {
27
29
  static readonly TYPE: TransactionType;
28
30
  order(transactionId: string | Transaction, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
29
31
  attachments(transactionId: string | Transaction, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
32
+ versions(transactionId: string | Transaction, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
30
33
  isTransaction(resource: any): resource is Transaction;
31
34
  relationship(id: string | ResourceId | null): TransactionRel;
32
35
  type(): TransactionType;
@@ -8,6 +8,10 @@ class Transactions extends ApiResource {
8
8
  const _transactionId = transactionId.id || transactionId;
9
9
  return this.resources.fetch({ type: 'attachments' }, `transactions/${_transactionId}/attachments`, params, options);
10
10
  }
11
+ async versions(transactionId, params, options) {
12
+ const _transactionId = transactionId.id || transactionId;
13
+ return this.resources.fetch({ type: 'versions' }, `transactions/${_transactionId}/versions`, params, options);
14
+ }
11
15
  isTransaction(resource) {
12
16
  return resource.type && (resource.type === Transactions.TYPE);
13
17
  }
@@ -0,0 +1,22 @@
1
+ import { ApiResource } from '../resource';
2
+ import type { Resource, ResourceId, ResourceRel } from '../resource';
3
+ type VersionType = 'versions';
4
+ type VersionRel = ResourceRel & {
5
+ type: VersionType;
6
+ };
7
+ interface Version extends Resource {
8
+ readonly type: VersionType;
9
+ resource_type?: string | null;
10
+ resource_id?: string | null;
11
+ event?: string | null;
12
+ changes?: Record<string, any> | null;
13
+ who?: Record<string, any> | null;
14
+ }
15
+ declare class Versions extends ApiResource<Version> {
16
+ static readonly TYPE: VersionType;
17
+ isVersion(resource: any): resource is Version;
18
+ relationship(id: string | ResourceId | null): VersionRel;
19
+ type(): VersionType;
20
+ }
21
+ export default Versions;
22
+ export type { Version, VersionType };
@@ -0,0 +1,14 @@
1
+ import { ApiResource } from '../resource';
2
+ class Versions extends ApiResource {
3
+ isVersion(resource) {
4
+ return resource.type && (resource.type === Versions.TYPE);
5
+ }
6
+ relationship(id) {
7
+ return ((id === null) || (typeof id === 'string')) ? { id, type: Versions.TYPE } : { id: id.id, type: Versions.TYPE };
8
+ }
9
+ type() {
10
+ return Versions.TYPE;
11
+ }
12
+ }
13
+ Versions.TYPE = 'versions';
14
+ export default Versions;
@@ -3,6 +3,7 @@ import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse }
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Order } from './orders';
5
5
  import type { Attachment } from './attachments';
6
+ import type { Version } from './versions';
6
7
  import type { Authorization } from './authorizations';
7
8
  import type { Event } from './events';
8
9
  type VoidType = 'voids';
@@ -24,6 +25,7 @@ interface Void extends Resource {
24
25
  gateway_transaction_id?: string | null;
25
26
  order?: Order | null;
26
27
  attachments?: Attachment[] | null;
28
+ versions?: Version[] | null;
27
29
  reference_authorization?: Authorization | null;
28
30
  events?: Event[] | null;
29
31
  }
@@ -31,6 +33,7 @@ declare class Voids extends ApiResource<Void> {
31
33
  static readonly TYPE: VoidType;
32
34
  order(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
33
35
  attachments(voidId: string | Void, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
36
+ versions(voidId: string | Void, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
34
37
  reference_authorization(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
35
38
  events(voidId: string | Void, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
36
39
  isVoid(resource: any): resource is Void;
@@ -8,6 +8,10 @@ class Voids extends ApiResource {
8
8
  const _voidId = voidId.id || voidId;
9
9
  return this.resources.fetch({ type: 'attachments' }, `voids/${_voidId}/attachments`, params, options);
10
10
  }
11
+ async versions(voidId, params, options) {
12
+ const _voidId = voidId.id || voidId;
13
+ return this.resources.fetch({ type: 'versions' }, `voids/${_voidId}/versions`, params, options);
14
+ }
11
15
  async reference_authorization(voidId, params, options) {
12
16
  const _voidId = voidId.id || voidId;
13
17
  return this.resources.fetch({ type: 'authorizations' }, `voids/${_voidId}/reference_authorization`, params, options);
@@ -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 { EventCallback } from './event_callbacks';
5
+ import type { Version } from './versions';
5
6
  type WebhookType = 'webhooks';
6
7
  type WebhookRel = ResourceRel & {
7
8
  type: WebhookType;
@@ -16,6 +17,7 @@ interface Webhook extends Resource {
16
17
  circuit_failure_count?: number | null;
17
18
  shared_secret: string;
18
19
  last_event_callbacks?: EventCallback[] | null;
20
+ versions?: Version[] | null;
19
21
  }
20
22
  interface WebhookCreate extends ResourceCreate {
21
23
  name?: string | null;
@@ -36,6 +38,7 @@ declare class Webhooks extends ApiResource<Webhook> {
36
38
  update(resource: WebhookUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
37
39
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
38
40
  last_event_callbacks(webhookId: string | Webhook, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
41
+ versions(webhookId: string | Webhook, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
39
42
  _reset_circuit(id: string | Webhook, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
40
43
  isWebhook(resource: any): resource is Webhook;
41
44
  relationship(id: string | ResourceId | null): WebhookRel;
@@ -13,6 +13,10 @@ class Webhooks extends ApiResource {
13
13
  const _webhookId = webhookId.id || webhookId;
14
14
  return this.resources.fetch({ type: 'event_callbacks' }, `webhooks/${_webhookId}/last_event_callbacks`, params, options);
15
15
  }
16
+ async versions(webhookId, params, options) {
17
+ const _webhookId = webhookId.id || webhookId;
18
+ return this.resources.fetch({ type: 'versions' }, `webhooks/${_webhookId}/versions`, params, options);
19
+ }
16
20
  async _reset_circuit(id, params, options) {
17
21
  return this.resources.update({ id: (typeof id === 'string') ? id : id.id, type: Webhooks.TYPE, _reset_circuit: true }, params, options);
18
22
  }
@@ -1,7 +1,8 @@
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
+ import type { Version } from './versions';
5
6
  type WireTransferType = 'wire_transfers';
6
7
  type WireTransferRel = ResourceRel & {
7
8
  type: WireTransferType;
@@ -13,6 +14,7 @@ interface WireTransfer extends Resource {
13
14
  readonly type: WireTransferType;
14
15
  payment_instrument?: Record<string, any> | null;
15
16
  order?: Order | null;
17
+ versions?: Version[] | null;
16
18
  }
17
19
  interface WireTransferCreate extends ResourceCreate {
18
20
  order: OrderRel;
@@ -26,6 +28,7 @@ declare class WireTransfers extends ApiResource<WireTransfer> {
26
28
  update(resource: WireTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
27
29
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
28
30
  order(wireTransferId: string | WireTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
31
+ versions(wireTransferId: string | WireTransfer, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Version>>;
29
32
  isWireTransfer(resource: any): resource is WireTransfer;
30
33
  relationship(id: string | ResourceId | null): WireTransferRel;
31
34
  type(): WireTransferType;
@@ -13,6 +13,10 @@ class WireTransfers extends ApiResource {
13
13
  const _wireTransferId = wireTransferId.id || wireTransferId;
14
14
  return this.resources.fetch({ type: 'orders' }, `wire_transfers/${_wireTransferId}/order`, params, options);
15
15
  }
16
+ async versions(wireTransferId, params, options) {
17
+ const _wireTransferId = wireTransferId.id || wireTransferId;
18
+ return this.resources.fetch({ type: 'versions' }, `wire_transfers/${_wireTransferId}/versions`, params, options);
19
+ }
16
20
  isWireTransfer(resource) {
17
21
  return resource.type && (resource.type === WireTransfers.TYPE);
18
22
  }
package/lib/esm/util.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  /// <reference types="node" />
4
4
  /// <reference types="node" />
5
5
  /// <reference types="node" />
6
- import type { ObjectType } from "./common";
6
+ import type { ObjectType } from "../src/common";
7
7
  declare const sleep: (ms: number) => Promise<NodeJS.Timeout>;
8
8
  declare const sortObjectFields: (obj: ObjectType) => ObjectType;
9
9
  export { sleep, sortObjectFields };