@commercelayer/sdk 4.48.0 → 4.49.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 (547) hide show
  1. package/lib/cjs/api.d.ts +1 -126
  2. package/lib/cjs/api.js +1 -394
  3. package/lib/cjs/client.d.ts +1 -31
  4. package/lib/cjs/client.js +1 -123
  5. package/lib/cjs/commercelayer.d.ts +1 -152
  6. package/lib/cjs/commercelayer.js +1 -243
  7. package/lib/cjs/common.d.ts +1 -4
  8. package/lib/cjs/common.js +1 -14
  9. package/lib/cjs/config.d.ts +1 -11
  10. package/lib/cjs/config.js +1 -13
  11. package/lib/cjs/debug.d.ts +1 -3
  12. package/lib/cjs/debug.js +1 -42
  13. package/lib/cjs/error.d.ts +1 -28
  14. package/lib/cjs/error.js +1 -43
  15. package/lib/cjs/index.d.ts +1 -7
  16. package/lib/cjs/index.js +1 -29
  17. package/lib/cjs/interceptor.d.ts +1 -21
  18. package/lib/cjs/interceptor.js +1 -2
  19. package/lib/cjs/jsonapi.d.ts +1 -5
  20. package/lib/cjs/jsonapi.js +1 -82
  21. package/lib/cjs/model.d.ts +1 -124
  22. package/lib/cjs/model.js +1 -3
  23. package/lib/cjs/query.d.ts +1 -23
  24. package/lib/cjs/query.js +1 -51
  25. package/lib/cjs/resource.d.ts +1 -75
  26. package/lib/cjs/resource.js +1 -145
  27. package/lib/cjs/resources/addresses.d.ts +1 -102
  28. package/lib/cjs/resources/addresses.js +1 -49
  29. package/lib/cjs/resources/adjustments.d.ts +1 -41
  30. package/lib/cjs/resources/adjustments.js +1 -37
  31. package/lib/cjs/resources/adyen_gateways.d.ts +1 -59
  32. package/lib/cjs/resources/adyen_gateways.js +1 -45
  33. package/lib/cjs/resources/adyen_payments.d.ts +1 -49
  34. package/lib/cjs/resources/adyen_payments.js +1 -45
  35. package/lib/cjs/resources/application.d.ts +1 -21
  36. package/lib/cjs/resources/application.js +1 -21
  37. package/lib/cjs/resources/attachments.d.ts +1 -156
  38. package/lib/cjs/resources/attachments.js +1 -33
  39. package/lib/cjs/resources/authorizations.d.ts +1 -66
  40. package/lib/cjs/resources/authorizations.js +1 -51
  41. package/lib/cjs/resources/avalara_accounts.d.ts +1 -58
  42. package/lib/cjs/resources/avalara_accounts.js +1 -49
  43. package/lib/cjs/resources/axerve_gateways.d.ts +1 -47
  44. package/lib/cjs/resources/axerve_gateways.js +1 -45
  45. package/lib/cjs/resources/axerve_payments.d.ts +1 -52
  46. package/lib/cjs/resources/axerve_payments.js +1 -45
  47. package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -38
  48. package/lib/cjs/resources/billing_info_validation_rules.js +1 -45
  49. package/lib/cjs/resources/bing_geocoders.d.ts +1 -35
  50. package/lib/cjs/resources/bing_geocoders.js +1 -41
  51. package/lib/cjs/resources/braintree_gateways.d.ts +1 -59
  52. package/lib/cjs/resources/braintree_gateways.js +1 -45
  53. package/lib/cjs/resources/braintree_payments.d.ts +1 -51
  54. package/lib/cjs/resources/braintree_payments.js +1 -45
  55. package/lib/cjs/resources/bundles.d.ts +1 -90
  56. package/lib/cjs/resources/bundles.js +1 -61
  57. package/lib/cjs/resources/buy_x_pay_y_promotions.d.ts +1 -134
  58. package/lib/cjs/resources/buy_x_pay_y_promotions.js +1 -81
  59. package/lib/cjs/resources/captures.d.ts +1 -57
  60. package/lib/cjs/resources/captures.js +1 -51
  61. package/lib/cjs/resources/carrier_accounts.d.ts +1 -29
  62. package/lib/cjs/resources/carrier_accounts.js +1 -36
  63. package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -48
  64. package/lib/cjs/resources/checkout_com_gateways.js +1 -45
  65. package/lib/cjs/resources/checkout_com_payments.d.ts +1 -62
  66. package/lib/cjs/resources/checkout_com_payments.js +1 -45
  67. package/lib/cjs/resources/cleanups.d.ts +1 -39
  68. package/lib/cjs/resources/cleanups.js +1 -38
  69. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -66
  70. package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -41
  71. package/lib/cjs/resources/coupon_recipients.d.ts +1 -47
  72. package/lib/cjs/resources/coupon_recipients.js +1 -45
  73. package/lib/cjs/resources/coupons.d.ts +1 -70
  74. package/lib/cjs/resources/coupons.js +1 -53
  75. package/lib/cjs/resources/custom_promotion_rules.d.ts +1 -61
  76. package/lib/cjs/resources/custom_promotion_rules.js +1 -37
  77. package/lib/cjs/resources/customer_addresses.d.ts +1 -49
  78. package/lib/cjs/resources/customer_addresses.js +1 -49
  79. package/lib/cjs/resources/customer_groups.d.ts +1 -39
  80. package/lib/cjs/resources/customer_groups.js +1 -49
  81. package/lib/cjs/resources/customer_password_resets.d.ts +1 -36
  82. package/lib/cjs/resources/customer_password_resets.js +1 -41
  83. package/lib/cjs/resources/customer_payment_sources.d.ts +1 -85
  84. package/lib/cjs/resources/customer_payment_sources.js +1 -45
  85. package/lib/cjs/resources/customer_subscriptions.d.ts +1 -34
  86. package/lib/cjs/resources/customer_subscriptions.js +1 -45
  87. package/lib/cjs/resources/customers.d.ts +1 -75
  88. package/lib/cjs/resources/customers.js +1 -77
  89. package/lib/cjs/resources/delivery_lead_times.d.ts +1 -54
  90. package/lib/cjs/resources/delivery_lead_times.js +1 -49
  91. package/lib/cjs/resources/event_callbacks.d.ts +1 -24
  92. package/lib/cjs/resources/event_callbacks.js +1 -28
  93. package/lib/cjs/resources/events.d.ts +1 -24
  94. package/lib/cjs/resources/events.js +1 -32
  95. package/lib/cjs/resources/exports.d.ts +1 -40
  96. package/lib/cjs/resources/exports.js +1 -34
  97. package/lib/cjs/resources/external_gateways.d.ts +1 -55
  98. package/lib/cjs/resources/external_gateways.js +1 -45
  99. package/lib/cjs/resources/external_payments.d.ts +1 -47
  100. package/lib/cjs/resources/external_payments.js +1 -49
  101. package/lib/cjs/resources/external_promotions.d.ts +1 -132
  102. package/lib/cjs/resources/external_promotions.js +1 -81
  103. package/lib/cjs/resources/external_tax_calculators.d.ts +1 -43
  104. package/lib/cjs/resources/external_tax_calculators.js +1 -45
  105. package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -130
  106. package/lib/cjs/resources/fixed_amount_promotions.js +1 -81
  107. package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -130
  108. package/lib/cjs/resources/fixed_price_promotions.js +1 -81
  109. package/lib/cjs/resources/free_gift_promotions.d.ts +1 -128
  110. package/lib/cjs/resources/free_gift_promotions.js +1 -81
  111. package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -122
  112. package/lib/cjs/resources/free_shipping_promotions.js +1 -77
  113. package/lib/cjs/resources/geocoders.d.ts +1 -24
  114. package/lib/cjs/resources/geocoders.js +1 -32
  115. package/lib/cjs/resources/gift_card_recipients.d.ts +1 -47
  116. package/lib/cjs/resources/gift_card_recipients.js +1 -45
  117. package/lib/cjs/resources/gift_cards.d.ts +1 -99
  118. package/lib/cjs/resources/gift_cards.js +1 -57
  119. package/lib/cjs/resources/google_geocoders.d.ts +1 -35
  120. package/lib/cjs/resources/google_geocoders.js +1 -41
  121. package/lib/cjs/resources/imports.d.ts +1 -43
  122. package/lib/cjs/resources/imports.js +1 -34
  123. package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -65
  124. package/lib/cjs/resources/in_stock_subscriptions.js +1 -53
  125. package/lib/cjs/resources/inventory_models.d.ts +1 -54
  126. package/lib/cjs/resources/inventory_models.js +1 -49
  127. package/lib/cjs/resources/inventory_return_locations.d.ts +1 -46
  128. package/lib/cjs/resources/inventory_return_locations.js +1 -45
  129. package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -49
  130. package/lib/cjs/resources/inventory_stock_locations.js +1 -45
  131. package/lib/cjs/resources/klarna_gateways.d.ts +1 -47
  132. package/lib/cjs/resources/klarna_gateways.js +1 -45
  133. package/lib/cjs/resources/klarna_payments.d.ts +1 -46
  134. package/lib/cjs/resources/klarna_payments.js +1 -45
  135. package/lib/cjs/resources/line_item_options.d.ts +1 -68
  136. package/lib/cjs/resources/line_item_options.js +1 -49
  137. package/lib/cjs/resources/line_items.d.ts +1 -166
  138. package/lib/cjs/resources/line_items.js +1 -65
  139. package/lib/cjs/resources/manual_gateways.d.ts +1 -33
  140. package/lib/cjs/resources/manual_gateways.js +1 -41
  141. package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -44
  142. package/lib/cjs/resources/manual_tax_calculators.js +1 -49
  143. package/lib/cjs/resources/markets.d.ts +1 -104
  144. package/lib/cjs/resources/markets.js +1 -65
  145. package/lib/cjs/resources/merchants.d.ts +1 -41
  146. package/lib/cjs/resources/merchants.js +1 -45
  147. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -66
  148. package/lib/cjs/resources/order_amount_promotion_rules.js +1 -37
  149. package/lib/cjs/resources/order_copies.d.ts +1 -50
  150. package/lib/cjs/resources/order_copies.js +1 -49
  151. package/lib/cjs/resources/order_factories.d.ts +1 -33
  152. package/lib/cjs/resources/order_factories.js +1 -36
  153. package/lib/cjs/resources/order_subscription_items.d.ts +1 -71
  154. package/lib/cjs/resources/order_subscription_items.js +1 -41
  155. package/lib/cjs/resources/order_subscriptions.d.ts +1 -94
  156. package/lib/cjs/resources/order_subscriptions.js +1 -77
  157. package/lib/cjs/resources/order_validation_rules.d.ts +1 -26
  158. package/lib/cjs/resources/order_validation_rules.js +1 -36
  159. package/lib/cjs/resources/orders.d.ts +1 -359
  160. package/lib/cjs/resources/orders.js +1 -157
  161. package/lib/cjs/resources/organization.d.ts +1 -33
  162. package/lib/cjs/resources/organization.js +1 -21
  163. package/lib/cjs/resources/packages.d.ts +1 -59
  164. package/lib/cjs/resources/packages.js +1 -49
  165. package/lib/cjs/resources/parcel_line_items.d.ts +1 -46
  166. package/lib/cjs/resources/parcel_line_items.js +1 -45
  167. package/lib/cjs/resources/parcels.d.ts +1 -125
  168. package/lib/cjs/resources/parcels.js +1 -57
  169. package/lib/cjs/resources/payment_gateways.d.ts +1 -24
  170. package/lib/cjs/resources/payment_gateways.js +1 -32
  171. package/lib/cjs/resources/payment_methods.d.ts +1 -80
  172. package/lib/cjs/resources/payment_methods.js +1 -49
  173. package/lib/cjs/resources/payment_options.d.ts +1 -43
  174. package/lib/cjs/resources/payment_options.js +1 -41
  175. package/lib/cjs/resources/paypal_gateways.d.ts +1 -40
  176. package/lib/cjs/resources/paypal_gateways.js +1 -45
  177. package/lib/cjs/resources/paypal_payments.d.ts +1 -52
  178. package/lib/cjs/resources/paypal_payments.js +1 -45
  179. package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -128
  180. package/lib/cjs/resources/percentage_discount_promotions.js +1 -81
  181. package/lib/cjs/resources/price_frequency_tiers.d.ts +1 -52
  182. package/lib/cjs/resources/price_frequency_tiers.js +1 -49
  183. package/lib/cjs/resources/price_lists.d.ts +1 -45
  184. package/lib/cjs/resources/price_lists.js +1 -45
  185. package/lib/cjs/resources/price_tiers.d.ts +1 -31
  186. package/lib/cjs/resources/price_tiers.js +1 -36
  187. package/lib/cjs/resources/price_volume_tiers.d.ts +1 -52
  188. package/lib/cjs/resources/price_volume_tiers.js +1 -49
  189. package/lib/cjs/resources/prices.d.ts +1 -83
  190. package/lib/cjs/resources/prices.js +1 -73
  191. package/lib/cjs/resources/promotion_rules.d.ts +1 -28
  192. package/lib/cjs/resources/promotion_rules.js +1 -28
  193. package/lib/cjs/resources/promotions.d.ts +1 -62
  194. package/lib/cjs/resources/promotions.js +1 -68
  195. package/lib/cjs/resources/recurring_order_copies.d.ts +1 -52
  196. package/lib/cjs/resources/recurring_order_copies.js +1 -49
  197. package/lib/cjs/resources/refunds.d.ts +1 -43
  198. package/lib/cjs/resources/refunds.js +1 -44
  199. package/lib/cjs/resources/reserved_stocks.d.ts +1 -27
  200. package/lib/cjs/resources/reserved_stocks.js +1 -36
  201. package/lib/cjs/resources/resource_errors.d.ts +1 -22
  202. package/lib/cjs/resources/resource_errors.js +1 -24
  203. package/lib/cjs/resources/return_line_items.d.ts +1 -50
  204. package/lib/cjs/resources/return_line_items.js +1 -41
  205. package/lib/cjs/resources/returns.d.ts +1 -86
  206. package/lib/cjs/resources/returns.js +1 -73
  207. package/lib/cjs/resources/satispay_gateways.d.ts +1 -45
  208. package/lib/cjs/resources/satispay_gateways.js +1 -45
  209. package/lib/cjs/resources/satispay_payments.d.ts +1 -48
  210. package/lib/cjs/resources/satispay_payments.js +1 -45
  211. package/lib/cjs/resources/shipments.d.ts +1 -139
  212. package/lib/cjs/resources/shipments.js +1 -105
  213. package/lib/cjs/resources/shipping_categories.d.ts +1 -39
  214. package/lib/cjs/resources/shipping_categories.js +1 -45
  215. package/lib/cjs/resources/shipping_method_tiers.d.ts +1 -31
  216. package/lib/cjs/resources/shipping_method_tiers.js +1 -36
  217. package/lib/cjs/resources/shipping_methods.d.ts +1 -121
  218. package/lib/cjs/resources/shipping_methods.js +1 -69
  219. package/lib/cjs/resources/shipping_weight_tiers.d.ts +1 -49
  220. package/lib/cjs/resources/shipping_weight_tiers.js +1 -45
  221. package/lib/cjs/resources/shipping_zones.d.ts +1 -51
  222. package/lib/cjs/resources/shipping_zones.js +1 -41
  223. package/lib/cjs/resources/sku_list_items.d.ts +1 -50
  224. package/lib/cjs/resources/sku_list_items.js +1 -45
  225. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -75
  226. package/lib/cjs/resources/sku_list_promotion_rules.js +1 -45
  227. package/lib/cjs/resources/sku_lists.d.ts +1 -63
  228. package/lib/cjs/resources/sku_lists.js +1 -57
  229. package/lib/cjs/resources/sku_options.d.ts +1 -70
  230. package/lib/cjs/resources/sku_options.js +1 -53
  231. package/lib/cjs/resources/skus.d.ts +1 -95
  232. package/lib/cjs/resources/skus.js +1 -73
  233. package/lib/cjs/resources/stock_items.d.ts +1 -59
  234. package/lib/cjs/resources/stock_items.js +1 -57
  235. package/lib/cjs/resources/stock_line_items.d.ts +1 -69
  236. package/lib/cjs/resources/stock_line_items.js +1 -53
  237. package/lib/cjs/resources/stock_locations.d.ts +1 -63
  238. package/lib/cjs/resources/stock_locations.js +1 -61
  239. package/lib/cjs/resources/stock_reservations.d.ts +1 -49
  240. package/lib/cjs/resources/stock_reservations.js +1 -53
  241. package/lib/cjs/resources/stock_transfers.d.ts +1 -79
  242. package/lib/cjs/resources/stock_transfers.js +1 -61
  243. package/lib/cjs/resources/stripe_gateways.d.ts +1 -44
  244. package/lib/cjs/resources/stripe_gateways.js +1 -45
  245. package/lib/cjs/resources/stripe_payments.d.ts +1 -56
  246. package/lib/cjs/resources/stripe_payments.js +1 -45
  247. package/lib/cjs/resources/subscription_models.d.ts +1 -48
  248. package/lib/cjs/resources/subscription_models.js +1 -45
  249. package/lib/cjs/resources/tags.d.ts +1 -27
  250. package/lib/cjs/resources/tags.js +1 -33
  251. package/lib/cjs/resources/tax_calculators.d.ts +1 -27
  252. package/lib/cjs/resources/tax_calculators.js +1 -36
  253. package/lib/cjs/resources/tax_categories.d.ts +1 -62
  254. package/lib/cjs/resources/tax_categories.js +1 -45
  255. package/lib/cjs/resources/tax_rules.d.ts +1 -72
  256. package/lib/cjs/resources/tax_rules.js +1 -41
  257. package/lib/cjs/resources/taxjar_accounts.d.ts +1 -46
  258. package/lib/cjs/resources/taxjar_accounts.js +1 -49
  259. package/lib/cjs/resources/transactions.d.ts +1 -40
  260. package/lib/cjs/resources/transactions.js +1 -40
  261. package/lib/cjs/resources/versions.d.ts +1 -22
  262. package/lib/cjs/resources/versions.js +1 -24
  263. package/lib/cjs/resources/voids.d.ts +1 -43
  264. package/lib/cjs/resources/voids.js +1 -44
  265. package/lib/cjs/resources/webhooks.d.ts +1 -51
  266. package/lib/cjs/resources/webhooks.js +1 -41
  267. package/lib/cjs/resources/wire_transfers.d.ts +1 -36
  268. package/lib/cjs/resources/wire_transfers.js +1 -41
  269. package/lib/cjs/static.d.ts +1 -9
  270. package/lib/cjs/static.js +1 -45
  271. package/lib/cjs/util.d.ts +1 -6
  272. package/lib/cjs/util.js +1 -15
  273. package/lib/esm/api.d.ts +1 -126
  274. package/lib/esm/api.js +1 -265
  275. package/lib/esm/client.d.ts +1 -31
  276. package/lib/esm/client.js +1 -118
  277. package/lib/esm/commercelayer.d.ts +1 -152
  278. package/lib/esm/commercelayer.js +1 -214
  279. package/lib/esm/common.d.ts +1 -4
  280. package/lib/esm/common.js +1 -10
  281. package/lib/esm/config.d.ts +1 -11
  282. package/lib/esm/config.js +1 -11
  283. package/lib/esm/debug.d.ts +1 -3
  284. package/lib/esm/debug.js +1 -40
  285. package/lib/esm/error.d.ts +1 -28
  286. package/lib/esm/error.js +1 -38
  287. package/lib/esm/index.d.ts +1 -7
  288. package/lib/esm/index.js +1 -6
  289. package/lib/esm/interceptor.d.ts +1 -21
  290. package/lib/esm/interceptor.js +1 -1
  291. package/lib/esm/jsonapi.d.ts +1 -5
  292. package/lib/esm/jsonapi.js +1 -75
  293. package/lib/esm/model.d.ts +1 -124
  294. package/lib/esm/model.js +1 -2
  295. package/lib/esm/query.d.ts +1 -23
  296. package/lib/esm/query.js +1 -45
  297. package/lib/esm/resource.d.ts +1 -75
  298. package/lib/esm/resource.js +1 -139
  299. package/lib/esm/resources/addresses.d.ts +1 -102
  300. package/lib/esm/resources/addresses.js +1 -47
  301. package/lib/esm/resources/adjustments.d.ts +1 -41
  302. package/lib/esm/resources/adjustments.js +1 -35
  303. package/lib/esm/resources/adyen_gateways.d.ts +1 -59
  304. package/lib/esm/resources/adyen_gateways.js +1 -43
  305. package/lib/esm/resources/adyen_payments.d.ts +1 -49
  306. package/lib/esm/resources/adyen_payments.js +1 -43
  307. package/lib/esm/resources/application.d.ts +1 -21
  308. package/lib/esm/resources/application.js +1 -19
  309. package/lib/esm/resources/attachments.d.ts +1 -156
  310. package/lib/esm/resources/attachments.js +1 -31
  311. package/lib/esm/resources/authorizations.d.ts +1 -66
  312. package/lib/esm/resources/authorizations.js +1 -49
  313. package/lib/esm/resources/avalara_accounts.d.ts +1 -58
  314. package/lib/esm/resources/avalara_accounts.js +1 -47
  315. package/lib/esm/resources/axerve_gateways.d.ts +1 -47
  316. package/lib/esm/resources/axerve_gateways.js +1 -43
  317. package/lib/esm/resources/axerve_payments.d.ts +1 -52
  318. package/lib/esm/resources/axerve_payments.js +1 -43
  319. package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -38
  320. package/lib/esm/resources/billing_info_validation_rules.js +1 -43
  321. package/lib/esm/resources/bing_geocoders.d.ts +1 -35
  322. package/lib/esm/resources/bing_geocoders.js +1 -39
  323. package/lib/esm/resources/braintree_gateways.d.ts +1 -59
  324. package/lib/esm/resources/braintree_gateways.js +1 -43
  325. package/lib/esm/resources/braintree_payments.d.ts +1 -51
  326. package/lib/esm/resources/braintree_payments.js +1 -43
  327. package/lib/esm/resources/bundles.d.ts +1 -90
  328. package/lib/esm/resources/bundles.js +1 -59
  329. package/lib/esm/resources/buy_x_pay_y_promotions.d.ts +1 -134
  330. package/lib/esm/resources/buy_x_pay_y_promotions.js +1 -79
  331. package/lib/esm/resources/captures.d.ts +1 -57
  332. package/lib/esm/resources/captures.js +1 -49
  333. package/lib/esm/resources/carrier_accounts.d.ts +1 -29
  334. package/lib/esm/resources/carrier_accounts.js +1 -34
  335. package/lib/esm/resources/checkout_com_gateways.d.ts +1 -48
  336. package/lib/esm/resources/checkout_com_gateways.js +1 -43
  337. package/lib/esm/resources/checkout_com_payments.d.ts +1 -62
  338. package/lib/esm/resources/checkout_com_payments.js +1 -43
  339. package/lib/esm/resources/cleanups.d.ts +1 -39
  340. package/lib/esm/resources/cleanups.js +1 -36
  341. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -66
  342. package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -39
  343. package/lib/esm/resources/coupon_recipients.d.ts +1 -47
  344. package/lib/esm/resources/coupon_recipients.js +1 -43
  345. package/lib/esm/resources/coupons.d.ts +1 -70
  346. package/lib/esm/resources/coupons.js +1 -51
  347. package/lib/esm/resources/custom_promotion_rules.d.ts +1 -61
  348. package/lib/esm/resources/custom_promotion_rules.js +1 -35
  349. package/lib/esm/resources/customer_addresses.d.ts +1 -49
  350. package/lib/esm/resources/customer_addresses.js +1 -47
  351. package/lib/esm/resources/customer_groups.d.ts +1 -39
  352. package/lib/esm/resources/customer_groups.js +1 -47
  353. package/lib/esm/resources/customer_password_resets.d.ts +1 -36
  354. package/lib/esm/resources/customer_password_resets.js +1 -39
  355. package/lib/esm/resources/customer_payment_sources.d.ts +1 -85
  356. package/lib/esm/resources/customer_payment_sources.js +1 -43
  357. package/lib/esm/resources/customer_subscriptions.d.ts +1 -34
  358. package/lib/esm/resources/customer_subscriptions.js +1 -43
  359. package/lib/esm/resources/customers.d.ts +1 -75
  360. package/lib/esm/resources/customers.js +1 -75
  361. package/lib/esm/resources/delivery_lead_times.d.ts +1 -54
  362. package/lib/esm/resources/delivery_lead_times.js +1 -47
  363. package/lib/esm/resources/event_callbacks.d.ts +1 -24
  364. package/lib/esm/resources/event_callbacks.js +1 -26
  365. package/lib/esm/resources/events.d.ts +1 -24
  366. package/lib/esm/resources/events.js +1 -30
  367. package/lib/esm/resources/exports.d.ts +1 -40
  368. package/lib/esm/resources/exports.js +1 -32
  369. package/lib/esm/resources/external_gateways.d.ts +1 -55
  370. package/lib/esm/resources/external_gateways.js +1 -43
  371. package/lib/esm/resources/external_payments.d.ts +1 -47
  372. package/lib/esm/resources/external_payments.js +1 -47
  373. package/lib/esm/resources/external_promotions.d.ts +1 -132
  374. package/lib/esm/resources/external_promotions.js +1 -79
  375. package/lib/esm/resources/external_tax_calculators.d.ts +1 -43
  376. package/lib/esm/resources/external_tax_calculators.js +1 -43
  377. package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -130
  378. package/lib/esm/resources/fixed_amount_promotions.js +1 -79
  379. package/lib/esm/resources/fixed_price_promotions.d.ts +1 -130
  380. package/lib/esm/resources/fixed_price_promotions.js +1 -79
  381. package/lib/esm/resources/free_gift_promotions.d.ts +1 -128
  382. package/lib/esm/resources/free_gift_promotions.js +1 -79
  383. package/lib/esm/resources/free_shipping_promotions.d.ts +1 -122
  384. package/lib/esm/resources/free_shipping_promotions.js +1 -75
  385. package/lib/esm/resources/geocoders.d.ts +1 -24
  386. package/lib/esm/resources/geocoders.js +1 -30
  387. package/lib/esm/resources/gift_card_recipients.d.ts +1 -47
  388. package/lib/esm/resources/gift_card_recipients.js +1 -43
  389. package/lib/esm/resources/gift_cards.d.ts +1 -99
  390. package/lib/esm/resources/gift_cards.js +1 -55
  391. package/lib/esm/resources/google_geocoders.d.ts +1 -35
  392. package/lib/esm/resources/google_geocoders.js +1 -39
  393. package/lib/esm/resources/imports.d.ts +1 -43
  394. package/lib/esm/resources/imports.js +1 -32
  395. package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -65
  396. package/lib/esm/resources/in_stock_subscriptions.js +1 -51
  397. package/lib/esm/resources/inventory_models.d.ts +1 -54
  398. package/lib/esm/resources/inventory_models.js +1 -47
  399. package/lib/esm/resources/inventory_return_locations.d.ts +1 -46
  400. package/lib/esm/resources/inventory_return_locations.js +1 -43
  401. package/lib/esm/resources/inventory_stock_locations.d.ts +1 -49
  402. package/lib/esm/resources/inventory_stock_locations.js +1 -43
  403. package/lib/esm/resources/klarna_gateways.d.ts +1 -47
  404. package/lib/esm/resources/klarna_gateways.js +1 -43
  405. package/lib/esm/resources/klarna_payments.d.ts +1 -46
  406. package/lib/esm/resources/klarna_payments.js +1 -43
  407. package/lib/esm/resources/line_item_options.d.ts +1 -68
  408. package/lib/esm/resources/line_item_options.js +1 -47
  409. package/lib/esm/resources/line_items.d.ts +1 -166
  410. package/lib/esm/resources/line_items.js +1 -63
  411. package/lib/esm/resources/manual_gateways.d.ts +1 -33
  412. package/lib/esm/resources/manual_gateways.js +1 -39
  413. package/lib/esm/resources/manual_tax_calculators.d.ts +1 -44
  414. package/lib/esm/resources/manual_tax_calculators.js +1 -47
  415. package/lib/esm/resources/markets.d.ts +1 -104
  416. package/lib/esm/resources/markets.js +1 -63
  417. package/lib/esm/resources/merchants.d.ts +1 -41
  418. package/lib/esm/resources/merchants.js +1 -43
  419. package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -66
  420. package/lib/esm/resources/order_amount_promotion_rules.js +1 -35
  421. package/lib/esm/resources/order_copies.d.ts +1 -50
  422. package/lib/esm/resources/order_copies.js +1 -47
  423. package/lib/esm/resources/order_factories.d.ts +1 -33
  424. package/lib/esm/resources/order_factories.js +1 -34
  425. package/lib/esm/resources/order_subscription_items.d.ts +1 -71
  426. package/lib/esm/resources/order_subscription_items.js +1 -39
  427. package/lib/esm/resources/order_subscriptions.d.ts +1 -94
  428. package/lib/esm/resources/order_subscriptions.js +1 -75
  429. package/lib/esm/resources/order_validation_rules.d.ts +1 -26
  430. package/lib/esm/resources/order_validation_rules.js +1 -34
  431. package/lib/esm/resources/orders.d.ts +1 -359
  432. package/lib/esm/resources/orders.js +1 -155
  433. package/lib/esm/resources/organization.d.ts +1 -33
  434. package/lib/esm/resources/organization.js +1 -19
  435. package/lib/esm/resources/packages.d.ts +1 -59
  436. package/lib/esm/resources/packages.js +1 -47
  437. package/lib/esm/resources/parcel_line_items.d.ts +1 -46
  438. package/lib/esm/resources/parcel_line_items.js +1 -43
  439. package/lib/esm/resources/parcels.d.ts +1 -125
  440. package/lib/esm/resources/parcels.js +1 -55
  441. package/lib/esm/resources/payment_gateways.d.ts +1 -24
  442. package/lib/esm/resources/payment_gateways.js +1 -30
  443. package/lib/esm/resources/payment_methods.d.ts +1 -80
  444. package/lib/esm/resources/payment_methods.js +1 -47
  445. package/lib/esm/resources/payment_options.d.ts +1 -43
  446. package/lib/esm/resources/payment_options.js +1 -39
  447. package/lib/esm/resources/paypal_gateways.d.ts +1 -40
  448. package/lib/esm/resources/paypal_gateways.js +1 -43
  449. package/lib/esm/resources/paypal_payments.d.ts +1 -52
  450. package/lib/esm/resources/paypal_payments.js +1 -43
  451. package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -128
  452. package/lib/esm/resources/percentage_discount_promotions.js +1 -79
  453. package/lib/esm/resources/price_frequency_tiers.d.ts +1 -52
  454. package/lib/esm/resources/price_frequency_tiers.js +1 -47
  455. package/lib/esm/resources/price_lists.d.ts +1 -45
  456. package/lib/esm/resources/price_lists.js +1 -43
  457. package/lib/esm/resources/price_tiers.d.ts +1 -31
  458. package/lib/esm/resources/price_tiers.js +1 -34
  459. package/lib/esm/resources/price_volume_tiers.d.ts +1 -52
  460. package/lib/esm/resources/price_volume_tiers.js +1 -47
  461. package/lib/esm/resources/prices.d.ts +1 -83
  462. package/lib/esm/resources/prices.js +1 -71
  463. package/lib/esm/resources/promotion_rules.d.ts +1 -28
  464. package/lib/esm/resources/promotion_rules.js +1 -26
  465. package/lib/esm/resources/promotions.d.ts +1 -62
  466. package/lib/esm/resources/promotions.js +1 -66
  467. package/lib/esm/resources/recurring_order_copies.d.ts +1 -52
  468. package/lib/esm/resources/recurring_order_copies.js +1 -47
  469. package/lib/esm/resources/refunds.d.ts +1 -43
  470. package/lib/esm/resources/refunds.js +1 -42
  471. package/lib/esm/resources/reserved_stocks.d.ts +1 -27
  472. package/lib/esm/resources/reserved_stocks.js +1 -34
  473. package/lib/esm/resources/resource_errors.d.ts +1 -22
  474. package/lib/esm/resources/resource_errors.js +1 -22
  475. package/lib/esm/resources/return_line_items.d.ts +1 -50
  476. package/lib/esm/resources/return_line_items.js +1 -39
  477. package/lib/esm/resources/returns.d.ts +1 -86
  478. package/lib/esm/resources/returns.js +1 -71
  479. package/lib/esm/resources/satispay_gateways.d.ts +1 -45
  480. package/lib/esm/resources/satispay_gateways.js +1 -43
  481. package/lib/esm/resources/satispay_payments.d.ts +1 -48
  482. package/lib/esm/resources/satispay_payments.js +1 -43
  483. package/lib/esm/resources/shipments.d.ts +1 -139
  484. package/lib/esm/resources/shipments.js +1 -103
  485. package/lib/esm/resources/shipping_categories.d.ts +1 -39
  486. package/lib/esm/resources/shipping_categories.js +1 -43
  487. package/lib/esm/resources/shipping_method_tiers.d.ts +1 -31
  488. package/lib/esm/resources/shipping_method_tiers.js +1 -34
  489. package/lib/esm/resources/shipping_methods.d.ts +1 -121
  490. package/lib/esm/resources/shipping_methods.js +1 -67
  491. package/lib/esm/resources/shipping_weight_tiers.d.ts +1 -49
  492. package/lib/esm/resources/shipping_weight_tiers.js +1 -43
  493. package/lib/esm/resources/shipping_zones.d.ts +1 -51
  494. package/lib/esm/resources/shipping_zones.js +1 -39
  495. package/lib/esm/resources/sku_list_items.d.ts +1 -50
  496. package/lib/esm/resources/sku_list_items.js +1 -43
  497. package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -75
  498. package/lib/esm/resources/sku_list_promotion_rules.js +1 -43
  499. package/lib/esm/resources/sku_lists.d.ts +1 -63
  500. package/lib/esm/resources/sku_lists.js +1 -55
  501. package/lib/esm/resources/sku_options.d.ts +1 -70
  502. package/lib/esm/resources/sku_options.js +1 -51
  503. package/lib/esm/resources/skus.d.ts +1 -95
  504. package/lib/esm/resources/skus.js +1 -71
  505. package/lib/esm/resources/stock_items.d.ts +1 -59
  506. package/lib/esm/resources/stock_items.js +1 -55
  507. package/lib/esm/resources/stock_line_items.d.ts +1 -69
  508. package/lib/esm/resources/stock_line_items.js +1 -51
  509. package/lib/esm/resources/stock_locations.d.ts +1 -63
  510. package/lib/esm/resources/stock_locations.js +1 -59
  511. package/lib/esm/resources/stock_reservations.d.ts +1 -49
  512. package/lib/esm/resources/stock_reservations.js +1 -51
  513. package/lib/esm/resources/stock_transfers.d.ts +1 -79
  514. package/lib/esm/resources/stock_transfers.js +1 -59
  515. package/lib/esm/resources/stripe_gateways.d.ts +1 -44
  516. package/lib/esm/resources/stripe_gateways.js +1 -43
  517. package/lib/esm/resources/stripe_payments.d.ts +1 -56
  518. package/lib/esm/resources/stripe_payments.js +1 -43
  519. package/lib/esm/resources/subscription_models.d.ts +1 -48
  520. package/lib/esm/resources/subscription_models.js +1 -43
  521. package/lib/esm/resources/tags.d.ts +1 -27
  522. package/lib/esm/resources/tags.js +1 -31
  523. package/lib/esm/resources/tax_calculators.d.ts +1 -27
  524. package/lib/esm/resources/tax_calculators.js +1 -34
  525. package/lib/esm/resources/tax_categories.d.ts +1 -62
  526. package/lib/esm/resources/tax_categories.js +1 -43
  527. package/lib/esm/resources/tax_rules.d.ts +1 -72
  528. package/lib/esm/resources/tax_rules.js +1 -39
  529. package/lib/esm/resources/taxjar_accounts.d.ts +1 -46
  530. package/lib/esm/resources/taxjar_accounts.js +1 -47
  531. package/lib/esm/resources/transactions.d.ts +1 -40
  532. package/lib/esm/resources/transactions.js +1 -38
  533. package/lib/esm/resources/versions.d.ts +1 -22
  534. package/lib/esm/resources/versions.js +1 -22
  535. package/lib/esm/resources/voids.d.ts +1 -43
  536. package/lib/esm/resources/voids.js +1 -42
  537. package/lib/esm/resources/webhooks.d.ts +1 -51
  538. package/lib/esm/resources/webhooks.js +1 -39
  539. package/lib/esm/resources/wire_transfers.d.ts +1 -36
  540. package/lib/esm/resources/wire_transfers.js +1 -39
  541. package/lib/esm/static.d.ts +1 -9
  542. package/lib/esm/static.js +1 -19
  543. package/lib/esm/util.d.ts +1 -6
  544. package/lib/esm/util.js +1 -11
  545. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  546. package/lib/tsconfig.tsbuildinfo +1 -1
  547. package/package.json +1 -1
@@ -1,33 +1,3 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
- import { AxiosProxyConfig, Method } from 'axios';
4
- import type { InterceptorManager } from './interceptor';
5
- import type { Agent as HttpAgent } from 'http';
6
- import type { Agent as HttpsAgent } from 'https';
7
- type ProxyConfig = AxiosProxyConfig | false;
8
- type RequestConfig = {
9
- timeout?: number;
10
- params?: {
11
- [key: string]: string | number | boolean;
12
- };
13
- httpAgent?: HttpAgent;
14
- httpsAgent?: HttpsAgent;
15
- proxy?: ProxyConfig;
16
- };
17
- type ApiClientInitConfig = {
18
- organization: string;
19
- domain?: string;
20
- accessToken: string;
21
- } & RequestConfig;
22
- type ApiClientConfig = Partial<ApiClientInitConfig>;
23
- declare class ApiClient {
24
- #private;
25
- static create(options: ApiClientInitConfig): ApiClient;
26
- baseUrl: string;
27
- interceptors: InterceptorManager;
28
- private constructor();
29
- config(config: ApiClientConfig): void;
30
- request(method: Method, path: string, body?: any, options?: ApiClientConfig): Promise<any>;
31
- }
32
- export default ApiClient;
33
- export { ApiClientInitConfig, ApiClientConfig, RequestConfig };
3
+ import{AxiosProxyConfig,Method}from'axios';import type{InterceptorManager}from'./interceptor';import type{Agent as HttpAgent}from'http';import type{Agent as HttpsAgent}from'https';type ProxyConfig=AxiosProxyConfig|false;type RequestConfig={timeout?:number;params?:{[key:string]:string|number|boolean;};httpAgent?:HttpAgent;httpsAgent?:HttpsAgent;proxy?:ProxyConfig;};type ApiClientInitConfig={organization:string;domain?:string;accessToken:string;}&RequestConfig;type ApiClientConfig=Partial<ApiClientInitConfig>;declare class ApiClient{#private;static create(options:ApiClientInitConfig):ApiClient;baseUrl:string;interceptors:InterceptorManager;private constructor();config(config:ApiClientConfig):void;request(method:Method,path:string,body?:any,options?:ApiClientConfig):Promise<any>;}export default ApiClient;export{ApiClientInitConfig,ApiClientConfig,RequestConfig};
package/lib/esm/client.js CHANGED
@@ -1,118 +1 @@
1
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
- if (kind === "m") throw new TypeError("Private method is not writable");
3
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
- };
7
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
- };
12
- var _ApiClient_accessToken, _ApiClient_client;
13
- /* eslint-disable @typescript-eslint/no-explicit-any */
14
- import axios from 'axios';
15
- import { SdkError, ApiError, ErrorType } from './error';
16
- import config from './config';
17
- import Debug from './debug';
18
- const debug = Debug('client');
19
- const baseURL = (organization, domain) => {
20
- return `https://${organization.toLowerCase()}.${domain || config.default.domain}/api`;
21
- };
22
- const handleError = (error) => {
23
- let sdkError = new SdkError({ message: error.message });
24
- if (axios.isAxiosError(error)) {
25
- if (error.response) {
26
- // The request was made and the server responded with a status code that falls out of the range of 2xx
27
- const apiError = new ApiError(sdkError);
28
- apiError.type = ErrorType.RESPONSE;
29
- apiError.status = error.response.status;
30
- apiError.code = String(apiError.status);
31
- apiError.errors = error.response.data.errors;
32
- sdkError = apiError;
33
- }
34
- else if (error.request) {
35
- // The request was made but no response was received
36
- // `error.request` is an instance of XMLHttpRequest in the browser and an instance of http.ClientRequest in node.js
37
- sdkError.type = ErrorType.REQUEST;
38
- sdkError.request = error.request;
39
- }
40
- else {
41
- // Something happened in setting up the request that triggered an Error
42
- sdkError.type = ErrorType.CLIENT;
43
- }
44
- }
45
- else if (axios.isCancel(error))
46
- sdkError.type = ErrorType.CANCEL;
47
- else
48
- sdkError.source = error;
49
- throw sdkError;
50
- };
51
- class ApiClient {
52
- static create(options) {
53
- if (!(options === null || options === void 0 ? void 0 : options.organization))
54
- throw new Error("Undefined 'organization' parameter");
55
- if (!(options === null || options === void 0 ? void 0 : options.accessToken))
56
- throw new Error("Undefined 'accessToken' parameter");
57
- return new ApiClient(options);
58
- }
59
- constructor(options) {
60
- _ApiClient_accessToken.set(this, void 0);
61
- _ApiClient_client.set(this, void 0);
62
- debug('new client instance %O', options);
63
- this.baseUrl = baseURL(options.organization, options.domain);
64
- __classPrivateFieldSet(this, _ApiClient_accessToken, options.accessToken, "f");
65
- const axiosConfig = {
66
- timeout: options.timeout || config.client.timeout,
67
- proxy: options.proxy,
68
- httpAgent: options.httpAgent,
69
- httpsAgent: options.httpsAgent,
70
- };
71
- const axiosOptions = Object.assign({ baseURL: this.baseUrl, timeout: config.client.timeout, headers: {
72
- 'Accept': 'application/vnd.api+json',
73
- 'Content-Type': 'application/vnd.api+json',
74
- 'Authorization': 'Bearer ' + __classPrivateFieldGet(this, _ApiClient_accessToken, "f"),
75
- } }, axiosConfig);
76
- debug('axios options: %O', axiosOptions);
77
- __classPrivateFieldSet(this, _ApiClient_client, axios.create(axiosOptions), "f");
78
- this.interceptors = __classPrivateFieldGet(this, _ApiClient_client, "f").interceptors;
79
- }
80
- config(config) {
81
- debug('config %o', config);
82
- const def = __classPrivateFieldGet(this, _ApiClient_client, "f").defaults;
83
- // Axios config
84
- if (config.timeout)
85
- def.timeout = config.timeout;
86
- if (config.proxy)
87
- def.proxy = config.proxy;
88
- if (config.httpAgent)
89
- def.httpAgent = config.httpAgent;
90
- if (config.httpsAgent)
91
- def.httpsAgent = config.httpsAgent;
92
- // API Client config
93
- if (config.organization)
94
- this.baseUrl = baseURL(config.organization, config.domain);
95
- if (config.accessToken) {
96
- __classPrivateFieldSet(this, _ApiClient_accessToken, config.accessToken, "f");
97
- def.headers.common.Authorization = 'Bearer ' + __classPrivateFieldGet(this, _ApiClient_accessToken, "f");
98
- }
99
- }
100
- async request(method, path, body, options) {
101
- debug('request %s %s, %O, %O', method, path, body || {}, options || {});
102
- const data = body ? { data: body } : undefined;
103
- const url = path;
104
- // Runtime request parameters
105
- const baseUrl = (options === null || options === void 0 ? void 0 : options.organization) ? baseURL(options.organization, options.domain) : undefined;
106
- const accessToken = (options === null || options === void 0 ? void 0 : options.accessToken) || __classPrivateFieldGet(this, _ApiClient_accessToken, "f");
107
- const headers = accessToken ? { 'Authorization': 'Bearer ' + accessToken } : undefined;
108
- const requestParams = Object.assign({ method, baseURL: baseUrl, url, data, headers }, options);
109
- debug('request params: %O', requestParams);
110
- // const start = Date.now()
111
- return __classPrivateFieldGet(this, _ApiClient_client, "f").request(requestParams)
112
- .then(response => response.data)
113
- .catch(error => handleError(error));
114
- // .finally(() => console.log(`<<-- ${method} ${path} ${Date.now() - start}`))
115
- }
116
- }
117
- _ApiClient_accessToken = new WeakMap(), _ApiClient_client = new WeakMap();
118
- export default ApiClient;
1
+ var l=function(a,e,t,s,r){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?a!==e||!r:!e.has(a))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?r.call(a,t):r?r.value=t:e.set(a,t),t},n=function(a,e,t,s){if(t==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?a!==e||!s:!e.has(a))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?s:t==="a"?s.call(a):s?s.value:e.get(a)},i,o;import u from"axios";import{SdkError as T,ApiError as b,ErrorType as h}from"./error";import p from"./config";import x from"./debug";const c=x("client"),m=(a,e)=>`https://${a.toLowerCase()}.${e||p.default.domain}/api`,C=a=>{let e=new T({message:a.message});if(u.isAxiosError(a))if(a.response){const t=new b(e);t.type=h.RESPONSE,t.status=a.response.status,t.code=String(t.status),t.errors=a.response.data.errors,e=t}else a.request?(e.type=h.REQUEST,e.request=a.request):e.type=h.CLIENT;else u.isCancel(a)?e.type=h.CANCEL:e.source=a;throw e};class f{static create(e){if(!e?.organization)throw new Error("Undefined 'organization' parameter");if(!e?.accessToken)throw new Error("Undefined 'accessToken' parameter");return new f(e)}constructor(e){i.set(this,void 0),o.set(this,void 0),c("new client instance %O",e),this.baseUrl=m(e.organization,e.domain),l(this,i,e.accessToken,"f");const t={timeout:e.timeout||p.client.timeout,proxy:e.proxy,httpAgent:e.httpAgent,httpsAgent:e.httpsAgent},s=Object.assign({baseURL:this.baseUrl,timeout:p.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+n(this,i,"f")}},t);c("axios options: %O",s),l(this,o,u.create(s),"f"),this.interceptors=n(this,o,"f").interceptors}config(e){c("config %o",e);const t=n(this,o,"f").defaults;e.timeout&&(t.timeout=e.timeout),e.proxy&&(t.proxy=e.proxy),e.httpAgent&&(t.httpAgent=e.httpAgent),e.httpsAgent&&(t.httpsAgent=e.httpsAgent),e.organization&&(this.baseUrl=m(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,s,r){c("request %s %s, %O, %O",e,t,s||{},r||{});const A=s?{data:s}:void 0,g=t,v=r?.organization?m(r.organization,r.domain):void 0,w=r?.accessToken||n(this,i,"f"),y=w?{Authorization:"Bearer "+w}:void 0,E=Object.assign({method:e,baseURL:v,url:g,data:A,headers:y},r);return c("request params: %O",E),n(this,o,"f").request(E).then(d=>d.data).catch(d=>C(d))}}i=new WeakMap,o=new WeakMap;export default f;
@@ -1,152 +1 @@
1
- import * as api from './api';
2
- import { ApiError } from './error';
3
- import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
4
- import { ResourcesInitConfig } from './resource';
5
- declare const OPEN_API_SCHEMA_VERSION = "5.2.1";
6
- export { OPEN_API_SCHEMA_VERSION };
7
- type SdkConfig = {};
8
- type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
9
- type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
10
- declare class CommerceLayerClient {
11
- #private;
12
- static get openApiSchemaVersion(): string;
13
- readonly openApiSchemaVersion = "5.2.1";
14
- addresses: api.Addresses;
15
- adjustments: api.Adjustments;
16
- adyen_gateways: api.AdyenGateways;
17
- adyen_payments: api.AdyenPayments;
18
- application: api.Applications;
19
- attachments: api.Attachments;
20
- authorizations: api.Authorizations;
21
- avalara_accounts: api.AvalaraAccounts;
22
- axerve_gateways: api.AxerveGateways;
23
- axerve_payments: api.AxervePayments;
24
- billing_info_validation_rules: api.BillingInfoValidationRules;
25
- bing_geocoders: api.BingGeocoders;
26
- braintree_gateways: api.BraintreeGateways;
27
- braintree_payments: api.BraintreePayments;
28
- bundles: api.Bundles;
29
- buy_x_pay_y_promotions: api.BuyXPayYPromotions;
30
- captures: api.Captures;
31
- carrier_accounts: api.CarrierAccounts;
32
- checkout_com_gateways: api.CheckoutComGateways;
33
- checkout_com_payments: api.CheckoutComPayments;
34
- cleanups: api.Cleanups;
35
- coupon_codes_promotion_rules: api.CouponCodesPromotionRules;
36
- coupon_recipients: api.CouponRecipients;
37
- coupons: api.Coupons;
38
- custom_promotion_rules: api.CustomPromotionRules;
39
- customer_addresses: api.CustomerAddresses;
40
- customer_groups: api.CustomerGroups;
41
- customer_password_resets: api.CustomerPasswordResets;
42
- customer_payment_sources: api.CustomerPaymentSources;
43
- customer_subscriptions: api.CustomerSubscriptions;
44
- customers: api.Customers;
45
- delivery_lead_times: api.DeliveryLeadTimes;
46
- event_callbacks: api.EventCallbacks;
47
- events: api.Events;
48
- exports: api.Exports;
49
- external_gateways: api.ExternalGateways;
50
- external_payments: api.ExternalPayments;
51
- external_promotions: api.ExternalPromotions;
52
- external_tax_calculators: api.ExternalTaxCalculators;
53
- fixed_amount_promotions: api.FixedAmountPromotions;
54
- fixed_price_promotions: api.FixedPricePromotions;
55
- free_gift_promotions: api.FreeGiftPromotions;
56
- free_shipping_promotions: api.FreeShippingPromotions;
57
- geocoders: api.Geocoders;
58
- gift_card_recipients: api.GiftCardRecipients;
59
- gift_cards: api.GiftCards;
60
- google_geocoders: api.GoogleGeocoders;
61
- imports: api.Imports;
62
- in_stock_subscriptions: api.InStockSubscriptions;
63
- inventory_models: api.InventoryModels;
64
- inventory_return_locations: api.InventoryReturnLocations;
65
- inventory_stock_locations: api.InventoryStockLocations;
66
- klarna_gateways: api.KlarnaGateways;
67
- klarna_payments: api.KlarnaPayments;
68
- line_item_options: api.LineItemOptions;
69
- line_items: api.LineItems;
70
- manual_gateways: api.ManualGateways;
71
- manual_tax_calculators: api.ManualTaxCalculators;
72
- markets: api.Markets;
73
- merchants: api.Merchants;
74
- order_amount_promotion_rules: api.OrderAmountPromotionRules;
75
- order_copies: api.OrderCopies;
76
- order_factories: api.OrderFactories;
77
- order_subscription_items: api.OrderSubscriptionItems;
78
- order_subscriptions: api.OrderSubscriptions;
79
- order_validation_rules: api.OrderValidationRules;
80
- orders: api.Orders;
81
- organization: api.Organizations;
82
- packages: api.Packages;
83
- parcel_line_items: api.ParcelLineItems;
84
- parcels: api.Parcels;
85
- payment_gateways: api.PaymentGateways;
86
- payment_methods: api.PaymentMethods;
87
- payment_options: api.PaymentOptions;
88
- paypal_gateways: api.PaypalGateways;
89
- paypal_payments: api.PaypalPayments;
90
- percentage_discount_promotions: api.PercentageDiscountPromotions;
91
- price_frequency_tiers: api.PriceFrequencyTiers;
92
- price_lists: api.PriceLists;
93
- price_tiers: api.PriceTiers;
94
- price_volume_tiers: api.PriceVolumeTiers;
95
- prices: api.Prices;
96
- promotion_rules: api.PromotionRules;
97
- promotions: api.Promotions;
98
- recurring_order_copies: api.RecurringOrderCopies;
99
- refunds: api.Refunds;
100
- reserved_stocks: api.ReservedStocks;
101
- resource_errors: api.ResourceErrors;
102
- return_line_items: api.ReturnLineItems;
103
- returns: api.Returns;
104
- satispay_gateways: api.SatispayGateways;
105
- satispay_payments: api.SatispayPayments;
106
- shipments: api.Shipments;
107
- shipping_categories: api.ShippingCategories;
108
- shipping_method_tiers: api.ShippingMethodTiers;
109
- shipping_methods: api.ShippingMethods;
110
- shipping_weight_tiers: api.ShippingWeightTiers;
111
- shipping_zones: api.ShippingZones;
112
- sku_list_items: api.SkuListItems;
113
- sku_list_promotion_rules: api.SkuListPromotionRules;
114
- sku_lists: api.SkuLists;
115
- sku_options: api.SkuOptions;
116
- skus: api.Skus;
117
- stock_items: api.StockItems;
118
- stock_line_items: api.StockLineItems;
119
- stock_locations: api.StockLocations;
120
- stock_reservations: api.StockReservations;
121
- stock_transfers: api.StockTransfers;
122
- stripe_gateways: api.StripeGateways;
123
- stripe_payments: api.StripePayments;
124
- subscription_models: api.SubscriptionModels;
125
- tags: api.Tags;
126
- tax_calculators: api.TaxCalculators;
127
- tax_categories: api.TaxCategories;
128
- tax_rules: api.TaxRules;
129
- taxjar_accounts: api.TaxjarAccounts;
130
- transactions: api.Transactions;
131
- versions: api.Versions;
132
- voids: api.Voids;
133
- webhooks: api.Webhooks;
134
- wire_transfers: api.WireTransfers;
135
- constructor(config: CommerceLayerInitConfig);
136
- get currentOrganization(): string;
137
- private localConfig;
138
- config(config: CommerceLayerConfig): void;
139
- resources(): readonly string[];
140
- isApiError(error: any): error is ApiError;
141
- addRequestInterceptor(onFulfilled?: RequestInterceptor, onRejected?: ErrorInterceptor): number;
142
- addResponseInterceptor(onFulfilled?: ResponseInterceptor, onRejected?: ErrorInterceptor): number;
143
- removeInterceptor(type: InterceptorType, id: number): void;
144
- addRawResponseReader(options?: {
145
- headers: boolean;
146
- }): RawResponseReader;
147
- removeRawResponseReader(reader: number | RawResponseReader): void;
148
- }
149
- declare const CommerceLayer: (config: CommerceLayerInitConfig) => CommerceLayerClient;
150
- export default CommerceLayer;
151
- export { CommerceLayer };
152
- export type { CommerceLayerClient, CommerceLayerConfig, CommerceLayerInitConfig };
1
+ import*as api from'./api';import{ApiError}from'./error';import type{ErrorInterceptor,InterceptorType,RawResponseReader,RequestInterceptor,ResponseInterceptor}from'./interceptor';import{ResourcesInitConfig}from'./resource';declare const OPEN_API_SCHEMA_VERSION="5.2.2";export{OPEN_API_SCHEMA_VERSION};type SdkConfig={};type CommerceLayerInitConfig=SdkConfig&ResourcesInitConfig;type CommerceLayerConfig=Partial<CommerceLayerInitConfig>;declare class CommerceLayerClient{#private;static get openApiSchemaVersion():string;readonly openApiSchemaVersion="5.2.2";addresses:api.Addresses;adjustments:api.Adjustments;adyen_gateways:api.AdyenGateways;adyen_payments:api.AdyenPayments;application:api.Applications;attachments:api.Attachments;authorizations:api.Authorizations;avalara_accounts:api.AvalaraAccounts;axerve_gateways:api.AxerveGateways;axerve_payments:api.AxervePayments;billing_info_validation_rules:api.BillingInfoValidationRules;bing_geocoders:api.BingGeocoders;braintree_gateways:api.BraintreeGateways;braintree_payments:api.BraintreePayments;bundles:api.Bundles;buy_x_pay_y_promotions:api.BuyXPayYPromotions;captures:api.Captures;carrier_accounts:api.CarrierAccounts;checkout_com_gateways:api.CheckoutComGateways;checkout_com_payments:api.CheckoutComPayments;cleanups:api.Cleanups;coupon_codes_promotion_rules:api.CouponCodesPromotionRules;coupon_recipients:api.CouponRecipients;coupons:api.Coupons;custom_promotion_rules:api.CustomPromotionRules;customer_addresses:api.CustomerAddresses;customer_groups:api.CustomerGroups;customer_password_resets:api.CustomerPasswordResets;customer_payment_sources:api.CustomerPaymentSources;customer_subscriptions:api.CustomerSubscriptions;customers:api.Customers;delivery_lead_times:api.DeliveryLeadTimes;event_callbacks:api.EventCallbacks;events:api.Events;exports:api.Exports;external_gateways:api.ExternalGateways;external_payments:api.ExternalPayments;external_promotions:api.ExternalPromotions;external_tax_calculators:api.ExternalTaxCalculators;fixed_amount_promotions:api.FixedAmountPromotions;fixed_price_promotions:api.FixedPricePromotions;free_gift_promotions:api.FreeGiftPromotions;free_shipping_promotions:api.FreeShippingPromotions;geocoders:api.Geocoders;gift_card_recipients:api.GiftCardRecipients;gift_cards:api.GiftCards;google_geocoders:api.GoogleGeocoders;imports:api.Imports;in_stock_subscriptions:api.InStockSubscriptions;inventory_models:api.InventoryModels;inventory_return_locations:api.InventoryReturnLocations;inventory_stock_locations:api.InventoryStockLocations;klarna_gateways:api.KlarnaGateways;klarna_payments:api.KlarnaPayments;line_item_options:api.LineItemOptions;line_items:api.LineItems;manual_gateways:api.ManualGateways;manual_tax_calculators:api.ManualTaxCalculators;markets:api.Markets;merchants:api.Merchants;order_amount_promotion_rules:api.OrderAmountPromotionRules;order_copies:api.OrderCopies;order_factories:api.OrderFactories;order_subscription_items:api.OrderSubscriptionItems;order_subscriptions:api.OrderSubscriptions;order_validation_rules:api.OrderValidationRules;orders:api.Orders;organization:api.Organizations;packages:api.Packages;parcel_line_items:api.ParcelLineItems;parcels:api.Parcels;payment_gateways:api.PaymentGateways;payment_methods:api.PaymentMethods;payment_options:api.PaymentOptions;paypal_gateways:api.PaypalGateways;paypal_payments:api.PaypalPayments;percentage_discount_promotions:api.PercentageDiscountPromotions;price_frequency_tiers:api.PriceFrequencyTiers;price_lists:api.PriceLists;price_tiers:api.PriceTiers;price_volume_tiers:api.PriceVolumeTiers;prices:api.Prices;promotion_rules:api.PromotionRules;promotions:api.Promotions;recurring_order_copies:api.RecurringOrderCopies;refunds:api.Refunds;reserved_stocks:api.ReservedStocks;resource_errors:api.ResourceErrors;return_line_items:api.ReturnLineItems;returns:api.Returns;satispay_gateways:api.SatispayGateways;satispay_payments:api.SatispayPayments;shipments:api.Shipments;shipping_categories:api.ShippingCategories;shipping_method_tiers:api.ShippingMethodTiers;shipping_methods:api.ShippingMethods;shipping_weight_tiers:api.ShippingWeightTiers;shipping_zones:api.ShippingZones;sku_list_items:api.SkuListItems;sku_list_promotion_rules:api.SkuListPromotionRules;sku_lists:api.SkuLists;sku_options:api.SkuOptions;skus:api.Skus;stock_items:api.StockItems;stock_line_items:api.StockLineItems;stock_locations:api.StockLocations;stock_reservations:api.StockReservations;stock_transfers:api.StockTransfers;stripe_gateways:api.StripeGateways;stripe_payments:api.StripePayments;subscription_models:api.SubscriptionModels;tags:api.Tags;tax_calculators:api.TaxCalculators;tax_categories:api.TaxCategories;tax_rules:api.TaxRules;taxjar_accounts:api.TaxjarAccounts;transactions:api.Transactions;versions:api.Versions;voids:api.Voids;webhooks:api.Webhooks;wire_transfers:api.WireTransfers;constructor(config:CommerceLayerInitConfig);get currentOrganization():string;private localConfig;config(config:CommerceLayerConfig):void;resources():readonly string[];isApiError(error:any):error is ApiError;addRequestInterceptor(onFulfilled?:RequestInterceptor,onRejected?:ErrorInterceptor):number;addResponseInterceptor(onFulfilled?:ResponseInterceptor,onRejected?:ErrorInterceptor):number;removeInterceptor(type:InterceptorType,id:number):void;addRawResponseReader(options?:{headers:boolean;}):RawResponseReader;removeRawResponseReader(reader:number|RawResponseReader):void;}declare const CommerceLayer:(config:CommerceLayerInitConfig)=>CommerceLayerClient;export default CommerceLayer;export{CommerceLayer};export type{CommerceLayerClient,CommerceLayerConfig,CommerceLayerInitConfig};
@@ -1,214 +1 @@
1
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
- if (kind === "m") throw new TypeError("Private method is not writable");
3
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
- };
7
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
- };
12
- var _CommerceLayerClient_adapter, _CommerceLayerClient_organization;
13
- import * as api from './api';
14
- import { CommerceLayerStatic } from './static';
15
- import ResourceAdapter from './resource';
16
- import Debug from './debug';
17
- const debug = Debug('commercelayer');
18
- // Autogenerated schema version number, do not remove this line
19
- const OPEN_API_SCHEMA_VERSION = '5.2.1';
20
- export { OPEN_API_SCHEMA_VERSION };
21
- class CommerceLayerClient {
22
- static get openApiSchemaVersion() { return OPEN_API_SCHEMA_VERSION; }
23
- // ##__CL_RESOURCES_DEF_STOP__##
24
- constructor(config) {
25
- this.openApiSchemaVersion = OPEN_API_SCHEMA_VERSION;
26
- _CommerceLayerClient_adapter.set(this, void 0);
27
- _CommerceLayerClient_organization.set(this, void 0);
28
- debug('new commercelayer instance %O', config);
29
- __classPrivateFieldSet(this, _CommerceLayerClient_adapter, new ResourceAdapter(config), "f");
30
- __classPrivateFieldSet(this, _CommerceLayerClient_organization, config.organization, "f");
31
- // ##__CL_RESOURCES_INIT_START__##
32
- // ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)
33
- this.addresses = new api.Addresses(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
34
- this.adjustments = new api.Adjustments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
35
- this.adyen_gateways = new api.AdyenGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
36
- this.adyen_payments = new api.AdyenPayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
37
- this.application = new api.Applications(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
38
- this.attachments = new api.Attachments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
39
- this.authorizations = new api.Authorizations(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
40
- this.avalara_accounts = new api.AvalaraAccounts(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
41
- this.axerve_gateways = new api.AxerveGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
42
- this.axerve_payments = new api.AxervePayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
43
- this.billing_info_validation_rules = new api.BillingInfoValidationRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
44
- this.bing_geocoders = new api.BingGeocoders(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
45
- this.braintree_gateways = new api.BraintreeGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
46
- this.braintree_payments = new api.BraintreePayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
47
- this.bundles = new api.Bundles(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
48
- this.buy_x_pay_y_promotions = new api.BuyXPayYPromotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
49
- this.captures = new api.Captures(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
50
- this.carrier_accounts = new api.CarrierAccounts(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
51
- this.checkout_com_gateways = new api.CheckoutComGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
52
- this.checkout_com_payments = new api.CheckoutComPayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
53
- this.cleanups = new api.Cleanups(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
54
- this.coupon_codes_promotion_rules = new api.CouponCodesPromotionRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
55
- this.coupon_recipients = new api.CouponRecipients(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
56
- this.coupons = new api.Coupons(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
57
- this.custom_promotion_rules = new api.CustomPromotionRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
58
- this.customer_addresses = new api.CustomerAddresses(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
59
- this.customer_groups = new api.CustomerGroups(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
60
- this.customer_password_resets = new api.CustomerPasswordResets(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
61
- this.customer_payment_sources = new api.CustomerPaymentSources(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
62
- this.customer_subscriptions = new api.CustomerSubscriptions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
63
- this.customers = new api.Customers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
64
- this.delivery_lead_times = new api.DeliveryLeadTimes(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
65
- this.event_callbacks = new api.EventCallbacks(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
66
- this.events = new api.Events(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
67
- this.exports = new api.Exports(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
68
- this.external_gateways = new api.ExternalGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
69
- this.external_payments = new api.ExternalPayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
70
- this.external_promotions = new api.ExternalPromotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
71
- this.external_tax_calculators = new api.ExternalTaxCalculators(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
72
- this.fixed_amount_promotions = new api.FixedAmountPromotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
73
- this.fixed_price_promotions = new api.FixedPricePromotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
74
- this.free_gift_promotions = new api.FreeGiftPromotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
75
- this.free_shipping_promotions = new api.FreeShippingPromotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
76
- this.geocoders = new api.Geocoders(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
77
- this.gift_card_recipients = new api.GiftCardRecipients(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
78
- this.gift_cards = new api.GiftCards(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
79
- this.google_geocoders = new api.GoogleGeocoders(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
80
- this.imports = new api.Imports(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
81
- this.in_stock_subscriptions = new api.InStockSubscriptions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
82
- this.inventory_models = new api.InventoryModels(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
83
- this.inventory_return_locations = new api.InventoryReturnLocations(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
84
- this.inventory_stock_locations = new api.InventoryStockLocations(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
85
- this.klarna_gateways = new api.KlarnaGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
86
- this.klarna_payments = new api.KlarnaPayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
87
- this.line_item_options = new api.LineItemOptions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
88
- this.line_items = new api.LineItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
89
- this.manual_gateways = new api.ManualGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
90
- this.manual_tax_calculators = new api.ManualTaxCalculators(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
91
- this.markets = new api.Markets(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
92
- this.merchants = new api.Merchants(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
93
- this.order_amount_promotion_rules = new api.OrderAmountPromotionRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
94
- this.order_copies = new api.OrderCopies(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
95
- this.order_factories = new api.OrderFactories(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
96
- this.order_subscription_items = new api.OrderSubscriptionItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
97
- this.order_subscriptions = new api.OrderSubscriptions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
98
- this.order_validation_rules = new api.OrderValidationRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
99
- this.orders = new api.Orders(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
100
- this.organization = new api.Organizations(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
101
- this.packages = new api.Packages(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
102
- this.parcel_line_items = new api.ParcelLineItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
103
- this.parcels = new api.Parcels(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
104
- this.payment_gateways = new api.PaymentGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
105
- this.payment_methods = new api.PaymentMethods(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
106
- this.payment_options = new api.PaymentOptions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
107
- this.paypal_gateways = new api.PaypalGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
108
- this.paypal_payments = new api.PaypalPayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
109
- this.percentage_discount_promotions = new api.PercentageDiscountPromotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
110
- this.price_frequency_tiers = new api.PriceFrequencyTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
111
- this.price_lists = new api.PriceLists(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
112
- this.price_tiers = new api.PriceTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
113
- this.price_volume_tiers = new api.PriceVolumeTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
114
- this.prices = new api.Prices(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
115
- this.promotion_rules = new api.PromotionRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
116
- this.promotions = new api.Promotions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
117
- this.recurring_order_copies = new api.RecurringOrderCopies(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
118
- this.refunds = new api.Refunds(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
119
- this.reserved_stocks = new api.ReservedStocks(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
120
- this.resource_errors = new api.ResourceErrors(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
121
- this.return_line_items = new api.ReturnLineItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
122
- this.returns = new api.Returns(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
123
- this.satispay_gateways = new api.SatispayGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
124
- this.satispay_payments = new api.SatispayPayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
125
- this.shipments = new api.Shipments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
126
- this.shipping_categories = new api.ShippingCategories(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
127
- this.shipping_method_tiers = new api.ShippingMethodTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
128
- this.shipping_methods = new api.ShippingMethods(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
129
- this.shipping_weight_tiers = new api.ShippingWeightTiers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
130
- this.shipping_zones = new api.ShippingZones(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
131
- this.sku_list_items = new api.SkuListItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
132
- this.sku_list_promotion_rules = new api.SkuListPromotionRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
133
- this.sku_lists = new api.SkuLists(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
134
- this.sku_options = new api.SkuOptions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
135
- this.skus = new api.Skus(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
136
- this.stock_items = new api.StockItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
137
- this.stock_line_items = new api.StockLineItems(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
138
- this.stock_locations = new api.StockLocations(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
139
- this.stock_reservations = new api.StockReservations(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
140
- this.stock_transfers = new api.StockTransfers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
141
- this.stripe_gateways = new api.StripeGateways(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
142
- this.stripe_payments = new api.StripePayments(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
143
- this.subscription_models = new api.SubscriptionModels(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
144
- this.tags = new api.Tags(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
145
- this.tax_calculators = new api.TaxCalculators(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
146
- this.tax_categories = new api.TaxCategories(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
147
- this.tax_rules = new api.TaxRules(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
148
- this.taxjar_accounts = new api.TaxjarAccounts(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
149
- this.transactions = new api.Transactions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
150
- this.versions = new api.Versions(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
151
- this.voids = new api.Voids(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
152
- this.webhooks = new api.Webhooks(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
153
- this.wire_transfers = new api.WireTransfers(__classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f"));
154
- // ##__CL_RESOURCES_INIT_STOP__##
155
- }
156
- get currentOrganization() { return __classPrivateFieldGet(this, _CommerceLayerClient_organization, "f"); }
157
- localConfig(config) {
158
- if (config.organization)
159
- __classPrivateFieldSet(this, _CommerceLayerClient_organization, config.organization, "f");
160
- }
161
- config(config) {
162
- debug('config %o', config);
163
- // CommerceLayer config
164
- this.localConfig(config);
165
- // ResourceAdapter config
166
- // To rebuild baseUrl in client in case only the domain is defined
167
- if (!config.organization)
168
- config.organization = this.currentOrganization;
169
- __classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f").config(config);
170
- }
171
- resources() {
172
- return CommerceLayerStatic.resources();
173
- }
174
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
175
- isApiError(error) {
176
- return CommerceLayerStatic.isApiError(error);
177
- }
178
- addRequestInterceptor(onFulfilled, onRejected) {
179
- return __classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f").interceptors.request.use(onFulfilled, onRejected);
180
- }
181
- addResponseInterceptor(onFulfilled, onRejected) {
182
- return __classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f").interceptors.response.use(onFulfilled, onRejected);
183
- }
184
- removeInterceptor(type, id) {
185
- return __classPrivateFieldGet(this, _CommerceLayerClient_adapter, "f").interceptors[type].eject(id);
186
- }
187
- addRawResponseReader(options) {
188
- const reader = {
189
- id: undefined,
190
- rawResponse: undefined,
191
- headers: undefined,
192
- };
193
- function rawResponseInterceptor(response) {
194
- reader.rawResponse = response === null || response === void 0 ? void 0 : response.data;
195
- if (options === null || options === void 0 ? void 0 : options.headers)
196
- reader.headers = response.headers;
197
- return response;
198
- }
199
- const interceptor = this.addResponseInterceptor(rawResponseInterceptor);
200
- reader.id = interceptor;
201
- return reader;
202
- }
203
- removeRawResponseReader(reader) {
204
- const id = (typeof reader === 'number') ? reader : reader === null || reader === void 0 ? void 0 : reader.id;
205
- if (id && (id >= 0))
206
- return this.removeInterceptor('response', id);
207
- }
208
- }
209
- _CommerceLayerClient_adapter = new WeakMap(), _CommerceLayerClient_organization = new WeakMap();
210
- const CommerceLayer = (config) => {
211
- return new CommerceLayerClient(config);
212
- };
213
- export default CommerceLayer;
214
- export { CommerceLayer };
1
+ var w=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=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,c;import*as e from"./api";import{CommerceLayerStatic as p}from"./static";import _ from"./resource";import l from"./debug";const u=l("commercelayer"),f="5.2.2";export{f as OPEN_API_SCHEMA_VERSION};class d{static get openApiSchemaVersion(){return f}constructor(i){this.openApiSchemaVersion=f,t.set(this,void 0),c.set(this,void 0),u("new commercelayer instance %O",i),w(this,t,new _(i),"f"),w(this,c,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.axerve_gateways=new e.AxerveGateways(s(this,t,"f")),this.axerve_payments=new e.AxervePayments(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.buy_x_pay_y_promotions=new e.BuyXPayYPromotions(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.cleanups=new e.Cleanups(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.custom_promotion_rules=new e.CustomPromotionRules(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.events=new e.Events(s(this,t,"f")),this.exports=new e.Exports(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_factories=new e.OrderFactories(s(this,t,"f")),this.order_subscription_items=new e.OrderSubscriptionItems(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.payment_options=new e.PaymentOptions(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_frequency_tiers=new e.PriceFrequencyTiers(s(this,t,"f")),this.price_lists=new e.PriceLists(s(this,t,"f")),this.price_tiers=new e.PriceTiers(s(this,t,"f")),this.price_volume_tiers=new e.PriceVolumeTiers(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.recurring_order_copies=new e.RecurringOrderCopies(s(this,t,"f")),this.refunds=new e.Refunds(s(this,t,"f")),this.reserved_stocks=new e.ReservedStocks(s(this,t,"f")),this.resource_errors=new e.ResourceErrors(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.satispay_gateways=new e.SatispayGateways(s(this,t,"f")),this.satispay_payments=new e.SatispayPayments(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_method_tiers=new e.ShippingMethodTiers(s(this,t,"f")),this.shipping_methods=new e.ShippingMethods(s(this,t,"f")),this.shipping_weight_tiers=new e.ShippingWeightTiers(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_reservations=new e.StockReservations(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.subscription_models=new e.SubscriptionModels(s(this,t,"f")),this.tags=new e.Tags(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.versions=new e.Versions(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,c,"f")}localConfig(i){i.organization&&w(this,c,i.organization,"f")}config(i){u("config %o",i),this.localConfig(i),i.organization||(i.organization=this.currentOrganization),s(this,t,"f").config(i)}resources(){return p.resources()}isApiError(i){return p.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(i){const n={id:void 0,rawResponse:void 0,headers:void 0};function o(h){return n.rawResponse=h?.data,i?.headers&&(n.headers=h.headers),h}const a=this.addResponseInterceptor(o);return n.id=a,n}removeRawResponseReader(i){const n=typeof i=="number"?i:i?.id;if(n&&n>=0)return this.removeInterceptor("response",n)}}t=new WeakMap,c=new WeakMap;const m=r=>new d(r);export default m;export{m as CommerceLayer};
@@ -1,4 +1 @@
1
- import type { ResourceId, ResourceType } from './resource';
2
- declare const isResourceId: (resource: any) => resource is ResourceId;
3
- declare const isResourceType: (resource: any) => resource is ResourceType;
4
- export { isResourceId, isResourceType };
1
+ import type{ResourceId,ResourceType}from'./resource';declare const isResourceId:(resource:any)=>resource is ResourceId;declare const isResourceType:(resource:any)=>resource is ResourceType;export{isResourceId,isResourceType};
package/lib/esm/common.js CHANGED
@@ -1,10 +1 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
3
- import { resourceList } from './api';
4
- const isResourceId = (resource) => {
5
- return ((resource === null || resource === void 0 ? void 0 : resource.type) && resource.id) && resourceList.includes(resource.type);
6
- };
7
- const isResourceType = (resource) => {
8
- return resource && (typeof resource.type !== 'undefined') && resource.type && resourceList.includes(resource.type);
9
- };
10
- export { isResourceId, isResourceType };
1
+ import{resourceList as i}from"./api";const n=t=>t?.type&&t.id&&i.includes(t.type),p=t=>t&&typeof t.type<"u"&&t.type&&i.includes(t.type);export{n as isResourceId,p as isResourceType};
@@ -1,11 +1 @@
1
- declare const config: {
2
- readonly default: {
3
- readonly domain: "commercelayer.io";
4
- readonly pageNumber: 1;
5
- readonly pageSize: 10;
6
- };
7
- readonly client: {
8
- readonly timeout: 15000;
9
- };
10
- };
11
- export default config;
1
+ declare const config:{readonly default:{readonly domain:"commercelayer.io";readonly pageNumber:1;readonly pageSize:10;};readonly client:{readonly timeout:15000;};};export default config;
package/lib/esm/config.js CHANGED
@@ -1,11 +1 @@
1
- const config = {
2
- default: {
3
- domain: 'commercelayer.io',
4
- pageNumber: 1,
5
- pageSize: 10,
6
- },
7
- client: {
8
- timeout: 15000,
9
- }
10
- };
11
- export default config;
1
+ const e={default:{domain:"commercelayer.io",pageNumber:1,pageSize:10},client:{timeout:15e3}};export default e;
@@ -1,3 +1 @@
1
- type Debugger = (pattern: string, ...args: any[]) => void;
2
- declare const debug: (namespace: string) => Debugger;
3
- export default debug;
1
+ type Debugger=(pattern:string,...args:any[])=>void;declare const debug:(namespace:string)=>Debugger;export default debug;