@commercelayer/sdk 4.6.0 → 4.7.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 (387) hide show
  1. package/README.md +4 -4
  2. package/lib/cjs/commercelayer.js +1 -1
  3. package/lib/cjs/index.js +1 -1
  4. package/lib/cjs/query.d.ts +1 -1
  5. package/lib/cjs/query.js +1 -1
  6. package/lib/cjs/resource.d.ts +1 -1
  7. package/lib/cjs/resources/addresses.d.ts +3 -3
  8. package/lib/cjs/resources/addresses.js +1 -1
  9. package/lib/cjs/resources/adjustments.d.ts +1 -1
  10. package/lib/cjs/resources/adyen_gateways.d.ts +5 -5
  11. package/lib/cjs/resources/adyen_gateways.js +1 -1
  12. package/lib/cjs/resources/adyen_payments.d.ts +5 -5
  13. package/lib/cjs/resources/adyen_payments.js +1 -1
  14. package/lib/cjs/resources/application.d.ts +1 -1
  15. package/lib/cjs/resources/attachments.d.ts +31 -31
  16. package/lib/cjs/resources/authorizations.d.ts +7 -7
  17. package/lib/cjs/resources/authorizations.js +1 -1
  18. package/lib/cjs/resources/avalara_accounts.d.ts +7 -7
  19. package/lib/cjs/resources/avalara_accounts.js +1 -1
  20. package/lib/cjs/resources/billing_info_validation_rules.d.ts +3 -3
  21. package/lib/cjs/resources/billing_info_validation_rules.js +1 -1
  22. package/lib/cjs/resources/bing_geocoders.d.ts +5 -5
  23. package/lib/cjs/resources/bing_geocoders.js +1 -1
  24. package/lib/cjs/resources/braintree_gateways.d.ts +5 -5
  25. package/lib/cjs/resources/braintree_gateways.js +1 -1
  26. package/lib/cjs/resources/braintree_payments.d.ts +5 -5
  27. package/lib/cjs/resources/braintree_payments.js +1 -1
  28. package/lib/cjs/resources/bundles.d.ts +9 -9
  29. package/lib/cjs/resources/bundles.js +1 -1
  30. package/lib/cjs/resources/captures.d.ts +7 -7
  31. package/lib/cjs/resources/captures.js +1 -1
  32. package/lib/cjs/resources/carrier_accounts.d.ts +5 -5
  33. package/lib/cjs/resources/carrier_accounts.js +1 -1
  34. package/lib/cjs/resources/checkout_com_gateways.d.ts +5 -5
  35. package/lib/cjs/resources/checkout_com_gateways.js +1 -1
  36. package/lib/cjs/resources/checkout_com_payments.d.ts +5 -5
  37. package/lib/cjs/resources/checkout_com_payments.js +1 -1
  38. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +9 -9
  39. package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -1
  40. package/lib/cjs/resources/coupon_recipients.d.ts +5 -5
  41. package/lib/cjs/resources/coupon_recipients.js +1 -1
  42. package/lib/cjs/resources/coupons.d.ts +3 -3
  43. package/lib/cjs/resources/coupons.js +1 -1
  44. package/lib/cjs/resources/customer_addresses.d.ts +5 -5
  45. package/lib/cjs/resources/customer_addresses.js +1 -1
  46. package/lib/cjs/resources/customer_groups.d.ts +7 -7
  47. package/lib/cjs/resources/customer_groups.js +1 -1
  48. package/lib/cjs/resources/customer_password_resets.d.ts +3 -3
  49. package/lib/cjs/resources/customer_password_resets.js +1 -1
  50. package/lib/cjs/resources/customer_payment_sources.d.ts +11 -11
  51. package/lib/cjs/resources/customer_payment_sources.js +1 -1
  52. package/lib/cjs/resources/customer_subscriptions.d.ts +3 -3
  53. package/lib/cjs/resources/customer_subscriptions.js +1 -1
  54. package/lib/cjs/resources/customers.d.ts +17 -17
  55. package/lib/cjs/resources/customers.js +1 -1
  56. package/lib/cjs/resources/delivery_lead_times.d.ts +7 -7
  57. package/lib/cjs/resources/delivery_lead_times.js +1 -1
  58. package/lib/cjs/resources/event_callbacks.d.ts +3 -3
  59. package/lib/cjs/resources/event_callbacks.js +1 -1
  60. package/lib/cjs/resources/external_gateways.d.ts +5 -5
  61. package/lib/cjs/resources/external_gateways.js +1 -1
  62. package/lib/cjs/resources/external_payments.d.ts +7 -7
  63. package/lib/cjs/resources/external_payments.js +1 -1
  64. package/lib/cjs/resources/external_promotions.d.ts +12 -12
  65. package/lib/cjs/resources/external_promotions.js +1 -1
  66. package/lib/cjs/resources/external_tax_calculators.d.ts +7 -7
  67. package/lib/cjs/resources/external_tax_calculators.js +1 -1
  68. package/lib/cjs/resources/fixed_amount_promotions.d.ts +12 -12
  69. package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
  70. package/lib/cjs/resources/fixed_price_promotions.d.ts +16 -16
  71. package/lib/cjs/resources/fixed_price_promotions.js +1 -1
  72. package/lib/cjs/resources/free_gift_promotions.d.ts +16 -16
  73. package/lib/cjs/resources/free_gift_promotions.js +1 -1
  74. package/lib/cjs/resources/free_shipping_promotions.d.ts +12 -12
  75. package/lib/cjs/resources/free_shipping_promotions.js +1 -1
  76. package/lib/cjs/resources/geocoders.d.ts +5 -5
  77. package/lib/cjs/resources/geocoders.js +1 -1
  78. package/lib/cjs/resources/gift_card_recipients.d.ts +5 -5
  79. package/lib/cjs/resources/gift_card_recipients.js +1 -1
  80. package/lib/cjs/resources/gift_cards.d.ts +7 -7
  81. package/lib/cjs/resources/gift_cards.js +1 -1
  82. package/lib/cjs/resources/google_geocoders.d.ts +5 -5
  83. package/lib/cjs/resources/google_geocoders.js +1 -1
  84. package/lib/cjs/resources/imports.d.ts +1 -1
  85. package/lib/cjs/resources/in_stock_subscriptions.d.ts +7 -7
  86. package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
  87. package/lib/cjs/resources/inventory_models.d.ts +7 -7
  88. package/lib/cjs/resources/inventory_models.js +1 -1
  89. package/lib/cjs/resources/inventory_return_locations.d.ts +5 -5
  90. package/lib/cjs/resources/inventory_return_locations.js +1 -1
  91. package/lib/cjs/resources/inventory_stock_locations.d.ts +5 -5
  92. package/lib/cjs/resources/inventory_stock_locations.js +1 -1
  93. package/lib/cjs/resources/klarna_gateways.d.ts +5 -5
  94. package/lib/cjs/resources/klarna_gateways.js +1 -1
  95. package/lib/cjs/resources/klarna_payments.d.ts +5 -5
  96. package/lib/cjs/resources/klarna_payments.js +1 -1
  97. package/lib/cjs/resources/line_item_options.d.ts +5 -5
  98. package/lib/cjs/resources/line_item_options.js +1 -1
  99. package/lib/cjs/resources/line_items.d.ts +19 -19
  100. package/lib/cjs/resources/line_items.js +1 -1
  101. package/lib/cjs/resources/manual_gateways.d.ts +3 -3
  102. package/lib/cjs/resources/manual_gateways.js +1 -1
  103. package/lib/cjs/resources/manual_tax_calculators.d.ts +9 -9
  104. package/lib/cjs/resources/manual_tax_calculators.js +1 -1
  105. package/lib/cjs/resources/markets.d.ts +13 -13
  106. package/lib/cjs/resources/markets.js +1 -1
  107. package/lib/cjs/resources/merchants.d.ts +5 -5
  108. package/lib/cjs/resources/merchants.js +1 -1
  109. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +7 -7
  110. package/lib/cjs/resources/order_copies.d.ts +6 -6
  111. package/lib/cjs/resources/order_copies.js +1 -1
  112. package/lib/cjs/resources/order_subscriptions.d.ts +10 -10
  113. package/lib/cjs/resources/order_subscriptions.js +1 -1
  114. package/lib/cjs/resources/order_validation_rules.d.ts +3 -3
  115. package/lib/cjs/resources/order_validation_rules.js +1 -1
  116. package/lib/cjs/resources/orders.d.ts +39 -39
  117. package/lib/cjs/resources/orders.js +1 -1
  118. package/lib/cjs/resources/organization.d.ts +1 -1
  119. package/lib/cjs/resources/packages.d.ts +7 -7
  120. package/lib/cjs/resources/packages.js +1 -1
  121. package/lib/cjs/resources/parcel_line_items.d.ts +5 -5
  122. package/lib/cjs/resources/parcel_line_items.js +1 -1
  123. package/lib/cjs/resources/parcels.d.ts +9 -9
  124. package/lib/cjs/resources/parcels.js +1 -1
  125. package/lib/cjs/resources/payment_gateways.d.ts +3 -3
  126. package/lib/cjs/resources/payment_gateways.js +1 -1
  127. package/lib/cjs/resources/payment_methods.d.ts +7 -7
  128. package/lib/cjs/resources/payment_methods.js +1 -1
  129. package/lib/cjs/resources/paypal_gateways.d.ts +5 -5
  130. package/lib/cjs/resources/paypal_gateways.js +1 -1
  131. package/lib/cjs/resources/paypal_payments.d.ts +5 -5
  132. package/lib/cjs/resources/paypal_payments.js +1 -1
  133. package/lib/cjs/resources/percentage_discount_promotions.d.ts +16 -16
  134. package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
  135. package/lib/cjs/resources/price_lists.d.ts +5 -5
  136. package/lib/cjs/resources/price_lists.js +1 -1
  137. package/lib/cjs/resources/prices.d.ts +7 -7
  138. package/lib/cjs/resources/prices.js +1 -1
  139. package/lib/cjs/resources/promotion_rules.d.ts +7 -7
  140. package/lib/cjs/resources/promotions.d.ts +12 -12
  141. package/lib/cjs/resources/promotions.js +1 -1
  142. package/lib/cjs/resources/refunds.d.ts +5 -5
  143. package/lib/cjs/resources/refunds.js +1 -1
  144. package/lib/cjs/resources/return_line_items.d.ts +5 -5
  145. package/lib/cjs/resources/return_line_items.js +1 -1
  146. package/lib/cjs/resources/returns.d.ts +14 -14
  147. package/lib/cjs/resources/returns.js +1 -1
  148. package/lib/cjs/resources/shipments.d.ts +25 -25
  149. package/lib/cjs/resources/shipments.js +1 -1
  150. package/lib/cjs/resources/shipping_categories.d.ts +5 -5
  151. package/lib/cjs/resources/shipping_categories.js +1 -1
  152. package/lib/cjs/resources/shipping_methods.d.ts +11 -11
  153. package/lib/cjs/resources/shipping_methods.js +1 -1
  154. package/lib/cjs/resources/shipping_zones.d.ts +3 -3
  155. package/lib/cjs/resources/shipping_zones.js +1 -1
  156. package/lib/cjs/resources/sku_list_items.d.ts +5 -5
  157. package/lib/cjs/resources/sku_list_items.js +1 -1
  158. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +11 -11
  159. package/lib/cjs/resources/sku_list_promotion_rules.js +1 -1
  160. package/lib/cjs/resources/sku_lists.d.ts +7 -7
  161. package/lib/cjs/resources/sku_lists.js +1 -1
  162. package/lib/cjs/resources/sku_options.d.ts +5 -5
  163. package/lib/cjs/resources/sku_options.js +1 -1
  164. package/lib/cjs/resources/skus.d.ts +13 -13
  165. package/lib/cjs/resources/skus.js +1 -1
  166. package/lib/cjs/resources/stock_items.d.ts +7 -7
  167. package/lib/cjs/resources/stock_items.js +1 -1
  168. package/lib/cjs/resources/stock_line_items.d.ts +7 -7
  169. package/lib/cjs/resources/stock_line_items.js +1 -1
  170. package/lib/cjs/resources/stock_locations.d.ts +13 -13
  171. package/lib/cjs/resources/stock_locations.js +1 -1
  172. package/lib/cjs/resources/stock_transfers.d.ts +10 -10
  173. package/lib/cjs/resources/stock_transfers.js +1 -1
  174. package/lib/cjs/resources/stripe_gateways.d.ts +5 -5
  175. package/lib/cjs/resources/stripe_gateways.js +1 -1
  176. package/lib/cjs/resources/stripe_payments.d.ts +5 -5
  177. package/lib/cjs/resources/stripe_payments.js +1 -1
  178. package/lib/cjs/resources/tax_calculators.d.ts +7 -7
  179. package/lib/cjs/resources/tax_calculators.js +1 -1
  180. package/lib/cjs/resources/tax_categories.d.ts +9 -9
  181. package/lib/cjs/resources/tax_categories.js +1 -1
  182. package/lib/cjs/resources/tax_rules.d.ts +3 -3
  183. package/lib/cjs/resources/tax_rules.js +1 -1
  184. package/lib/cjs/resources/taxjar_accounts.d.ts +7 -7
  185. package/lib/cjs/resources/taxjar_accounts.js +1 -1
  186. package/lib/cjs/resources/transactions.d.ts +3 -3
  187. package/lib/cjs/resources/transactions.js +1 -1
  188. package/lib/cjs/resources/voids.d.ts +5 -5
  189. package/lib/cjs/resources/voids.js +1 -1
  190. package/lib/cjs/resources/webhooks.d.ts +3 -3
  191. package/lib/cjs/resources/webhooks.js +1 -1
  192. package/lib/cjs/resources/wire_transfers.d.ts +3 -3
  193. package/lib/cjs/resources/wire_transfers.js +1 -1
  194. package/lib/cjs/static.js +1 -1
  195. package/lib/esm/query.d.ts +1 -1
  196. package/lib/esm/query.js +1 -1
  197. package/lib/esm/resource.d.ts +1 -1
  198. package/lib/esm/resources/addresses.d.ts +3 -3
  199. package/lib/esm/resources/addresses.js +1 -1
  200. package/lib/esm/resources/adjustments.d.ts +1 -1
  201. package/lib/esm/resources/adyen_gateways.d.ts +5 -5
  202. package/lib/esm/resources/adyen_gateways.js +1 -1
  203. package/lib/esm/resources/adyen_payments.d.ts +5 -5
  204. package/lib/esm/resources/adyen_payments.js +1 -1
  205. package/lib/esm/resources/application.d.ts +1 -1
  206. package/lib/esm/resources/attachments.d.ts +31 -31
  207. package/lib/esm/resources/authorizations.d.ts +7 -7
  208. package/lib/esm/resources/authorizations.js +1 -1
  209. package/lib/esm/resources/avalara_accounts.d.ts +7 -7
  210. package/lib/esm/resources/avalara_accounts.js +1 -1
  211. package/lib/esm/resources/billing_info_validation_rules.d.ts +3 -3
  212. package/lib/esm/resources/billing_info_validation_rules.js +1 -1
  213. package/lib/esm/resources/bing_geocoders.d.ts +5 -5
  214. package/lib/esm/resources/bing_geocoders.js +1 -1
  215. package/lib/esm/resources/braintree_gateways.d.ts +5 -5
  216. package/lib/esm/resources/braintree_gateways.js +1 -1
  217. package/lib/esm/resources/braintree_payments.d.ts +5 -5
  218. package/lib/esm/resources/braintree_payments.js +1 -1
  219. package/lib/esm/resources/bundles.d.ts +9 -9
  220. package/lib/esm/resources/bundles.js +1 -1
  221. package/lib/esm/resources/captures.d.ts +7 -7
  222. package/lib/esm/resources/captures.js +1 -1
  223. package/lib/esm/resources/carrier_accounts.d.ts +5 -5
  224. package/lib/esm/resources/carrier_accounts.js +1 -1
  225. package/lib/esm/resources/checkout_com_gateways.d.ts +5 -5
  226. package/lib/esm/resources/checkout_com_gateways.js +1 -1
  227. package/lib/esm/resources/checkout_com_payments.d.ts +5 -5
  228. package/lib/esm/resources/checkout_com_payments.js +1 -1
  229. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +9 -9
  230. package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
  231. package/lib/esm/resources/coupon_recipients.d.ts +5 -5
  232. package/lib/esm/resources/coupon_recipients.js +1 -1
  233. package/lib/esm/resources/coupons.d.ts +3 -3
  234. package/lib/esm/resources/coupons.js +1 -1
  235. package/lib/esm/resources/customer_addresses.d.ts +5 -5
  236. package/lib/esm/resources/customer_addresses.js +1 -1
  237. package/lib/esm/resources/customer_groups.d.ts +7 -7
  238. package/lib/esm/resources/customer_groups.js +1 -1
  239. package/lib/esm/resources/customer_password_resets.d.ts +3 -3
  240. package/lib/esm/resources/customer_password_resets.js +1 -1
  241. package/lib/esm/resources/customer_payment_sources.d.ts +11 -11
  242. package/lib/esm/resources/customer_payment_sources.js +1 -1
  243. package/lib/esm/resources/customer_subscriptions.d.ts +3 -3
  244. package/lib/esm/resources/customer_subscriptions.js +1 -1
  245. package/lib/esm/resources/customers.d.ts +17 -17
  246. package/lib/esm/resources/customers.js +1 -1
  247. package/lib/esm/resources/delivery_lead_times.d.ts +7 -7
  248. package/lib/esm/resources/delivery_lead_times.js +1 -1
  249. package/lib/esm/resources/event_callbacks.d.ts +3 -3
  250. package/lib/esm/resources/event_callbacks.js +1 -1
  251. package/lib/esm/resources/external_gateways.d.ts +5 -5
  252. package/lib/esm/resources/external_gateways.js +1 -1
  253. package/lib/esm/resources/external_payments.d.ts +7 -7
  254. package/lib/esm/resources/external_payments.js +1 -1
  255. package/lib/esm/resources/external_promotions.d.ts +12 -12
  256. package/lib/esm/resources/external_promotions.js +1 -1
  257. package/lib/esm/resources/external_tax_calculators.d.ts +7 -7
  258. package/lib/esm/resources/external_tax_calculators.js +1 -1
  259. package/lib/esm/resources/fixed_amount_promotions.d.ts +12 -12
  260. package/lib/esm/resources/fixed_amount_promotions.js +1 -1
  261. package/lib/esm/resources/fixed_price_promotions.d.ts +16 -16
  262. package/lib/esm/resources/fixed_price_promotions.js +1 -1
  263. package/lib/esm/resources/free_gift_promotions.d.ts +16 -16
  264. package/lib/esm/resources/free_gift_promotions.js +1 -1
  265. package/lib/esm/resources/free_shipping_promotions.d.ts +12 -12
  266. package/lib/esm/resources/free_shipping_promotions.js +1 -1
  267. package/lib/esm/resources/geocoders.d.ts +5 -5
  268. package/lib/esm/resources/geocoders.js +1 -1
  269. package/lib/esm/resources/gift_card_recipients.d.ts +5 -5
  270. package/lib/esm/resources/gift_card_recipients.js +1 -1
  271. package/lib/esm/resources/gift_cards.d.ts +7 -7
  272. package/lib/esm/resources/gift_cards.js +1 -1
  273. package/lib/esm/resources/google_geocoders.d.ts +5 -5
  274. package/lib/esm/resources/google_geocoders.js +1 -1
  275. package/lib/esm/resources/imports.d.ts +1 -1
  276. package/lib/esm/resources/in_stock_subscriptions.d.ts +7 -7
  277. package/lib/esm/resources/in_stock_subscriptions.js +1 -1
  278. package/lib/esm/resources/inventory_models.d.ts +7 -7
  279. package/lib/esm/resources/inventory_models.js +1 -1
  280. package/lib/esm/resources/inventory_return_locations.d.ts +5 -5
  281. package/lib/esm/resources/inventory_return_locations.js +1 -1
  282. package/lib/esm/resources/inventory_stock_locations.d.ts +5 -5
  283. package/lib/esm/resources/inventory_stock_locations.js +1 -1
  284. package/lib/esm/resources/klarna_gateways.d.ts +5 -5
  285. package/lib/esm/resources/klarna_gateways.js +1 -1
  286. package/lib/esm/resources/klarna_payments.d.ts +5 -5
  287. package/lib/esm/resources/klarna_payments.js +1 -1
  288. package/lib/esm/resources/line_item_options.d.ts +5 -5
  289. package/lib/esm/resources/line_item_options.js +1 -1
  290. package/lib/esm/resources/line_items.d.ts +19 -19
  291. package/lib/esm/resources/line_items.js +1 -1
  292. package/lib/esm/resources/manual_gateways.d.ts +3 -3
  293. package/lib/esm/resources/manual_gateways.js +1 -1
  294. package/lib/esm/resources/manual_tax_calculators.d.ts +9 -9
  295. package/lib/esm/resources/manual_tax_calculators.js +1 -1
  296. package/lib/esm/resources/markets.d.ts +13 -13
  297. package/lib/esm/resources/markets.js +1 -1
  298. package/lib/esm/resources/merchants.d.ts +5 -5
  299. package/lib/esm/resources/merchants.js +1 -1
  300. package/lib/esm/resources/order_amount_promotion_rules.d.ts +7 -7
  301. package/lib/esm/resources/order_copies.d.ts +6 -6
  302. package/lib/esm/resources/order_copies.js +1 -1
  303. package/lib/esm/resources/order_subscriptions.d.ts +10 -10
  304. package/lib/esm/resources/order_subscriptions.js +1 -1
  305. package/lib/esm/resources/order_validation_rules.d.ts +3 -3
  306. package/lib/esm/resources/order_validation_rules.js +1 -1
  307. package/lib/esm/resources/orders.d.ts +39 -39
  308. package/lib/esm/resources/orders.js +1 -1
  309. package/lib/esm/resources/organization.d.ts +1 -1
  310. package/lib/esm/resources/packages.d.ts +7 -7
  311. package/lib/esm/resources/packages.js +1 -1
  312. package/lib/esm/resources/parcel_line_items.d.ts +5 -5
  313. package/lib/esm/resources/parcel_line_items.js +1 -1
  314. package/lib/esm/resources/parcels.d.ts +9 -9
  315. package/lib/esm/resources/parcels.js +1 -1
  316. package/lib/esm/resources/payment_gateways.d.ts +3 -3
  317. package/lib/esm/resources/payment_gateways.js +1 -1
  318. package/lib/esm/resources/payment_methods.d.ts +7 -7
  319. package/lib/esm/resources/payment_methods.js +1 -1
  320. package/lib/esm/resources/paypal_gateways.d.ts +5 -5
  321. package/lib/esm/resources/paypal_gateways.js +1 -1
  322. package/lib/esm/resources/paypal_payments.d.ts +5 -5
  323. package/lib/esm/resources/paypal_payments.js +1 -1
  324. package/lib/esm/resources/percentage_discount_promotions.d.ts +16 -16
  325. package/lib/esm/resources/percentage_discount_promotions.js +1 -1
  326. package/lib/esm/resources/price_lists.d.ts +5 -5
  327. package/lib/esm/resources/price_lists.js +1 -1
  328. package/lib/esm/resources/prices.d.ts +7 -7
  329. package/lib/esm/resources/prices.js +1 -1
  330. package/lib/esm/resources/promotion_rules.d.ts +7 -7
  331. package/lib/esm/resources/promotions.d.ts +12 -12
  332. package/lib/esm/resources/promotions.js +1 -1
  333. package/lib/esm/resources/refunds.d.ts +5 -5
  334. package/lib/esm/resources/refunds.js +1 -1
  335. package/lib/esm/resources/return_line_items.d.ts +5 -5
  336. package/lib/esm/resources/return_line_items.js +1 -1
  337. package/lib/esm/resources/returns.d.ts +14 -14
  338. package/lib/esm/resources/returns.js +1 -1
  339. package/lib/esm/resources/shipments.d.ts +25 -25
  340. package/lib/esm/resources/shipments.js +1 -1
  341. package/lib/esm/resources/shipping_categories.d.ts +5 -5
  342. package/lib/esm/resources/shipping_categories.js +1 -1
  343. package/lib/esm/resources/shipping_methods.d.ts +11 -11
  344. package/lib/esm/resources/shipping_methods.js +1 -1
  345. package/lib/esm/resources/shipping_zones.d.ts +3 -3
  346. package/lib/esm/resources/shipping_zones.js +1 -1
  347. package/lib/esm/resources/sku_list_items.d.ts +5 -5
  348. package/lib/esm/resources/sku_list_items.js +1 -1
  349. package/lib/esm/resources/sku_list_promotion_rules.d.ts +11 -11
  350. package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
  351. package/lib/esm/resources/sku_lists.d.ts +7 -7
  352. package/lib/esm/resources/sku_lists.js +1 -1
  353. package/lib/esm/resources/sku_options.d.ts +5 -5
  354. package/lib/esm/resources/sku_options.js +1 -1
  355. package/lib/esm/resources/skus.d.ts +13 -13
  356. package/lib/esm/resources/skus.js +1 -1
  357. package/lib/esm/resources/stock_items.d.ts +7 -7
  358. package/lib/esm/resources/stock_items.js +1 -1
  359. package/lib/esm/resources/stock_line_items.d.ts +7 -7
  360. package/lib/esm/resources/stock_line_items.js +1 -1
  361. package/lib/esm/resources/stock_locations.d.ts +13 -13
  362. package/lib/esm/resources/stock_locations.js +1 -1
  363. package/lib/esm/resources/stock_transfers.d.ts +10 -10
  364. package/lib/esm/resources/stock_transfers.js +1 -1
  365. package/lib/esm/resources/stripe_gateways.d.ts +5 -5
  366. package/lib/esm/resources/stripe_gateways.js +1 -1
  367. package/lib/esm/resources/stripe_payments.d.ts +5 -5
  368. package/lib/esm/resources/stripe_payments.js +1 -1
  369. package/lib/esm/resources/tax_calculators.d.ts +7 -7
  370. package/lib/esm/resources/tax_calculators.js +1 -1
  371. package/lib/esm/resources/tax_categories.d.ts +9 -9
  372. package/lib/esm/resources/tax_categories.js +1 -1
  373. package/lib/esm/resources/tax_rules.d.ts +3 -3
  374. package/lib/esm/resources/tax_rules.js +1 -1
  375. package/lib/esm/resources/taxjar_accounts.d.ts +7 -7
  376. package/lib/esm/resources/taxjar_accounts.js +1 -1
  377. package/lib/esm/resources/transactions.d.ts +3 -3
  378. package/lib/esm/resources/transactions.js +1 -1
  379. package/lib/esm/resources/voids.d.ts +5 -5
  380. package/lib/esm/resources/voids.js +1 -1
  381. package/lib/esm/resources/webhooks.d.ts +3 -3
  382. package/lib/esm/resources/webhooks.js +1 -1
  383. package/lib/esm/resources/wire_transfers.d.ts +3 -3
  384. package/lib/esm/resources/wire_transfers.js +1 -1
  385. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  386. package/lib/tsconfig.tsbuildinfo +1 -1
  387. package/package.json +18 -11
@@ -1,7 +1,7 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Order } from './orders';
4
- import { PaymentGateway } from './payment_gateways';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { Order } from './orders';
4
+ import type { PaymentGateway } from './payment_gateways';
5
5
  declare type StripePaymentRel = ResourceRel & {
6
6
  type: typeof StripePayments.TYPE;
7
7
  };
@@ -32,8 +32,8 @@ declare class StripePayments extends ApiResource {
32
32
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
33
33
  update(resource: StripePaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripePayment>;
34
34
  delete(id: string, options?: ResourcesConfig): Promise<void>;
35
- order(stripePaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
36
- payment_gateway(stripePaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
35
+ order(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
36
+ payment_gateway(stripePaymentId: string | StripePayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
37
37
  isStripePayment(resource: any): resource is StripePayment;
38
38
  relationship(id: string | ResourceId | null): StripePaymentRel;
39
39
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripePayments extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StripePayments.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:StripePayments.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:StripePayments.TYPE,id:e},t)}async order(e,t,r){return this.resources.fetch({type:"orders"},`stripe_payments/${e}/order`,t,r)}async payment_gateway(e,t,r){return this.resources.fetch({type:"payment_gateways"},`stripe_payments/${e}/payment_gateway`,t,r)}isStripePayment(e){return e.type&&e.type===StripePayments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StripePayments.TYPE}:{id:e.id,type:StripePayments.TYPE}}type(){return StripePayments.TYPE}}StripePayments.TYPE="stripe_payments",exports.default=StripePayments;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripePayments extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:StripePayments.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:StripePayments.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:StripePayments.TYPE,id:e},s)}async order(e,s,t){const r=e.id||e;return this.resources.fetch({type:"orders"},`stripe_payments/${r}/order`,s,t)}async payment_gateway(e,s,t){const r=e.id||e;return this.resources.fetch({type:"payment_gateways"},`stripe_payments/${r}/payment_gateway`,s,t)}isStripePayment(e){return e.type&&e.type===StripePayments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StripePayments.TYPE}:{id:e.id,type:StripePayments.TYPE}}type(){return StripePayments.TYPE}}StripePayments.TYPE="stripe_payments",exports.default=StripePayments;
@@ -1,8 +1,8 @@
1
1
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { TaxCategory } from './tax_categories';
4
- import { Market } from './markets';
5
- import { Attachment } from './attachments';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { TaxCategory } from './tax_categories';
4
+ import type { Market } from './markets';
5
+ import type { Attachment } from './attachments';
6
6
  declare type TaxCalculatorRel = ResourceRel & {
7
7
  type: typeof TaxCalculators.TYPE;
8
8
  };
@@ -16,9 +16,9 @@ declare class TaxCalculators extends ApiResource {
16
16
  static readonly TYPE: 'tax_calculators';
17
17
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCalculator>>;
18
18
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCalculator>;
19
- tax_categories(taxCalculatorId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
20
- markets(taxCalculatorId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
21
- attachments(taxCalculatorId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
19
+ tax_categories(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
20
+ markets(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
21
+ attachments(taxCalculatorId: string | TaxCalculator, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
22
22
  isTaxCalculator(resource: any): resource is TaxCalculator;
23
23
  relationship(id: string | ResourceId | null): TaxCalculatorRel;
24
24
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCalculators extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCalculators.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxCalculators.TYPE,id:e},t,r)}async tax_categories(e,t,r){return this.resources.fetch({type:"tax_categories"},`tax_calculators/${e}/tax_categories`,t,r)}async markets(e,t,r){return this.resources.fetch({type:"markets"},`tax_calculators/${e}/markets`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`tax_calculators/${e}/attachments`,t,r)}isTaxCalculator(e){return e.type&&e.type===TaxCalculators.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxCalculators.TYPE}:{id:e.id,type:TaxCalculators.TYPE}}type(){return TaxCalculators.TYPE}}TaxCalculators.TYPE="tax_calculators",exports.default=TaxCalculators;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCalculators extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCalculators.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxCalculators.TYPE,id:e},t,r)}async tax_categories(e,t,r){const s=e.id||e;return this.resources.fetch({type:"tax_categories"},`tax_calculators/${s}/tax_categories`,t,r)}async markets(e,t,r){const s=e.id||e;return this.resources.fetch({type:"markets"},`tax_calculators/${s}/markets`,t,r)}async attachments(e,t,r){const s=e.id||e;return this.resources.fetch({type:"attachments"},`tax_calculators/${s}/attachments`,t,r)}isTaxCalculator(e){return e.type&&e.type===TaxCalculators.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxCalculators.TYPE}:{id:e.id,type:TaxCalculators.TYPE}}type(){return TaxCalculators.TYPE}}TaxCalculators.TYPE="tax_calculators",exports.default=TaxCalculators;
@@ -1,11 +1,11 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Sku } from './skus';
4
- import { AvalaraAccount } from './avalara_accounts';
5
- import { TaxjarAccount } from './taxjar_accounts';
6
- import { ManualTaxCalculator } from './manual_tax_calculators';
7
- import { ExternalTaxCalculator } from './external_tax_calculators';
8
- import { Attachment } from './attachments';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { Sku } from './skus';
4
+ import type { AvalaraAccount } from './avalara_accounts';
5
+ import type { TaxjarAccount } from './taxjar_accounts';
6
+ import type { ManualTaxCalculator } from './manual_tax_calculators';
7
+ import type { ExternalTaxCalculator } from './external_tax_calculators';
8
+ import type { Attachment } from './attachments';
9
9
  declare type TaxCategoryRel = ResourceRel & {
10
10
  type: typeof TaxCategories.TYPE;
11
11
  };
@@ -49,8 +49,8 @@ declare class TaxCategories extends ApiResource {
49
49
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
50
50
  update(resource: TaxCategoryUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
51
51
  delete(id: string, options?: ResourcesConfig): Promise<void>;
52
- sku(taxCategoryId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
53
- attachments(taxCategoryId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
52
+ sku(taxCategoryId: string | TaxCategory, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
53
+ attachments(taxCategoryId: string | TaxCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
54
54
  isTaxCategory(resource: any): resource is TaxCategory;
55
55
  relationship(id: string | ResourceId | null): TaxCategoryRel;
56
56
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCategories extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCategories.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxCategories.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:TaxCategories.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxCategories.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:TaxCategories.TYPE,id:e},t)}async sku(e,t,s){return this.resources.fetch({type:"skus"},`tax_categories/${e}/sku`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`tax_categories/${e}/attachments`,t,s)}isTaxCategory(e){return e.type&&e.type===TaxCategories.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxCategories.TYPE}:{id:e.id,type:TaxCategories.TYPE}}type(){return TaxCategories.TYPE}}TaxCategories.TYPE="tax_categories",exports.default=TaxCategories;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCategories extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCategories.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxCategories.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:TaxCategories.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxCategories.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:TaxCategories.TYPE,id:e},t)}async sku(e,t,s){const r=e.id||e;return this.resources.fetch({type:"skus"},`tax_categories/${r}/sku`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`tax_categories/${r}/attachments`,t,s)}isTaxCategory(e){return e.type&&e.type===TaxCategories.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxCategories.TYPE}:{id:e.id,type:TaxCategories.TYPE}}type(){return TaxCategories.TYPE}}TaxCategories.TYPE="tax_categories",exports.default=TaxCategories;
@@ -1,6 +1,6 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { ManualTaxCalculator } from './manual_tax_calculators';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { ManualTaxCalculator } from './manual_tax_calculators';
4
4
  declare type TaxRuleRel = ResourceRel & {
5
5
  type: typeof TaxRules.TYPE;
6
6
  };
@@ -60,7 +60,7 @@ declare class TaxRules extends ApiResource {
60
60
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
61
61
  update(resource: TaxRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
62
62
  delete(id: string, options?: ResourcesConfig): Promise<void>;
63
- manual_tax_calculator(taxRuleId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
63
+ manual_tax_calculator(taxRuleId: string | TaxRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ManualTaxCalculator>;
64
64
  isTaxRule(resource: any): resource is TaxRule;
65
65
  relationship(id: string | ResourceId | null): TaxRuleRel;
66
66
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxRules extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxRules.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxRules.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxRules.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxRules.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:TaxRules.TYPE,id:e},t)}async manual_tax_calculator(e,t,r){return this.resources.fetch({type:"manual_tax_calculators"},`tax_rules/${e}/manual_tax_calculator`,t,r)}isTaxRule(e){return e.type&&e.type===TaxRules.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxRules.TYPE}:{id:e.id,type:TaxRules.TYPE}}type(){return TaxRules.TYPE}}TaxRules.TYPE="tax_rules",exports.default=TaxRules;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxRules extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxRules.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxRules.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxRules.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxRules.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:TaxRules.TYPE,id:e},t)}async manual_tax_calculator(e,t,r){const s=e.id||e;return this.resources.fetch({type:"manual_tax_calculators"},`tax_rules/${s}/manual_tax_calculator`,t,r)}isTaxRule(e){return e.type&&e.type===TaxRules.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxRules.TYPE}:{id:e.id,type:TaxRules.TYPE}}type(){return TaxRules.TYPE}}TaxRules.TYPE="tax_rules",exports.default=TaxRules;
@@ -1,8 +1,8 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { TaxCategory } from './tax_categories';
4
- import { Market } from './markets';
5
- import { Attachment } from './attachments';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { TaxCategory } from './tax_categories';
4
+ import type { Market } from './markets';
5
+ import type { Attachment } from './attachments';
6
6
  declare type TaxjarAccountRel = ResourceRel & {
7
7
  type: typeof TaxjarAccounts.TYPE;
8
8
  };
@@ -32,9 +32,9 @@ declare class TaxjarAccounts extends ApiResource {
32
32
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
33
33
  update(resource: TaxjarAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
34
34
  delete(id: string, options?: ResourcesConfig): Promise<void>;
35
- tax_categories(taxjarAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
36
- markets(taxjarAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
37
- attachments(taxjarAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
35
+ tax_categories(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
36
+ markets(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
37
+ attachments(taxjarAccountId: string | TaxjarAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
38
38
  isTaxjarAccount(resource: any): resource is TaxjarAccount;
39
39
  relationship(id: string | ResourceId | null): TaxjarAccountRel;
40
40
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxjarAccounts extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxjarAccounts.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:TaxjarAccounts.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:TaxjarAccounts.TYPE,id:e},t)}async tax_categories(e,t,s){return this.resources.fetch({type:"tax_categories"},`taxjar_accounts/${e}/tax_categories`,t,s)}async markets(e,t,s){return this.resources.fetch({type:"markets"},`taxjar_accounts/${e}/markets`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`taxjar_accounts/${e}/attachments`,t,s)}isTaxjarAccount(e){return e.type&&e.type===TaxjarAccounts.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxjarAccounts.TYPE}:{id:e.id,type:TaxjarAccounts.TYPE}}type(){return TaxjarAccounts.TYPE}}TaxjarAccounts.TYPE="taxjar_accounts",exports.default=TaxjarAccounts;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxjarAccounts extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxjarAccounts.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:TaxjarAccounts.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:TaxjarAccounts.TYPE,id:e},t)}async tax_categories(e,t,s){const r=e.id||e;return this.resources.fetch({type:"tax_categories"},`taxjar_accounts/${r}/tax_categories`,t,s)}async markets(e,t,s){const r=e.id||e;return this.resources.fetch({type:"markets"},`taxjar_accounts/${r}/markets`,t,s)}async attachments(e,t,s){const r=e.id||e;return this.resources.fetch({type:"attachments"},`taxjar_accounts/${r}/attachments`,t,s)}isTaxjarAccount(e){return e.type&&e.type===TaxjarAccounts.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:TaxjarAccounts.TYPE}:{id:e.id,type:TaxjarAccounts.TYPE}}type(){return TaxjarAccounts.TYPE}}TaxjarAccounts.TYPE="taxjar_accounts",exports.default=TaxjarAccounts;
@@ -1,6 +1,6 @@
1
1
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Order } from './orders';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { Order } from './orders';
4
4
  declare type TransactionRel = ResourceRel & {
5
5
  type: typeof Transactions.TYPE;
6
6
  };
@@ -22,7 +22,7 @@ declare class Transactions extends ApiResource {
22
22
  static readonly TYPE: 'transactions';
23
23
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
24
24
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Transaction>;
25
- order(transactionId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
25
+ order(transactionId: string | Transaction, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
26
26
  isTransaction(resource: any): resource is Transaction;
27
27
  relationship(id: string | ResourceId | null): TransactionRel;
28
28
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Transactions extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Transactions.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Transactions.TYPE,id:e},r,t)}async order(e,r,t){return this.resources.fetch({type:"orders"},`transactions/${e}/order`,r,t)}isTransaction(e){return e.type&&e.type===Transactions.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Transactions.TYPE}:{id:e.id,type:Transactions.TYPE}}type(){return Transactions.TYPE}}Transactions.TYPE="transactions",exports.default=Transactions;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Transactions extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Transactions.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Transactions.TYPE,id:e},r,t)}async order(e,r,t){const s=e.id||e;return this.resources.fetch({type:"orders"},`transactions/${s}/order`,r,t)}isTransaction(e){return e.type&&e.type===Transactions.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Transactions.TYPE}:{id:e.id,type:Transactions.TYPE}}type(){return Transactions.TYPE}}Transactions.TYPE="transactions",exports.default=Transactions;
@@ -1,7 +1,7 @@
1
1
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Order } from './orders';
4
- import { Authorization } from './authorizations';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { Order } from './orders';
4
+ import type { Authorization } from './authorizations';
5
5
  declare type VoidRel = ResourceRel & {
6
6
  type: typeof Voids.TYPE;
7
7
  };
@@ -24,8 +24,8 @@ declare class Voids extends ApiResource {
24
24
  static readonly TYPE: 'voids';
25
25
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
26
26
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Void>;
27
- order(voidId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
28
- reference_authorization(voidId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
27
+ order(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
28
+ reference_authorization(voidId: string | Void, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
29
29
  isVoid(resource: any): resource is Void;
30
30
  relationship(id: string | ResourceId | null): VoidRel;
31
31
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Voids extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Voids.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Voids.TYPE,id:e},r,t)}async order(e,r,t){return this.resources.fetch({type:"orders"},`voids/${e}/order`,r,t)}async reference_authorization(e,r,t){return this.resources.fetch({type:"authorizations"},`voids/${e}/reference_authorization`,r,t)}isVoid(e){return e.type&&e.type===Voids.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Voids.TYPE}:{id:e.id,type:Voids.TYPE}}type(){return Voids.TYPE}}Voids.TYPE="voids",exports.default=Voids;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Voids extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Voids.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Voids.TYPE,id:e},r,t)}async order(e,r,t){const s=e.id||e;return this.resources.fetch({type:"orders"},`voids/${s}/order`,r,t)}async reference_authorization(e,r,t){const s=e.id||e;return this.resources.fetch({type:"authorizations"},`voids/${s}/reference_authorization`,r,t)}isVoid(e){return e.type&&e.type===Voids.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Voids.TYPE}:{id:e.id,type:Voids.TYPE}}type(){return Voids.TYPE}}Voids.TYPE="voids",exports.default=Voids;
@@ -1,6 +1,6 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { EventCallback } from './event_callbacks';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { EventCallback } from './event_callbacks';
4
4
  declare type WebhookRel = ResourceRel & {
5
5
  type: typeof Webhooks.TYPE;
6
6
  };
@@ -33,7 +33,7 @@ declare class Webhooks extends ApiResource {
33
33
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
34
34
  update(resource: WebhookUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
35
35
  delete(id: string, options?: ResourcesConfig): Promise<void>;
36
- last_event_callbacks(webhookId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
36
+ last_event_callbacks(webhookId: string | Webhook, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<EventCallback>>;
37
37
  isWebhook(resource: any): resource is Webhook;
38
38
  relationship(id: string | ResourceId | null): WebhookRel;
39
39
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Webhooks extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Webhooks.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Webhooks.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Webhooks.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Webhooks.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:Webhooks.TYPE,id:e},t)}async last_event_callbacks(e,t,r){return this.resources.fetch({type:"event_callbacks"},`webhooks/${e}/last_event_callbacks`,t,r)}isWebhook(e){return e.type&&e.type===Webhooks.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Webhooks.TYPE}:{id:e.id,type:Webhooks.TYPE}}type(){return Webhooks.TYPE}}Webhooks.TYPE="webhooks",exports.default=Webhooks;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Webhooks extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Webhooks.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:Webhooks.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:Webhooks.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:Webhooks.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:Webhooks.TYPE,id:e},t)}async last_event_callbacks(e,t,s){const r=e.id||e;return this.resources.fetch({type:"event_callbacks"},`webhooks/${r}/last_event_callbacks`,t,s)}isWebhook(e){return e.type&&e.type===Webhooks.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Webhooks.TYPE}:{id:e.id,type:Webhooks.TYPE}}type(){return Webhooks.TYPE}}Webhooks.TYPE="webhooks",exports.default=Webhooks;
@@ -1,6 +1,6 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Order } from './orders';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { Order } from './orders';
4
4
  declare type WireTransferRel = ResourceRel & {
5
5
  type: typeof WireTransfers.TYPE;
6
6
  };
@@ -23,7 +23,7 @@ declare class WireTransfers extends ApiResource {
23
23
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
24
24
  update(resource: WireTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
25
25
  delete(id: string, options?: ResourcesConfig): Promise<void>;
26
- order(wireTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
26
+ order(wireTransferId: string | WireTransfer, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
27
27
  isWireTransfer(resource: any): resource is WireTransfer;
28
28
  relationship(id: string | ResourceId | null): WireTransferRel;
29
29
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class WireTransfers extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:WireTransfers.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:WireTransfers.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:WireTransfers.TYPE,id:e},t)}async order(e,t,r){return this.resources.fetch({type:"orders"},`wire_transfers/${e}/order`,t,r)}isWireTransfer(e){return e.type&&e.type===WireTransfers.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:WireTransfers.TYPE}:{id:e.id,type:WireTransfers.TYPE}}type(){return WireTransfers.TYPE}}WireTransfers.TYPE="wire_transfers",exports.default=WireTransfers;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class WireTransfers extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:WireTransfers.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:WireTransfers.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:WireTransfers.TYPE,id:e},t)}async order(e,t,s){const r=e.id||e;return this.resources.fetch({type:"orders"},`wire_transfers/${r}/order`,t,s)}isWireTransfer(e){return e.type&&e.type===WireTransfers.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:WireTransfers.TYPE}:{id:e.id,type:WireTransfers.TYPE}}type(){return WireTransfers.TYPE}}WireTransfers.TYPE="wire_transfers",exports.default=WireTransfers;
package/lib/cjs/static.js CHANGED
@@ -1 +1 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,i){i===void 0&&(i=t),Object.defineProperty(e,i,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,i){i===void 0&&(i=t),e[i]=r[t]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&__createBinding(r,e,t);return __setModuleDefault(r,e),r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommerceLayerStatic=void 0;const api=__importStar(require("./api")),error_1=require("./error");exports.CommerceLayerStatic={resources:()=>api.resourceList,isSdkError:e=>error_1.SdkError.isSdkError(e),isApiError:e=>error_1.ApiError.isApiError(e)};
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,o){o===void 0&&(o=t);var i=Object.getOwnPropertyDescriptor(r,t);(!i||("get"in i?!r.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return r[t]}}),Object.defineProperty(e,o,i)}:function(e,r,t,o){o===void 0&&(o=t),e[o]=r[t]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&__createBinding(r,e,t);return __setModuleDefault(r,e),r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommerceLayerStatic=void 0;const api=__importStar(require("./api")),error_1=require("./error");exports.CommerceLayerStatic={resources:()=>api.resourceList,isSdkError:e=>error_1.SdkError.isSdkError(e),isApiError:e=>error_1.ApiError.isApiError(e)};
@@ -17,7 +17,7 @@ interface QueryParamsList extends QueryParamsRetrieve {
17
17
  }
18
18
  declare type QueryParams = QueryParamsRetrieve | QueryParamsList;
19
19
  export { QueryParamsRetrieve, QueryParamsList, QueryParams };
20
- declare const generateQueryStringParams: (params: QueryParamsRetrieve | QueryParamsList | undefined, res: ResourceType) => {
20
+ declare const generateQueryStringParams: (params: QueryParamsRetrieve | QueryParamsList | undefined, res: string | ResourceType) => {
21
21
  [key: string]: string;
22
22
  };
23
23
  export { generateQueryStringParams };
package/lib/esm/query.js CHANGED
@@ -1 +1 @@
1
- import n from"./debug";const a=n("query"),o=e=>e.filters||e.pageNumber||e.pageSize||e.sort,g=(e,r)=>{a("generate query string params: %O, %O",e,r);const i={};return e&&(e.include&&(i.include=e.include.join(",")),e.fields&&(Array.isArray(e.fields)&&(e.fields={[r.type]:e.fields}),Object.entries(e.fields).forEach(([s,t])=>{i[`fields[${s}]`]=t.join(",")})),o(e)&&(e.sort&&(Array.isArray(e.sort)?i.sort=e.sort.join(","):i.sort=Object.entries(e.sort).map(([s,t])=>`${t==="desc"?"-":""}${s}`).join(",")),e.pageNumber&&(i["page[number]"]=String(e.pageNumber)),e.pageSize&&(i["page[size]"]=String(e.pageSize)),e.filters&&Object.entries(e.filters).forEach(([s,t])=>{i[`filter[q][${s}]`]=String(t)})),a("query string params: %O",i)),i};export{g as generateQueryStringParams};
1
+ import n from"./debug";const a=n("query"),o=e=>e.filters||e.pageNumber||e.pageSize||e.sort,g=(e,r)=>{a("generate query string params: %O, %O",e,r);const i={};return e&&(e.include&&(i.include=e.include.join(",")),e.fields&&(Array.isArray(e.fields)&&(e.fields={[r.type||r]:e.fields}),Object.entries(e.fields).forEach(([s,t])=>{i[`fields[${s}]`]=t.join(",")})),o(e)&&(e.sort&&(Array.isArray(e.sort)?i.sort=e.sort.join(","):i.sort=Object.entries(e.sort).map(([s,t])=>`${t==="desc"?"-":""}${s}`).join(",")),e.pageNumber&&(i["page[number]"]=String(e.pageNumber)),e.pageSize&&(i["page[size]"]=String(e.pageSize)),e.filters&&Object.entries(e.filters).forEach(([s,t])=>{i[`filter[q][${s}]`]=String(t)})),a("query string params: %O",i)),i};export{g as generateQueryStringParams};
@@ -63,7 +63,7 @@ declare class ResourceAdapter {
63
63
  create<C extends ResourceCreate, R extends Resource>(resource: C & ResourceType, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
64
64
  update<U extends ResourceUpdate, R extends Resource>(resource: U & ResourceId, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
65
65
  delete(resource: ResourceId, options?: ResourcesConfig): Promise<void>;
66
- fetch<R extends Resource>(resource: ResourceType, path: string, params?: QueryParams, options?: ResourcesConfig): Promise<R | ListResponse<R>>;
66
+ fetch<R extends Resource>(resource: string | ResourceType, path: string, params?: QueryParams, options?: ResourcesConfig): Promise<R | ListResponse<R>>;
67
67
  }
68
68
  declare abstract class ApiResource {
69
69
  static readonly TYPE: ResourceTypeLock;
@@ -1,6 +1,6 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Geocoder } from './geocoders';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { Geocoder } from './geocoders';
4
4
  declare type AddressRel = ResourceRel & {
5
5
  type: typeof Addresses.TYPE;
6
6
  };
@@ -79,7 +79,7 @@ declare class Addresses extends ApiResource {
79
79
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
80
80
  update(resource: AddressUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
81
81
  delete(id: string, options?: ResourcesConfig): Promise<void>;
82
- geocoder(addressId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Geocoder>;
82
+ geocoder(addressId: string | Address, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Geocoder>;
83
83
  isAddress(resource: any): resource is Address;
84
84
  relationship(id: string | ResourceId | null): AddressRel;
85
85
  type(): string;
@@ -1 +1 @@
1
- import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async geocoder(e,r,s){return this.resources.fetch({type:"geocoders"},`addresses/${e}/geocoder`,r,s)}isAddress(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="addresses";export default t;
1
+ import{ApiResource as c}from"../resource";class t extends c{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async geocoder(e,r,s){const i=e.id||e;return this.resources.fetch({type:"geocoders"},`addresses/${i}/geocoder`,r,s)}isAddress(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="addresses";export default t;
@@ -1,5 +1,5 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  declare type AdjustmentRel = ResourceRel & {
4
4
  type: typeof Adjustments.TYPE;
5
5
  };
@@ -1,7 +1,7 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { PaymentMethod } from './payment_methods';
4
- import { AdyenPayment } from './adyen_payments';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { PaymentMethod } from './payment_methods';
4
+ import type { AdyenPayment } from './adyen_payments';
5
5
  declare type AdyenGatewayRel = ResourceRel & {
6
6
  type: typeof AdyenGateways.TYPE;
7
7
  };
@@ -37,8 +37,8 @@ declare class AdyenGateways extends ApiResource {
37
37
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
38
38
  update(resource: AdyenGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
39
39
  delete(id: string, options?: ResourcesConfig): Promise<void>;
40
- payment_methods(adyenGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
41
- adyen_payments(adyenGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>>;
40
+ payment_methods(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
41
+ adyen_payments(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>>;
42
42
  isAdyenGateway(resource: any): resource is AdyenGateway;
43
43
  relationship(id: string | ResourceId | null): AdyenGatewayRel;
44
44
  type(): string;
@@ -1 +1 @@
1
- import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async payment_methods(e,t,r){return this.resources.fetch({type:"payment_methods"},`adyen_gateways/${e}/payment_methods`,t,r)}async adyen_payments(e,t,r){return this.resources.fetch({type:"adyen_payments"},`adyen_gateways/${e}/adyen_payments`,t,r)}isAdyenGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="adyen_gateways";export default s;
1
+ import{ApiResource as n}from"../resource";class s extends n{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async payment_methods(e,t,r){const a=e.id||e;return this.resources.fetch({type:"payment_methods"},`adyen_gateways/${a}/payment_methods`,t,r)}async adyen_payments(e,t,r){const a=e.id||e;return this.resources.fetch({type:"adyen_payments"},`adyen_gateways/${a}/adyen_payments`,t,r)}isAdyenGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="adyen_gateways";export default s;
@@ -1,7 +1,7 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Order } from './orders';
4
- import { PaymentGateway } from './payment_gateways';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { Order } from './orders';
4
+ import type { PaymentGateway } from './payment_gateways';
5
5
  declare type AdyenPaymentRel = ResourceRel & {
6
6
  type: typeof AdyenPayments.TYPE;
7
7
  };
@@ -34,8 +34,8 @@ declare class AdyenPayments extends ApiResource {
34
34
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
35
35
  update(resource: AdyenPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
36
36
  delete(id: string, options?: ResourcesConfig): Promise<void>;
37
- order(adyenPaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
38
- payment_gateway(adyenPaymentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
37
+ order(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
38
+ payment_gateway(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
39
39
  isAdyenPayment(resource: any): resource is AdyenPayment;
40
40
  relationship(id: string | ResourceId | null): AdyenPaymentRel;
41
41
  type(): string;
@@ -1 +1 @@
1
- import{ApiResource as a}from"../resource";class r extends a{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){return this.resources.fetch({type:"orders"},`adyen_payments/${e}/order`,t,s)}async payment_gateway(e,t,s){return this.resources.fetch({type:"payment_gateways"},`adyen_payments/${e}/payment_gateway`,t,s)}isAdyenPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="adyen_payments";export default r;
1
+ import{ApiResource as n}from"../resource";class r extends n{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){const a=e.id||e;return this.resources.fetch({type:"orders"},`adyen_payments/${a}/order`,t,s)}async payment_gateway(e,t,s){const a=e.id||e;return this.resources.fetch({type:"payment_gateways"},`adyen_payments/${a}/payment_gateway`,t,s)}isAdyenPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="adyen_payments";export default r;
@@ -1,5 +1,5 @@
1
1
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel } from '../resource';
2
- import { QueryParamsRetrieve } from '../query';
2
+ import type { QueryParamsRetrieve } from '../query';
3
3
  declare type ApplicationRel = ResourceRel & {
4
4
  type: typeof Applications.TYPE;
5
5
  };
@@ -1,35 +1,35 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Bundle } from './bundles';
4
- import { CarrierAccount } from './carrier_accounts';
5
- import { CustomerGroup } from './customer_groups';
6
- import { Customer } from './customers';
7
- import { DeliveryLeadTime } from './delivery_lead_times';
8
- import { Geocoder } from './geocoders';
9
- import { GiftCardRecipient } from './gift_card_recipients';
10
- import { GiftCard } from './gift_cards';
11
- import { InventoryModel } from './inventory_models';
12
- import { Market } from './markets';
13
- import { Merchant } from './merchants';
14
- import { BillingInfoValidationRule } from './billing_info_validation_rules';
15
- import { Order } from './orders';
16
- import { Package } from './packages';
17
- import { Parcel } from './parcels';
18
- import { PaymentMethod } from './payment_methods';
19
- import { PriceList } from './price_lists';
20
- import { Price } from './prices';
21
- import { Promotion } from './promotions';
22
- import { Return } from './returns';
23
- import { Shipment } from './shipments';
24
- import { ShippingCategory } from './shipping_categories';
25
- import { ShippingMethod } from './shipping_methods';
26
- import { ShippingZone } from './shipping_zones';
27
- import { SkuOption } from './sku_options';
28
- import { Sku } from './skus';
29
- import { StockItem } from './stock_items';
30
- import { StockLocation } from './stock_locations';
31
- import { TaxCalculator } from './tax_calculators';
32
- import { TaxCategory } from './tax_categories';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { Bundle } from './bundles';
4
+ import type { CarrierAccount } from './carrier_accounts';
5
+ import type { CustomerGroup } from './customer_groups';
6
+ import type { Customer } from './customers';
7
+ import type { DeliveryLeadTime } from './delivery_lead_times';
8
+ import type { Geocoder } from './geocoders';
9
+ import type { GiftCardRecipient } from './gift_card_recipients';
10
+ import type { GiftCard } from './gift_cards';
11
+ import type { InventoryModel } from './inventory_models';
12
+ import type { Market } from './markets';
13
+ import type { Merchant } from './merchants';
14
+ import type { BillingInfoValidationRule } from './billing_info_validation_rules';
15
+ import type { Order } from './orders';
16
+ import type { Package } from './packages';
17
+ import type { Parcel } from './parcels';
18
+ import type { PaymentMethod } from './payment_methods';
19
+ import type { PriceList } from './price_lists';
20
+ import type { Price } from './prices';
21
+ import type { Promotion } from './promotions';
22
+ import type { Return } from './returns';
23
+ import type { Shipment } from './shipments';
24
+ import type { ShippingCategory } from './shipping_categories';
25
+ import type { ShippingMethod } from './shipping_methods';
26
+ import type { ShippingZone } from './shipping_zones';
27
+ import type { SkuOption } from './sku_options';
28
+ import type { Sku } from './skus';
29
+ import type { StockItem } from './stock_items';
30
+ import type { StockLocation } from './stock_locations';
31
+ import type { TaxCalculator } from './tax_calculators';
32
+ import type { TaxCategory } from './tax_categories';
33
33
  declare type AttachmentRel = ResourceRel & {
34
34
  type: typeof Attachments.TYPE;
35
35
  };
@@ -1,8 +1,8 @@
1
1
  import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Order } from './orders';
4
- import { Capture } from './captures';
5
- import { Void } from './voids';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { Order } from './orders';
4
+ import type { Capture } from './captures';
5
+ import type { Void } from './voids';
6
6
  declare type AuthorizationRel = ResourceRel & {
7
7
  type: typeof Authorizations.TYPE;
8
8
  };
@@ -46,9 +46,9 @@ declare class Authorizations extends ApiResource {
46
46
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Authorization>>;
47
47
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
48
48
  update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
49
- order(authorizationId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
50
- captures(authorizationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
51
- voids(authorizationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
49
+ order(authorizationId: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
50
+ captures(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
51
+ voids(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
52
52
  isAuthorization(resource: any): resource is Authorization;
53
53
  relationship(id: string | ResourceId | null): AuthorizationRel;
54
54
  type(): string;
@@ -1 +1 @@
1
- import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async order(e,r,s){return this.resources.fetch({type:"orders"},`authorizations/${e}/order`,r,s)}async captures(e,r,s){return this.resources.fetch({type:"captures"},`authorizations/${e}/captures`,r,s)}async voids(e,r,s){return this.resources.fetch({type:"voids"},`authorizations/${e}/voids`,r,s)}isAuthorization(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="authorizations";export default t;
1
+ import{ApiResource as o}from"../resource";class t extends o{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async order(e,r,s){const i=e.id||e;return this.resources.fetch({type:"orders"},`authorizations/${i}/order`,r,s)}async captures(e,r,s){const i=e.id||e;return this.resources.fetch({type:"captures"},`authorizations/${i}/captures`,r,s)}async voids(e,r,s){const i=e.id||e;return this.resources.fetch({type:"voids"},`authorizations/${i}/voids`,r,s)}isAuthorization(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="authorizations";export default t;
@@ -1,8 +1,8 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { TaxCategory } from './tax_categories';
4
- import { Market } from './markets';
5
- import { Attachment } from './attachments';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { TaxCategory } from './tax_categories';
4
+ import type { Market } from './markets';
5
+ import type { Attachment } from './attachments';
6
6
  declare type AvalaraAccountRel = ResourceRel & {
7
7
  type: typeof AvalaraAccounts.TYPE;
8
8
  };
@@ -41,9 +41,9 @@ declare class AvalaraAccounts extends ApiResource {
41
41
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
42
42
  update(resource: AvalaraAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AvalaraAccount>;
43
43
  delete(id: string, options?: ResourcesConfig): Promise<void>;
44
- tax_categories(avalaraAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
45
- markets(avalaraAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
46
- attachments(avalaraAccountId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
44
+ tax_categories(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCategory>>;
45
+ markets(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Market>>;
46
+ attachments(avalaraAccountId: string | AvalaraAccount, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
47
47
  isAvalaraAccount(resource: any): resource is AvalaraAccount;
48
48
  relationship(id: string | ResourceId | null): AvalaraAccountRel;
49
49
  type(): string;
@@ -1 +1 @@
1
- import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async tax_categories(e,t,r){return this.resources.fetch({type:"tax_categories"},`avalara_accounts/${e}/tax_categories`,t,r)}async markets(e,t,r){return this.resources.fetch({type:"markets"},`avalara_accounts/${e}/markets`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`avalara_accounts/${e}/attachments`,t,r)}isAvalaraAccount(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="avalara_accounts";export default s;
1
+ import{ApiResource as c}from"../resource";class s extends c{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async tax_categories(e,t,r){const a=e.id||e;return this.resources.fetch({type:"tax_categories"},`avalara_accounts/${a}/tax_categories`,t,r)}async markets(e,t,r){const a=e.id||e;return this.resources.fetch({type:"markets"},`avalara_accounts/${a}/markets`,t,r)}async attachments(e,t,r){const a=e.id||e;return this.resources.fetch({type:"attachments"},`avalara_accounts/${a}/attachments`,t,r)}isAvalaraAccount(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="avalara_accounts";export default s;
@@ -1,6 +1,6 @@
1
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import { Market } from './markets';
2
+ import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ import type { Market } from './markets';
4
4
  declare type BillingInfoValidationRuleRel = ResourceRel & {
5
5
  type: typeof BillingInfoValidationRules.TYPE;
6
6
  };
@@ -23,7 +23,7 @@ declare class BillingInfoValidationRules extends ApiResource {
23
23
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BillingInfoValidationRule>;
24
24
  update(resource: BillingInfoValidationRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<BillingInfoValidationRule>;
25
25
  delete(id: string, options?: ResourcesConfig): Promise<void>;
26
- market(billingInfoValidationRuleId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
26
+ market(billingInfoValidationRuleId: string | BillingInfoValidationRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
27
27
  isBillingInfoValidationRule(resource: any): resource is BillingInfoValidationRule;
28
28
  relationship(id: string | ResourceId | null): BillingInfoValidationRuleRel;
29
29
  type(): string;