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