@commercelayer/sdk 3.1.1 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (414) hide show
  1. package/lib/cjs/api.d.ts +6 -4
  2. package/lib/cjs/api.js +1 -1
  3. package/lib/cjs/client.js +1 -1
  4. package/lib/cjs/commercelayer.d.ts +2 -0
  5. package/lib/cjs/commercelayer.js +1 -1
  6. package/lib/cjs/debug.d.ts +3 -0
  7. package/lib/cjs/debug.js +1 -0
  8. package/lib/cjs/jsonapi.js +1 -1
  9. package/lib/cjs/model.d.ts +4 -2
  10. package/lib/cjs/resource.d.ts +6 -2
  11. package/lib/cjs/resource.js +1 -1
  12. package/lib/cjs/resources/addresses.d.ts +5 -5
  13. package/lib/cjs/resources/addresses.js +1 -1
  14. package/lib/cjs/resources/adjustments.d.ts +4 -4
  15. package/lib/cjs/resources/adjustments.js +1 -1
  16. package/lib/cjs/resources/adyen_gateways.d.ts +5 -5
  17. package/lib/cjs/resources/adyen_gateways.js +1 -1
  18. package/lib/cjs/resources/adyen_payments.d.ts +5 -5
  19. package/lib/cjs/resources/adyen_payments.js +1 -1
  20. package/lib/cjs/resources/application.d.ts +4 -4
  21. package/lib/cjs/resources/application.js +1 -1
  22. package/lib/cjs/resources/attachments.d.ts +34 -34
  23. package/lib/cjs/resources/attachments.js +1 -1
  24. package/lib/cjs/resources/authorizations.d.ts +4 -4
  25. package/lib/cjs/resources/authorizations.js +1 -1
  26. package/lib/cjs/resources/avalara_accounts.d.ts +5 -5
  27. package/lib/cjs/resources/avalara_accounts.js +1 -1
  28. package/lib/cjs/resources/billing_info_validation_rules.d.ts +5 -5
  29. package/lib/cjs/resources/billing_info_validation_rules.js +1 -1
  30. package/lib/cjs/resources/bing_geocoders.d.ts +4 -4
  31. package/lib/cjs/resources/bing_geocoders.js +1 -1
  32. package/lib/cjs/resources/braintree_gateways.d.ts +5 -5
  33. package/lib/cjs/resources/braintree_gateways.js +1 -1
  34. package/lib/cjs/resources/braintree_payments.d.ts +5 -5
  35. package/lib/cjs/resources/braintree_payments.js +1 -1
  36. package/lib/cjs/resources/bundles.d.ts +11 -6
  37. package/lib/cjs/resources/bundles.js +1 -1
  38. package/lib/cjs/resources/captures.d.ts +4 -4
  39. package/lib/cjs/resources/captures.js +1 -1
  40. package/lib/cjs/resources/carrier_accounts.d.ts +4 -4
  41. package/lib/cjs/resources/carrier_accounts.js +1 -1
  42. package/lib/cjs/resources/checkout_com_gateways.d.ts +5 -5
  43. package/lib/cjs/resources/checkout_com_gateways.js +1 -1
  44. package/lib/cjs/resources/checkout_com_payments.d.ts +5 -5
  45. package/lib/cjs/resources/checkout_com_payments.js +1 -1
  46. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +11 -11
  47. package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -1
  48. package/lib/cjs/resources/coupon_recipients.d.ts +5 -5
  49. package/lib/cjs/resources/coupon_recipients.js +1 -1
  50. package/lib/cjs/resources/coupons.d.ts +5 -5
  51. package/lib/cjs/resources/coupons.js +1 -1
  52. package/lib/cjs/resources/customer_addresses.d.ts +6 -6
  53. package/lib/cjs/resources/customer_addresses.js +1 -1
  54. package/lib/cjs/resources/customer_groups.d.ts +4 -4
  55. package/lib/cjs/resources/customer_groups.js +1 -1
  56. package/lib/cjs/resources/customer_password_resets.d.ts +4 -4
  57. package/lib/cjs/resources/customer_password_resets.js +1 -1
  58. package/lib/cjs/resources/customer_payment_sources.d.ts +19 -15
  59. package/lib/cjs/resources/customer_payment_sources.js +1 -1
  60. package/lib/cjs/resources/customer_subscriptions.d.ts +4 -4
  61. package/lib/cjs/resources/customer_subscriptions.js +1 -1
  62. package/lib/cjs/resources/customers.d.ts +5 -5
  63. package/lib/cjs/resources/customers.js +1 -1
  64. package/lib/cjs/resources/delivery_lead_times.d.ts +6 -6
  65. package/lib/cjs/resources/delivery_lead_times.js +1 -1
  66. package/lib/cjs/resources/event_callbacks.d.ts +4 -4
  67. package/lib/cjs/resources/event_callbacks.js +1 -1
  68. package/lib/cjs/resources/external_gateways.d.ts +7 -4
  69. package/lib/cjs/resources/external_gateways.js +1 -1
  70. package/lib/cjs/resources/external_payments.d.ts +7 -5
  71. package/lib/cjs/resources/external_payments.js +1 -1
  72. package/lib/cjs/resources/external_promotions.d.ts +12 -9
  73. package/lib/cjs/resources/external_promotions.js +1 -1
  74. package/lib/cjs/resources/external_tax_calculators.d.ts +5 -5
  75. package/lib/cjs/resources/external_tax_calculators.js +1 -1
  76. package/lib/cjs/resources/fixed_amount_promotions.d.ts +12 -9
  77. package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
  78. package/lib/cjs/resources/fixed_price_promotions.d.ts +13 -10
  79. package/lib/cjs/resources/fixed_price_promotions.js +1 -1
  80. package/lib/cjs/resources/free_gift_promotions.d.ts +13 -10
  81. package/lib/cjs/resources/free_gift_promotions.js +1 -1
  82. package/lib/cjs/resources/free_shipping_promotions.d.ts +12 -9
  83. package/lib/cjs/resources/free_shipping_promotions.js +1 -1
  84. package/lib/cjs/resources/geocoders.d.ts +4 -4
  85. package/lib/cjs/resources/geocoders.js +1 -1
  86. package/lib/cjs/resources/gift_card_recipients.d.ts +5 -5
  87. package/lib/cjs/resources/gift_card_recipients.js +1 -1
  88. package/lib/cjs/resources/gift_cards.d.ts +7 -7
  89. package/lib/cjs/resources/gift_cards.js +1 -1
  90. package/lib/cjs/resources/google_geocoders.d.ts +4 -4
  91. package/lib/cjs/resources/google_geocoders.js +1 -1
  92. package/lib/cjs/resources/imports.d.ts +4 -4
  93. package/lib/cjs/resources/imports.js +1 -1
  94. package/lib/cjs/resources/in_stock_subscriptions.d.ts +7 -7
  95. package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
  96. package/lib/cjs/resources/inventory_models.d.ts +4 -4
  97. package/lib/cjs/resources/inventory_models.js +1 -1
  98. package/lib/cjs/resources/inventory_return_locations.d.ts +6 -6
  99. package/lib/cjs/resources/inventory_return_locations.js +1 -1
  100. package/lib/cjs/resources/inventory_stock_locations.d.ts +6 -6
  101. package/lib/cjs/resources/inventory_stock_locations.js +1 -1
  102. package/lib/cjs/resources/klarna_gateways.d.ts +42 -0
  103. package/lib/cjs/resources/klarna_gateways.js +1 -0
  104. package/lib/cjs/resources/klarna_payments.d.ts +39 -0
  105. package/lib/cjs/resources/klarna_payments.js +1 -0
  106. package/lib/cjs/resources/line_item_options.d.ts +6 -6
  107. package/lib/cjs/resources/line_item_options.js +1 -1
  108. package/lib/cjs/resources/line_items.d.ts +15 -15
  109. package/lib/cjs/resources/line_items.js +1 -1
  110. package/lib/cjs/resources/manual_gateways.d.ts +4 -4
  111. package/lib/cjs/resources/manual_gateways.js +1 -1
  112. package/lib/cjs/resources/manual_tax_calculators.d.ts +6 -6
  113. package/lib/cjs/resources/manual_tax_calculators.js +1 -1
  114. package/lib/cjs/resources/markets.d.ts +9 -9
  115. package/lib/cjs/resources/markets.js +1 -1
  116. package/lib/cjs/resources/merchants.d.ts +5 -5
  117. package/lib/cjs/resources/merchants.js +1 -1
  118. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +10 -10
  119. package/lib/cjs/resources/order_amount_promotion_rules.js +1 -1
  120. package/lib/cjs/resources/order_copies.d.ts +5 -5
  121. package/lib/cjs/resources/order_copies.js +1 -1
  122. package/lib/cjs/resources/order_subscriptions.d.ts +6 -6
  123. package/lib/cjs/resources/order_subscriptions.js +1 -1
  124. package/lib/cjs/resources/order_validation_rules.d.ts +4 -4
  125. package/lib/cjs/resources/order_validation_rules.js +1 -1
  126. package/lib/cjs/resources/orders.d.ts +22 -18
  127. package/lib/cjs/resources/orders.js +1 -1
  128. package/lib/cjs/resources/organization.d.ts +4 -4
  129. package/lib/cjs/resources/organization.js +1 -1
  130. package/lib/cjs/resources/packages.d.ts +5 -5
  131. package/lib/cjs/resources/packages.js +1 -1
  132. package/lib/cjs/resources/parcel_line_items.d.ts +6 -6
  133. package/lib/cjs/resources/parcel_line_items.js +1 -1
  134. package/lib/cjs/resources/parcels.d.ts +6 -6
  135. package/lib/cjs/resources/parcels.js +1 -1
  136. package/lib/cjs/resources/payment_gateways.d.ts +4 -4
  137. package/lib/cjs/resources/payment_gateways.js +1 -1
  138. package/lib/cjs/resources/payment_methods.d.ts +10 -7
  139. package/lib/cjs/resources/payment_methods.js +1 -1
  140. package/lib/cjs/resources/paypal_gateways.d.ts +4 -4
  141. package/lib/cjs/resources/paypal_gateways.js +1 -1
  142. package/lib/cjs/resources/paypal_payments.d.ts +5 -5
  143. package/lib/cjs/resources/paypal_payments.js +1 -1
  144. package/lib/cjs/resources/percentage_discount_promotions.d.ts +13 -10
  145. package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
  146. package/lib/cjs/resources/price_lists.d.ts +4 -4
  147. package/lib/cjs/resources/price_lists.js +1 -1
  148. package/lib/cjs/resources/prices.d.ts +6 -6
  149. package/lib/cjs/resources/prices.js +1 -1
  150. package/lib/cjs/resources/promotion_rules.d.ts +4 -4
  151. package/lib/cjs/resources/promotion_rules.js +1 -1
  152. package/lib/cjs/resources/promotions.d.ts +5 -4
  153. package/lib/cjs/resources/promotions.js +1 -1
  154. package/lib/cjs/resources/refunds.d.ts +4 -4
  155. package/lib/cjs/resources/refunds.js +1 -1
  156. package/lib/cjs/resources/return_line_items.d.ts +6 -6
  157. package/lib/cjs/resources/return_line_items.js +1 -1
  158. package/lib/cjs/resources/returns.d.ts +6 -6
  159. package/lib/cjs/resources/returns.js +1 -1
  160. package/lib/cjs/resources/shipments.d.ts +5 -5
  161. package/lib/cjs/resources/shipments.js +1 -1
  162. package/lib/cjs/resources/shipping_categories.d.ts +4 -4
  163. package/lib/cjs/resources/shipping_categories.js +1 -1
  164. package/lib/cjs/resources/shipping_methods.d.ts +11 -9
  165. package/lib/cjs/resources/shipping_methods.js +1 -1
  166. package/lib/cjs/resources/shipping_zones.d.ts +4 -4
  167. package/lib/cjs/resources/shipping_zones.js +1 -1
  168. package/lib/cjs/resources/sku_list_items.d.ts +6 -6
  169. package/lib/cjs/resources/sku_list_items.js +1 -1
  170. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +11 -11
  171. package/lib/cjs/resources/sku_list_promotion_rules.js +1 -1
  172. package/lib/cjs/resources/sku_lists.d.ts +4 -4
  173. package/lib/cjs/resources/sku_lists.js +1 -1
  174. package/lib/cjs/resources/sku_options.d.ts +8 -5
  175. package/lib/cjs/resources/sku_options.js +1 -1
  176. package/lib/cjs/resources/skus.d.ts +5 -5
  177. package/lib/cjs/resources/skus.js +1 -1
  178. package/lib/cjs/resources/stock_items.d.ts +6 -6
  179. package/lib/cjs/resources/stock_items.js +1 -1
  180. package/lib/cjs/resources/stock_line_items.d.ts +4 -4
  181. package/lib/cjs/resources/stock_line_items.js +1 -1
  182. package/lib/cjs/resources/stock_locations.d.ts +5 -5
  183. package/lib/cjs/resources/stock_locations.js +1 -1
  184. package/lib/cjs/resources/stock_transfers.d.ts +8 -8
  185. package/lib/cjs/resources/stock_transfers.js +1 -1
  186. package/lib/cjs/resources/stripe_gateways.d.ts +4 -4
  187. package/lib/cjs/resources/stripe_gateways.js +1 -1
  188. package/lib/cjs/resources/stripe_payments.d.ts +5 -5
  189. package/lib/cjs/resources/stripe_payments.js +1 -1
  190. package/lib/cjs/resources/tax_calculators.d.ts +4 -4
  191. package/lib/cjs/resources/tax_calculators.js +1 -1
  192. package/lib/cjs/resources/tax_categories.d.ts +9 -9
  193. package/lib/cjs/resources/tax_categories.js +1 -1
  194. package/lib/cjs/resources/tax_rules.d.ts +5 -5
  195. package/lib/cjs/resources/tax_rules.js +1 -1
  196. package/lib/cjs/resources/taxjar_accounts.d.ts +5 -5
  197. package/lib/cjs/resources/taxjar_accounts.js +1 -1
  198. package/lib/cjs/resources/transactions.d.ts +4 -4
  199. package/lib/cjs/resources/transactions.js +1 -1
  200. package/lib/cjs/resources/voids.d.ts +4 -4
  201. package/lib/cjs/resources/voids.js +1 -1
  202. package/lib/cjs/resources/webhooks.d.ts +4 -4
  203. package/lib/cjs/resources/webhooks.js +1 -1
  204. package/lib/cjs/resources/wire_transfers.d.ts +5 -5
  205. package/lib/cjs/resources/wire_transfers.js +1 -1
  206. package/lib/esm/api.d.ts +6 -4
  207. package/lib/esm/api.js +1 -1
  208. package/lib/esm/client.js +1 -1
  209. package/lib/esm/commercelayer.d.ts +2 -0
  210. package/lib/esm/commercelayer.js +1 -1
  211. package/lib/esm/debug.d.ts +3 -0
  212. package/lib/esm/debug.js +1 -0
  213. package/lib/esm/error.js +1 -1
  214. package/lib/esm/jsonapi.js +1 -1
  215. package/lib/esm/model.d.ts +4 -2
  216. package/lib/esm/resource.d.ts +6 -2
  217. package/lib/esm/resource.js +1 -1
  218. package/lib/esm/resources/addresses.d.ts +5 -5
  219. package/lib/esm/resources/addresses.js +1 -1
  220. package/lib/esm/resources/adjustments.d.ts +4 -4
  221. package/lib/esm/resources/adjustments.js +1 -1
  222. package/lib/esm/resources/adyen_gateways.d.ts +5 -5
  223. package/lib/esm/resources/adyen_gateways.js +1 -1
  224. package/lib/esm/resources/adyen_payments.d.ts +5 -5
  225. package/lib/esm/resources/adyen_payments.js +1 -1
  226. package/lib/esm/resources/application.d.ts +4 -4
  227. package/lib/esm/resources/application.js +1 -1
  228. package/lib/esm/resources/attachments.d.ts +34 -34
  229. package/lib/esm/resources/attachments.js +1 -1
  230. package/lib/esm/resources/authorizations.d.ts +4 -4
  231. package/lib/esm/resources/authorizations.js +1 -1
  232. package/lib/esm/resources/avalara_accounts.d.ts +5 -5
  233. package/lib/esm/resources/avalara_accounts.js +1 -1
  234. package/lib/esm/resources/billing_info_validation_rules.d.ts +5 -5
  235. package/lib/esm/resources/billing_info_validation_rules.js +1 -1
  236. package/lib/esm/resources/bing_geocoders.d.ts +4 -4
  237. package/lib/esm/resources/bing_geocoders.js +1 -1
  238. package/lib/esm/resources/braintree_gateways.d.ts +5 -5
  239. package/lib/esm/resources/braintree_gateways.js +1 -1
  240. package/lib/esm/resources/braintree_payments.d.ts +5 -5
  241. package/lib/esm/resources/braintree_payments.js +1 -1
  242. package/lib/esm/resources/bundles.d.ts +11 -6
  243. package/lib/esm/resources/bundles.js +1 -1
  244. package/lib/esm/resources/captures.d.ts +4 -4
  245. package/lib/esm/resources/captures.js +1 -1
  246. package/lib/esm/resources/carrier_accounts.d.ts +4 -4
  247. package/lib/esm/resources/carrier_accounts.js +1 -1
  248. package/lib/esm/resources/checkout_com_gateways.d.ts +5 -5
  249. package/lib/esm/resources/checkout_com_gateways.js +1 -1
  250. package/lib/esm/resources/checkout_com_payments.d.ts +5 -5
  251. package/lib/esm/resources/checkout_com_payments.js +1 -1
  252. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +11 -11
  253. package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
  254. package/lib/esm/resources/coupon_recipients.d.ts +5 -5
  255. package/lib/esm/resources/coupon_recipients.js +1 -1
  256. package/lib/esm/resources/coupons.d.ts +5 -5
  257. package/lib/esm/resources/coupons.js +1 -1
  258. package/lib/esm/resources/customer_addresses.d.ts +6 -6
  259. package/lib/esm/resources/customer_addresses.js +1 -1
  260. package/lib/esm/resources/customer_groups.d.ts +4 -4
  261. package/lib/esm/resources/customer_groups.js +1 -1
  262. package/lib/esm/resources/customer_password_resets.d.ts +4 -4
  263. package/lib/esm/resources/customer_password_resets.js +1 -1
  264. package/lib/esm/resources/customer_payment_sources.d.ts +19 -15
  265. package/lib/esm/resources/customer_payment_sources.js +1 -1
  266. package/lib/esm/resources/customer_subscriptions.d.ts +4 -4
  267. package/lib/esm/resources/customer_subscriptions.js +1 -1
  268. package/lib/esm/resources/customers.d.ts +5 -5
  269. package/lib/esm/resources/customers.js +1 -1
  270. package/lib/esm/resources/delivery_lead_times.d.ts +6 -6
  271. package/lib/esm/resources/delivery_lead_times.js +1 -1
  272. package/lib/esm/resources/event_callbacks.d.ts +4 -4
  273. package/lib/esm/resources/event_callbacks.js +1 -1
  274. package/lib/esm/resources/external_gateways.d.ts +7 -4
  275. package/lib/esm/resources/external_gateways.js +1 -1
  276. package/lib/esm/resources/external_payments.d.ts +7 -5
  277. package/lib/esm/resources/external_payments.js +1 -1
  278. package/lib/esm/resources/external_promotions.d.ts +12 -9
  279. package/lib/esm/resources/external_promotions.js +1 -1
  280. package/lib/esm/resources/external_tax_calculators.d.ts +5 -5
  281. package/lib/esm/resources/external_tax_calculators.js +1 -1
  282. package/lib/esm/resources/fixed_amount_promotions.d.ts +12 -9
  283. package/lib/esm/resources/fixed_amount_promotions.js +1 -1
  284. package/lib/esm/resources/fixed_price_promotions.d.ts +13 -10
  285. package/lib/esm/resources/fixed_price_promotions.js +1 -1
  286. package/lib/esm/resources/free_gift_promotions.d.ts +13 -10
  287. package/lib/esm/resources/free_gift_promotions.js +1 -1
  288. package/lib/esm/resources/free_shipping_promotions.d.ts +12 -9
  289. package/lib/esm/resources/free_shipping_promotions.js +1 -1
  290. package/lib/esm/resources/geocoders.d.ts +4 -4
  291. package/lib/esm/resources/geocoders.js +1 -1
  292. package/lib/esm/resources/gift_card_recipients.d.ts +5 -5
  293. package/lib/esm/resources/gift_card_recipients.js +1 -1
  294. package/lib/esm/resources/gift_cards.d.ts +7 -7
  295. package/lib/esm/resources/gift_cards.js +1 -1
  296. package/lib/esm/resources/google_geocoders.d.ts +4 -4
  297. package/lib/esm/resources/google_geocoders.js +1 -1
  298. package/lib/esm/resources/imports.d.ts +4 -4
  299. package/lib/esm/resources/imports.js +1 -1
  300. package/lib/esm/resources/in_stock_subscriptions.d.ts +7 -7
  301. package/lib/esm/resources/in_stock_subscriptions.js +1 -1
  302. package/lib/esm/resources/inventory_models.d.ts +4 -4
  303. package/lib/esm/resources/inventory_models.js +1 -1
  304. package/lib/esm/resources/inventory_return_locations.d.ts +6 -6
  305. package/lib/esm/resources/inventory_return_locations.js +1 -1
  306. package/lib/esm/resources/inventory_stock_locations.d.ts +6 -6
  307. package/lib/esm/resources/inventory_stock_locations.js +1 -1
  308. package/lib/esm/resources/klarna_gateways.d.ts +42 -0
  309. package/lib/esm/resources/klarna_gateways.js +1 -0
  310. package/lib/esm/resources/klarna_payments.d.ts +39 -0
  311. package/lib/esm/resources/klarna_payments.js +1 -0
  312. package/lib/esm/resources/line_item_options.d.ts +6 -6
  313. package/lib/esm/resources/line_item_options.js +1 -1
  314. package/lib/esm/resources/line_items.d.ts +15 -15
  315. package/lib/esm/resources/line_items.js +1 -1
  316. package/lib/esm/resources/manual_gateways.d.ts +4 -4
  317. package/lib/esm/resources/manual_gateways.js +1 -1
  318. package/lib/esm/resources/manual_tax_calculators.d.ts +6 -6
  319. package/lib/esm/resources/manual_tax_calculators.js +1 -1
  320. package/lib/esm/resources/markets.d.ts +9 -9
  321. package/lib/esm/resources/markets.js +1 -1
  322. package/lib/esm/resources/merchants.d.ts +5 -5
  323. package/lib/esm/resources/merchants.js +1 -1
  324. package/lib/esm/resources/order_amount_promotion_rules.d.ts +10 -10
  325. package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
  326. package/lib/esm/resources/order_copies.d.ts +5 -5
  327. package/lib/esm/resources/order_copies.js +1 -1
  328. package/lib/esm/resources/order_subscriptions.d.ts +6 -6
  329. package/lib/esm/resources/order_subscriptions.js +1 -1
  330. package/lib/esm/resources/order_validation_rules.d.ts +4 -4
  331. package/lib/esm/resources/order_validation_rules.js +1 -1
  332. package/lib/esm/resources/orders.d.ts +22 -18
  333. package/lib/esm/resources/orders.js +1 -1
  334. package/lib/esm/resources/organization.d.ts +4 -4
  335. package/lib/esm/resources/organization.js +1 -1
  336. package/lib/esm/resources/packages.d.ts +5 -5
  337. package/lib/esm/resources/packages.js +1 -1
  338. package/lib/esm/resources/parcel_line_items.d.ts +6 -6
  339. package/lib/esm/resources/parcel_line_items.js +1 -1
  340. package/lib/esm/resources/parcels.d.ts +6 -6
  341. package/lib/esm/resources/parcels.js +1 -1
  342. package/lib/esm/resources/payment_gateways.d.ts +4 -4
  343. package/lib/esm/resources/payment_gateways.js +1 -1
  344. package/lib/esm/resources/payment_methods.d.ts +10 -7
  345. package/lib/esm/resources/payment_methods.js +1 -1
  346. package/lib/esm/resources/paypal_gateways.d.ts +4 -4
  347. package/lib/esm/resources/paypal_gateways.js +1 -1
  348. package/lib/esm/resources/paypal_payments.d.ts +5 -5
  349. package/lib/esm/resources/paypal_payments.js +1 -1
  350. package/lib/esm/resources/percentage_discount_promotions.d.ts +13 -10
  351. package/lib/esm/resources/percentage_discount_promotions.js +1 -1
  352. package/lib/esm/resources/price_lists.d.ts +4 -4
  353. package/lib/esm/resources/price_lists.js +1 -1
  354. package/lib/esm/resources/prices.d.ts +6 -6
  355. package/lib/esm/resources/prices.js +1 -1
  356. package/lib/esm/resources/promotion_rules.d.ts +4 -4
  357. package/lib/esm/resources/promotion_rules.js +1 -1
  358. package/lib/esm/resources/promotions.d.ts +5 -4
  359. package/lib/esm/resources/promotions.js +1 -1
  360. package/lib/esm/resources/refunds.d.ts +4 -4
  361. package/lib/esm/resources/refunds.js +1 -1
  362. package/lib/esm/resources/return_line_items.d.ts +6 -6
  363. package/lib/esm/resources/return_line_items.js +1 -1
  364. package/lib/esm/resources/returns.d.ts +6 -6
  365. package/lib/esm/resources/returns.js +1 -1
  366. package/lib/esm/resources/shipments.d.ts +5 -5
  367. package/lib/esm/resources/shipments.js +1 -1
  368. package/lib/esm/resources/shipping_categories.d.ts +4 -4
  369. package/lib/esm/resources/shipping_categories.js +1 -1
  370. package/lib/esm/resources/shipping_methods.d.ts +11 -9
  371. package/lib/esm/resources/shipping_methods.js +1 -1
  372. package/lib/esm/resources/shipping_zones.d.ts +4 -4
  373. package/lib/esm/resources/shipping_zones.js +1 -1
  374. package/lib/esm/resources/sku_list_items.d.ts +6 -6
  375. package/lib/esm/resources/sku_list_items.js +1 -1
  376. package/lib/esm/resources/sku_list_promotion_rules.d.ts +11 -11
  377. package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
  378. package/lib/esm/resources/sku_lists.d.ts +4 -4
  379. package/lib/esm/resources/sku_lists.js +1 -1
  380. package/lib/esm/resources/sku_options.d.ts +8 -5
  381. package/lib/esm/resources/sku_options.js +1 -1
  382. package/lib/esm/resources/skus.d.ts +5 -5
  383. package/lib/esm/resources/skus.js +1 -1
  384. package/lib/esm/resources/stock_items.d.ts +6 -6
  385. package/lib/esm/resources/stock_items.js +1 -1
  386. package/lib/esm/resources/stock_line_items.d.ts +4 -4
  387. package/lib/esm/resources/stock_line_items.js +1 -1
  388. package/lib/esm/resources/stock_locations.d.ts +5 -5
  389. package/lib/esm/resources/stock_locations.js +1 -1
  390. package/lib/esm/resources/stock_transfers.d.ts +8 -8
  391. package/lib/esm/resources/stock_transfers.js +1 -1
  392. package/lib/esm/resources/stripe_gateways.d.ts +4 -4
  393. package/lib/esm/resources/stripe_gateways.js +1 -1
  394. package/lib/esm/resources/stripe_payments.d.ts +5 -5
  395. package/lib/esm/resources/stripe_payments.js +1 -1
  396. package/lib/esm/resources/tax_calculators.d.ts +4 -4
  397. package/lib/esm/resources/tax_calculators.js +1 -1
  398. package/lib/esm/resources/tax_categories.d.ts +9 -9
  399. package/lib/esm/resources/tax_categories.js +1 -1
  400. package/lib/esm/resources/tax_rules.d.ts +5 -5
  401. package/lib/esm/resources/tax_rules.js +1 -1
  402. package/lib/esm/resources/taxjar_accounts.d.ts +5 -5
  403. package/lib/esm/resources/taxjar_accounts.js +1 -1
  404. package/lib/esm/resources/transactions.d.ts +4 -4
  405. package/lib/esm/resources/transactions.js +1 -1
  406. package/lib/esm/resources/voids.d.ts +4 -4
  407. package/lib/esm/resources/voids.js +1 -1
  408. package/lib/esm/resources/webhooks.d.ts +4 -4
  409. package/lib/esm/resources/webhooks.js +1 -1
  410. package/lib/esm/resources/wire_transfers.d.ts +5 -5
  411. package/lib/esm/resources/wire_transfers.js +1 -1
  412. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  413. package/lib/tsconfig.tsbuildinfo +1 -1
  414. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
- import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { TaxCategory } from './tax_categories';
4
4
  import { Market } from './markets';
5
5
  import { Attachment } from './attachments';
6
- declare type TaxCalculatorRel = ResourceId & {
6
+ declare type TaxCalculatorRel = ResourceRel & {
7
7
  type: typeof TaxCalculators.TYPE;
8
8
  };
9
9
  interface TaxCalculator extends Resource {
@@ -17,7 +17,7 @@ declare class TaxCalculators extends ApiResource {
17
17
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCalculator>>;
18
18
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCalculator>;
19
19
  isTaxCalculator(resource: any): resource is TaxCalculator;
20
- relationship(id: string | ResourceId): TaxCalculatorRel;
20
+ relationship(id: string | ResourceId | null): TaxCalculatorRel;
21
21
  type(): string;
22
22
  }
23
23
  export default TaxCalculators;
@@ -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 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,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,27 +1,27 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Sku } from './skus';
4
4
  import { AvalaraAccount } from './avalara_accounts';
5
5
  import { TaxjarAccount } from './taxjar_accounts';
6
6
  import { ManualTaxCalculator } from './manual_tax_calculators';
7
7
  import { ExternalTaxCalculator } from './external_tax_calculators';
8
8
  import { Attachment } from './attachments';
9
- declare type TaxCategoryRel = ResourceId & {
9
+ declare type TaxCategoryRel = ResourceRel & {
10
10
  type: typeof TaxCategories.TYPE;
11
11
  };
12
- declare type SkuRel = ResourceId & {
12
+ declare type SkuRel = ResourceRel & {
13
13
  type: 'skus';
14
14
  };
15
- declare type AvalaraAccountRel = ResourceId & {
15
+ declare type AvalaraAccountRel = ResourceRel & {
16
16
  type: 'avalara_accounts';
17
17
  };
18
- declare type TaxjarAccountRel = ResourceId & {
18
+ declare type TaxjarAccountRel = ResourceRel & {
19
19
  type: 'taxjar_accounts';
20
20
  };
21
- declare type ManualTaxCalculatorRel = ResourceId & {
21
+ declare type ManualTaxCalculatorRel = ResourceRel & {
22
22
  type: 'manual_tax_calculators';
23
23
  };
24
- declare type ExternalTaxCalculatorRel = ResourceId & {
24
+ declare type ExternalTaxCalculatorRel = ResourceRel & {
25
25
  type: 'external_tax_calculators';
26
26
  };
27
27
  interface TaxCategory extends Resource {
@@ -50,7 +50,7 @@ declare class TaxCategories extends ApiResource {
50
50
  update(resource: TaxCategoryUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCategory>;
51
51
  delete(id: string, options?: ResourcesConfig): Promise<void>;
52
52
  isTaxCategory(resource: any): resource is TaxCategory;
53
- relationship(id: string | ResourceId): TaxCategoryRel;
53
+ relationship(id: string | ResourceId | null): TaxCategoryRel;
54
54
  type(): string;
55
55
  }
56
56
  export default TaxCategories;
@@ -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 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,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,10 +1,10 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { ManualTaxCalculator } from './manual_tax_calculators';
4
- declare type TaxRuleRel = ResourceId & {
4
+ declare type TaxRuleRel = ResourceRel & {
5
5
  type: typeof TaxRules.TYPE;
6
6
  };
7
- declare type ManualTaxCalculatorRel = ResourceId & {
7
+ declare type ManualTaxCalculatorRel = ResourceRel & {
8
8
  type: 'manual_tax_calculators';
9
9
  };
10
10
  interface TaxRule extends Resource {
@@ -61,7 +61,7 @@ declare class TaxRules extends ApiResource {
61
61
  update(resource: TaxRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxRule>;
62
62
  delete(id: string, options?: ResourcesConfig): Promise<void>;
63
63
  isTaxRule(resource: any): resource is TaxRule;
64
- relationship(id: string | ResourceId): TaxRuleRel;
64
+ relationship(id: string | ResourceId | null): TaxRuleRel;
65
65
  type(): string;
66
66
  }
67
67
  export default TaxRules;
@@ -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 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)}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,12 +1,12 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { TaxCategory } from './tax_categories';
4
4
  import { Market } from './markets';
5
5
  import { Attachment } from './attachments';
6
- declare type TaxjarAccountRel = ResourceId & {
6
+ declare type TaxjarAccountRel = ResourceRel & {
7
7
  type: typeof TaxjarAccounts.TYPE;
8
8
  };
9
- declare type TaxCategoryRel = ResourceId & {
9
+ declare type TaxCategoryRel = ResourceRel & {
10
10
  type: 'tax_categories';
11
11
  };
12
12
  interface TaxjarAccount extends Resource {
@@ -33,7 +33,7 @@ declare class TaxjarAccounts extends ApiResource {
33
33
  update(resource: TaxjarAccountUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxjarAccount>;
34
34
  delete(id: string, options?: ResourcesConfig): Promise<void>;
35
35
  isTaxjarAccount(resource: any): resource is TaxjarAccount;
36
- relationship(id: string | ResourceId): TaxjarAccountRel;
36
+ relationship(id: string | ResourceId | null): TaxjarAccountRel;
37
37
  type(): string;
38
38
  }
39
39
  export default TaxjarAccounts;
@@ -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 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,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,7 +1,7 @@
1
- import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Order } from './orders';
4
- declare type TransactionRel = ResourceId & {
4
+ declare type TransactionRel = ResourceRel & {
5
5
  type: typeof Transactions.TYPE;
6
6
  };
7
7
  interface Transaction extends Resource {
@@ -23,7 +23,7 @@ declare class Transactions extends ApiResource {
23
23
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
24
24
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Transaction>;
25
25
  isTransaction(resource: any): resource is Transaction;
26
- relationship(id: string | ResourceId): TransactionRel;
26
+ relationship(id: string | ResourceId | null): TransactionRel;
27
27
  type(): string;
28
28
  }
29
29
  export default Transactions;
@@ -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 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)}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,8 +1,8 @@
1
- import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Order } from './orders';
4
4
  import { Authorization } from './authorizations';
5
- declare type VoidRel = ResourceId & {
5
+ declare type VoidRel = ResourceRel & {
6
6
  type: typeof Voids.TYPE;
7
7
  };
8
8
  interface Void extends Resource {
@@ -25,7 +25,7 @@ declare class Voids extends ApiResource {
25
25
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
26
26
  retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Void>;
27
27
  isVoid(resource: any): resource is Void;
28
- relationship(id: string | ResourceId): VoidRel;
28
+ relationship(id: string | ResourceId | null): VoidRel;
29
29
  type(): string;
30
30
  }
31
31
  export default Voids;
@@ -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 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)}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,7 +1,7 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { EventCallback } from './event_callbacks';
4
- declare type WebhookRel = ResourceId & {
4
+ declare type WebhookRel = ResourceRel & {
5
5
  type: typeof Webhooks.TYPE;
6
6
  };
7
7
  interface Webhook extends Resource {
@@ -34,7 +34,7 @@ declare class Webhooks extends ApiResource {
34
34
  update(resource: WebhookUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Webhook>;
35
35
  delete(id: string, options?: ResourcesConfig): Promise<void>;
36
36
  isWebhook(resource: any): resource is Webhook;
37
- relationship(id: string | ResourceId): WebhookRel;
37
+ relationship(id: string | ResourceId | null): WebhookRel;
38
38
  type(): string;
39
39
  }
40
40
  export default Webhooks;
@@ -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 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)}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,10 +1,10 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Order } from './orders';
4
- declare type WireTransferRel = ResourceId & {
4
+ declare type WireTransferRel = ResourceRel & {
5
5
  type: typeof WireTransfers.TYPE;
6
6
  };
7
- declare type OrderRel = ResourceId & {
7
+ declare type OrderRel = ResourceRel & {
8
8
  type: 'orders';
9
9
  };
10
10
  interface WireTransfer extends Resource {
@@ -24,7 +24,7 @@ declare class WireTransfers extends ApiResource {
24
24
  update(resource: WireTransferUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<WireTransfer>;
25
25
  delete(id: string, options?: ResourcesConfig): Promise<void>;
26
26
  isWireTransfer(resource: any): resource is WireTransfer;
27
- relationship(id: string | ResourceId): WireTransferRel;
27
+ relationship(id: string | ResourceId | null): WireTransferRel;
28
28
  type(): string;
29
29
  }
30
30
  export default WireTransfers;
@@ -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 typeof e=="string"?{id:e,type:WireTransfers.TYPE}:{id:e.id,type:WireTransfers.TYPE}}type(){return WireTransfers.TYPE}}WireTransfers.TYPE="wire_transfers",exports.default=WireTransfers;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class WireTransfers extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:WireTransfers.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:WireTransfers.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:WireTransfers.TYPE,id:e},t)}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/api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * OpenAPI schema, version 2.7.6
2
+ * ©2022 Commerce Layer Inc.
3
+ * OpenAPI schema, version 2.8.1
4
4
  **/
5
5
  export { default as Addresses } from './resources/addresses';
6
6
  export { default as Adjustments } from './resources/adjustments';
@@ -47,6 +47,8 @@ export { default as InStockSubscriptions } from './resources/in_stock_subscripti
47
47
  export { default as InventoryModels } from './resources/inventory_models';
48
48
  export { default as InventoryReturnLocations } from './resources/inventory_return_locations';
49
49
  export { default as InventoryStockLocations } from './resources/inventory_stock_locations';
50
+ export { default as KlarnaGateways } from './resources/klarna_gateways';
51
+ export { default as KlarnaPayments } from './resources/klarna_payments';
50
52
  export { default as LineItemOptions } from './resources/line_item_options';
51
53
  export { default as LineItems } from './resources/line_items';
52
54
  export { default as ManualGateways } from './resources/manual_gateways';
@@ -97,5 +99,5 @@ export { default as Transactions } from './resources/transactions';
97
99
  export { default as Voids } from './resources/voids';
98
100
  export { default as Webhooks } from './resources/webhooks';
99
101
  export { default as WireTransfers } from './resources/wire_transfers';
100
- export declare type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_lists' | 'prices' | 'promotion_rules' | 'promotions' | 'refunds' | 'return_line_items' | 'returns' | 'shipments' | 'shipping_categories' | 'shipping_methods' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
101
- export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "billing_info_validation_rules", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "event_callbacks", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "free_gift_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "line_item_options", "line_items", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_copies", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_lists", "prices", "promotion_rules", "promotions", "refunds", "return_line_items", "returns", "shipments", "shipping_categories", "shipping_methods", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_transfers", "stripe_gateways", "stripe_payments", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "voids", "webhooks", "wire_transfers"];
102
+ export declare type ResourceTypeLock = 'addresses' | 'adjustments' | 'adyen_gateways' | 'adyen_payments' | 'application' | 'attachments' | 'authorizations' | 'avalara_accounts' | 'billing_info_validation_rules' | 'bing_geocoders' | 'braintree_gateways' | 'braintree_payments' | 'bundles' | 'captures' | 'carrier_accounts' | 'checkout_com_gateways' | 'checkout_com_payments' | 'coupon_codes_promotion_rules' | 'coupon_recipients' | 'coupons' | 'customer_addresses' | 'customer_groups' | 'customer_password_resets' | 'customer_payment_sources' | 'customer_subscriptions' | 'customers' | 'delivery_lead_times' | 'event_callbacks' | 'external_gateways' | 'external_payments' | 'external_promotions' | 'external_tax_calculators' | 'fixed_amount_promotions' | 'fixed_price_promotions' | 'free_gift_promotions' | 'free_shipping_promotions' | 'geocoders' | 'gift_card_recipients' | 'gift_cards' | 'google_geocoders' | 'imports' | 'in_stock_subscriptions' | 'inventory_models' | 'inventory_return_locations' | 'inventory_stock_locations' | 'klarna_gateways' | 'klarna_payments' | 'line_item_options' | 'line_items' | 'manual_gateways' | 'manual_tax_calculators' | 'markets' | 'merchants' | 'order_amount_promotion_rules' | 'order_copies' | 'order_subscriptions' | 'order_validation_rules' | 'orders' | 'organization' | 'packages' | 'parcel_line_items' | 'parcels' | 'payment_gateways' | 'payment_methods' | 'paypal_gateways' | 'paypal_payments' | 'percentage_discount_promotions' | 'price_lists' | 'prices' | 'promotion_rules' | 'promotions' | 'refunds' | 'return_line_items' | 'returns' | 'shipments' | 'shipping_categories' | 'shipping_methods' | 'shipping_zones' | 'sku_list_items' | 'sku_list_promotion_rules' | 'sku_lists' | 'sku_options' | 'skus' | 'stock_items' | 'stock_line_items' | 'stock_locations' | 'stock_transfers' | 'stripe_gateways' | 'stripe_payments' | 'tax_calculators' | 'tax_categories' | 'tax_rules' | 'taxjar_accounts' | 'transactions' | 'voids' | 'webhooks' | 'wire_transfers';
103
+ export declare const resourceList: readonly ["addresses", "adjustments", "adyen_gateways", "adyen_payments", "application", "attachments", "authorizations", "avalara_accounts", "billing_info_validation_rules", "bing_geocoders", "braintree_gateways", "braintree_payments", "bundles", "captures", "carrier_accounts", "checkout_com_gateways", "checkout_com_payments", "coupon_codes_promotion_rules", "coupon_recipients", "coupons", "customer_addresses", "customer_groups", "customer_password_resets", "customer_payment_sources", "customer_subscriptions", "customers", "delivery_lead_times", "event_callbacks", "external_gateways", "external_payments", "external_promotions", "external_tax_calculators", "fixed_amount_promotions", "fixed_price_promotions", "free_gift_promotions", "free_shipping_promotions", "geocoders", "gift_card_recipients", "gift_cards", "google_geocoders", "imports", "in_stock_subscriptions", "inventory_models", "inventory_return_locations", "inventory_stock_locations", "klarna_gateways", "klarna_payments", "line_item_options", "line_items", "manual_gateways", "manual_tax_calculators", "markets", "merchants", "order_amount_promotion_rules", "order_copies", "order_subscriptions", "order_validation_rules", "orders", "organization", "packages", "parcel_line_items", "parcels", "payment_gateways", "payment_methods", "paypal_gateways", "paypal_payments", "percentage_discount_promotions", "price_lists", "prices", "promotion_rules", "promotions", "refunds", "return_line_items", "returns", "shipments", "shipping_categories", "shipping_methods", "shipping_zones", "sku_list_items", "sku_list_promotion_rules", "sku_lists", "sku_options", "skus", "stock_items", "stock_line_items", "stock_locations", "stock_transfers", "stripe_gateways", "stripe_payments", "tax_calculators", "tax_categories", "tax_rules", "taxjar_accounts", "transactions", "voids", "webhooks", "wire_transfers"];
package/lib/esm/api.js CHANGED
@@ -1 +1 @@
1
- export{default as Addresses}from"./resources/addresses";export{default as Adjustments}from"./resources/adjustments";export{default as AdyenGateways}from"./resources/adyen_gateways";export{default as AdyenPayments}from"./resources/adyen_payments";export{default as Applications}from"./resources/application";export{default as Attachments}from"./resources/attachments";export{default as Authorizations}from"./resources/authorizations";export{default as AvalaraAccounts}from"./resources/avalara_accounts";export{default as BillingInfoValidationRules}from"./resources/billing_info_validation_rules";export{default as BingGeocoders}from"./resources/bing_geocoders";export{default as BraintreeGateways}from"./resources/braintree_gateways";export{default as BraintreePayments}from"./resources/braintree_payments";export{default as Bundles}from"./resources/bundles";export{default as Captures}from"./resources/captures";export{default as CarrierAccounts}from"./resources/carrier_accounts";export{default as CheckoutComGateways}from"./resources/checkout_com_gateways";export{default as CheckoutComPayments}from"./resources/checkout_com_payments";export{default as CouponCodesPromotionRules}from"./resources/coupon_codes_promotion_rules";export{default as CouponRecipients}from"./resources/coupon_recipients";export{default as Coupons}from"./resources/coupons";export{default as CustomerAddresses}from"./resources/customer_addresses";export{default as CustomerGroups}from"./resources/customer_groups";export{default as CustomerPasswordResets}from"./resources/customer_password_resets";export{default as CustomerPaymentSources}from"./resources/customer_payment_sources";export{default as CustomerSubscriptions}from"./resources/customer_subscriptions";export{default as Customers}from"./resources/customers";export{default as DeliveryLeadTimes}from"./resources/delivery_lead_times";export{default as EventCallbacks}from"./resources/event_callbacks";export{default as ExternalGateways}from"./resources/external_gateways";export{default as ExternalPayments}from"./resources/external_payments";export{default as ExternalPromotions}from"./resources/external_promotions";export{default as ExternalTaxCalculators}from"./resources/external_tax_calculators";export{default as FixedAmountPromotions}from"./resources/fixed_amount_promotions";export{default as FixedPricePromotions}from"./resources/fixed_price_promotions";export{default as FreeGiftPromotions}from"./resources/free_gift_promotions";export{default as FreeShippingPromotions}from"./resources/free_shipping_promotions";export{default as Geocoders}from"./resources/geocoders";export{default as GiftCardRecipients}from"./resources/gift_card_recipients";export{default as GiftCards}from"./resources/gift_cards";export{default as GoogleGeocoders}from"./resources/google_geocoders";export{default as Imports}from"./resources/imports";export{default as InStockSubscriptions}from"./resources/in_stock_subscriptions";export{default as InventoryModels}from"./resources/inventory_models";export{default as InventoryReturnLocations}from"./resources/inventory_return_locations";export{default as InventoryStockLocations}from"./resources/inventory_stock_locations";export{default as LineItemOptions}from"./resources/line_item_options";export{default as LineItems}from"./resources/line_items";export{default as ManualGateways}from"./resources/manual_gateways";export{default as ManualTaxCalculators}from"./resources/manual_tax_calculators";export{default as Markets}from"./resources/markets";export{default as Merchants}from"./resources/merchants";export{default as OrderAmountPromotionRules}from"./resources/order_amount_promotion_rules";export{default as OrderCopies}from"./resources/order_copies";export{default as OrderSubscriptions}from"./resources/order_subscriptions";export{default as OrderValidationRules}from"./resources/order_validation_rules";export{default as Orders}from"./resources/orders";export{default as Organizations}from"./resources/organization";export{default as Packages}from"./resources/packages";export{default as ParcelLineItems}from"./resources/parcel_line_items";export{default as Parcels}from"./resources/parcels";export{default as PaymentGateways}from"./resources/payment_gateways";export{default as PaymentMethods}from"./resources/payment_methods";export{default as PaypalGateways}from"./resources/paypal_gateways";export{default as PaypalPayments}from"./resources/paypal_payments";export{default as PercentageDiscountPromotions}from"./resources/percentage_discount_promotions";export{default as PriceLists}from"./resources/price_lists";export{default as Prices}from"./resources/prices";export{default as PromotionRules}from"./resources/promotion_rules";export{default as Promotions}from"./resources/promotions";export{default as Refunds}from"./resources/refunds";export{default as ReturnLineItems}from"./resources/return_line_items";export{default as Returns}from"./resources/returns";export{default as Shipments}from"./resources/shipments";export{default as ShippingCategories}from"./resources/shipping_categories";export{default as ShippingMethods}from"./resources/shipping_methods";export{default as ShippingZones}from"./resources/shipping_zones";export{default as SkuListItems}from"./resources/sku_list_items";export{default as SkuListPromotionRules}from"./resources/sku_list_promotion_rules";export{default as SkuLists}from"./resources/sku_lists";export{default as SkuOptions}from"./resources/sku_options";export{default as Skus}from"./resources/skus";export{default as StockItems}from"./resources/stock_items";export{default as StockLineItems}from"./resources/stock_line_items";export{default as StockLocations}from"./resources/stock_locations";export{default as StockTransfers}from"./resources/stock_transfers";export{default as StripeGateways}from"./resources/stripe_gateways";export{default as StripePayments}from"./resources/stripe_payments";export{default as TaxCalculators}from"./resources/tax_calculators";export{default as TaxCategories}from"./resources/tax_categories";export{default as TaxRules}from"./resources/tax_rules";export{default as TaxjarAccounts}from"./resources/taxjar_accounts";export{default as Transactions}from"./resources/transactions";export{default as Voids}from"./resources/voids";export{default as Webhooks}from"./resources/webhooks";export{default as WireTransfers}from"./resources/wire_transfers";export const resourceList=["addresses","adjustments","adyen_gateways","adyen_payments","application","attachments","authorizations","avalara_accounts","billing_info_validation_rules","bing_geocoders","braintree_gateways","braintree_payments","bundles","captures","carrier_accounts","checkout_com_gateways","checkout_com_payments","coupon_codes_promotion_rules","coupon_recipients","coupons","customer_addresses","customer_groups","customer_password_resets","customer_payment_sources","customer_subscriptions","customers","delivery_lead_times","event_callbacks","external_gateways","external_payments","external_promotions","external_tax_calculators","fixed_amount_promotions","fixed_price_promotions","free_gift_promotions","free_shipping_promotions","geocoders","gift_card_recipients","gift_cards","google_geocoders","imports","in_stock_subscriptions","inventory_models","inventory_return_locations","inventory_stock_locations","line_item_options","line_items","manual_gateways","manual_tax_calculators","markets","merchants","order_amount_promotion_rules","order_copies","order_subscriptions","order_validation_rules","orders","organization","packages","parcel_line_items","parcels","payment_gateways","payment_methods","paypal_gateways","paypal_payments","percentage_discount_promotions","price_lists","prices","promotion_rules","promotions","refunds","return_line_items","returns","shipments","shipping_categories","shipping_methods","shipping_zones","sku_list_items","sku_list_promotion_rules","sku_lists","sku_options","skus","stock_items","stock_line_items","stock_locations","stock_transfers","stripe_gateways","stripe_payments","tax_calculators","tax_categories","tax_rules","taxjar_accounts","transactions","voids","webhooks","wire_transfers"];
1
+ export{default as Addresses}from"./resources/addresses";export{default as Adjustments}from"./resources/adjustments";export{default as AdyenGateways}from"./resources/adyen_gateways";export{default as AdyenPayments}from"./resources/adyen_payments";export{default as Applications}from"./resources/application";export{default as Attachments}from"./resources/attachments";export{default as Authorizations}from"./resources/authorizations";export{default as AvalaraAccounts}from"./resources/avalara_accounts";export{default as BillingInfoValidationRules}from"./resources/billing_info_validation_rules";export{default as BingGeocoders}from"./resources/bing_geocoders";export{default as BraintreeGateways}from"./resources/braintree_gateways";export{default as BraintreePayments}from"./resources/braintree_payments";export{default as Bundles}from"./resources/bundles";export{default as Captures}from"./resources/captures";export{default as CarrierAccounts}from"./resources/carrier_accounts";export{default as CheckoutComGateways}from"./resources/checkout_com_gateways";export{default as CheckoutComPayments}from"./resources/checkout_com_payments";export{default as CouponCodesPromotionRules}from"./resources/coupon_codes_promotion_rules";export{default as CouponRecipients}from"./resources/coupon_recipients";export{default as Coupons}from"./resources/coupons";export{default as CustomerAddresses}from"./resources/customer_addresses";export{default as CustomerGroups}from"./resources/customer_groups";export{default as CustomerPasswordResets}from"./resources/customer_password_resets";export{default as CustomerPaymentSources}from"./resources/customer_payment_sources";export{default as CustomerSubscriptions}from"./resources/customer_subscriptions";export{default as Customers}from"./resources/customers";export{default as DeliveryLeadTimes}from"./resources/delivery_lead_times";export{default as EventCallbacks}from"./resources/event_callbacks";export{default as ExternalGateways}from"./resources/external_gateways";export{default as ExternalPayments}from"./resources/external_payments";export{default as ExternalPromotions}from"./resources/external_promotions";export{default as ExternalTaxCalculators}from"./resources/external_tax_calculators";export{default as FixedAmountPromotions}from"./resources/fixed_amount_promotions";export{default as FixedPricePromotions}from"./resources/fixed_price_promotions";export{default as FreeGiftPromotions}from"./resources/free_gift_promotions";export{default as FreeShippingPromotions}from"./resources/free_shipping_promotions";export{default as Geocoders}from"./resources/geocoders";export{default as GiftCardRecipients}from"./resources/gift_card_recipients";export{default as GiftCards}from"./resources/gift_cards";export{default as GoogleGeocoders}from"./resources/google_geocoders";export{default as Imports}from"./resources/imports";export{default as InStockSubscriptions}from"./resources/in_stock_subscriptions";export{default as InventoryModels}from"./resources/inventory_models";export{default as InventoryReturnLocations}from"./resources/inventory_return_locations";export{default as InventoryStockLocations}from"./resources/inventory_stock_locations";export{default as KlarnaGateways}from"./resources/klarna_gateways";export{default as KlarnaPayments}from"./resources/klarna_payments";export{default as LineItemOptions}from"./resources/line_item_options";export{default as LineItems}from"./resources/line_items";export{default as ManualGateways}from"./resources/manual_gateways";export{default as ManualTaxCalculators}from"./resources/manual_tax_calculators";export{default as Markets}from"./resources/markets";export{default as Merchants}from"./resources/merchants";export{default as OrderAmountPromotionRules}from"./resources/order_amount_promotion_rules";export{default as OrderCopies}from"./resources/order_copies";export{default as OrderSubscriptions}from"./resources/order_subscriptions";export{default as OrderValidationRules}from"./resources/order_validation_rules";export{default as Orders}from"./resources/orders";export{default as Organizations}from"./resources/organization";export{default as Packages}from"./resources/packages";export{default as ParcelLineItems}from"./resources/parcel_line_items";export{default as Parcels}from"./resources/parcels";export{default as PaymentGateways}from"./resources/payment_gateways";export{default as PaymentMethods}from"./resources/payment_methods";export{default as PaypalGateways}from"./resources/paypal_gateways";export{default as PaypalPayments}from"./resources/paypal_payments";export{default as PercentageDiscountPromotions}from"./resources/percentage_discount_promotions";export{default as PriceLists}from"./resources/price_lists";export{default as Prices}from"./resources/prices";export{default as PromotionRules}from"./resources/promotion_rules";export{default as Promotions}from"./resources/promotions";export{default as Refunds}from"./resources/refunds";export{default as ReturnLineItems}from"./resources/return_line_items";export{default as Returns}from"./resources/returns";export{default as Shipments}from"./resources/shipments";export{default as ShippingCategories}from"./resources/shipping_categories";export{default as ShippingMethods}from"./resources/shipping_methods";export{default as ShippingZones}from"./resources/shipping_zones";export{default as SkuListItems}from"./resources/sku_list_items";export{default as SkuListPromotionRules}from"./resources/sku_list_promotion_rules";export{default as SkuLists}from"./resources/sku_lists";export{default as SkuOptions}from"./resources/sku_options";export{default as Skus}from"./resources/skus";export{default as StockItems}from"./resources/stock_items";export{default as StockLineItems}from"./resources/stock_line_items";export{default as StockLocations}from"./resources/stock_locations";export{default as StockTransfers}from"./resources/stock_transfers";export{default as StripeGateways}from"./resources/stripe_gateways";export{default as StripePayments}from"./resources/stripe_payments";export{default as TaxCalculators}from"./resources/tax_calculators";export{default as TaxCategories}from"./resources/tax_categories";export{default as TaxRules}from"./resources/tax_rules";export{default as TaxjarAccounts}from"./resources/taxjar_accounts";export{default as Transactions}from"./resources/transactions";export{default as Voids}from"./resources/voids";export{default as Webhooks}from"./resources/webhooks";export{default as WireTransfers}from"./resources/wire_transfers";export const resourceList=["addresses","adjustments","adyen_gateways","adyen_payments","application","attachments","authorizations","avalara_accounts","billing_info_validation_rules","bing_geocoders","braintree_gateways","braintree_payments","bundles","captures","carrier_accounts","checkout_com_gateways","checkout_com_payments","coupon_codes_promotion_rules","coupon_recipients","coupons","customer_addresses","customer_groups","customer_password_resets","customer_payment_sources","customer_subscriptions","customers","delivery_lead_times","event_callbacks","external_gateways","external_payments","external_promotions","external_tax_calculators","fixed_amount_promotions","fixed_price_promotions","free_gift_promotions","free_shipping_promotions","geocoders","gift_card_recipients","gift_cards","google_geocoders","imports","in_stock_subscriptions","inventory_models","inventory_return_locations","inventory_stock_locations","klarna_gateways","klarna_payments","line_item_options","line_items","manual_gateways","manual_tax_calculators","markets","merchants","order_amount_promotion_rules","order_copies","order_subscriptions","order_validation_rules","orders","organization","packages","parcel_line_items","parcels","payment_gateways","payment_methods","paypal_gateways","paypal_payments","percentage_discount_promotions","price_lists","prices","promotion_rules","promotions","refunds","return_line_items","returns","shipments","shipping_categories","shipping_methods","shipping_zones","sku_list_items","sku_list_promotion_rules","sku_lists","sku_options","skus","stock_items","stock_line_items","stock_locations","stock_transfers","stripe_gateways","stripe_payments","tax_calculators","tax_categories","tax_rules","taxjar_accounts","transactions","voids","webhooks","wire_transfers"];
package/lib/esm/client.js CHANGED
@@ -1 +1 @@
1
- var l=this&&this.__classPrivateFieldSet||function(t,e,a,i,s){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?s.call(t,a):s?s.value=a:e.set(t,a),a},o=this&&this.__classPrivateFieldGet||function(t,e,a,i){if(a==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?i:a==="a"?i.call(t):i?i.value:e.get(t)},r,n;import h from"axios";import{SdkError as y,ApiError as b,ErrorType as c}from"./error";import u from"./config";const f=(t,e)=>`https://${t.toLowerCase()}.${e||u.default.domain}/api`,C=t=>{let e=new y({message:t.message,type:c.GENERIC});if(h.isAxiosError(t))if(t.response){const a=new b(e);a.type=c.RESPONSE,a.status=t.response.status,a.code=String(a.status),a.errors=t.response.data.errors,e=a}else t.request?(e.type=c.REQUEST,e.request=t.request):e.type=c.CLIENT;else h.isCancel(t)?e.type=c.CANCEL:e.source=t;throw e};class m{constructor(e){r.set(this,void 0),n.set(this,void 0),this.baseUrl=f(e.organization,e.domain),l(this,r,e.accessToken,"f");const a={timeout:e.timeout||u.client.timeout};l(this,n,h.create(Object.assign({baseURL:this.baseUrl,timeout:u.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+o(this,r,"f")}},a)),"f"),this.interceptors=o(this,n,"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){const a=o(this,n,"f").defaults;e.timeout&&(a.timeout=e.timeout),e.organization&&(this.baseUrl=f(e.organization,e.domain)),e.accessToken&&l(this,r,e.accessToken,"f")}async request(e,a,i,s){const p=i?{data:i}:void 0,E=a,v=(s==null?void 0:s.organization)?f(s.organization,s.domain):void 0,w=(s==null?void 0:s.accessToken)||o(this,r,"f"),T=w?{Authorization:"Bearer "+w}:void 0;return o(this,n,"f").request(Object.assign({method:e,baseURL:v,url:E,data:p,headers:T},s)).then(d=>d.data).catch(d=>C(d))}}r=new WeakMap,n=new WeakMap;export default m;
1
+ var h=this&&this.__classPrivateFieldSet||function(r,e,t,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!s:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(r,t):s?s.value=t:e.set(r,t),t},i=this&&this.__classPrivateFieldGet||function(r,e,t,a){if(t==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!a:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?a:t==="a"?a.call(r):a?a.value:e.get(r)},o,n;import u from"axios";import{SdkError as y,ApiError as T,ErrorType as c}from"./error";import l from"./config";const p=(r,e)=>`https://${r.toLowerCase()}.${e||l.default.domain}/api`,b=r=>{let e=new y({message:r.message,type:c.GENERIC});if(u.isAxiosError(r))if(r.response){const t=new T(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 f{constructor(e){o.set(this,void 0),n.set(this,void 0),this.baseUrl=p(e.organization,e.domain),h(this,o,e.accessToken,"f");const t={timeout:e.timeout||l.client.timeout};h(this,n,u.create(Object.assign({baseURL:this.baseUrl,timeout:l.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+i(this,o,"f")}},t)),"f"),this.interceptors=i(this,n,"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 f(e)}config(e){const t=i(this,n,"f").defaults;e.timeout&&(t.timeout=e.timeout),e.organization&&(this.baseUrl=p(e.organization,e.domain)),e.accessToken&&(h(this,o,e.accessToken,"f"),t.headers.common.Authorization="Bearer "+i(this,o,"f"))}async request(e,t,a,s){const w=a?{data:a}:void 0,v=t,E=(s==null?void 0:s.organization)?p(s.organization,s.domain):void 0,m=(s==null?void 0:s.accessToken)||i(this,o,"f"),g=m?{Authorization:"Bearer "+m}:void 0;return i(this,n,"f").request(Object.assign({method:e,baseURL:E,url:v,data:w,headers:g},s)).then(d=>d.data).catch(d=>b(d))}}o=new WeakMap,n=new WeakMap;export default f;
@@ -53,6 +53,8 @@ declare class CommerceLayerClient {
53
53
  inventory_models: api.InventoryModels;
54
54
  inventory_return_locations: api.InventoryReturnLocations;
55
55
  inventory_stock_locations: api.InventoryStockLocations;
56
+ klarna_gateways: api.KlarnaGateways;
57
+ klarna_payments: api.KlarnaPayments;
56
58
  line_item_options: api.LineItemOptions;
57
59
  line_items: api.LineItems;
58
60
  manual_gateways: api.ManualGateways;
@@ -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 w}from"./static";import f from"./resource";const p="2.7.6";class u{constructor(i){t.set(this,void 0),h.set(this,void 0),c(this,t,new f(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.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 p}get currentOrganization(){return s(this,h,"f")}config(i){i.organization&&c(this,h,i.organization,"f"),s(this,t,"f").config(i)}resources(){return w.resources()}isApiError(i){return w.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 m=o=>new u(o);export default m;
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 w from"./resource";const u="2.8.1";class p{constructor(i){t.set(this,void 0),h.set(this,void 0),c(this,t,new w(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 u}get currentOrganization(){return s(this,h,"f")}config(i){i.organization&&c(this,h,i.organization,"f"),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 m=o=>new p(o);export default m;
@@ -0,0 +1,3 @@
1
+ declare type Debugger = (pattern: string, ...args: any[]) => void;
2
+ declare const debug: (namespace?: string | undefined) => Debugger;
3
+ export default debug;
@@ -0,0 +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;
package/lib/esm/error.js CHANGED
@@ -1 +1 @@
1
- var s;(function(e){e.CLIENT="client",e.REQUEST="request",e.RESPONSE="response",e.GENERIC="generic",e.CANCEL="cancel"})(s||(s={}));class t extends Error{constructor(r){super(r.message);this.name=this.constructor.name,this.type=r.type||s.GENERIC}static isSdkError(r){return r&&["SdkError","ApiError"].includes(r.name)&&Object.values(s).includes(r.type)}}class i extends t{constructor(r){super(Object.assign(Object.assign({},r),{type:s.RESPONSE}));this.errors=[],this.name=this.constructor.name}static isApiError(r){return t.isSdkError(r)&&r.name==="ApiError"&&r.type===s.RESPONSE}first(){var r;return((r=this.errors)===null||r===void 0?void 0:r.length)>0?this.errors[0]:void 0}}export{t as SdkError,i as ApiError,s as ErrorType};
1
+ var t;(function(s){s.CLIENT="client",s.REQUEST="request",s.RESPONSE="response",s.GENERIC="generic",s.CANCEL="cancel"})(t||(t={}));class e extends Error{constructor(r){super(r.message);this.name=this.constructor.name,this.type=r.type||t.GENERIC}static isSdkError(r){return r&&["SdkError","ApiError"].includes(r.name)&&Object.values(t).includes(r.type)}}class i extends e{constructor(r){super(Object.assign(Object.assign({},r),{type:t.RESPONSE}));this.errors=[],this.name=this.constructor.name}static isApiError(r){return e.isSdkError(r)&&r.name==="ApiError"&&r.type===t.RESPONSE}first(){var r;return((r=this.errors)===null||r===void 0?void 0:r.length)>0?this.errors[0]:void 0}}export{e as SdkError,i as ApiError,t as ErrorType};
@@ -1 +1 @@
1
- import{isResourceId as o}from"./common";const l=e=>{let s;e.links&&delete e.links;const r=e.data,a=e.included;return Array.isArray(r)?s=r.map(i=>t(i,a)):s=t(r,a),s},d=(e,s=[])=>s.find(r=>e.id===r.id&&e.type===r.type)||e,t=(e,s)=>{const r=Object.assign({id:e.id,type:e.type},e.attributes);return e.relationships&&Object.keys(e.relationships).forEach(a=>{const i=e.relationships[a].data;i?Array.isArray(i)?r[a]=i.map(n=>t(d(n,s),s)):r[a]=t(d(i,s),s):i===null&&(r[a]=null)}),r},c=e=>{const s={},r={};for(const i in e){if(["type","id"].includes(i))continue;const n=e[i];n&&(o(n)||Array.isArray(n)&&o(n[0]))?r[i]={data:n}:s[i]=n}const a={type:e.type,attributes:s,relationships:r};return o(e)&&(a.id=e.id),a};export{l as denormalize,c as normalize};
1
+ import{isResourceId as i,isResourceType as d}from"./common";const c=t=>{let r;t.links&&delete t.links;const s=t.data,a=t.included;return Array.isArray(s)?r=s.map(e=>o(e,a)):r=o(s,a),r},l=(t,r=[])=>r.find(s=>t.id===s.id&&t.type===s.type)||t,o=(t,r)=>{const s=Object.assign({id:t.id,type:t.type},t.attributes);return t.relationships&&Object.keys(t.relationships).forEach(a=>{const e=t.relationships[a].data;e?Array.isArray(e)?s[a]=e.map(n=>o(l(n,r),r)):s[a]=o(l(e,r),r):e===null&&(s[a]=null)}),s},p=t=>{const r={},s={};for(const e in t){if(["type","id"].includes(e))continue;const n=t[e];n&&d(n)&&n.id===null?s[e]={data:null}:n&&(i(n)||Array.isArray(n)&&i(n[0]))?s[e]={data:n}:r[e]=n}const a={type:t.type,attributes:r,relationships:s};return i(t)&&(a.id=t.id),a};export{c as denormalize,p as normalize};
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * OpenAPI schema, version 2.7.6
2
+ * ©2022 Commerce Layer Inc.
3
+ * OpenAPI schema, version 2.8.1
4
4
  **/
5
5
  export type { Address, AddressCreate, AddressUpdate } from './resources/addresses';
6
6
  export type { Adjustment, AdjustmentCreate, AdjustmentUpdate } from './resources/adjustments';
@@ -47,6 +47,8 @@ export type { InStockSubscription, InStockSubscriptionCreate, InStockSubscriptio
47
47
  export type { InventoryModel, InventoryModelCreate, InventoryModelUpdate } from './resources/inventory_models';
48
48
  export type { InventoryReturnLocation, InventoryReturnLocationCreate, InventoryReturnLocationUpdate } from './resources/inventory_return_locations';
49
49
  export type { InventoryStockLocation, InventoryStockLocationCreate, InventoryStockLocationUpdate } from './resources/inventory_stock_locations';
50
+ export type { KlarnaGateway, KlarnaGatewayCreate, KlarnaGatewayUpdate } from './resources/klarna_gateways';
51
+ export type { KlarnaPayment, KlarnaPaymentCreate, KlarnaPaymentUpdate } from './resources/klarna_payments';
50
52
  export type { LineItemOption, LineItemOptionCreate, LineItemOptionUpdate } from './resources/line_item_options';
51
53
  export type { LineItem, LineItemCreate, LineItemUpdate } from './resources/line_items';
52
54
  export type { ManualGateway, ManualGatewayCreate, ManualGatewayUpdate } from './resources/manual_gateways';
@@ -3,6 +3,10 @@ import { QueryParamsRetrieve, QueryParamsList } from './query';
3
3
  import { ResourceTypeLock } from './api';
4
4
  import { InterceptorManager } from './interceptor';
5
5
  import { Value as JSONValue } from 'json-typescript';
6
+ declare type ResourceNull = {
7
+ id: null;
8
+ } & ResourceType;
9
+ declare type ResourceRel = ResourceId | ResourceNull;
6
10
  declare type Metadata = {
7
11
  [key: string]: JSONValue;
8
12
  };
@@ -43,7 +47,7 @@ declare class ListResponse<R> extends Array<R> {
43
47
  last(): R | undefined;
44
48
  get(index: number): R | undefined;
45
49
  }
46
- export type { Metadata, ResourceType, ResourceId, Resource, ResourceCreate, ResourceUpdate, ListResponse };
50
+ export type { Metadata, ResourceType, ResourceId, Resource, ResourceCreate, ResourceUpdate, ListResponse, ResourceRel };
47
51
  declare type ResourceAdapterConfig = {};
48
52
  declare type ResourcesInitConfig = ResourceAdapterConfig & ApiClientInitConfig;
49
53
  declare type ResourcesConfig = ResourceAdapterConfig & ApiClientConfig;
@@ -63,7 +67,7 @@ declare abstract class ApiResource {
63
67
  static readonly TYPE: ResourceTypeLock;
64
68
  protected resources: ResourceAdapter;
65
69
  constructor(adapter: ResourceAdapter);
66
- abstract relationship(id: string | ResourceId): ResourceId;
70
+ abstract relationship(id: string | ResourceId | null): ResourceRel;
67
71
  }
68
72
  export default ResourceAdapter;
69
73
  export { ApiResource, ResourcesConfig, ResourcesInitConfig };
@@ -1 +1 @@
1
- var w=this&&this.__classPrivateFieldSet||function(s,t,a,e,r){if(e==="m")throw new TypeError("Private method is not writable");if(e==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?s!==t||!r:!t.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e==="a"?r.call(s,a):r?r.value=a:t.set(s,a),a},d=this&&this.__classPrivateFieldGet||function(s,t,a,e){if(a==="a"&&!e)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?s!==t||!e:!t.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return a==="m"?e:a==="a"?e.call(s):e?e.value:t.get(s)},n,h;import y from"./client";import{denormalize as u,normalize as g}from"./jsonapi";import{generateQueryStringParams as o}from"./query";import m from"./config";class b extends Array{constructor(t,a){super(...a||[]);this.meta=t}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(t){return this.length&&t>=0?this[t]:void 0}}class p{constructor(t){n.set(this,void 0),h.set(this,{}),w(this,n,y.create(t),"f"),this.config(t)}get interceptors(){return d(this,n,"f").interceptors}config(t){d(this,n,"f").config(t)}async singleton(t,a,e){const r=o(a,t);(e==null?void 0:e.params)&&Object.assign(r,e==null?void 0:e.params);const i=await d(this,n,"f").request("get",`${t.type}`,void 0,Object.assign(Object.assign({},e),{params:r}));return u(i)}async retrieve(t,a,e){const r=o(a,t);(e==null?void 0:e.params)&&Object.assign(r,e==null?void 0:e.params);const i=await d(this,n,"f").request("get",`${t.type}/${t.id}`,void 0,Object.assign(Object.assign({},e),{params:r}));return u(i)}async list(t,a,e){var r,i;const c=o(a,t);(e==null?void 0:e.params)&&Object.assign(c,e==null?void 0:e.params);const l=await d(this,n,"f").request("get",`${t.type}`,void 0,Object.assign(Object.assign({},e),{params:c})),f=u(l),v={pageCount:Number((r=l.meta)===null||r===void 0?void 0:r.page_count),recordCount:Number((i=l.meta)===null||i===void 0?void 0:i.record_count),currentPage:(a==null?void 0:a.pageNumber)||m.default.pageNumber,recordsPerPage:(a==null?void 0:a.pageSize)||m.default.pageSize};return new b(v,f)}async create(t,a,e){const r=o(a,t);(e==null?void 0:e.params)&&Object.assign(r,e==null?void 0:e.params);const i=g(t),c=await d(this,n,"f").request("post",t.type,i,Object.assign(Object.assign({},e),{params:r}));return u(c)}async update(t,a,e){const r=o(a,t);(e==null?void 0:e.params)&&Object.assign(r,e==null?void 0:e.params);const i=g(t),c=await d(this,n,"f").request("patch",`${t.type}/${t.id}`,i,Object.assign(Object.assign({},e),{params:r}));return u(c)}async delete(t,a){await d(this,n,"f").request("delete",`${t.type}/${t.id}`,void 0,a)}}n=new WeakMap,h=new WeakMap;class j{constructor(t){this.resources=t}}export default p;export{j as ApiResource};
1
+ var f=this&&this.__classPrivateFieldSet||function(a,t,s,e,r){if(e==="m")throw new TypeError("Private method is not writable");if(e==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?a!==t||!r:!t.has(a))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e==="a"?r.call(a,s):r?r.value=s:t.set(a,s),s},o=this&&this.__classPrivateFieldGet||function(a,t,s,e){if(s==="a"&&!e)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?a!==t||!e:!t.has(a))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?e:s==="a"?e.call(a):e?e.value:t.get(a)},n,p;import w from"./client";import{denormalize as l,normalize as h}from"./jsonapi";import{generateQueryStringParams as u}from"./query";import m from"./config";class b extends Array{constructor(t,s){super(...s||[]);this.meta=t}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(t){return this.length&&t>=0?this[t]:void 0}}class y{constructor(t){n.set(this,void 0),p.set(this,{}),f(this,n,w.create(t),"f"),this.config(t)}get interceptors(){return o(this,n,"f").interceptors}config(t){o(this,n,"f").config(t)}async singleton(t,s,e){const r=u(s,t);(e==null?void 0:e.params)&&Object.assign(r,e==null?void 0:e.params);const i=await o(this,n,"f").request("get",`${t.type}`,void 0,Object.assign(Object.assign({},e),{params:r}));return l(i)}async retrieve(t,s,e){const r=u(s,t);(e==null?void 0:e.params)&&Object.assign(r,e==null?void 0:e.params);const i=await o(this,n,"f").request("get",`${t.type}/${t.id}`,void 0,Object.assign(Object.assign({},e),{params:r}));return l(i)}async list(t,s,e){var r,i;const c=u(s,t);(e==null?void 0:e.params)&&Object.assign(c,e==null?void 0:e.params);const d=await o(this,n,"f").request("get",`${t.type}`,void 0,Object.assign(Object.assign({},e),{params:c})),g=l(d),v={pageCount:Number((r=d.meta)===null||r===void 0?void 0:r.page_count),recordCount:Number((i=d.meta)===null||i===void 0?void 0:i.record_count),currentPage:(s==null?void 0:s.pageNumber)||m.default.pageNumber,recordsPerPage:(s==null?void 0:s.pageSize)||m.default.pageSize};return new b(v,g)}async create(t,s,e){const r=u(s,t);(e==null?void 0:e.params)&&Object.assign(r,e==null?void 0:e.params);const i=h(t),c=await o(this,n,"f").request("post",t.type,i,Object.assign(Object.assign({},e),{params:r}));return l(c)}async update(t,s,e){const r=u(s,t);(e==null?void 0:e.params)&&Object.assign(r,e==null?void 0:e.params);const i=h(t),c=await o(this,n,"f").request("patch",`${t.type}/${t.id}`,i,Object.assign(Object.assign({},e),{params:r}));return l(c)}async delete(t,s){await o(this,n,"f").request("delete",`${t.type}/${t.id}`,void 0,s)}}n=new WeakMap,p=new WeakMap;class j{constructor(t){this.resources=t}}export default y;export{j as ApiResource};
@@ -1,10 +1,10 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
3
  import { Geocoder } from './geocoders';
4
- declare type AddressRel = ResourceId & {
4
+ declare type AddressRel = ResourceRel & {
5
5
  type: typeof Addresses.TYPE;
6
6
  };
7
- declare type GeocoderRel = ResourceId & {
7
+ declare type GeocoderRel = ResourceRel & {
8
8
  type: 'geocoders';
9
9
  };
10
10
  interface Address extends Resource {
@@ -80,7 +80,7 @@ declare class Addresses extends ApiResource {
80
80
  update(resource: AddressUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
81
81
  delete(id: string, options?: ResourcesConfig): Promise<void>;
82
82
  isAddress(resource: any): resource is Address;
83
- relationship(id: string | ResourceId): AddressRel;
83
+ relationship(id: string | ResourceId | null): AddressRel;
84
84
  type(): string;
85
85
  }
86
86
  export default Addresses;
@@ -1 +1 @@
1
- import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isAddress(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="addresses";export default s;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}isAddress(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="addresses";export default s;
@@ -1,6 +1,6 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
2
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
3
- declare type AdjustmentRel = ResourceId & {
1
+ import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
+ import { QueryParamsList, QueryParamsRetrieve } from '../query';
3
+ declare type AdjustmentRel = ResourceRel & {
4
4
  type: typeof Adjustments.TYPE;
5
5
  };
6
6
  interface Adjustment extends Resource {
@@ -28,7 +28,7 @@ declare class Adjustments extends ApiResource {
28
28
  update(resource: AdjustmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Adjustment>;
29
29
  delete(id: string, options?: ResourcesConfig): Promise<void>;
30
30
  isAdjustment(resource: any): resource is Adjustment;
31
- relationship(id: string | ResourceId): AdjustmentRel;
31
+ relationship(id: string | ResourceId | null): AdjustmentRel;
32
32
  type(): string;
33
33
  }
34
34
  export default Adjustments;