@commercelayer/sdk 4.3.0 → 4.5.0-beta.2

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 (384) hide show
  1. package/README.md +24 -13
  2. package/lib/cjs/client.js +1 -1
  3. package/lib/cjs/commercelayer.d.ts +2 -2
  4. package/lib/cjs/commercelayer.js +1 -1
  5. package/lib/cjs/common.js +1 -1
  6. package/lib/cjs/debug.d.ts +1 -1
  7. package/lib/cjs/debug.js +1 -1
  8. package/lib/cjs/jsonapi.js +1 -1
  9. package/lib/cjs/query.js +1 -1
  10. package/lib/cjs/resource.d.ts +2 -0
  11. package/lib/cjs/resource.js +1 -1
  12. package/lib/cjs/resources/addresses.d.ts +1 -0
  13. package/lib/cjs/resources/addresses.js +1 -1
  14. package/lib/cjs/resources/adyen_gateways.d.ts +2 -0
  15. package/lib/cjs/resources/adyen_gateways.js +1 -1
  16. package/lib/cjs/resources/adyen_payments.d.ts +2 -0
  17. package/lib/cjs/resources/adyen_payments.js +1 -1
  18. package/lib/cjs/resources/authorizations.d.ts +3 -0
  19. package/lib/cjs/resources/authorizations.js +1 -1
  20. package/lib/cjs/resources/avalara_accounts.d.ts +3 -0
  21. package/lib/cjs/resources/avalara_accounts.js +1 -1
  22. package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -0
  23. package/lib/cjs/resources/billing_info_validation_rules.js +1 -1
  24. package/lib/cjs/resources/bing_geocoders.d.ts +2 -0
  25. package/lib/cjs/resources/bing_geocoders.js +1 -1
  26. package/lib/cjs/resources/braintree_gateways.d.ts +2 -0
  27. package/lib/cjs/resources/braintree_gateways.js +1 -1
  28. package/lib/cjs/resources/braintree_payments.d.ts +2 -0
  29. package/lib/cjs/resources/braintree_payments.js +1 -1
  30. package/lib/cjs/resources/bundles.d.ts +4 -0
  31. package/lib/cjs/resources/bundles.js +1 -1
  32. package/lib/cjs/resources/captures.d.ts +3 -0
  33. package/lib/cjs/resources/captures.js +1 -1
  34. package/lib/cjs/resources/carrier_accounts.d.ts +2 -0
  35. package/lib/cjs/resources/carrier_accounts.js +1 -1
  36. package/lib/cjs/resources/checkout_com_gateways.d.ts +2 -0
  37. package/lib/cjs/resources/checkout_com_gateways.js +1 -1
  38. package/lib/cjs/resources/checkout_com_payments.d.ts +2 -0
  39. package/lib/cjs/resources/checkout_com_payments.js +1 -1
  40. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -0
  41. package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -1
  42. package/lib/cjs/resources/coupon_recipients.d.ts +2 -0
  43. package/lib/cjs/resources/coupon_recipients.js +1 -1
  44. package/lib/cjs/resources/coupons.d.ts +1 -0
  45. package/lib/cjs/resources/coupons.js +1 -1
  46. package/lib/cjs/resources/customer_addresses.d.ts +2 -0
  47. package/lib/cjs/resources/customer_addresses.js +1 -1
  48. package/lib/cjs/resources/customer_groups.d.ts +3 -0
  49. package/lib/cjs/resources/customer_groups.js +1 -1
  50. package/lib/cjs/resources/customer_password_resets.d.ts +1 -0
  51. package/lib/cjs/resources/customer_password_resets.js +1 -1
  52. package/lib/cjs/resources/customer_payment_sources.d.ts +1 -0
  53. package/lib/cjs/resources/customer_payment_sources.js +1 -1
  54. package/lib/cjs/resources/customer_subscriptions.d.ts +1 -0
  55. package/lib/cjs/resources/customer_subscriptions.js +1 -1
  56. package/lib/cjs/resources/customers.d.ts +8 -0
  57. package/lib/cjs/resources/customers.js +1 -1
  58. package/lib/cjs/resources/delivery_lead_times.d.ts +3 -0
  59. package/lib/cjs/resources/delivery_lead_times.js +1 -1
  60. package/lib/cjs/resources/event_callbacks.d.ts +1 -0
  61. package/lib/cjs/resources/event_callbacks.js +1 -1
  62. package/lib/cjs/resources/external_gateways.d.ts +2 -0
  63. package/lib/cjs/resources/external_gateways.js +1 -1
  64. package/lib/cjs/resources/external_payments.d.ts +3 -0
  65. package/lib/cjs/resources/external_payments.js +1 -1
  66. package/lib/cjs/resources/external_promotions.d.ts +5 -0
  67. package/lib/cjs/resources/external_promotions.js +1 -1
  68. package/lib/cjs/resources/external_tax_calculators.d.ts +3 -0
  69. package/lib/cjs/resources/external_tax_calculators.js +1 -1
  70. package/lib/cjs/resources/fixed_amount_promotions.d.ts +5 -0
  71. package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
  72. package/lib/cjs/resources/fixed_price_promotions.d.ts +7 -0
  73. package/lib/cjs/resources/fixed_price_promotions.js +1 -1
  74. package/lib/cjs/resources/free_gift_promotions.d.ts +7 -0
  75. package/lib/cjs/resources/free_gift_promotions.js +1 -1
  76. package/lib/cjs/resources/free_shipping_promotions.d.ts +5 -0
  77. package/lib/cjs/resources/free_shipping_promotions.js +1 -1
  78. package/lib/cjs/resources/geocoders.d.ts +2 -0
  79. package/lib/cjs/resources/geocoders.js +1 -1
  80. package/lib/cjs/resources/gift_card_recipients.d.ts +2 -0
  81. package/lib/cjs/resources/gift_card_recipients.js +1 -1
  82. package/lib/cjs/resources/gift_cards.d.ts +3 -0
  83. package/lib/cjs/resources/gift_cards.js +1 -1
  84. package/lib/cjs/resources/google_geocoders.d.ts +2 -0
  85. package/lib/cjs/resources/google_geocoders.js +1 -1
  86. package/lib/cjs/resources/in_stock_subscriptions.d.ts +3 -0
  87. package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
  88. package/lib/cjs/resources/inventory_models.d.ts +3 -0
  89. package/lib/cjs/resources/inventory_models.js +1 -1
  90. package/lib/cjs/resources/inventory_return_locations.d.ts +2 -0
  91. package/lib/cjs/resources/inventory_return_locations.js +1 -1
  92. package/lib/cjs/resources/inventory_stock_locations.d.ts +2 -0
  93. package/lib/cjs/resources/inventory_stock_locations.js +1 -1
  94. package/lib/cjs/resources/klarna_gateways.d.ts +2 -0
  95. package/lib/cjs/resources/klarna_gateways.js +1 -1
  96. package/lib/cjs/resources/klarna_payments.d.ts +2 -0
  97. package/lib/cjs/resources/klarna_payments.js +1 -1
  98. package/lib/cjs/resources/line_item_options.d.ts +2 -0
  99. package/lib/cjs/resources/line_item_options.js +1 -1
  100. package/lib/cjs/resources/line_items.d.ts +4 -0
  101. package/lib/cjs/resources/line_items.js +1 -1
  102. package/lib/cjs/resources/manual_gateways.d.ts +1 -0
  103. package/lib/cjs/resources/manual_gateways.js +1 -1
  104. package/lib/cjs/resources/manual_tax_calculators.d.ts +4 -0
  105. package/lib/cjs/resources/manual_tax_calculators.js +1 -1
  106. package/lib/cjs/resources/markets.d.ts +6 -0
  107. package/lib/cjs/resources/markets.js +1 -1
  108. package/lib/cjs/resources/merchants.d.ts +2 -0
  109. package/lib/cjs/resources/merchants.js +1 -1
  110. package/lib/cjs/resources/order_copies.d.ts +3 -0
  111. package/lib/cjs/resources/order_copies.js +1 -1
  112. package/lib/cjs/resources/order_subscriptions.d.ts +5 -0
  113. package/lib/cjs/resources/order_subscriptions.js +1 -1
  114. package/lib/cjs/resources/order_validation_rules.d.ts +1 -0
  115. package/lib/cjs/resources/order_validation_rules.js +1 -1
  116. package/lib/cjs/resources/orders.d.ts +16 -0
  117. package/lib/cjs/resources/orders.js +1 -1
  118. package/lib/cjs/resources/packages.d.ts +3 -0
  119. package/lib/cjs/resources/packages.js +1 -1
  120. package/lib/cjs/resources/parcel_line_items.d.ts +2 -0
  121. package/lib/cjs/resources/parcel_line_items.js +1 -1
  122. package/lib/cjs/resources/parcels.d.ts +4 -0
  123. package/lib/cjs/resources/parcels.js +1 -1
  124. package/lib/cjs/resources/payment_gateways.d.ts +1 -0
  125. package/lib/cjs/resources/payment_gateways.js +1 -1
  126. package/lib/cjs/resources/payment_methods.d.ts +3 -0
  127. package/lib/cjs/resources/payment_methods.js +1 -1
  128. package/lib/cjs/resources/paypal_gateways.d.ts +2 -0
  129. package/lib/cjs/resources/paypal_gateways.js +1 -1
  130. package/lib/cjs/resources/paypal_payments.d.ts +2 -0
  131. package/lib/cjs/resources/paypal_payments.js +1 -1
  132. package/lib/cjs/resources/percentage_discount_promotions.d.ts +7 -0
  133. package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
  134. package/lib/cjs/resources/price_lists.d.ts +2 -0
  135. package/lib/cjs/resources/price_lists.js +1 -1
  136. package/lib/cjs/resources/prices.d.ts +3 -0
  137. package/lib/cjs/resources/prices.js +1 -1
  138. package/lib/cjs/resources/promotions.d.ts +5 -0
  139. package/lib/cjs/resources/promotions.js +1 -1
  140. package/lib/cjs/resources/refunds.d.ts +2 -0
  141. package/lib/cjs/resources/refunds.js +1 -1
  142. package/lib/cjs/resources/return_line_items.d.ts +2 -0
  143. package/lib/cjs/resources/return_line_items.js +1 -1
  144. package/lib/cjs/resources/returns.d.ts +7 -0
  145. package/lib/cjs/resources/returns.js +1 -1
  146. package/lib/cjs/resources/shipments.d.ts +13 -0
  147. package/lib/cjs/resources/shipments.js +1 -1
  148. package/lib/cjs/resources/shipping_categories.d.ts +2 -0
  149. package/lib/cjs/resources/shipping_categories.js +1 -1
  150. package/lib/cjs/resources/shipping_methods.d.ts +5 -0
  151. package/lib/cjs/resources/shipping_methods.js +1 -1
  152. package/lib/cjs/resources/shipping_zones.d.ts +1 -0
  153. package/lib/cjs/resources/shipping_zones.js +1 -1
  154. package/lib/cjs/resources/sku_list_items.d.ts +2 -0
  155. package/lib/cjs/resources/sku_list_items.js +1 -1
  156. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +2 -0
  157. package/lib/cjs/resources/sku_list_promotion_rules.js +1 -1
  158. package/lib/cjs/resources/sku_lists.d.ts +3 -0
  159. package/lib/cjs/resources/sku_lists.js +1 -1
  160. package/lib/cjs/resources/sku_options.d.ts +2 -0
  161. package/lib/cjs/resources/sku_options.js +1 -1
  162. package/lib/cjs/resources/skus.d.ts +6 -0
  163. package/lib/cjs/resources/skus.js +1 -1
  164. package/lib/cjs/resources/stock_items.d.ts +3 -0
  165. package/lib/cjs/resources/stock_items.js +1 -1
  166. package/lib/cjs/resources/stock_line_items.d.ts +3 -0
  167. package/lib/cjs/resources/stock_line_items.js +1 -1
  168. package/lib/cjs/resources/stock_locations.d.ts +6 -0
  169. package/lib/cjs/resources/stock_locations.js +1 -1
  170. package/lib/cjs/resources/stock_transfers.d.ts +5 -0
  171. package/lib/cjs/resources/stock_transfers.js +1 -1
  172. package/lib/cjs/resources/stripe_gateways.d.ts +2 -0
  173. package/lib/cjs/resources/stripe_gateways.js +1 -1
  174. package/lib/cjs/resources/stripe_payments.d.ts +2 -0
  175. package/lib/cjs/resources/stripe_payments.js +1 -1
  176. package/lib/cjs/resources/tax_calculators.d.ts +3 -0
  177. package/lib/cjs/resources/tax_calculators.js +1 -1
  178. package/lib/cjs/resources/tax_categories.d.ts +2 -0
  179. package/lib/cjs/resources/tax_categories.js +1 -1
  180. package/lib/cjs/resources/tax_rules.d.ts +1 -0
  181. package/lib/cjs/resources/tax_rules.js +1 -1
  182. package/lib/cjs/resources/taxjar_accounts.d.ts +3 -0
  183. package/lib/cjs/resources/taxjar_accounts.js +1 -1
  184. package/lib/cjs/resources/transactions.d.ts +1 -0
  185. package/lib/cjs/resources/transactions.js +1 -1
  186. package/lib/cjs/resources/voids.d.ts +2 -0
  187. package/lib/cjs/resources/voids.js +1 -1
  188. package/lib/cjs/resources/webhooks.d.ts +1 -0
  189. package/lib/cjs/resources/webhooks.js +1 -1
  190. package/lib/cjs/resources/wire_transfers.d.ts +1 -0
  191. package/lib/cjs/resources/wire_transfers.js +1 -1
  192. package/lib/esm/client.js +1 -1
  193. package/lib/esm/commercelayer.d.ts +2 -2
  194. package/lib/esm/commercelayer.js +1 -1
  195. package/lib/esm/common.js +1 -1
  196. package/lib/esm/debug.d.ts +1 -1
  197. package/lib/esm/debug.js +1 -1
  198. package/lib/esm/jsonapi.js +1 -1
  199. package/lib/esm/query.js +1 -1
  200. package/lib/esm/resource.d.ts +2 -0
  201. package/lib/esm/resource.js +1 -1
  202. package/lib/esm/resources/addresses.d.ts +1 -0
  203. package/lib/esm/resources/addresses.js +1 -1
  204. package/lib/esm/resources/adyen_gateways.d.ts +2 -0
  205. package/lib/esm/resources/adyen_gateways.js +1 -1
  206. package/lib/esm/resources/adyen_payments.d.ts +2 -0
  207. package/lib/esm/resources/adyen_payments.js +1 -1
  208. package/lib/esm/resources/authorizations.d.ts +3 -0
  209. package/lib/esm/resources/authorizations.js +1 -1
  210. package/lib/esm/resources/avalara_accounts.d.ts +3 -0
  211. package/lib/esm/resources/avalara_accounts.js +1 -1
  212. package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -0
  213. package/lib/esm/resources/billing_info_validation_rules.js +1 -1
  214. package/lib/esm/resources/bing_geocoders.d.ts +2 -0
  215. package/lib/esm/resources/bing_geocoders.js +1 -1
  216. package/lib/esm/resources/braintree_gateways.d.ts +2 -0
  217. package/lib/esm/resources/braintree_gateways.js +1 -1
  218. package/lib/esm/resources/braintree_payments.d.ts +2 -0
  219. package/lib/esm/resources/braintree_payments.js +1 -1
  220. package/lib/esm/resources/bundles.d.ts +4 -0
  221. package/lib/esm/resources/bundles.js +1 -1
  222. package/lib/esm/resources/captures.d.ts +3 -0
  223. package/lib/esm/resources/captures.js +1 -1
  224. package/lib/esm/resources/carrier_accounts.d.ts +2 -0
  225. package/lib/esm/resources/carrier_accounts.js +1 -1
  226. package/lib/esm/resources/checkout_com_gateways.d.ts +2 -0
  227. package/lib/esm/resources/checkout_com_gateways.js +1 -1
  228. package/lib/esm/resources/checkout_com_payments.d.ts +2 -0
  229. package/lib/esm/resources/checkout_com_payments.js +1 -1
  230. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -0
  231. package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
  232. package/lib/esm/resources/coupon_recipients.d.ts +2 -0
  233. package/lib/esm/resources/coupon_recipients.js +1 -1
  234. package/lib/esm/resources/coupons.d.ts +1 -0
  235. package/lib/esm/resources/coupons.js +1 -1
  236. package/lib/esm/resources/customer_addresses.d.ts +2 -0
  237. package/lib/esm/resources/customer_addresses.js +1 -1
  238. package/lib/esm/resources/customer_groups.d.ts +3 -0
  239. package/lib/esm/resources/customer_groups.js +1 -1
  240. package/lib/esm/resources/customer_password_resets.d.ts +1 -0
  241. package/lib/esm/resources/customer_password_resets.js +1 -1
  242. package/lib/esm/resources/customer_payment_sources.d.ts +1 -0
  243. package/lib/esm/resources/customer_payment_sources.js +1 -1
  244. package/lib/esm/resources/customer_subscriptions.d.ts +1 -0
  245. package/lib/esm/resources/customer_subscriptions.js +1 -1
  246. package/lib/esm/resources/customers.d.ts +8 -0
  247. package/lib/esm/resources/customers.js +1 -1
  248. package/lib/esm/resources/delivery_lead_times.d.ts +3 -0
  249. package/lib/esm/resources/delivery_lead_times.js +1 -1
  250. package/lib/esm/resources/event_callbacks.d.ts +1 -0
  251. package/lib/esm/resources/event_callbacks.js +1 -1
  252. package/lib/esm/resources/external_gateways.d.ts +2 -0
  253. package/lib/esm/resources/external_gateways.js +1 -1
  254. package/lib/esm/resources/external_payments.d.ts +3 -0
  255. package/lib/esm/resources/external_payments.js +1 -1
  256. package/lib/esm/resources/external_promotions.d.ts +5 -0
  257. package/lib/esm/resources/external_promotions.js +1 -1
  258. package/lib/esm/resources/external_tax_calculators.d.ts +3 -0
  259. package/lib/esm/resources/external_tax_calculators.js +1 -1
  260. package/lib/esm/resources/fixed_amount_promotions.d.ts +5 -0
  261. package/lib/esm/resources/fixed_amount_promotions.js +1 -1
  262. package/lib/esm/resources/fixed_price_promotions.d.ts +7 -0
  263. package/lib/esm/resources/fixed_price_promotions.js +1 -1
  264. package/lib/esm/resources/free_gift_promotions.d.ts +7 -0
  265. package/lib/esm/resources/free_gift_promotions.js +1 -1
  266. package/lib/esm/resources/free_shipping_promotions.d.ts +5 -0
  267. package/lib/esm/resources/free_shipping_promotions.js +1 -1
  268. package/lib/esm/resources/geocoders.d.ts +2 -0
  269. package/lib/esm/resources/geocoders.js +1 -1
  270. package/lib/esm/resources/gift_card_recipients.d.ts +2 -0
  271. package/lib/esm/resources/gift_card_recipients.js +1 -1
  272. package/lib/esm/resources/gift_cards.d.ts +3 -0
  273. package/lib/esm/resources/gift_cards.js +1 -1
  274. package/lib/esm/resources/google_geocoders.d.ts +2 -0
  275. package/lib/esm/resources/google_geocoders.js +1 -1
  276. package/lib/esm/resources/in_stock_subscriptions.d.ts +3 -0
  277. package/lib/esm/resources/in_stock_subscriptions.js +1 -1
  278. package/lib/esm/resources/inventory_models.d.ts +3 -0
  279. package/lib/esm/resources/inventory_models.js +1 -1
  280. package/lib/esm/resources/inventory_return_locations.d.ts +2 -0
  281. package/lib/esm/resources/inventory_return_locations.js +1 -1
  282. package/lib/esm/resources/inventory_stock_locations.d.ts +2 -0
  283. package/lib/esm/resources/inventory_stock_locations.js +1 -1
  284. package/lib/esm/resources/klarna_gateways.d.ts +2 -0
  285. package/lib/esm/resources/klarna_gateways.js +1 -1
  286. package/lib/esm/resources/klarna_payments.d.ts +2 -0
  287. package/lib/esm/resources/klarna_payments.js +1 -1
  288. package/lib/esm/resources/line_item_options.d.ts +2 -0
  289. package/lib/esm/resources/line_item_options.js +1 -1
  290. package/lib/esm/resources/line_items.d.ts +4 -0
  291. package/lib/esm/resources/line_items.js +1 -1
  292. package/lib/esm/resources/manual_gateways.d.ts +1 -0
  293. package/lib/esm/resources/manual_gateways.js +1 -1
  294. package/lib/esm/resources/manual_tax_calculators.d.ts +4 -0
  295. package/lib/esm/resources/manual_tax_calculators.js +1 -1
  296. package/lib/esm/resources/markets.d.ts +6 -0
  297. package/lib/esm/resources/markets.js +1 -1
  298. package/lib/esm/resources/merchants.d.ts +2 -0
  299. package/lib/esm/resources/merchants.js +1 -1
  300. package/lib/esm/resources/order_copies.d.ts +3 -0
  301. package/lib/esm/resources/order_copies.js +1 -1
  302. package/lib/esm/resources/order_subscriptions.d.ts +5 -0
  303. package/lib/esm/resources/order_subscriptions.js +1 -1
  304. package/lib/esm/resources/order_validation_rules.d.ts +1 -0
  305. package/lib/esm/resources/order_validation_rules.js +1 -1
  306. package/lib/esm/resources/orders.d.ts +16 -0
  307. package/lib/esm/resources/orders.js +1 -1
  308. package/lib/esm/resources/packages.d.ts +3 -0
  309. package/lib/esm/resources/packages.js +1 -1
  310. package/lib/esm/resources/parcel_line_items.d.ts +2 -0
  311. package/lib/esm/resources/parcel_line_items.js +1 -1
  312. package/lib/esm/resources/parcels.d.ts +4 -0
  313. package/lib/esm/resources/parcels.js +1 -1
  314. package/lib/esm/resources/payment_gateways.d.ts +1 -0
  315. package/lib/esm/resources/payment_gateways.js +1 -1
  316. package/lib/esm/resources/payment_methods.d.ts +3 -0
  317. package/lib/esm/resources/payment_methods.js +1 -1
  318. package/lib/esm/resources/paypal_gateways.d.ts +2 -0
  319. package/lib/esm/resources/paypal_gateways.js +1 -1
  320. package/lib/esm/resources/paypal_payments.d.ts +2 -0
  321. package/lib/esm/resources/paypal_payments.js +1 -1
  322. package/lib/esm/resources/percentage_discount_promotions.d.ts +7 -0
  323. package/lib/esm/resources/percentage_discount_promotions.js +1 -1
  324. package/lib/esm/resources/price_lists.d.ts +2 -0
  325. package/lib/esm/resources/price_lists.js +1 -1
  326. package/lib/esm/resources/prices.d.ts +3 -0
  327. package/lib/esm/resources/prices.js +1 -1
  328. package/lib/esm/resources/promotions.d.ts +5 -0
  329. package/lib/esm/resources/promotions.js +1 -1
  330. package/lib/esm/resources/refunds.d.ts +2 -0
  331. package/lib/esm/resources/refunds.js +1 -1
  332. package/lib/esm/resources/return_line_items.d.ts +2 -0
  333. package/lib/esm/resources/return_line_items.js +1 -1
  334. package/lib/esm/resources/returns.d.ts +7 -0
  335. package/lib/esm/resources/returns.js +1 -1
  336. package/lib/esm/resources/shipments.d.ts +13 -0
  337. package/lib/esm/resources/shipments.js +1 -1
  338. package/lib/esm/resources/shipping_categories.d.ts +2 -0
  339. package/lib/esm/resources/shipping_categories.js +1 -1
  340. package/lib/esm/resources/shipping_methods.d.ts +5 -0
  341. package/lib/esm/resources/shipping_methods.js +1 -1
  342. package/lib/esm/resources/shipping_zones.d.ts +1 -0
  343. package/lib/esm/resources/shipping_zones.js +1 -1
  344. package/lib/esm/resources/sku_list_items.d.ts +2 -0
  345. package/lib/esm/resources/sku_list_items.js +1 -1
  346. package/lib/esm/resources/sku_list_promotion_rules.d.ts +2 -0
  347. package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
  348. package/lib/esm/resources/sku_lists.d.ts +3 -0
  349. package/lib/esm/resources/sku_lists.js +1 -1
  350. package/lib/esm/resources/sku_options.d.ts +2 -0
  351. package/lib/esm/resources/sku_options.js +1 -1
  352. package/lib/esm/resources/skus.d.ts +6 -0
  353. package/lib/esm/resources/skus.js +1 -1
  354. package/lib/esm/resources/stock_items.d.ts +3 -0
  355. package/lib/esm/resources/stock_items.js +1 -1
  356. package/lib/esm/resources/stock_line_items.d.ts +3 -0
  357. package/lib/esm/resources/stock_line_items.js +1 -1
  358. package/lib/esm/resources/stock_locations.d.ts +6 -0
  359. package/lib/esm/resources/stock_locations.js +1 -1
  360. package/lib/esm/resources/stock_transfers.d.ts +5 -0
  361. package/lib/esm/resources/stock_transfers.js +1 -1
  362. package/lib/esm/resources/stripe_gateways.d.ts +2 -0
  363. package/lib/esm/resources/stripe_gateways.js +1 -1
  364. package/lib/esm/resources/stripe_payments.d.ts +2 -0
  365. package/lib/esm/resources/stripe_payments.js +1 -1
  366. package/lib/esm/resources/tax_calculators.d.ts +3 -0
  367. package/lib/esm/resources/tax_calculators.js +1 -1
  368. package/lib/esm/resources/tax_categories.d.ts +2 -0
  369. package/lib/esm/resources/tax_categories.js +1 -1
  370. package/lib/esm/resources/tax_rules.d.ts +1 -0
  371. package/lib/esm/resources/tax_rules.js +1 -1
  372. package/lib/esm/resources/taxjar_accounts.d.ts +3 -0
  373. package/lib/esm/resources/taxjar_accounts.js +1 -1
  374. package/lib/esm/resources/transactions.d.ts +1 -0
  375. package/lib/esm/resources/transactions.js +1 -1
  376. package/lib/esm/resources/voids.d.ts +2 -0
  377. package/lib/esm/resources/voids.js +1 -1
  378. package/lib/esm/resources/webhooks.d.ts +1 -0
  379. package/lib/esm/resources/webhooks.js +1 -1
  380. package/lib/esm/resources/wire_transfers.d.ts +1 -0
  381. package/lib/esm/resources/wire_transfers.js +1 -1
  382. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  383. package/lib/tsconfig.tsbuildinfo +1 -1
  384. package/package.json +8 -8
@@ -68,6 +68,19 @@ declare class Shipments extends ApiResource {
68
68
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Shipment>>;
69
69
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
70
70
  update(resource: ShipmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
71
+ order(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
72
+ shipping_category(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
73
+ stock_location(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
74
+ origin_address(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
75
+ shipping_address(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
76
+ shipping_method(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
77
+ delivery_lead_time(shipmentId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
78
+ stock_line_items(shipmentId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
79
+ stock_transfers(shipmentId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
80
+ available_shipping_methods(shipmentId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>>;
81
+ carrier_accounts(shipmentId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>>;
82
+ parcels(shipmentId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
83
+ attachments(shipmentId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
71
84
  isShipment(resource: any): resource is Shipment;
72
85
  relationship(id: string | ResourceId | null): ShipmentRel;
73
86
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Shipments extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:Shipments.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:Shipments.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Shipments.TYPE}),r,t)}isShipment(e){return e.type&&e.type===Shipments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Shipments.TYPE}:{id:e.id,type:Shipments.TYPE}}type(){return Shipments.TYPE}}Shipments.TYPE="shipments",exports.default=Shipments;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Shipments extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:Shipments.TYPE},e,s)}async retrieve(e,s,t){return this.resources.retrieve({type:Shipments.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Shipments.TYPE}),s,t)}async order(e,s,t){return this.resources.fetch({type:"orders"},`shipments/${e}/order`,s,t)}async shipping_category(e,s,t){return this.resources.fetch({type:"shipping_categories"},`shipments/${e}/shipping_category`,s,t)}async stock_location(e,s,t){return this.resources.fetch({type:"stock_locations"},`shipments/${e}/stock_location`,s,t)}async origin_address(e,s,t){return this.resources.fetch({type:"addresses"},`shipments/${e}/origin_address`,s,t)}async shipping_address(e,s,t){return this.resources.fetch({type:"addresses"},`shipments/${e}/shipping_address`,s,t)}async shipping_method(e,s,t){return this.resources.fetch({type:"shipping_methods"},`shipments/${e}/shipping_method`,s,t)}async delivery_lead_time(e,s,t){return this.resources.fetch({type:"delivery_lead_times"},`shipments/${e}/delivery_lead_time`,s,t)}async stock_line_items(e,s,t){return this.resources.fetch({type:"stock_line_items"},`shipments/${e}/stock_line_items`,s,t)}async stock_transfers(e,s,t){return this.resources.fetch({type:"stock_transfers"},`shipments/${e}/stock_transfers`,s,t)}async available_shipping_methods(e,s,t){return this.resources.fetch({type:"shipping_methods"},`shipments/${e}/available_shipping_methods`,s,t)}async carrier_accounts(e,s,t){return this.resources.fetch({type:"carrier_accounts"},`shipments/${e}/carrier_accounts`,s,t)}async parcels(e,s,t){return this.resources.fetch({type:"parcels"},`shipments/${e}/parcels`,s,t)}async attachments(e,s,t){return this.resources.fetch({type:"attachments"},`shipments/${e}/attachments`,s,t)}isShipment(e){return e.type&&e.type===Shipments.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Shipments.TYPE}:{id:e.id,type:Shipments.TYPE}}type(){return Shipments.TYPE}}Shipments.TYPE="shipments",exports.default=Shipments;
@@ -23,6 +23,8 @@ declare class ShippingCategories extends ApiResource {
23
23
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
24
24
  update(resource: ShippingCategoryUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
25
25
  delete(id: string, options?: ResourcesConfig): Promise<void>;
26
+ skus(shippingCategoryId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
27
+ attachments(shippingCategoryId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
26
28
  isShippingCategory(resource: any): resource is ShippingCategory;
27
29
  relationship(id: string | ResourceId | null): ShippingCategoryRel;
28
30
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingCategories extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingCategories.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingCategories.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:ShippingCategories.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingCategories.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:ShippingCategories.TYPE,id:e},t)}isShippingCategory(e){return e.type&&e.type===ShippingCategories.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ShippingCategories.TYPE}:{id:e.id,type:ShippingCategories.TYPE}}type(){return ShippingCategories.TYPE}}ShippingCategories.TYPE="shipping_categories",exports.default=ShippingCategories;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingCategories extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingCategories.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingCategories.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:ShippingCategories.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingCategories.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:ShippingCategories.TYPE,id:e},t)}async skus(e,t,s){return this.resources.fetch({type:"skus"},`shipping_categories/${e}/skus`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`shipping_categories/${e}/attachments`,t,s)}isShippingCategory(e){return e.type&&e.type===ShippingCategories.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ShippingCategories.TYPE}:{id:e.id,type:ShippingCategories.TYPE}}type(){return ShippingCategories.TYPE}}ShippingCategories.TYPE="shipping_categories",exports.default=ShippingCategories;
@@ -61,6 +61,11 @@ declare class ShippingMethods extends ApiResource {
61
61
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
62
62
  update(resource: ShippingMethodUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
63
63
  delete(id: string, options?: ResourcesConfig): Promise<void>;
64
+ market(shippingMethodId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
65
+ shipping_zone(shippingMethodId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
66
+ shipping_category(shippingMethodId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
67
+ delivery_lead_time_for_shipment(shippingMethodId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
68
+ attachments(shippingMethodId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
64
69
  isShippingMethod(resource: any): resource is ShippingMethod;
65
70
  relationship(id: string | ResourceId | null): ShippingMethodRel;
66
71
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingMethods extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:ShippingMethods.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:ShippingMethods.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:ShippingMethods.TYPE,id:e},r)}isShippingMethod(e){return e.type&&e.type===ShippingMethods.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ShippingMethods.TYPE}:{id:e.id,type:ShippingMethods.TYPE}}type(){return ShippingMethods.TYPE}}ShippingMethods.TYPE="shipping_methods",exports.default=ShippingMethods;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingMethods extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingMethods.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:ShippingMethods.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:ShippingMethods.TYPE,id:e},t)}async market(e,t,s){return this.resources.fetch({type:"markets"},`shipping_methods/${e}/market`,t,s)}async shipping_zone(e,t,s){return this.resources.fetch({type:"shipping_zones"},`shipping_methods/${e}/shipping_zone`,t,s)}async shipping_category(e,t,s){return this.resources.fetch({type:"shipping_categories"},`shipping_methods/${e}/shipping_category`,t,s)}async delivery_lead_time_for_shipment(e,t,s){return this.resources.fetch({type:"delivery_lead_times"},`shipping_methods/${e}/delivery_lead_time_for_shipment`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`shipping_methods/${e}/attachments`,t,s)}isShippingMethod(e){return e.type&&e.type===ShippingMethods.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ShippingMethods.TYPE}:{id:e.id,type:ShippingMethods.TYPE}}type(){return ShippingMethods.TYPE}}ShippingMethods.TYPE="shipping_methods",exports.default=ShippingMethods;
@@ -39,6 +39,7 @@ declare class ShippingZones extends ApiResource {
39
39
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
40
40
  update(resource: ShippingZoneUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
41
41
  delete(id: string, options?: ResourcesConfig): Promise<void>;
42
+ attachments(shippingZoneId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
42
43
  isShippingZone(resource: any): resource is ShippingZone;
43
44
  relationship(id: string | ResourceId | null): ShippingZoneRel;
44
45
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingZones extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingZones.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingZones.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:ShippingZones.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingZones.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:ShippingZones.TYPE,id:e},t)}isShippingZone(e){return e.type&&e.type===ShippingZones.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ShippingZones.TYPE}:{id:e.id,type:ShippingZones.TYPE}}type(){return ShippingZones.TYPE}}ShippingZones.TYPE="shipping_zones",exports.default=ShippingZones;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingZones extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingZones.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingZones.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:ShippingZones.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingZones.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:ShippingZones.TYPE,id:e},t)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`shipping_zones/${e}/attachments`,t,r)}isShippingZone(e){return e.type&&e.type===ShippingZones.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:ShippingZones.TYPE}:{id:e.id,type:ShippingZones.TYPE}}type(){return ShippingZones.TYPE}}ShippingZones.TYPE="shipping_zones",exports.default=ShippingZones;
@@ -37,6 +37,8 @@ declare class SkuListItems extends ApiResource {
37
37
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListItem>;
38
38
  update(resource: SkuListItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListItem>;
39
39
  delete(id: string, options?: ResourcesConfig): Promise<void>;
40
+ sku_list(skuListItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
41
+ sku(skuListItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
40
42
  isSkuListItem(resource: any): resource is SkuListItem;
41
43
  relationship(id: string | ResourceId | null): SkuListItemRel;
42
44
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuListItems extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:SkuListItems.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuListItems.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:SkuListItems.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuListItems.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:SkuListItems.TYPE,id:e},r)}isSkuListItem(e){return e.type&&e.type===SkuListItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuListItems.TYPE}:{id:e.id,type:SkuListItems.TYPE}}type(){return SkuListItems.TYPE}}SkuListItems.TYPE="sku_list_items",exports.default=SkuListItems;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuListItems extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:SkuListItems.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuListItems.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:SkuListItems.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuListItems.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:SkuListItems.TYPE,id:e},s)}async sku_list(e,s,r){return this.resources.fetch({type:"sku_lists"},`sku_list_items/${e}/sku_list`,s,r)}async sku(e,s,r){return this.resources.fetch({type:"skus"},`sku_list_items/${e}/sku`,s,r)}isSkuListItem(e){return e.type&&e.type===SkuListItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuListItems.TYPE}:{id:e.id,type:SkuListItems.TYPE}}type(){return SkuListItems.TYPE}}SkuListItems.TYPE="sku_list_items",exports.default=SkuListItems;
@@ -58,6 +58,8 @@ declare class SkuListPromotionRules extends ApiResource {
58
58
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
59
59
  update(resource: SkuListPromotionRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
60
60
  delete(id: string, options?: ResourcesConfig): Promise<void>;
61
+ sku_list(skuListPromotionRuleId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
62
+ skus(skuListPromotionRuleId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
61
63
  isSkuListPromotionRule(resource: any): resource is SkuListPromotionRule;
62
64
  relationship(id: string | ResourceId | null): SkuListPromotionRuleRel;
63
65
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuListPromotionRules extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:SkuListPromotionRules.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuListPromotionRules.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:SkuListPromotionRules.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuListPromotionRules.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:SkuListPromotionRules.TYPE,id:e},r)}isSkuListPromotionRule(e){return e.type&&e.type===SkuListPromotionRules.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuListPromotionRules.TYPE}:{id:e.id,type:SkuListPromotionRules.TYPE}}type(){return SkuListPromotionRules.TYPE}}SkuListPromotionRules.TYPE="sku_list_promotion_rules",exports.default=SkuListPromotionRules;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuListPromotionRules extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:SkuListPromotionRules.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuListPromotionRules.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:SkuListPromotionRules.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuListPromotionRules.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:SkuListPromotionRules.TYPE,id:e},s)}async sku_list(e,s,t){return this.resources.fetch({type:"sku_lists"},`sku_list_promotion_rules/${e}/sku_list`,s,t)}async skus(e,s,t){return this.resources.fetch({type:"skus"},`sku_list_promotion_rules/${e}/skus`,s,t)}isSkuListPromotionRule(e){return e.type&&e.type===SkuListPromotionRules.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuListPromotionRules.TYPE}:{id:e.id,type:SkuListPromotionRules.TYPE}}type(){return SkuListPromotionRules.TYPE}}SkuListPromotionRules.TYPE="sku_list_promotion_rules",exports.default=SkuListPromotionRules;
@@ -38,6 +38,9 @@ declare class SkuLists extends ApiResource {
38
38
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
39
39
  update(resource: SkuListUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
40
40
  delete(id: string, options?: ResourcesConfig): Promise<void>;
41
+ skus(skuListId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
42
+ sku_list_items(skuListId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuListItem>>;
43
+ bundles(skuListId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Bundle>>;
41
44
  isSkuList(resource: any): resource is SkuList;
42
45
  relationship(id: string | ResourceId | null): SkuListRel;
43
46
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuLists extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:SkuLists.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:SkuLists.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:SkuLists.TYPE,id:e},r)}isSkuList(e){return e.type&&e.type===SkuLists.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuLists.TYPE}:{id:e.id,type:SkuLists.TYPE}}type(){return SkuLists.TYPE}}SkuLists.TYPE="sku_lists",exports.default=SkuLists;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuLists extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:SkuLists.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:SkuLists.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:SkuLists.TYPE,id:e},s)}async skus(e,s,t){return this.resources.fetch({type:"skus"},`sku_lists/${e}/skus`,s,t)}async sku_list_items(e,s,t){return this.resources.fetch({type:"sku_list_items"},`sku_lists/${e}/sku_list_items`,s,t)}async bundles(e,s,t){return this.resources.fetch({type:"bundles"},`sku_lists/${e}/bundles`,s,t)}isSkuList(e){return e.type&&e.type===SkuLists.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuLists.TYPE}:{id:e.id,type:SkuLists.TYPE}}type(){return SkuLists.TYPE}}SkuLists.TYPE="sku_lists",exports.default=SkuLists;
@@ -46,6 +46,8 @@ declare class SkuOptions extends ApiResource {
46
46
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuOption>;
47
47
  update(resource: SkuOptionUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuOption>;
48
48
  delete(id: string, options?: ResourcesConfig): Promise<void>;
49
+ market(skuOptionId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
50
+ attachments(skuOptionId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
49
51
  isSkuOption(resource: any): resource is SkuOption;
50
52
  relationship(id: string | ResourceId | null): SkuOptionRel;
51
53
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuOptions extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:SkuOptions.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:SkuOptions.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:SkuOptions.TYPE,id:e},r)}isSkuOption(e){return e.type&&e.type===SkuOptions.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuOptions.TYPE}:{id:e.id,type:SkuOptions.TYPE}}type(){return SkuOptions.TYPE}}SkuOptions.TYPE="sku_options",exports.default=SkuOptions;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuOptions extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:SkuOptions.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:SkuOptions.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:SkuOptions.TYPE,id:e},t)}async market(e,t,r){return this.resources.fetch({type:"markets"},`sku_options/${e}/market`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`sku_options/${e}/attachments`,t,r)}isSkuOption(e){return e.type&&e.type===SkuOptions.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:SkuOptions.TYPE}:{id:e.id,type:SkuOptions.TYPE}}type(){return SkuOptions.TYPE}}SkuOptions.TYPE="sku_options",exports.default=SkuOptions;
@@ -64,6 +64,12 @@ declare class Skus extends ApiResource {
64
64
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
65
65
  update(resource: SkuUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
66
66
  delete(id: string, options?: ResourcesConfig): Promise<void>;
67
+ shipping_category(skuId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
68
+ prices(skuId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Price>>;
69
+ stock_items(skuId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockItem>>;
70
+ delivery_lead_times(skuId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<DeliveryLeadTime>>;
71
+ sku_options(skuId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuOption>>;
72
+ attachments(skuId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
67
73
  isSku(resource: any): resource is Sku;
68
74
  relationship(id: string | ResourceId | null): SkuRel;
69
75
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Skus extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Skus.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Skus.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Skus.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Skus.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:Skus.TYPE,id:e},t)}isSku(e){return e.type&&e.type===Skus.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Skus.TYPE}:{id:e.id,type:Skus.TYPE}}type(){return Skus.TYPE}}Skus.TYPE="skus",exports.default=Skus;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Skus extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:Skus.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:Skus.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:Skus.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Skus.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:Skus.TYPE,id:e},s)}async shipping_category(e,s,t){return this.resources.fetch({type:"shipping_categories"},`skus/${e}/shipping_category`,s,t)}async prices(e,s,t){return this.resources.fetch({type:"prices"},`skus/${e}/prices`,s,t)}async stock_items(e,s,t){return this.resources.fetch({type:"stock_items"},`skus/${e}/stock_items`,s,t)}async delivery_lead_times(e,s,t){return this.resources.fetch({type:"delivery_lead_times"},`skus/${e}/delivery_lead_times`,s,t)}async sku_options(e,s,t){return this.resources.fetch({type:"sku_options"},`skus/${e}/sku_options`,s,t)}async attachments(e,s,t){return this.resources.fetch({type:"attachments"},`skus/${e}/attachments`,s,t)}isSku(e){return e.type&&e.type===Skus.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:Skus.TYPE}:{id:e.id,type:Skus.TYPE}}type(){return Skus.TYPE}}Skus.TYPE="skus",exports.default=Skus;
@@ -38,6 +38,9 @@ declare class StockItems extends ApiResource {
38
38
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
39
39
  update(resource: StockItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
40
40
  delete(id: string, options?: ResourcesConfig): Promise<void>;
41
+ stock_location(stockItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
42
+ sku(stockItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
43
+ attachments(stockItemId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
41
44
  isStockItem(resource: any): resource is StockItem;
42
45
  relationship(id: string | ResourceId | null): StockItemRel;
43
46
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockItems extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:StockItems.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockItems.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:StockItems.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockItems.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:StockItems.TYPE,id:e},r)}isStockItem(e){return e.type&&e.type===StockItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StockItems.TYPE}:{id:e.id,type:StockItems.TYPE}}type(){return StockItems.TYPE}}StockItems.TYPE="stock_items",exports.default=StockItems;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockItems extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockItems.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockItems.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:StockItems.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockItems.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:StockItems.TYPE,id:e},t)}async stock_location(e,t,s){return this.resources.fetch({type:"stock_locations"},`stock_items/${e}/stock_location`,t,s)}async sku(e,t,s){return this.resources.fetch({type:"skus"},`stock_items/${e}/sku`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`stock_items/${e}/attachments`,t,s)}isStockItem(e){return e.type&&e.type===StockItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StockItems.TYPE}:{id:e.id,type:StockItems.TYPE}}type(){return StockItems.TYPE}}StockItems.TYPE="stock_items",exports.default=StockItems;
@@ -18,6 +18,9 @@ declare class StockLineItems extends ApiResource {
18
18
  static readonly TYPE: 'stock_line_items';
19
19
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
20
20
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLineItem>;
21
+ shipment(stockLineItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
22
+ line_item(stockLineItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
23
+ stock_item(stockLineItemId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
21
24
  isStockLineItem(resource: any): resource is StockLineItem;
22
25
  relationship(id: string | ResourceId | null): StockLineItemRel;
23
26
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockLineItems extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:StockLineItems.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:StockLineItems.TYPE,id:e},r,t)}isStockLineItem(e){return e.type&&e.type===StockLineItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StockLineItems.TYPE}:{id:e.id,type:StockLineItems.TYPE}}type(){return StockLineItems.TYPE}}StockLineItems.TYPE="stock_line_items",exports.default=StockLineItems;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockLineItems extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockLineItems.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:StockLineItems.TYPE,id:e},t,s)}async shipment(e,t,s){return this.resources.fetch({type:"shipments"},`stock_line_items/${e}/shipment`,t,s)}async line_item(e,t,s){return this.resources.fetch({type:"line_items"},`stock_line_items/${e}/line_item`,t,s)}async stock_item(e,t,s){return this.resources.fetch({type:"stock_items"},`stock_line_items/${e}/stock_item`,t,s)}isStockLineItem(e){return e.type&&e.type===StockLineItems.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StockLineItems.TYPE}:{id:e.id,type:StockLineItems.TYPE}}type(){return StockLineItems.TYPE}}StockLineItems.TYPE="stock_line_items",exports.default=StockLineItems;
@@ -43,6 +43,12 @@ declare class StockLocations extends ApiResource {
43
43
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
44
44
  update(resource: StockLocationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
45
45
  delete(id: string, options?: ResourcesConfig): Promise<void>;
46
+ address(stockLocationId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
47
+ inventory_stock_locations(stockLocationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryStockLocation>>;
48
+ inventory_return_locations(stockLocationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<InventoryReturnLocation>>;
49
+ stock_items(stockLocationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockItem>>;
50
+ stock_transfers(stockLocationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
51
+ attachments(stockLocationId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
46
52
  isStockLocation(resource: any): resource is StockLocation;
47
53
  relationship(id: string | ResourceId | null): StockLocationRel;
48
54
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockLocations extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:StockLocations.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockLocations.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:StockLocations.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockLocations.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:StockLocations.TYPE,id:e},r)}isStockLocation(e){return e.type&&e.type===StockLocations.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StockLocations.TYPE}:{id:e.id,type:StockLocations.TYPE}}type(){return StockLocations.TYPE}}StockLocations.TYPE="stock_locations",exports.default=StockLocations;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockLocations extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockLocations.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockLocations.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:StockLocations.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockLocations.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:StockLocations.TYPE,id:e},t)}async address(e,t,s){return this.resources.fetch({type:"addresses"},`stock_locations/${e}/address`,t,s)}async inventory_stock_locations(e,t,s){return this.resources.fetch({type:"inventory_stock_locations"},`stock_locations/${e}/inventory_stock_locations`,t,s)}async inventory_return_locations(e,t,s){return this.resources.fetch({type:"inventory_return_locations"},`stock_locations/${e}/inventory_return_locations`,t,s)}async stock_items(e,t,s){return this.resources.fetch({type:"stock_items"},`stock_locations/${e}/stock_items`,t,s)}async stock_transfers(e,t,s){return this.resources.fetch({type:"stock_transfers"},`stock_locations/${e}/stock_transfers`,t,s)}async attachments(e,t,s){return this.resources.fetch({type:"attachments"},`stock_locations/${e}/attachments`,t,s)}isStockLocation(e){return e.type&&e.type===StockLocations.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StockLocations.TYPE}:{id:e.id,type:StockLocations.TYPE}}type(){return StockLocations.TYPE}}StockLocations.TYPE="stock_locations",exports.default=StockLocations;
@@ -58,6 +58,11 @@ declare class StockTransfers extends ApiResource {
58
58
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
59
59
  update(resource: StockTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockTransfer>;
60
60
  delete(id: string, options?: ResourcesConfig): Promise<void>;
61
+ sku(stockTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
62
+ origin_stock_location(stockTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
63
+ destination_stock_location(stockTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
64
+ shipment(stockTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
65
+ line_item(stockTransferId: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
61
66
  isStockTransfer(resource: any): resource is StockTransfer;
62
67
  relationship(id: string | ResourceId | null): StockTransferRel;
63
68
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockTransfers extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockTransfers.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockTransfers.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:StockTransfers.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockTransfers.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:StockTransfers.TYPE,id:e},t)}isStockTransfer(e){return e.type&&e.type===StockTransfers.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StockTransfers.TYPE}:{id:e.id,type:StockTransfers.TYPE}}type(){return StockTransfers.TYPE}}StockTransfers.TYPE="stock_transfers",exports.default=StockTransfers;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StockTransfers extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StockTransfers.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StockTransfers.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:StockTransfers.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StockTransfers.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:StockTransfers.TYPE,id:e},t)}async sku(e,t,s){return this.resources.fetch({type:"skus"},`stock_transfers/${e}/sku`,t,s)}async origin_stock_location(e,t,s){return this.resources.fetch({type:"stock_locations"},`stock_transfers/${e}/origin_stock_location`,t,s)}async destination_stock_location(e,t,s){return this.resources.fetch({type:"stock_locations"},`stock_transfers/${e}/destination_stock_location`,t,s)}async shipment(e,t,s){return this.resources.fetch({type:"shipments"},`stock_transfers/${e}/shipment`,t,s)}async line_item(e,t,s){return this.resources.fetch({type:"line_items"},`stock_transfers/${e}/line_item`,t,s)}isStockTransfer(e){return e.type&&e.type===StockTransfers.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StockTransfers.TYPE}:{id:e.id,type:StockTransfers.TYPE}}type(){return StockTransfers.TYPE}}StockTransfers.TYPE="stock_transfers",exports.default=StockTransfers;
@@ -28,6 +28,8 @@ declare class StripeGateways extends ApiResource {
28
28
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripeGateway>;
29
29
  update(resource: StripeGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StripeGateway>;
30
30
  delete(id: string, options?: ResourcesConfig): Promise<void>;
31
+ payment_methods(stripeGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
32
+ stripe_payments(stripeGatewayId: string, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StripePayment>>;
31
33
  isStripeGateway(resource: any): resource is StripeGateway;
32
34
  relationship(id: string | ResourceId | null): StripeGatewayRel;
33
35
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripeGateways extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:StripeGateways.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:StripeGateways.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:StripeGateways.TYPE,id:e},s)}isStripeGateway(e){return e.type&&e.type===StripeGateways.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StripeGateways.TYPE}:{id:e.id,type:StripeGateways.TYPE}}type(){return StripeGateways.TYPE}}StripeGateways.TYPE="stripe_gateways",exports.default=StripeGateways;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripeGateways extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:StripeGateways.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:StripeGateways.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:StripeGateways.TYPE,id:e},t)}async payment_methods(e,t,s){return this.resources.fetch({type:"payment_methods"},`stripe_gateways/${e}/payment_methods`,t,s)}async stripe_payments(e,t,s){return this.resources.fetch({type:"stripe_payments"},`stripe_gateways/${e}/stripe_payments`,t,s)}isStripeGateway(e){return e.type&&e.type===StripeGateways.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:StripeGateways.TYPE}:{id:e.id,type:StripeGateways.TYPE}}type(){return StripeGateways.TYPE}}StripeGateways.TYPE="stripe_gateways",exports.default=StripeGateways;
@@ -32,6 +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
37
  isStripePayment(resource: any): resource is StripePayment;
36
38
  relationship(id: string | ResourceId | null): StripePaymentRel;
37
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,s){return this.resources.list({type:StripePayments.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:StripePayments.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:StripePayments.TYPE,id:e},s)}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,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;
@@ -16,6 +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
22
  isTaxCalculator(resource: any): resource is TaxCalculator;
20
23
  relationship(id: string | ResourceId | null): TaxCalculatorRel;
21
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,r){return this.resources.list({type:TaxCalculators.TYPE},e,r)}async retrieve(e,r,t){return this.resources.retrieve({type:TaxCalculators.TYPE,id:e},r,t)}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){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;
@@ -49,6 +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
54
  isTaxCategory(resource: any): resource is TaxCategory;
53
55
  relationship(id: string | ResourceId | null): TaxCategoryRel;
54
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,r){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxCategories.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxCategories.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxCategories.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:TaxCategories.TYPE,id:e},t)}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){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;
@@ -60,6 +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
64
  isTaxRule(resource: any): resource is TaxRule;
64
65
  relationship(id: string | ResourceId | null): TaxRuleRel;
65
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)}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){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;
@@ -32,6 +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
38
  isTaxjarAccount(resource: any): resource is TaxjarAccount;
36
39
  relationship(id: string | ResourceId | null): TaxjarAccountRel;
37
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,r){return this.resources.create(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxjarAccounts.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:TaxjarAccounts.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:TaxjarAccounts.TYPE,id:e},t)}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){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;
@@ -22,6 +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
26
  isTransaction(resource: any): resource is Transaction;
26
27
  relationship(id: string | ResourceId | null): TransactionRel;
27
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)}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){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;
@@ -24,6 +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
29
  isVoid(resource: any): resource is Void;
28
30
  relationship(id: string | ResourceId | null): VoidRel;
29
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)}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){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;
@@ -33,6 +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
37
  isWebhook(resource: any): resource is Webhook;
37
38
  relationship(id: string | ResourceId | null): WebhookRel;
38
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)}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,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;
@@ -23,6 +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
27
  isWireTransfer(resource: any): resource is WireTransfer;
27
28
  relationship(id: string | ResourceId | null): WireTransferRel;
28
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,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)}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,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;
package/lib/esm/client.js CHANGED
@@ -1 +1 @@
1
- var d=this&&this.__classPrivateFieldSet||function(r,e,t,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(r,t):a?a.value=t:e.set(r,t),t},n=this&&this.__classPrivateFieldGet||function(r,e,t,s){if(t==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!s:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?s:t==="a"?s.call(r):s?s.value:e.get(r)},o,i;import u from"axios";import{SdkError as T,ApiError as b,ErrorType as c}from"./error";import l from"./config";import z from"./debug";const p=z(),f=(r,e)=>`https://${r.toLowerCase()}.${e||l.default.domain}/api`,C=r=>{let e=new T({message:r.message,type:c.GENERIC});if(u.isAxiosError(r))if(r.response){const t=new b(e);t.type=c.RESPONSE,t.status=r.response.status,t.code=String(t.status),t.errors=r.response.data.errors,e=t}else r.request?(e.type=c.REQUEST,e.request=r.request):e.type=c.CLIENT;else u.isCancel(r)?e.type=c.CANCEL:e.source=r;throw e};class m{constructor(e){o.set(this,void 0),i.set(this,void 0),p("new client instance %O",e),this.baseUrl=f(e.organization,e.domain),d(this,o,e.accessToken,"f");const t={timeout:e.timeout||l.client.timeout,proxy:e.proxy,httpAgent:e.httpAgent,httpsAgent:e.httpsAgent},s=Object.assign({baseURL:this.baseUrl,timeout:l.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+n(this,o,"f")}},t);p("axios options: %O",s),d(this,i,u.create(s),"f"),this.interceptors=n(this,i,"f").interceptors}static create(e){if(!(e==null?void 0:e.organization))throw new Error("Undefined 'organization' parameter");if(!(e==null?void 0:e.accessToken))throw new Error("Undefined 'accessToken' parameter");return new m(e)}config(e){p("config %o",e);const t=n(this,i,"f").defaults;e.timeout&&(t.timeout=e.timeout),e.proxy&&(t.proxy=e.proxy),e.httpAgent&&(t.httpAgent=e.httpAgent),e.httpsAgent&&(t.httpsAgent=e.httpsAgent),e.organization&&(this.baseUrl=f(e.organization,e.domain)),e.accessToken&&(d(this,o,e.accessToken,"f"),t.headers.common.Authorization="Bearer "+n(this,o,"f"))}async request(e,t,s,a){p("request %s %s, %O, %O",e,t,s||{},a||{});const v=s?{data:s}:void 0,y=t,E=(a==null?void 0:a.organization)?f(a.organization,a.domain):void 0,w=(a==null?void 0:a.accessToken)||n(this,o,"f"),A=w?{Authorization:"Bearer "+w}:void 0,g=Object.assign({method:e,baseURL:E,url:y,data:v,headers:A},a);return p("request params: %O",g),n(this,i,"f").request(g).then(h=>h.data).catch(h=>C(h))}}o=new WeakMap,i=new WeakMap;export default m;
1
+ var d=this&&this.__classPrivateFieldSet||function(r,e,t,s,a){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?a.call(r,t):a?a.value=t:e.set(r,t),t},n=this&&this.__classPrivateFieldGet||function(r,e,t,s){if(t==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!s:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?s:t==="a"?s.call(r):s?s.value:e.get(r)},o,i;import u from"axios";import{SdkError as T,ApiError as b,ErrorType as c}from"./error";import l from"./config";import z from"./debug";const p=z("client"),f=(r,e)=>`https://${r.toLowerCase()}.${e||l.default.domain}/api`,C=r=>{let e=new T({message:r.message,type:c.GENERIC});if(u.isAxiosError(r))if(r.response){const t=new b(e);t.type=c.RESPONSE,t.status=r.response.status,t.code=String(t.status),t.errors=r.response.data.errors,e=t}else r.request?(e.type=c.REQUEST,e.request=r.request):e.type=c.CLIENT;else u.isCancel(r)?e.type=c.CANCEL:e.source=r;throw e};class m{constructor(e){o.set(this,void 0),i.set(this,void 0),p("new client instance %O",e),this.baseUrl=f(e.organization,e.domain),d(this,o,e.accessToken,"f");const t={timeout:e.timeout||l.client.timeout,proxy:e.proxy,httpAgent:e.httpAgent,httpsAgent:e.httpsAgent},s=Object.assign({baseURL:this.baseUrl,timeout:l.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+n(this,o,"f")}},t);p("axios options: %O",s),d(this,i,u.create(s),"f"),this.interceptors=n(this,i,"f").interceptors}static create(e){if(!(e==null?void 0:e.organization))throw new Error("Undefined 'organization' parameter");if(!(e==null?void 0:e.accessToken))throw new Error("Undefined 'accessToken' parameter");return new m(e)}config(e){p("config %o",e);const t=n(this,i,"f").defaults;e.timeout&&(t.timeout=e.timeout),e.proxy&&(t.proxy=e.proxy),e.httpAgent&&(t.httpAgent=e.httpAgent),e.httpsAgent&&(t.httpsAgent=e.httpsAgent),e.organization&&(this.baseUrl=f(e.organization,e.domain)),e.accessToken&&(d(this,o,e.accessToken,"f"),t.headers.common.Authorization="Bearer "+n(this,o,"f"))}async request(e,t,s,a){p("request %s %s, %O, %O",e,t,s||{},a||{});const v=s?{data:s}:void 0,y=t,E=(a==null?void 0:a.organization)?f(a.organization,a.domain):void 0,w=(a==null?void 0:a.accessToken)||n(this,o,"f"),A=w?{Authorization:"Bearer "+w}:void 0,g=Object.assign({method:e,baseURL:E,url:y,data:v,headers:A},a);return p("request params: %O",g),n(this,i,"f").request(g).then(h=>h.data).catch(h=>C(h))}}o=new WeakMap,i=new WeakMap;export default m;
@@ -1,10 +1,10 @@
1
1
  import * as api from './api';
2
2
  import { ApiError } from './error';
3
3
  import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
4
- import { ResourcesConfig, ResourcesInitConfig } from './resource';
4
+ import { ResourcesInitConfig } from './resource';
5
5
  declare type SdkConfig = {};
6
6
  declare type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
7
- declare type CommerceLayerConfig = SdkConfig & ResourcesConfig;
7
+ declare type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
8
8
  declare class CommerceLayerClient {
9
9
  #private;
10
10
  static get openApiSchemaVersion(): string;
@@ -1 +1 @@
1
- var c=this&&this.__classPrivateFieldSet||function(o,i,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?o!==i||!a:!i.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(o,n):a?a.value=n:i.set(o,n),n},s=this&&this.__classPrivateFieldGet||function(o,i,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?o!==i||!r:!i.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(o):r?r.value:i.get(o)},t,h;import*as e from"./api";import{CommerceLayerStatic as f}from"./static";import p from"./resource";import u from"./debug";const w=u(),m="2.8.1";class l{constructor(i){t.set(this,void 0),h.set(this,void 0),w("new commercelayer instance %O",i),c(this,t,new p(i),"f"),c(this,h,i.organization,"f"),this.addresses=new e.Addresses(s(this,t,"f")),this.adjustments=new e.Adjustments(s(this,t,"f")),this.adyen_gateways=new e.AdyenGateways(s(this,t,"f")),this.adyen_payments=new e.AdyenPayments(s(this,t,"f")),this.application=new e.Applications(s(this,t,"f")),this.attachments=new e.Attachments(s(this,t,"f")),this.authorizations=new e.Authorizations(s(this,t,"f")),this.avalara_accounts=new e.AvalaraAccounts(s(this,t,"f")),this.billing_info_validation_rules=new e.BillingInfoValidationRules(s(this,t,"f")),this.bing_geocoders=new e.BingGeocoders(s(this,t,"f")),this.braintree_gateways=new e.BraintreeGateways(s(this,t,"f")),this.braintree_payments=new e.BraintreePayments(s(this,t,"f")),this.bundles=new e.Bundles(s(this,t,"f")),this.captures=new e.Captures(s(this,t,"f")),this.carrier_accounts=new e.CarrierAccounts(s(this,t,"f")),this.checkout_com_gateways=new e.CheckoutComGateways(s(this,t,"f")),this.checkout_com_payments=new e.CheckoutComPayments(s(this,t,"f")),this.coupon_codes_promotion_rules=new e.CouponCodesPromotionRules(s(this,t,"f")),this.coupon_recipients=new e.CouponRecipients(s(this,t,"f")),this.coupons=new e.Coupons(s(this,t,"f")),this.customer_addresses=new e.CustomerAddresses(s(this,t,"f")),this.customer_groups=new e.CustomerGroups(s(this,t,"f")),this.customer_password_resets=new e.CustomerPasswordResets(s(this,t,"f")),this.customer_payment_sources=new e.CustomerPaymentSources(s(this,t,"f")),this.customer_subscriptions=new e.CustomerSubscriptions(s(this,t,"f")),this.customers=new e.Customers(s(this,t,"f")),this.delivery_lead_times=new e.DeliveryLeadTimes(s(this,t,"f")),this.event_callbacks=new e.EventCallbacks(s(this,t,"f")),this.external_gateways=new e.ExternalGateways(s(this,t,"f")),this.external_payments=new e.ExternalPayments(s(this,t,"f")),this.external_promotions=new e.ExternalPromotions(s(this,t,"f")),this.external_tax_calculators=new e.ExternalTaxCalculators(s(this,t,"f")),this.fixed_amount_promotions=new e.FixedAmountPromotions(s(this,t,"f")),this.fixed_price_promotions=new e.FixedPricePromotions(s(this,t,"f")),this.free_gift_promotions=new e.FreeGiftPromotions(s(this,t,"f")),this.free_shipping_promotions=new e.FreeShippingPromotions(s(this,t,"f")),this.geocoders=new e.Geocoders(s(this,t,"f")),this.gift_card_recipients=new e.GiftCardRecipients(s(this,t,"f")),this.gift_cards=new e.GiftCards(s(this,t,"f")),this.google_geocoders=new e.GoogleGeocoders(s(this,t,"f")),this.imports=new e.Imports(s(this,t,"f")),this.in_stock_subscriptions=new e.InStockSubscriptions(s(this,t,"f")),this.inventory_models=new e.InventoryModels(s(this,t,"f")),this.inventory_return_locations=new e.InventoryReturnLocations(s(this,t,"f")),this.inventory_stock_locations=new e.InventoryStockLocations(s(this,t,"f")),this.klarna_gateways=new e.KlarnaGateways(s(this,t,"f")),this.klarna_payments=new e.KlarnaPayments(s(this,t,"f")),this.line_item_options=new e.LineItemOptions(s(this,t,"f")),this.line_items=new e.LineItems(s(this,t,"f")),this.manual_gateways=new e.ManualGateways(s(this,t,"f")),this.manual_tax_calculators=new e.ManualTaxCalculators(s(this,t,"f")),this.markets=new e.Markets(s(this,t,"f")),this.merchants=new e.Merchants(s(this,t,"f")),this.order_amount_promotion_rules=new e.OrderAmountPromotionRules(s(this,t,"f")),this.order_copies=new e.OrderCopies(s(this,t,"f")),this.order_subscriptions=new e.OrderSubscriptions(s(this,t,"f")),this.order_validation_rules=new e.OrderValidationRules(s(this,t,"f")),this.orders=new e.Orders(s(this,t,"f")),this.organization=new e.Organizations(s(this,t,"f")),this.packages=new e.Packages(s(this,t,"f")),this.parcel_line_items=new e.ParcelLineItems(s(this,t,"f")),this.parcels=new e.Parcels(s(this,t,"f")),this.payment_gateways=new e.PaymentGateways(s(this,t,"f")),this.payment_methods=new e.PaymentMethods(s(this,t,"f")),this.paypal_gateways=new e.PaypalGateways(s(this,t,"f")),this.paypal_payments=new e.PaypalPayments(s(this,t,"f")),this.percentage_discount_promotions=new e.PercentageDiscountPromotions(s(this,t,"f")),this.price_lists=new e.PriceLists(s(this,t,"f")),this.prices=new e.Prices(s(this,t,"f")),this.promotion_rules=new e.PromotionRules(s(this,t,"f")),this.promotions=new e.Promotions(s(this,t,"f")),this.refunds=new e.Refunds(s(this,t,"f")),this.return_line_items=new e.ReturnLineItems(s(this,t,"f")),this.returns=new e.Returns(s(this,t,"f")),this.shipments=new e.Shipments(s(this,t,"f")),this.shipping_categories=new e.ShippingCategories(s(this,t,"f")),this.shipping_methods=new e.ShippingMethods(s(this,t,"f")),this.shipping_zones=new e.ShippingZones(s(this,t,"f")),this.sku_list_items=new e.SkuListItems(s(this,t,"f")),this.sku_list_promotion_rules=new e.SkuListPromotionRules(s(this,t,"f")),this.sku_lists=new e.SkuLists(s(this,t,"f")),this.sku_options=new e.SkuOptions(s(this,t,"f")),this.skus=new e.Skus(s(this,t,"f")),this.stock_items=new e.StockItems(s(this,t,"f")),this.stock_line_items=new e.StockLineItems(s(this,t,"f")),this.stock_locations=new e.StockLocations(s(this,t,"f")),this.stock_transfers=new e.StockTransfers(s(this,t,"f")),this.stripe_gateways=new e.StripeGateways(s(this,t,"f")),this.stripe_payments=new e.StripePayments(s(this,t,"f")),this.tax_calculators=new e.TaxCalculators(s(this,t,"f")),this.tax_categories=new e.TaxCategories(s(this,t,"f")),this.tax_rules=new e.TaxRules(s(this,t,"f")),this.taxjar_accounts=new e.TaxjarAccounts(s(this,t,"f")),this.transactions=new e.Transactions(s(this,t,"f")),this.voids=new e.Voids(s(this,t,"f")),this.webhooks=new e.Webhooks(s(this,t,"f")),this.wire_transfers=new e.WireTransfers(s(this,t,"f"))}static get openApiSchemaVersion(){return m}get currentOrganization(){return s(this,h,"f")}localConfig(i){i.organization&&c(this,h,i.organization,"f")}config(i){w("config %o",i),this.localConfig(i),s(this,t,"f").config(i)}resources(){return f.resources()}isApiError(i){return f.isApiError(i)}addRequestInterceptor(i,n){return s(this,t,"f").interceptors.request.use(i,n)}addResponseInterceptor(i,n){return s(this,t,"f").interceptors.response.use(i,n)}removeInterceptor(i,n){return s(this,t,"f").interceptors[i].eject(n)}addRawResponseReader(){const i={id:void 0,rawResponse:void 0};function n(a){return i.rawResponse=a==null?void 0:a.data,a}const r=this.addResponseInterceptor(n);return i.id=r,i}removeRawResponseReader(i){const n=typeof i=="number"?i:i.id;if(n)return this.removeInterceptor("response",n)}}t=new WeakMap,h=new WeakMap;const _=o=>new l(o);export default _;
1
+ var c=this&&this.__classPrivateFieldSet||function(o,i,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?o!==i||!a:!i.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(o,n):a?a.value=n:i.set(o,n),n},s=this&&this.__classPrivateFieldGet||function(o,i,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?o!==i||!r:!i.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(o):r?r.value:i.get(o)},t,h;import*as e from"./api";import{CommerceLayerStatic as f}from"./static";import p from"./resource";import u from"./debug";const w=u("commercelayer"),m="2.8.1";class l{constructor(i){t.set(this,void 0),h.set(this,void 0),w("new commercelayer instance %O",i),c(this,t,new p(i),"f"),c(this,h,i.organization,"f"),this.addresses=new e.Addresses(s(this,t,"f")),this.adjustments=new e.Adjustments(s(this,t,"f")),this.adyen_gateways=new e.AdyenGateways(s(this,t,"f")),this.adyen_payments=new e.AdyenPayments(s(this,t,"f")),this.application=new e.Applications(s(this,t,"f")),this.attachments=new e.Attachments(s(this,t,"f")),this.authorizations=new e.Authorizations(s(this,t,"f")),this.avalara_accounts=new e.AvalaraAccounts(s(this,t,"f")),this.billing_info_validation_rules=new e.BillingInfoValidationRules(s(this,t,"f")),this.bing_geocoders=new e.BingGeocoders(s(this,t,"f")),this.braintree_gateways=new e.BraintreeGateways(s(this,t,"f")),this.braintree_payments=new e.BraintreePayments(s(this,t,"f")),this.bundles=new e.Bundles(s(this,t,"f")),this.captures=new e.Captures(s(this,t,"f")),this.carrier_accounts=new e.CarrierAccounts(s(this,t,"f")),this.checkout_com_gateways=new e.CheckoutComGateways(s(this,t,"f")),this.checkout_com_payments=new e.CheckoutComPayments(s(this,t,"f")),this.coupon_codes_promotion_rules=new e.CouponCodesPromotionRules(s(this,t,"f")),this.coupon_recipients=new e.CouponRecipients(s(this,t,"f")),this.coupons=new e.Coupons(s(this,t,"f")),this.customer_addresses=new e.CustomerAddresses(s(this,t,"f")),this.customer_groups=new e.CustomerGroups(s(this,t,"f")),this.customer_password_resets=new e.CustomerPasswordResets(s(this,t,"f")),this.customer_payment_sources=new e.CustomerPaymentSources(s(this,t,"f")),this.customer_subscriptions=new e.CustomerSubscriptions(s(this,t,"f")),this.customers=new e.Customers(s(this,t,"f")),this.delivery_lead_times=new e.DeliveryLeadTimes(s(this,t,"f")),this.event_callbacks=new e.EventCallbacks(s(this,t,"f")),this.external_gateways=new e.ExternalGateways(s(this,t,"f")),this.external_payments=new e.ExternalPayments(s(this,t,"f")),this.external_promotions=new e.ExternalPromotions(s(this,t,"f")),this.external_tax_calculators=new e.ExternalTaxCalculators(s(this,t,"f")),this.fixed_amount_promotions=new e.FixedAmountPromotions(s(this,t,"f")),this.fixed_price_promotions=new e.FixedPricePromotions(s(this,t,"f")),this.free_gift_promotions=new e.FreeGiftPromotions(s(this,t,"f")),this.free_shipping_promotions=new e.FreeShippingPromotions(s(this,t,"f")),this.geocoders=new e.Geocoders(s(this,t,"f")),this.gift_card_recipients=new e.GiftCardRecipients(s(this,t,"f")),this.gift_cards=new e.GiftCards(s(this,t,"f")),this.google_geocoders=new e.GoogleGeocoders(s(this,t,"f")),this.imports=new e.Imports(s(this,t,"f")),this.in_stock_subscriptions=new e.InStockSubscriptions(s(this,t,"f")),this.inventory_models=new e.InventoryModels(s(this,t,"f")),this.inventory_return_locations=new e.InventoryReturnLocations(s(this,t,"f")),this.inventory_stock_locations=new e.InventoryStockLocations(s(this,t,"f")),this.klarna_gateways=new e.KlarnaGateways(s(this,t,"f")),this.klarna_payments=new e.KlarnaPayments(s(this,t,"f")),this.line_item_options=new e.LineItemOptions(s(this,t,"f")),this.line_items=new e.LineItems(s(this,t,"f")),this.manual_gateways=new e.ManualGateways(s(this,t,"f")),this.manual_tax_calculators=new e.ManualTaxCalculators(s(this,t,"f")),this.markets=new e.Markets(s(this,t,"f")),this.merchants=new e.Merchants(s(this,t,"f")),this.order_amount_promotion_rules=new e.OrderAmountPromotionRules(s(this,t,"f")),this.order_copies=new e.OrderCopies(s(this,t,"f")),this.order_subscriptions=new e.OrderSubscriptions(s(this,t,"f")),this.order_validation_rules=new e.OrderValidationRules(s(this,t,"f")),this.orders=new e.Orders(s(this,t,"f")),this.organization=new e.Organizations(s(this,t,"f")),this.packages=new e.Packages(s(this,t,"f")),this.parcel_line_items=new e.ParcelLineItems(s(this,t,"f")),this.parcels=new e.Parcels(s(this,t,"f")),this.payment_gateways=new e.PaymentGateways(s(this,t,"f")),this.payment_methods=new e.PaymentMethods(s(this,t,"f")),this.paypal_gateways=new e.PaypalGateways(s(this,t,"f")),this.paypal_payments=new e.PaypalPayments(s(this,t,"f")),this.percentage_discount_promotions=new e.PercentageDiscountPromotions(s(this,t,"f")),this.price_lists=new e.PriceLists(s(this,t,"f")),this.prices=new e.Prices(s(this,t,"f")),this.promotion_rules=new e.PromotionRules(s(this,t,"f")),this.promotions=new e.Promotions(s(this,t,"f")),this.refunds=new e.Refunds(s(this,t,"f")),this.return_line_items=new e.ReturnLineItems(s(this,t,"f")),this.returns=new e.Returns(s(this,t,"f")),this.shipments=new e.Shipments(s(this,t,"f")),this.shipping_categories=new e.ShippingCategories(s(this,t,"f")),this.shipping_methods=new e.ShippingMethods(s(this,t,"f")),this.shipping_zones=new e.ShippingZones(s(this,t,"f")),this.sku_list_items=new e.SkuListItems(s(this,t,"f")),this.sku_list_promotion_rules=new e.SkuListPromotionRules(s(this,t,"f")),this.sku_lists=new e.SkuLists(s(this,t,"f")),this.sku_options=new e.SkuOptions(s(this,t,"f")),this.skus=new e.Skus(s(this,t,"f")),this.stock_items=new e.StockItems(s(this,t,"f")),this.stock_line_items=new e.StockLineItems(s(this,t,"f")),this.stock_locations=new e.StockLocations(s(this,t,"f")),this.stock_transfers=new e.StockTransfers(s(this,t,"f")),this.stripe_gateways=new e.StripeGateways(s(this,t,"f")),this.stripe_payments=new e.StripePayments(s(this,t,"f")),this.tax_calculators=new e.TaxCalculators(s(this,t,"f")),this.tax_categories=new e.TaxCategories(s(this,t,"f")),this.tax_rules=new e.TaxRules(s(this,t,"f")),this.taxjar_accounts=new e.TaxjarAccounts(s(this,t,"f")),this.transactions=new e.Transactions(s(this,t,"f")),this.voids=new e.Voids(s(this,t,"f")),this.webhooks=new e.Webhooks(s(this,t,"f")),this.wire_transfers=new e.WireTransfers(s(this,t,"f"))}static get openApiSchemaVersion(){return m}get currentOrganization(){return s(this,h,"f")}localConfig(i){i.organization&&c(this,h,i.organization,"f")}config(i){w("config %o",i),this.localConfig(i),s(this,t,"f").config(i)}resources(){return f.resources()}isApiError(i){return f.isApiError(i)}addRequestInterceptor(i,n){return s(this,t,"f").interceptors.request.use(i,n)}addResponseInterceptor(i,n){return s(this,t,"f").interceptors.response.use(i,n)}removeInterceptor(i,n){return s(this,t,"f").interceptors[i].eject(n)}addRawResponseReader(){const i={id:void 0,rawResponse:void 0};function n(a){return i.rawResponse=a==null?void 0:a.data,a}const r=this.addResponseInterceptor(n);return i.id=r,i}removeRawResponseReader(i){const n=typeof i=="number"?i:i.id;if(n)return this.removeInterceptor("response",n)}}t=new WeakMap,h=new WeakMap;const _=o=>new l(o);export default _;
package/lib/esm/common.js CHANGED
@@ -1 +1 @@
1
- import{resourceList as e}from"./api";const p=s=>s&&s.type&&s.id&&e.includes(s.type),t=s=>s&&typeof s.type!="undefined"&&s.type&&e.includes(s.type);export{p as isResourceId,t as isResourceType};
1
+ import{resourceList as e}from"./api";const p=s=>s&&s.type&&s.id&&e.includes(s.type),t=s=>s&&typeof s.type<"u"&&s.type&&e.includes(s.type);export{p as isResourceId,t as isResourceType};
@@ -1,3 +1,3 @@
1
1
  declare type Debugger = (pattern: string, ...args: any[]) => void;
2
- declare const debug: (namespace?: string | undefined) => Debugger;
2
+ declare const debug: (namespace: string) => Debugger;
3
3
  export default debug;
package/lib/esm/debug.js CHANGED
@@ -1 +1 @@
1
- const a=(e,...r)=>{};let t=e=>a;try{const e=require("debug");e&&typeof e=="function"&&(t=e)}catch{}const o="clsdk",n=()=>{const e=new Error;Error.prepareStackTrace=(s,c)=>c;const r=e.stack;return Error.prepareStackTrace=void 0,(r[2].getFileName()||"/").replace(/^.*[\\/]/,"").replace(".ts","")},p=e=>t(`${o}:${e||n()}`);export default p;
1
+ const e=(t,...r)=>{};let c=t=>e;try{const t=require("debug");t&&typeof t=="function"&&(c=t)}catch{}const o="clsdk",n=t=>c(`${o}:${t}`);export default n;
@@ -1 +1 @@
1
- import{isResourceId as l,isResourceType as c}from"./common";import u from"./debug";const a=u(),p=r=>{let i;r.links&&delete r.links;const t=r.data,n=r.included;return Array.isArray(t)?i=t.map(s=>e(s,n)):i=e(t,n),i},d=(r,i=[])=>i.find(t=>r.id===t.id&&r.type===t.type)||r,e=(r,i)=>{a("denormalize resource: %O, %o",r,i||{});const t=Object.assign({id:r.id,type:r.type},r.attributes);return r.relationships&&Object.keys(r.relationships).forEach(n=>{const s=r.relationships[n].data;s?Array.isArray(s)?t[n]=s.map(o=>e(d(o,i),i)):t[n]=e(d(s,i),i):s===null&&(t[n]=null)}),a("denormalized resource: %O",t),t},y=r=>{a("normalize resource: %O",r);const i={},t={};for(const s in r){if(["type","id"].includes(s))continue;const o=r[s];o&&c(o)&&o.id===null?t[s]={data:null}:o&&(l(o)||Array.isArray(o)&&l(o[0]))?t[s]={data:o}:i[s]=o}const n={type:r.type,attributes:i,relationships:t};return l(r)&&(n.id=r.id),a("normalized resource: %O",n),n};export{p as denormalize,y as normalize};
1
+ import{isResourceId as l,isResourceType as c}from"./common";import p from"./debug";const a=p("jsonapi"),u=r=>{let t;r.links&&delete r.links;const i=r.data,n=r.included;return Array.isArray(i)?t=i.map(s=>e(s,n)):t=e(i,n),t},d=(r,t=[])=>t.find(i=>r.id===i.id&&r.type===i.type)||r,e=(r,t)=>{a("denormalize resource: %O, %o",r,t||{});const i=Object.assign({id:r.id,type:r.type},r.attributes);return r.relationships&&Object.keys(r.relationships).forEach(n=>{const s=r.relationships[n].data;s?Array.isArray(s)?i[n]=s.map(o=>e(d(o,t),t)):i[n]=e(d(s,t),t):s===null&&(i[n]=null)}),a("denormalized resource: %O",i),i},y=r=>{a("normalize resource: %O",r);const t={},i={};for(const s in r){if(["type","id"].includes(s))continue;const o=r[s];o&&c(o)&&o.id===null?i[s]={data:null}:o&&(l(o)||Array.isArray(o)&&l(o[0]))?i[s]={data:o}:t[s]=o}const n={type:r.type,attributes:t,relationships:i};return l(r)&&(n.id=r.id),a("normalized resource: %O",n),n};export{u as denormalize,y as normalize};