@commercelayer/sdk 2.3.12 → 2.4.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 (364) 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/common.js +1 -1
  7. package/lib/cjs/debug.d.ts +3 -0
  8. package/lib/cjs/debug.js +1 -0
  9. package/lib/cjs/error.js +1 -1
  10. package/lib/cjs/index.js +1 -1
  11. package/lib/cjs/jsonapi.js +1 -1
  12. package/lib/cjs/model.d.ts +5 -3
  13. package/lib/cjs/query.d.ts +35 -0
  14. package/lib/cjs/query.js +1 -1
  15. package/lib/cjs/resource.js +1 -1
  16. package/lib/cjs/resources/addresses.d.ts +2 -2
  17. package/lib/cjs/resources/adjustments.d.ts +2 -2
  18. package/lib/cjs/resources/adyen_gateways.d.ts +2 -2
  19. package/lib/cjs/resources/adyen_gateways.js +1 -1
  20. package/lib/cjs/resources/adyen_payments.d.ts +2 -3
  21. package/lib/cjs/resources/adyen_payments.js +1 -1
  22. package/lib/cjs/resources/application.d.ts +2 -2
  23. package/lib/cjs/resources/attachments.d.ts +2 -2
  24. package/lib/cjs/resources/authorizations.d.ts +2 -2
  25. package/lib/cjs/resources/avalara_accounts.d.ts +2 -2
  26. package/lib/cjs/resources/billing_info_validation_rules.d.ts +2 -2
  27. package/lib/cjs/resources/bing_geocoders.d.ts +2 -2
  28. package/lib/cjs/resources/braintree_gateways.d.ts +2 -2
  29. package/lib/cjs/resources/braintree_gateways.js +1 -1
  30. package/lib/cjs/resources/braintree_payments.d.ts +2 -2
  31. package/lib/cjs/resources/braintree_payments.js +1 -1
  32. package/lib/cjs/resources/bundles.d.ts +2 -2
  33. package/lib/cjs/resources/captures.d.ts +2 -2
  34. package/lib/cjs/resources/carrier_accounts.d.ts +2 -2
  35. package/lib/cjs/resources/checkout_com_gateways.d.ts +2 -2
  36. package/lib/cjs/resources/checkout_com_gateways.js +1 -1
  37. package/lib/cjs/resources/checkout_com_payments.d.ts +2 -3
  38. package/lib/cjs/resources/checkout_com_payments.js +1 -1
  39. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +2 -2
  40. package/lib/cjs/resources/coupon_recipients.d.ts +2 -2
  41. package/lib/cjs/resources/coupons.d.ts +5 -2
  42. package/lib/cjs/resources/customer_addresses.d.ts +2 -2
  43. package/lib/cjs/resources/customer_groups.d.ts +2 -2
  44. package/lib/cjs/resources/customer_password_resets.d.ts +2 -2
  45. package/lib/cjs/resources/customer_payment_sources.d.ts +9 -5
  46. package/lib/cjs/resources/customer_subscriptions.d.ts +2 -2
  47. package/lib/cjs/resources/customers.d.ts +2 -2
  48. package/lib/cjs/resources/delivery_lead_times.d.ts +2 -2
  49. package/lib/cjs/resources/delivery_lead_times.js +1 -1
  50. package/lib/cjs/resources/event_callbacks.d.ts +2 -2
  51. package/lib/cjs/resources/external_gateways.d.ts +5 -2
  52. package/lib/cjs/resources/external_gateways.js +1 -1
  53. package/lib/cjs/resources/external_payments.d.ts +4 -2
  54. package/lib/cjs/resources/external_payments.js +1 -1
  55. package/lib/cjs/resources/external_promotions.d.ts +2 -2
  56. package/lib/cjs/resources/external_promotions.js +1 -1
  57. package/lib/cjs/resources/external_tax_calculators.d.ts +2 -2
  58. package/lib/cjs/resources/external_tax_calculators.js +1 -1
  59. package/lib/cjs/resources/fixed_amount_promotions.d.ts +2 -2
  60. package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
  61. package/lib/cjs/resources/fixed_price_promotions.d.ts +2 -2
  62. package/lib/cjs/resources/free_gift_promotions.d.ts +2 -2
  63. package/lib/cjs/resources/free_gift_promotions.js +1 -1
  64. package/lib/cjs/resources/free_shipping_promotions.d.ts +2 -2
  65. package/lib/cjs/resources/geocoders.d.ts +4 -3
  66. package/lib/cjs/resources/geocoders.js +1 -1
  67. package/lib/cjs/resources/gift_card_recipients.d.ts +2 -2
  68. package/lib/cjs/resources/gift_card_recipients.js +1 -1
  69. package/lib/cjs/resources/gift_cards.d.ts +2 -2
  70. package/lib/cjs/resources/google_geocoders.d.ts +2 -2
  71. package/lib/cjs/resources/imports.d.ts +2 -2
  72. package/lib/cjs/resources/in_stock_subscriptions.d.ts +2 -2
  73. package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
  74. package/lib/cjs/resources/inventory_models.d.ts +2 -2
  75. package/lib/cjs/resources/inventory_return_locations.d.ts +2 -2
  76. package/lib/cjs/resources/inventory_stock_locations.d.ts +2 -2
  77. package/lib/cjs/resources/klarna_gateways.d.ts +46 -0
  78. package/lib/cjs/resources/klarna_gateways.js +1 -0
  79. package/lib/cjs/resources/klarna_payments.d.ts +43 -0
  80. package/lib/cjs/resources/klarna_payments.js +1 -0
  81. package/lib/cjs/resources/line_item_options.d.ts +2 -2
  82. package/lib/cjs/resources/line_item_options.js +1 -1
  83. package/lib/cjs/resources/line_items.d.ts +2 -2
  84. package/lib/cjs/resources/line_items.js +1 -1
  85. package/lib/cjs/resources/manual_gateways.d.ts +2 -2
  86. package/lib/cjs/resources/manual_gateways.js +1 -1
  87. package/lib/cjs/resources/manual_tax_calculators.d.ts +2 -2
  88. package/lib/cjs/resources/markets.d.ts +2 -2
  89. package/lib/cjs/resources/merchants.d.ts +2 -2
  90. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +2 -2
  91. package/lib/cjs/resources/order_amount_promotion_rules.js +1 -1
  92. package/lib/cjs/resources/order_copies.d.ts +2 -2
  93. package/lib/cjs/resources/order_subscriptions.d.ts +2 -2
  94. package/lib/cjs/resources/order_validation_rules.d.ts +4 -3
  95. package/lib/cjs/resources/order_validation_rules.js +1 -1
  96. package/lib/cjs/resources/orders.d.ts +9 -5
  97. package/lib/cjs/resources/organization.d.ts +2 -2
  98. package/lib/cjs/resources/organization.js +1 -1
  99. package/lib/cjs/resources/packages.d.ts +2 -2
  100. package/lib/cjs/resources/parcel_line_items.d.ts +2 -2
  101. package/lib/cjs/resources/parcels.d.ts +2 -2
  102. package/lib/cjs/resources/payment_gateways.d.ts +4 -13
  103. package/lib/cjs/resources/payment_gateways.js +1 -1
  104. package/lib/cjs/resources/payment_methods.d.ts +5 -2
  105. package/lib/cjs/resources/payment_methods.js +1 -1
  106. package/lib/cjs/resources/paypal_gateways.d.ts +2 -2
  107. package/lib/cjs/resources/paypal_gateways.js +1 -1
  108. package/lib/cjs/resources/paypal_payments.d.ts +2 -2
  109. package/lib/cjs/resources/paypal_payments.js +1 -1
  110. package/lib/cjs/resources/percentage_discount_promotions.d.ts +2 -2
  111. package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
  112. package/lib/cjs/resources/price_lists.d.ts +2 -2
  113. package/lib/cjs/resources/prices.d.ts +2 -2
  114. package/lib/cjs/resources/promotion_rules.d.ts +4 -3
  115. package/lib/cjs/resources/promotion_rules.js +1 -1
  116. package/lib/cjs/resources/promotions.d.ts +4 -3
  117. package/lib/cjs/resources/promotions.js +1 -1
  118. package/lib/cjs/resources/refunds.d.ts +2 -2
  119. package/lib/cjs/resources/return_line_items.d.ts +2 -2
  120. package/lib/cjs/resources/return_line_items.js +1 -1
  121. package/lib/cjs/resources/returns.d.ts +2 -2
  122. package/lib/cjs/resources/shipments.d.ts +2 -2
  123. package/lib/cjs/resources/shipping_categories.d.ts +2 -2
  124. package/lib/cjs/resources/shipping_methods.d.ts +2 -2
  125. package/lib/cjs/resources/shipping_methods.js +1 -1
  126. package/lib/cjs/resources/shipping_zones.d.ts +2 -2
  127. package/lib/cjs/resources/sku_list_items.d.ts +7 -4
  128. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +2 -2
  129. package/lib/cjs/resources/sku_lists.d.ts +2 -2
  130. package/lib/cjs/resources/sku_lists.js +1 -1
  131. package/lib/cjs/resources/sku_options.d.ts +2 -2
  132. package/lib/cjs/resources/sku_options.js +1 -1
  133. package/lib/cjs/resources/skus.d.ts +2 -2
  134. package/lib/cjs/resources/stock_items.d.ts +2 -2
  135. package/lib/cjs/resources/stock_line_items.d.ts +2 -2
  136. package/lib/cjs/resources/stock_locations.d.ts +2 -2
  137. package/lib/cjs/resources/stock_transfers.d.ts +2 -2
  138. package/lib/cjs/resources/stripe_gateways.d.ts +2 -2
  139. package/lib/cjs/resources/stripe_gateways.js +1 -1
  140. package/lib/cjs/resources/stripe_payments.d.ts +2 -2
  141. package/lib/cjs/resources/stripe_payments.js +1 -1
  142. package/lib/cjs/resources/tax_calculators.d.ts +4 -3
  143. package/lib/cjs/resources/tax_calculators.js +1 -1
  144. package/lib/cjs/resources/tax_categories.d.ts +2 -2
  145. package/lib/cjs/resources/tax_rules.d.ts +2 -2
  146. package/lib/cjs/resources/taxjar_accounts.d.ts +2 -2
  147. package/lib/cjs/resources/transactions.d.ts +4 -3
  148. package/lib/cjs/resources/transactions.js +1 -1
  149. package/lib/cjs/resources/voids.d.ts +2 -2
  150. package/lib/cjs/resources/webhooks.d.ts +2 -2
  151. package/lib/cjs/resources/wire_transfers.d.ts +2 -2
  152. package/lib/cjs/static.js +1 -1
  153. package/lib/esm/api.d.ts +6 -4
  154. package/lib/esm/api.js +1 -1
  155. package/lib/esm/client.js +1 -1
  156. package/lib/esm/commercelayer.d.ts +2 -0
  157. package/lib/esm/commercelayer.js +1 -1
  158. package/lib/esm/common.js +1 -1
  159. package/lib/esm/debug.d.ts +3 -0
  160. package/lib/esm/debug.js +1 -0
  161. package/lib/esm/error.js +1 -1
  162. package/lib/esm/jsonapi.js +1 -1
  163. package/lib/esm/model.d.ts +5 -3
  164. package/lib/esm/query.d.ts +35 -0
  165. package/lib/esm/query.js +1 -1
  166. package/lib/esm/resource.js +1 -1
  167. package/lib/esm/resources/addresses.d.ts +2 -2
  168. package/lib/esm/resources/addresses.js +1 -1
  169. package/lib/esm/resources/adjustments.d.ts +2 -2
  170. package/lib/esm/resources/adjustments.js +1 -1
  171. package/lib/esm/resources/adyen_gateways.d.ts +2 -2
  172. package/lib/esm/resources/adyen_gateways.js +1 -1
  173. package/lib/esm/resources/adyen_payments.d.ts +2 -3
  174. package/lib/esm/resources/adyen_payments.js +1 -1
  175. package/lib/esm/resources/application.d.ts +2 -2
  176. package/lib/esm/resources/application.js +1 -1
  177. package/lib/esm/resources/attachments.d.ts +2 -2
  178. package/lib/esm/resources/attachments.js +1 -1
  179. package/lib/esm/resources/authorizations.d.ts +2 -2
  180. package/lib/esm/resources/authorizations.js +1 -1
  181. package/lib/esm/resources/avalara_accounts.d.ts +2 -2
  182. package/lib/esm/resources/avalara_accounts.js +1 -1
  183. package/lib/esm/resources/billing_info_validation_rules.d.ts +2 -2
  184. package/lib/esm/resources/billing_info_validation_rules.js +1 -1
  185. package/lib/esm/resources/bing_geocoders.d.ts +2 -2
  186. package/lib/esm/resources/bing_geocoders.js +1 -1
  187. package/lib/esm/resources/braintree_gateways.d.ts +2 -2
  188. package/lib/esm/resources/braintree_gateways.js +1 -1
  189. package/lib/esm/resources/braintree_payments.d.ts +2 -2
  190. package/lib/esm/resources/braintree_payments.js +1 -1
  191. package/lib/esm/resources/bundles.d.ts +2 -2
  192. package/lib/esm/resources/bundles.js +1 -1
  193. package/lib/esm/resources/captures.d.ts +2 -2
  194. package/lib/esm/resources/captures.js +1 -1
  195. package/lib/esm/resources/carrier_accounts.d.ts +2 -2
  196. package/lib/esm/resources/carrier_accounts.js +1 -1
  197. package/lib/esm/resources/checkout_com_gateways.d.ts +2 -2
  198. package/lib/esm/resources/checkout_com_gateways.js +1 -1
  199. package/lib/esm/resources/checkout_com_payments.d.ts +2 -3
  200. package/lib/esm/resources/checkout_com_payments.js +1 -1
  201. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +2 -2
  202. package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
  203. package/lib/esm/resources/coupon_recipients.d.ts +2 -2
  204. package/lib/esm/resources/coupon_recipients.js +1 -1
  205. package/lib/esm/resources/coupons.d.ts +5 -2
  206. package/lib/esm/resources/coupons.js +1 -1
  207. package/lib/esm/resources/customer_addresses.d.ts +2 -2
  208. package/lib/esm/resources/customer_addresses.js +1 -1
  209. package/lib/esm/resources/customer_groups.d.ts +2 -2
  210. package/lib/esm/resources/customer_groups.js +1 -1
  211. package/lib/esm/resources/customer_password_resets.d.ts +2 -2
  212. package/lib/esm/resources/customer_password_resets.js +1 -1
  213. package/lib/esm/resources/customer_payment_sources.d.ts +9 -5
  214. package/lib/esm/resources/customer_payment_sources.js +1 -1
  215. package/lib/esm/resources/customer_subscriptions.d.ts +2 -2
  216. package/lib/esm/resources/customer_subscriptions.js +1 -1
  217. package/lib/esm/resources/customers.d.ts +2 -2
  218. package/lib/esm/resources/customers.js +1 -1
  219. package/lib/esm/resources/delivery_lead_times.d.ts +2 -2
  220. package/lib/esm/resources/delivery_lead_times.js +1 -1
  221. package/lib/esm/resources/event_callbacks.d.ts +2 -2
  222. package/lib/esm/resources/event_callbacks.js +1 -1
  223. package/lib/esm/resources/external_gateways.d.ts +5 -2
  224. package/lib/esm/resources/external_gateways.js +1 -1
  225. package/lib/esm/resources/external_payments.d.ts +4 -2
  226. package/lib/esm/resources/external_payments.js +1 -1
  227. package/lib/esm/resources/external_promotions.d.ts +2 -2
  228. package/lib/esm/resources/external_promotions.js +1 -1
  229. package/lib/esm/resources/external_tax_calculators.d.ts +2 -2
  230. package/lib/esm/resources/external_tax_calculators.js +1 -1
  231. package/lib/esm/resources/fixed_amount_promotions.d.ts +2 -2
  232. package/lib/esm/resources/fixed_amount_promotions.js +1 -1
  233. package/lib/esm/resources/fixed_price_promotions.d.ts +2 -2
  234. package/lib/esm/resources/fixed_price_promotions.js +1 -1
  235. package/lib/esm/resources/free_gift_promotions.d.ts +2 -2
  236. package/lib/esm/resources/free_gift_promotions.js +1 -1
  237. package/lib/esm/resources/free_shipping_promotions.d.ts +2 -2
  238. package/lib/esm/resources/free_shipping_promotions.js +1 -1
  239. package/lib/esm/resources/geocoders.d.ts +4 -3
  240. package/lib/esm/resources/geocoders.js +1 -1
  241. package/lib/esm/resources/gift_card_recipients.d.ts +2 -2
  242. package/lib/esm/resources/gift_card_recipients.js +1 -1
  243. package/lib/esm/resources/gift_cards.d.ts +2 -2
  244. package/lib/esm/resources/gift_cards.js +1 -1
  245. package/lib/esm/resources/google_geocoders.d.ts +2 -2
  246. package/lib/esm/resources/google_geocoders.js +1 -1
  247. package/lib/esm/resources/imports.d.ts +2 -2
  248. package/lib/esm/resources/imports.js +1 -1
  249. package/lib/esm/resources/in_stock_subscriptions.d.ts +2 -2
  250. package/lib/esm/resources/in_stock_subscriptions.js +1 -1
  251. package/lib/esm/resources/inventory_models.d.ts +2 -2
  252. package/lib/esm/resources/inventory_models.js +1 -1
  253. package/lib/esm/resources/inventory_return_locations.d.ts +2 -2
  254. package/lib/esm/resources/inventory_return_locations.js +1 -1
  255. package/lib/esm/resources/inventory_stock_locations.d.ts +2 -2
  256. package/lib/esm/resources/inventory_stock_locations.js +1 -1
  257. package/lib/esm/resources/klarna_gateways.d.ts +46 -0
  258. package/lib/esm/resources/klarna_gateways.js +1 -0
  259. package/lib/esm/resources/klarna_payments.d.ts +43 -0
  260. package/lib/esm/resources/klarna_payments.js +1 -0
  261. package/lib/esm/resources/line_item_options.d.ts +2 -2
  262. package/lib/esm/resources/line_item_options.js +1 -1
  263. package/lib/esm/resources/line_items.d.ts +2 -2
  264. package/lib/esm/resources/line_items.js +1 -1
  265. package/lib/esm/resources/manual_gateways.d.ts +2 -2
  266. package/lib/esm/resources/manual_gateways.js +1 -1
  267. package/lib/esm/resources/manual_tax_calculators.d.ts +2 -2
  268. package/lib/esm/resources/manual_tax_calculators.js +1 -1
  269. package/lib/esm/resources/markets.d.ts +2 -2
  270. package/lib/esm/resources/markets.js +1 -1
  271. package/lib/esm/resources/merchants.d.ts +2 -2
  272. package/lib/esm/resources/merchants.js +1 -1
  273. package/lib/esm/resources/order_amount_promotion_rules.d.ts +2 -2
  274. package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
  275. package/lib/esm/resources/order_copies.d.ts +2 -2
  276. package/lib/esm/resources/order_copies.js +1 -1
  277. package/lib/esm/resources/order_subscriptions.d.ts +2 -2
  278. package/lib/esm/resources/order_subscriptions.js +1 -1
  279. package/lib/esm/resources/order_validation_rules.d.ts +4 -3
  280. package/lib/esm/resources/order_validation_rules.js +1 -1
  281. package/lib/esm/resources/orders.d.ts +9 -5
  282. package/lib/esm/resources/orders.js +1 -1
  283. package/lib/esm/resources/organization.d.ts +2 -2
  284. package/lib/esm/resources/organization.js +1 -1
  285. package/lib/esm/resources/packages.d.ts +2 -2
  286. package/lib/esm/resources/packages.js +1 -1
  287. package/lib/esm/resources/parcel_line_items.d.ts +2 -2
  288. package/lib/esm/resources/parcel_line_items.js +1 -1
  289. package/lib/esm/resources/parcels.d.ts +2 -2
  290. package/lib/esm/resources/parcels.js +1 -1
  291. package/lib/esm/resources/payment_gateways.d.ts +4 -13
  292. package/lib/esm/resources/payment_gateways.js +1 -1
  293. package/lib/esm/resources/payment_methods.d.ts +5 -2
  294. package/lib/esm/resources/payment_methods.js +1 -1
  295. package/lib/esm/resources/paypal_gateways.d.ts +2 -2
  296. package/lib/esm/resources/paypal_gateways.js +1 -1
  297. package/lib/esm/resources/paypal_payments.d.ts +2 -2
  298. package/lib/esm/resources/paypal_payments.js +1 -1
  299. package/lib/esm/resources/percentage_discount_promotions.d.ts +2 -2
  300. package/lib/esm/resources/percentage_discount_promotions.js +1 -1
  301. package/lib/esm/resources/price_lists.d.ts +2 -2
  302. package/lib/esm/resources/price_lists.js +1 -1
  303. package/lib/esm/resources/prices.d.ts +2 -2
  304. package/lib/esm/resources/prices.js +1 -1
  305. package/lib/esm/resources/promotion_rules.d.ts +4 -3
  306. package/lib/esm/resources/promotion_rules.js +1 -1
  307. package/lib/esm/resources/promotions.d.ts +4 -3
  308. package/lib/esm/resources/promotions.js +1 -1
  309. package/lib/esm/resources/refunds.d.ts +2 -2
  310. package/lib/esm/resources/refunds.js +1 -1
  311. package/lib/esm/resources/return_line_items.d.ts +2 -2
  312. package/lib/esm/resources/return_line_items.js +1 -1
  313. package/lib/esm/resources/returns.d.ts +2 -2
  314. package/lib/esm/resources/returns.js +1 -1
  315. package/lib/esm/resources/shipments.d.ts +2 -2
  316. package/lib/esm/resources/shipments.js +1 -1
  317. package/lib/esm/resources/shipping_categories.d.ts +2 -2
  318. package/lib/esm/resources/shipping_categories.js +1 -1
  319. package/lib/esm/resources/shipping_methods.d.ts +2 -2
  320. package/lib/esm/resources/shipping_methods.js +1 -1
  321. package/lib/esm/resources/shipping_zones.d.ts +2 -2
  322. package/lib/esm/resources/shipping_zones.js +1 -1
  323. package/lib/esm/resources/sku_list_items.d.ts +7 -4
  324. package/lib/esm/resources/sku_list_items.js +1 -1
  325. package/lib/esm/resources/sku_list_promotion_rules.d.ts +2 -2
  326. package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
  327. package/lib/esm/resources/sku_lists.d.ts +2 -2
  328. package/lib/esm/resources/sku_lists.js +1 -1
  329. package/lib/esm/resources/sku_options.d.ts +2 -2
  330. package/lib/esm/resources/sku_options.js +1 -1
  331. package/lib/esm/resources/skus.d.ts +2 -2
  332. package/lib/esm/resources/skus.js +1 -1
  333. package/lib/esm/resources/stock_items.d.ts +2 -2
  334. package/lib/esm/resources/stock_items.js +1 -1
  335. package/lib/esm/resources/stock_line_items.d.ts +2 -2
  336. package/lib/esm/resources/stock_line_items.js +1 -1
  337. package/lib/esm/resources/stock_locations.d.ts +2 -2
  338. package/lib/esm/resources/stock_locations.js +1 -1
  339. package/lib/esm/resources/stock_transfers.d.ts +2 -2
  340. package/lib/esm/resources/stock_transfers.js +1 -1
  341. package/lib/esm/resources/stripe_gateways.d.ts +2 -2
  342. package/lib/esm/resources/stripe_gateways.js +1 -1
  343. package/lib/esm/resources/stripe_payments.d.ts +2 -2
  344. package/lib/esm/resources/stripe_payments.js +1 -1
  345. package/lib/esm/resources/tax_calculators.d.ts +4 -3
  346. package/lib/esm/resources/tax_calculators.js +1 -1
  347. package/lib/esm/resources/tax_categories.d.ts +2 -2
  348. package/lib/esm/resources/tax_categories.js +1 -1
  349. package/lib/esm/resources/tax_rules.d.ts +2 -2
  350. package/lib/esm/resources/tax_rules.js +1 -1
  351. package/lib/esm/resources/taxjar_accounts.d.ts +2 -2
  352. package/lib/esm/resources/taxjar_accounts.js +1 -1
  353. package/lib/esm/resources/transactions.d.ts +4 -3
  354. package/lib/esm/resources/transactions.js +1 -1
  355. package/lib/esm/resources/voids.d.ts +2 -2
  356. package/lib/esm/resources/voids.js +1 -1
  357. package/lib/esm/resources/webhooks.d.ts +2 -2
  358. package/lib/esm/resources/webhooks.js +1 -1
  359. package/lib/esm/resources/wire_transfers.d.ts +2 -2
  360. package/lib/esm/resources/wire_transfers.js +1 -1
  361. package/lib/esm/static.js +1 -1
  362. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  363. package/lib/tsconfig.tsbuildinfo +1 -1
  364. package/package.json +3 -7
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingMethods extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:ShippingMethods.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:ShippingMethods.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:ShippingMethods.TYPE,id:e},r)}isShippingMethod(e){return e.type&&e.type===ShippingMethods.TYPE}relationship(e){return typeof e=="string"?{id:e,type:ShippingMethods.TYPE}:{id:e.id,type:ShippingMethods.TYPE}}type(){return ShippingMethods.TYPE}}ShippingMethods.TYPE="shipping_methods",exports.default=ShippingMethods;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class ShippingMethods extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:ShippingMethods.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:ShippingMethods.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:ShippingMethods.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:ShippingMethods.TYPE,id:e},t)}isShippingMethod(e){return e.type&&e.type===ShippingMethods.TYPE}relationship(e){return typeof e=="string"?{id:e,type:ShippingMethods.TYPE}:{id:e.id,type:ShippingMethods.TYPE}}type(){return ShippingMethods.TYPE}}ShippingMethods.TYPE="shipping_methods",exports.default=ShippingMethods;
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -17,18 +17,21 @@ declare type SkuRel = ResourceId & {
17
17
  };
18
18
  interface SkuListItem extends Resource {
19
19
  position?: number;
20
+ sku_code?: string;
20
21
  quantity?: number;
21
22
  sku_list?: SkuList;
22
23
  sku?: Sku;
23
24
  }
24
25
  interface SkuListItemCreate extends ResourceCreate {
25
- position: number;
26
- quantity: number;
26
+ position?: number;
27
+ sku_code?: string;
28
+ quantity?: number;
27
29
  sku_list?: SkuListRel;
28
30
  sku?: SkuRel;
29
31
  }
30
32
  interface SkuListItemUpdate extends ResourceUpdate {
31
33
  position?: number;
34
+ sku_code?: string;
32
35
  quantity?: number;
33
36
  }
34
37
  declare class SkuListItems extends ApiResource {
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuLists extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:SkuLists.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:SkuLists.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:SkuLists.TYPE,id:e},r)}isSkuList(e){return e.type&&e.type===SkuLists.TYPE}relationship(e){return typeof e=="string"?{id:e,type:SkuLists.TYPE}:{id:e.id,type:SkuLists.TYPE}}type(){return SkuLists.TYPE}}SkuLists.TYPE="sku_lists",exports.default=SkuLists;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuLists extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:SkuLists.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:SkuLists.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuLists.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:SkuLists.TYPE,id:e},t)}isSkuList(e){return e.type&&e.type===SkuLists.TYPE}relationship(e){return typeof e=="string"?{id:e,type:SkuLists.TYPE}:{id:e.id,type:SkuLists.TYPE}}type(){return SkuLists.TYPE}}SkuLists.TYPE="sku_lists",exports.default=SkuLists;
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuOptions extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:SkuOptions.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:SkuOptions.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:SkuOptions.TYPE,id:e},r)}isSkuOption(e){return e.type&&e.type===SkuOptions.TYPE}relationship(e){return typeof e=="string"?{id:e,type:SkuOptions.TYPE}:{id:e.id,type:SkuOptions.TYPE}}type(){return SkuOptions.TYPE}}SkuOptions.TYPE="sku_options",exports.default=SkuOptions;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class SkuOptions extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:SkuOptions.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:SkuOptions.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:SkuOptions.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:SkuOptions.TYPE,id:e},t)}isSkuOption(e){return e.type&&e.type===SkuOptions.TYPE}relationship(e){return typeof e=="string"?{id:e,type:SkuOptions.TYPE}:{id:e.id,type:SkuOptions.TYPE}}type(){return SkuOptions.TYPE}}SkuOptions.TYPE="sku_options",exports.default=SkuOptions;
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripeGateways extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:StripeGateways.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:StripeGateways.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:StripeGateways.TYPE,id:e},s)}isStripeGateway(e){return e.type&&e.type===StripeGateways.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StripeGateways.TYPE}:{id:e.id,type:StripeGateways.TYPE}}type(){return StripeGateways.TYPE}}StripeGateways.TYPE="stripe_gateways",exports.default=StripeGateways;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripeGateways extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:StripeGateways.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:StripeGateways.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:StripeGateways.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:StripeGateways.TYPE,id:e},s)}isStripeGateway(e){return e.type&&e.type===StripeGateways.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StripeGateways.TYPE}:{id:e.id,type:StripeGateways.TYPE}}type(){return StripeGateways.TYPE}}StripeGateways.TYPE="stripe_gateways",exports.default=StripeGateways;
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripePayments extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:StripePayments.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:StripePayments.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:StripePayments.TYPE,id:e},s)}isStripePayment(e){return e.type&&e.type===StripePayments.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StripePayments.TYPE}:{id:e.id,type:StripePayments.TYPE}}type(){return StripePayments.TYPE}}StripePayments.TYPE="stripe_payments",exports.default=StripePayments;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class StripePayments extends resource_1.ApiResource{async list(e,s){return this.resources.list({type:StripePayments.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:StripePayments.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:StripePayments.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:StripePayments.TYPE,id:e},s)}isStripePayment(e){return e.type&&e.type===StripePayments.TYPE}relationship(e){return typeof e=="string"?{id:e,type:StripePayments.TYPE}:{id:e.id,type:StripePayments.TYPE}}type(){return StripePayments.TYPE}}StripePayments.TYPE="stripe_payments",exports.default=StripePayments;
@@ -1,9 +1,9 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList } from '../query';
6
+ import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
7
  import { TaxCategory } from './tax_categories';
8
8
  import { Market } from './markets';
9
9
  import { Attachment } from './attachments';
@@ -19,6 +19,7 @@ interface TaxCalculator extends Resource {
19
19
  declare class TaxCalculators extends ApiResource {
20
20
  static readonly TYPE: 'tax_calculators';
21
21
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<TaxCalculator>>;
22
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<TaxCalculator>;
22
23
  isTaxCalculator(resource: any): resource is TaxCalculator;
23
24
  relationship(id: string | ResourceId): TaxCalculatorRel;
24
25
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class TaxCalculators extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:TaxCalculators.TYPE},e,t)}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,t){return this.resources.list({type:TaxCalculators.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:TaxCalculators.TYPE,id:e},t,r)}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,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,9 +1,9 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList } from '../query';
6
+ import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
7
  import { Order } from './orders';
8
8
  declare type TransactionRel = ResourceId & {
9
9
  type: typeof Transactions.TYPE;
@@ -25,6 +25,7 @@ interface Transaction extends Resource {
25
25
  declare class Transactions extends ApiResource {
26
26
  static readonly TYPE: 'transactions';
27
27
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Transaction>>;
28
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Transaction>;
28
29
  isTransaction(resource: any): resource is Transaction;
29
30
  relationship(id: string | ResourceId): TransactionRel;
30
31
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Transactions extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Transactions.TYPE},e,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,t){return this.resources.list({type:Transactions.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:Transactions.TYPE,id:e},t,r)}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,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
4
4
  **/
5
5
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
6
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
package/lib/cjs/static.js CHANGED
@@ -1 +1 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t),Object.defineProperty(r,i,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),__importStar=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&__createBinding(e,r,t);return __setModuleDefault(e,r),e};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommerceLayerStatic=void 0;const api=__importStar(require("./api")),error_1=require("./error");exports.CommerceLayerStatic={resources:()=>api.resourceList,isSdkError:r=>error_1.SdkError.isSdkError(r),isApiError:r=>error_1.ApiError.isApiError(r)};
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,i){i===void 0&&(i=t),Object.defineProperty(e,i,{enumerable:!0,get:function(){return r[t]}})}:function(e,r,t,i){i===void 0&&(i=t),e[i]=r[t]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)t!=="default"&&Object.prototype.hasOwnProperty.call(e,t)&&__createBinding(r,e,t);return __setModuleDefault(r,e),r};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommerceLayerStatic=void 0;const api=__importStar(require("./api")),error_1=require("./error");exports.CommerceLayerStatic={resources:()=>api.resourceList,isSdkError:e=>error_1.SdkError.isSdkError(e),isApiError:e=>error_1.ApiError.isApiError(e)};
package/lib/esm/api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
2
+ * ©2022 Commerce Layer Inc.
3
+ * Source code generated automatically by SDK codegen from OpenAPI schema 2.8.0
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 h=this&&this.__classPrivateFieldSet||function(t,e,o,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,o):i?i.value=o:e.set(t,o),o},c=this&&this.__classPrivateFieldGet||function(t,e,o,r){if(o==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?r:o==="a"?r.call(t):r?r.value:e.get(t)},a,s;import u from"axios";import{SdkError as g,ApiError as T,ErrorType as n}from"./error";import l from"./config";const p=(t,e)=>`https://${t.toLowerCase()}.${e||l.default.domain}/api`,y=t=>{let e=new g({message:t.message,type:n.GENERIC});if(u.isAxiosError(t))if(t.response){const o=new T(e);o.type=n.RESPONSE,o.status=t.response.status,o.code=String(o.status),o.errors=t.response.data.errors,e=o}else t.request?(e.type=n.REQUEST,e.request=t.request):e.type=n.CLIENT;else u.isCancel(t)?e.type=n.CANCEL:e.source=t;throw e};class f{constructor(e){a.set(this,void 0),s.set(this,void 0),this.baseUrl=p(e.organization,e.domain),h(this,a,e.accessToken,"f");const o={timeout:e.timeout||l.client.timeout};h(this,s,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 "+c(this,a,"f")}},o)),"f"),this.interceptors=c(this,s,"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 o=c(this,s,"f").defaults;e.timeout&&(o.timeout=e.timeout),e.organization&&(this.baseUrl=p(e.organization,e.domain)),e.accessToken&&h(this,a,e.accessToken,"f")}async request(e,o,r,i){const m=r?{data:r}:void 0,w=o,v=(i==null?void 0:i.organization)?p(i.organization,i.domain):void 0,E=(i==null?void 0:i.accessToken)?{Authorization:"Bearer "+i.accessToken}:void 0;return c(this,s,"f").request(Object.assign({method:e,baseURL:v,url:w,data:m,headers:E},i)).then(d=>d.data).catch(d=>y(d))}}a=new WeakMap,s=new WeakMap;export default f;
1
+ var l=this&&this.__classPrivateFieldSet||function(a,e,t,r,s){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?a!==e||!s:!e.has(a))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?s.call(a,t):s?s.value=t:e.set(a,t),t},n=this&&this.__classPrivateFieldGet||function(a,e,t,r){if(t==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?a!==e||!r:!e.has(a))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(a):r?r.value:e.get(a)},i,o;import h from"axios";import{SdkError as y,ApiError as b,ErrorType as c}from"./error";import u from"./config";const f=(a,e)=>`https://${a.toLowerCase()}.${e||u.default.domain}/api`,C=a=>{let e=new y({message:a.message,type:c.GENERIC});if(h.isAxiosError(a))if(a.response){const t=new b(e);t.type=c.RESPONSE,t.status=a.response.status,t.code=String(t.status),t.errors=a.response.data.errors,e=t}else a.request?(e.type=c.REQUEST,e.request=a.request):e.type=c.CLIENT;else h.isCancel(a)?e.type=c.CANCEL:e.source=a;throw e};class m{constructor(e){i.set(this,void 0),o.set(this,void 0),this.baseUrl=f(e.organization,e.domain),l(this,i,e.accessToken,"f");const t={timeout:e.timeout||u.client.timeout};l(this,o,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 "+n(this,i,"f")}},t)),"f"),this.interceptors=n(this,o,"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 t=n(this,o,"f").defaults;e.timeout&&(t.timeout=e.timeout),e.organization&&(this.baseUrl=f(e.organization,e.domain)),e.accessToken&&(l(this,i,e.accessToken,"f"),t.headers.common.Authorization="Bearer "+n(this,i,"f"))}async request(e,t,r,s){const p=r?{data:r}:void 0,E=t,v=(s==null?void 0:s.organization)?f(s.organization,s.domain):void 0,w=(s==null?void 0:s.accessToken)||n(this,i,"f"),T=w?{Authorization:"Bearer "+w}:void 0;return n(this,o,"f").request(Object.assign({method:e,baseURL:v,url:E,data:p,headers:T},s)).then(d=>d.data).catch(d=>C(d))}}i=new WeakMap,o=new WeakMap;export default m;
@@ -52,6 +52,8 @@ declare class CommerceLayerClient {
52
52
  inventory_models: api.InventoryModels;
53
53
  inventory_return_locations: api.InventoryReturnLocations;
54
54
  inventory_stock_locations: api.InventoryStockLocations;
55
+ klarna_gateways: api.KlarnaGateways;
56
+ klarna_payments: api.KlarnaPayments;
55
57
  line_item_options: api.LineItemOptions;
56
58
  line_items: api.LineItems;
57
59
  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 f}from"./static";import w from"./resource";class u{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.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"))}get currentOrganization(){return s(this,h,"f")}config(i){!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 p=o=>new u(o);export default p;
1
+ var c=this&&this.__classPrivateFieldSet||function(r,i,n,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?r!==i||!a:!i.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(r,n):a?a.value=n:i.set(r,n),n},s=this&&this.__classPrivateFieldGet||function(r,i,n,o){if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?r!==i||!o:!i.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?o:n==="a"?o.call(r):o?o.value:i.get(r)},t,h;import*as e from"./api";import{CommerceLayerStatic as w}from"./static";import f from"./resource";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.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"))}get currentOrganization(){return s(this,h,"f")}config(i){!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 o=this.addResponseInterceptor(n);return i.id=o,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 p=r=>new u(r);export default p;
package/lib/esm/common.js CHANGED
@@ -1 +1 @@
1
- import{resourceList as p}from"./api";const i=e=>e&&e.type&&e.id&&p.includes(e.type),t=e=>e&&typeof e.type!="undefined"&&e.type&&p.includes(e.type);export{i as isResourceId,t as isResourceType};
1
+ const e=t=>t&&t.type&&t.id,n=t=>t&&typeof t.type!="undefined"&&t.type;export{e as isResourceId,n as isResourceType};
@@ -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 e;(function(t){t.CLIENT="client",t.REQUEST="request",t.RESPONSE="response",t.GENERIC="generic",t.CANCEL="cancel"})(e||(e={}));class r extends Error{constructor(s){super(s.message);this.name=this.constructor.name,this.type=s.type||e.GENERIC}static isSdkError(s){return s&&["SdkError","ApiError"].includes(s.name)&&Object.values(e).includes(s.type)}}class n extends r{constructor(s){super(Object.assign(Object.assign({},s),{type:e.RESPONSE}));this.errors=[],this.name=this.constructor.name}static isApiError(s){return r.isSdkError(s)&&s.name==="ApiError"&&s.type===e.RESPONSE}first(){return this.errors.length>0?this.errors[0]:void 0}}export{r as SdkError,n as ApiError,e as ErrorType};
@@ -1 +1 @@
1
- import{isResourceId as t}from"./common";const c=i=>{let e;i.links&&delete i.links;const s=i.data,a=i.included;return Array.isArray(s)?e=s.map(r=>o(r,a)):e=o(s,a),e},d=(i,e=[])=>e.find(s=>i.id===s.id&&i.type===s.type)||i,o=(i,e)=>{const s=Object.assign({id:i.id,type:i.type},i.attributes);return i.relationships&&Object.keys(i.relationships).forEach(a=>{const r=i.relationships[a].data;r?Array.isArray(r)?s[a]=r.map(n=>o(d(n,e),e)):s[a]=o(d(r,e),e):r===null&&(s[a]=null)}),s},l=i=>{const e={},s={};for(const r in i){if(["type","id"].includes(r))continue;const n=i[r];n&&(t(n)||Array.isArray(n)&&t(n[0]))?s[r]={data:n}:e[r]=n}const a={type:i.type,attributes:e,relationships:s};return t(i)&&(a.id=i.id),a};export{c as denormalize,l as normalize};
1
+ import{isResourceId as r}from"./common";const d=t=>{let i;t.links&&delete t.links;const e=t.data,n=t.included;return Array.isArray(e)?i=e.map(a=>o(a,n)):i=o(e,n),i},l=(t,i=[])=>i.find(n=>t.id===n.id&&t.type===n.type)||t,o=(t,i)=>{const e=Object.assign({id:t.id,type:t.type},t.attributes);return t.relationships&&Object.keys(t.relationships).forEach(n=>{const a=t.relationships[n].data;a?Array.isArray(a)?e[n]=a.map(s=>o(l(s,i),i)):e[n]=o(l(a,i),i):a===null&&(e[n]=null)}),e},c=t=>{const i={},e={};for(const a in t){if(["type","id"].includes(a))continue;const s=t[a];s&&(r(s)||Array.isArray(s)&&r(s[0]))?e[a]={data:s}:i[a]=s}const n={type:t.type,attributes:i,relationships:e};return r(t)&&(n.id=t.id),n};export{d as denormalize,c as normalize};