@commercelayer/sdk 7.0.0-rc.10 → 7.0.0-rc.11

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 (311) hide show
  1. package/lib/{api-2OqdnITp.d.cts → api-DNeGwzrs.d.cts} +6 -1
  2. package/lib/{api-DF66S5Gh.d.ts → api-Hgzs8bs4.d.ts} +6 -1
  3. package/lib/api.cjs +2 -2
  4. package/lib/api.d.cts +1 -1
  5. package/lib/api.d.ts +1 -1
  6. package/lib/api.js +1 -1
  7. package/lib/bundle.cjs +4 -4
  8. package/lib/bundle.d.cts +1 -1
  9. package/lib/bundle.d.ts +1 -1
  10. package/lib/bundle.js +2 -2
  11. package/lib/{chunk-RTLW5O74.cjs → chunk-3LTCO2OB.cjs} +4 -4
  12. package/lib/{chunk-RTLW5O74.cjs.map → chunk-3LTCO2OB.cjs.map} +1 -1
  13. package/lib/{chunk-EJSNNH47.js → chunk-5U5QLF2Z.js} +3 -3
  14. package/lib/{chunk-EJSNNH47.js.map → chunk-5U5QLF2Z.js.map} +1 -1
  15. package/lib/{chunk-VLLLEX5J.js → chunk-FKDKRSPO.js} +2 -2
  16. package/lib/chunk-FKDKRSPO.js.map +1 -0
  17. package/lib/{chunk-RIMDGLIA.cjs → chunk-JRYILJJY.cjs} +3 -3
  18. package/lib/{chunk-RIMDGLIA.cjs.map → chunk-JRYILJJY.cjs.map} +1 -1
  19. package/lib/{chunk-NKJBVNTV.cjs → chunk-KJAD45RP.cjs} +2 -2
  20. package/lib/chunk-KJAD45RP.cjs.map +1 -0
  21. package/lib/{chunk-IIR3UVU2.js → chunk-M55NSZVW.js} +3 -3
  22. package/lib/{chunk-IIR3UVU2.js.map → chunk-M55NSZVW.js.map} +1 -1
  23. package/lib/commercelayer.cjs +5 -5
  24. package/lib/commercelayer.d.cts +3 -3
  25. package/lib/commercelayer.d.ts +3 -3
  26. package/lib/commercelayer.js +1 -1
  27. package/lib/enum.d.cts +1 -1
  28. package/lib/enum.d.ts +1 -1
  29. package/lib/index.cjs +7 -7
  30. package/lib/index.d.cts +1 -1
  31. package/lib/index.d.ts +1 -1
  32. package/lib/index.js +3 -3
  33. package/lib/jsonapi.d.cts +1 -1
  34. package/lib/jsonapi.d.ts +1 -1
  35. package/lib/model.d.cts +1 -1
  36. package/lib/model.d.ts +1 -1
  37. package/lib/query.d.cts +1 -1
  38. package/lib/query.d.ts +1 -1
  39. package/lib/resource.d.cts +1 -1
  40. package/lib/resource.d.ts +1 -1
  41. package/lib/resources/addresses.d.cts +1 -1
  42. package/lib/resources/addresses.d.ts +1 -1
  43. package/lib/resources/adjustments.d.cts +1 -1
  44. package/lib/resources/adjustments.d.ts +1 -1
  45. package/lib/resources/adyen_gateways.d.cts +1 -1
  46. package/lib/resources/adyen_gateways.d.ts +1 -1
  47. package/lib/resources/adyen_payments.d.cts +1 -1
  48. package/lib/resources/adyen_payments.d.ts +1 -1
  49. package/lib/resources/applications.d.cts +1 -1
  50. package/lib/resources/applications.d.ts +1 -1
  51. package/lib/resources/attachments.d.cts +1 -1
  52. package/lib/resources/attachments.d.ts +1 -1
  53. package/lib/resources/authorizations.d.cts +1 -1
  54. package/lib/resources/authorizations.d.ts +1 -1
  55. package/lib/resources/avalara_accounts.d.cts +1 -1
  56. package/lib/resources/avalara_accounts.d.ts +1 -1
  57. package/lib/resources/axerve_gateways.d.cts +1 -1
  58. package/lib/resources/axerve_gateways.d.ts +1 -1
  59. package/lib/resources/axerve_payments.d.cts +1 -1
  60. package/lib/resources/axerve_payments.d.ts +1 -1
  61. package/lib/resources/bing_geocoders.d.cts +1 -1
  62. package/lib/resources/bing_geocoders.d.ts +1 -1
  63. package/lib/resources/braintree_gateways.d.cts +1 -1
  64. package/lib/resources/braintree_gateways.d.ts +1 -1
  65. package/lib/resources/braintree_payments.d.cts +1 -1
  66. package/lib/resources/braintree_payments.d.ts +1 -1
  67. package/lib/resources/bundles.d.cts +1 -1
  68. package/lib/resources/bundles.d.ts +1 -1
  69. package/lib/resources/buy_x_pay_y_promotions.d.cts +1 -1
  70. package/lib/resources/buy_x_pay_y_promotions.d.ts +1 -1
  71. package/lib/resources/captures.d.cts +1 -1
  72. package/lib/resources/captures.d.ts +1 -1
  73. package/lib/resources/carrier_accounts.d.cts +1 -1
  74. package/lib/resources/carrier_accounts.d.ts +1 -1
  75. package/lib/resources/checkout_com_gateways.d.cts +1 -1
  76. package/lib/resources/checkout_com_gateways.d.ts +1 -1
  77. package/lib/resources/checkout_com_payments.d.cts +1 -1
  78. package/lib/resources/checkout_com_payments.d.ts +1 -1
  79. package/lib/resources/cleanups.d.cts +1 -1
  80. package/lib/resources/cleanups.d.ts +1 -1
  81. package/lib/resources/coupon_codes_promotion_rules.d.cts +1 -1
  82. package/lib/resources/coupon_codes_promotion_rules.d.ts +1 -1
  83. package/lib/resources/coupon_recipients.d.cts +1 -1
  84. package/lib/resources/coupon_recipients.d.ts +1 -1
  85. package/lib/resources/coupons.d.cts +1 -1
  86. package/lib/resources/coupons.d.ts +1 -1
  87. package/lib/resources/custom_promotion_rules.d.cts +1 -1
  88. package/lib/resources/custom_promotion_rules.d.ts +1 -1
  89. package/lib/resources/customer_addresses.d.cts +1 -1
  90. package/lib/resources/customer_addresses.d.ts +1 -1
  91. package/lib/resources/customer_groups.d.cts +1 -1
  92. package/lib/resources/customer_groups.d.ts +1 -1
  93. package/lib/resources/customer_password_resets.d.cts +1 -1
  94. package/lib/resources/customer_password_resets.d.ts +1 -1
  95. package/lib/resources/customer_payment_sources.d.cts +1 -1
  96. package/lib/resources/customer_payment_sources.d.ts +1 -1
  97. package/lib/resources/customer_subscriptions.d.cts +1 -1
  98. package/lib/resources/customer_subscriptions.d.ts +1 -1
  99. package/lib/resources/customers.cjs +2 -2
  100. package/lib/resources/customers.d.cts +1 -1
  101. package/lib/resources/customers.d.ts +1 -1
  102. package/lib/resources/customers.js +1 -1
  103. package/lib/resources/delivery_lead_times.d.cts +1 -1
  104. package/lib/resources/delivery_lead_times.d.ts +1 -1
  105. package/lib/resources/discount_engine_items.d.cts +1 -1
  106. package/lib/resources/discount_engine_items.d.ts +1 -1
  107. package/lib/resources/discount_engines.d.cts +1 -1
  108. package/lib/resources/discount_engines.d.ts +1 -1
  109. package/lib/resources/easypost_pickups.d.cts +1 -1
  110. package/lib/resources/easypost_pickups.d.ts +1 -1
  111. package/lib/resources/event_callbacks.d.cts +1 -1
  112. package/lib/resources/event_callbacks.d.ts +1 -1
  113. package/lib/resources/events.d.cts +1 -1
  114. package/lib/resources/events.d.ts +1 -1
  115. package/lib/resources/exports.d.cts +1 -1
  116. package/lib/resources/exports.d.ts +1 -1
  117. package/lib/resources/external_gateways.d.cts +1 -1
  118. package/lib/resources/external_gateways.d.ts +1 -1
  119. package/lib/resources/external_payments.d.cts +1 -1
  120. package/lib/resources/external_payments.d.ts +1 -1
  121. package/lib/resources/external_promotions.d.cts +1 -1
  122. package/lib/resources/external_promotions.d.ts +1 -1
  123. package/lib/resources/external_tax_calculators.d.cts +1 -1
  124. package/lib/resources/external_tax_calculators.d.ts +1 -1
  125. package/lib/resources/fixed_amount_promotions.d.cts +1 -1
  126. package/lib/resources/fixed_amount_promotions.d.ts +1 -1
  127. package/lib/resources/fixed_price_promotions.d.cts +1 -1
  128. package/lib/resources/fixed_price_promotions.d.ts +1 -1
  129. package/lib/resources/flex_promotions.d.cts +1 -1
  130. package/lib/resources/flex_promotions.d.ts +1 -1
  131. package/lib/resources/free_gift_promotions.d.cts +1 -1
  132. package/lib/resources/free_gift_promotions.d.ts +1 -1
  133. package/lib/resources/free_shipping_promotions.d.cts +1 -1
  134. package/lib/resources/free_shipping_promotions.d.ts +1 -1
  135. package/lib/resources/geocoders.d.cts +1 -1
  136. package/lib/resources/geocoders.d.ts +1 -1
  137. package/lib/resources/gift_card_recipients.d.cts +1 -1
  138. package/lib/resources/gift_card_recipients.d.ts +1 -1
  139. package/lib/resources/gift_cards.d.cts +1 -1
  140. package/lib/resources/gift_cards.d.ts +1 -1
  141. package/lib/resources/google_geocoders.d.cts +1 -1
  142. package/lib/resources/google_geocoders.d.ts +1 -1
  143. package/lib/resources/imports.d.cts +1 -1
  144. package/lib/resources/imports.d.ts +1 -1
  145. package/lib/resources/in_stock_subscriptions.d.cts +1 -1
  146. package/lib/resources/in_stock_subscriptions.d.ts +1 -1
  147. package/lib/resources/inventory_models.d.cts +1 -1
  148. package/lib/resources/inventory_models.d.ts +1 -1
  149. package/lib/resources/inventory_return_locations.d.cts +1 -1
  150. package/lib/resources/inventory_return_locations.d.ts +1 -1
  151. package/lib/resources/inventory_stock_locations.d.cts +1 -1
  152. package/lib/resources/inventory_stock_locations.d.ts +1 -1
  153. package/lib/resources/klarna_gateways.d.cts +1 -1
  154. package/lib/resources/klarna_gateways.d.ts +1 -1
  155. package/lib/resources/klarna_payments.d.cts +1 -1
  156. package/lib/resources/klarna_payments.d.ts +1 -1
  157. package/lib/resources/line_item_options.d.cts +1 -1
  158. package/lib/resources/line_item_options.d.ts +1 -1
  159. package/lib/resources/line_items.d.cts +1 -1
  160. package/lib/resources/line_items.d.ts +1 -1
  161. package/lib/resources/links.d.cts +1 -1
  162. package/lib/resources/links.d.ts +1 -1
  163. package/lib/resources/manual_gateways.d.cts +1 -1
  164. package/lib/resources/manual_gateways.d.ts +1 -1
  165. package/lib/resources/manual_tax_calculators.d.cts +1 -1
  166. package/lib/resources/manual_tax_calculators.d.ts +1 -1
  167. package/lib/resources/markets.d.cts +1 -1
  168. package/lib/resources/markets.d.ts +1 -1
  169. package/lib/resources/merchants.d.cts +1 -1
  170. package/lib/resources/merchants.d.ts +1 -1
  171. package/lib/resources/notifications.d.cts +1 -1
  172. package/lib/resources/notifications.d.ts +1 -1
  173. package/lib/resources/order_amount_promotion_rules.d.cts +1 -1
  174. package/lib/resources/order_amount_promotion_rules.d.ts +1 -1
  175. package/lib/resources/order_copies.d.cts +1 -1
  176. package/lib/resources/order_copies.d.ts +1 -1
  177. package/lib/resources/order_factories.d.cts +1 -1
  178. package/lib/resources/order_factories.d.ts +1 -1
  179. package/lib/resources/order_subscription_items.d.cts +1 -1
  180. package/lib/resources/order_subscription_items.d.ts +1 -1
  181. package/lib/resources/order_subscriptions.d.cts +1 -1
  182. package/lib/resources/order_subscriptions.d.ts +1 -1
  183. package/lib/resources/orders.d.cts +1 -1
  184. package/lib/resources/orders.d.ts +1 -1
  185. package/lib/resources/organizations.d.cts +1 -1
  186. package/lib/resources/organizations.d.ts +1 -1
  187. package/lib/resources/packages.d.cts +1 -1
  188. package/lib/resources/packages.d.ts +1 -1
  189. package/lib/resources/parcel_line_items.d.cts +1 -1
  190. package/lib/resources/parcel_line_items.d.ts +1 -1
  191. package/lib/resources/parcels.d.cts +1 -1
  192. package/lib/resources/parcels.d.ts +1 -1
  193. package/lib/resources/payment_gateways.d.cts +1 -1
  194. package/lib/resources/payment_gateways.d.ts +1 -1
  195. package/lib/resources/payment_methods.d.cts +1 -1
  196. package/lib/resources/payment_methods.d.ts +1 -1
  197. package/lib/resources/payment_options.d.cts +1 -1
  198. package/lib/resources/payment_options.d.ts +1 -1
  199. package/lib/resources/paypal_gateways.d.cts +1 -1
  200. package/lib/resources/paypal_gateways.d.ts +1 -1
  201. package/lib/resources/paypal_payments.d.cts +1 -1
  202. package/lib/resources/paypal_payments.d.ts +1 -1
  203. package/lib/resources/percentage_discount_promotions.d.cts +1 -1
  204. package/lib/resources/percentage_discount_promotions.d.ts +1 -1
  205. package/lib/resources/pickups.d.cts +1 -1
  206. package/lib/resources/pickups.d.ts +1 -1
  207. package/lib/resources/price_frequency_tiers.d.cts +1 -1
  208. package/lib/resources/price_frequency_tiers.d.ts +1 -1
  209. package/lib/resources/price_list_schedulers.d.cts +1 -1
  210. package/lib/resources/price_list_schedulers.d.ts +1 -1
  211. package/lib/resources/price_lists.d.cts +1 -1
  212. package/lib/resources/price_lists.d.ts +1 -1
  213. package/lib/resources/price_tiers.d.cts +1 -1
  214. package/lib/resources/price_tiers.d.ts +1 -1
  215. package/lib/resources/price_volume_tiers.d.cts +1 -1
  216. package/lib/resources/price_volume_tiers.d.ts +1 -1
  217. package/lib/resources/prices.d.cts +1 -1
  218. package/lib/resources/prices.d.ts +1 -1
  219. package/lib/resources/promotion_rules.d.cts +1 -1
  220. package/lib/resources/promotion_rules.d.ts +1 -1
  221. package/lib/resources/promotions.d.cts +1 -1
  222. package/lib/resources/promotions.d.ts +1 -1
  223. package/lib/resources/recurring_order_copies.d.cts +1 -1
  224. package/lib/resources/recurring_order_copies.d.ts +1 -1
  225. package/lib/resources/refunds.d.cts +1 -1
  226. package/lib/resources/refunds.d.ts +1 -1
  227. package/lib/resources/reserved_stocks.d.cts +1 -1
  228. package/lib/resources/reserved_stocks.d.ts +1 -1
  229. package/lib/resources/resource_errors.d.cts +1 -1
  230. package/lib/resources/resource_errors.d.ts +1 -1
  231. package/lib/resources/return_line_items.d.cts +1 -1
  232. package/lib/resources/return_line_items.d.ts +1 -1
  233. package/lib/resources/returns.d.cts +1 -1
  234. package/lib/resources/returns.d.ts +1 -1
  235. package/lib/resources/satispay_gateways.d.cts +1 -1
  236. package/lib/resources/satispay_gateways.d.ts +1 -1
  237. package/lib/resources/satispay_payments.d.cts +1 -1
  238. package/lib/resources/satispay_payments.d.ts +1 -1
  239. package/lib/resources/shipments.d.cts +1 -1
  240. package/lib/resources/shipments.d.ts +1 -1
  241. package/lib/resources/shipping_categories.d.cts +1 -1
  242. package/lib/resources/shipping_categories.d.ts +1 -1
  243. package/lib/resources/shipping_method_tiers.d.cts +1 -1
  244. package/lib/resources/shipping_method_tiers.d.ts +1 -1
  245. package/lib/resources/shipping_methods.d.cts +1 -1
  246. package/lib/resources/shipping_methods.d.ts +1 -1
  247. package/lib/resources/shipping_weight_tiers.d.cts +1 -1
  248. package/lib/resources/shipping_weight_tiers.d.ts +1 -1
  249. package/lib/resources/shipping_zones.d.cts +1 -1
  250. package/lib/resources/shipping_zones.d.ts +1 -1
  251. package/lib/resources/sku_list_items.d.cts +1 -1
  252. package/lib/resources/sku_list_items.d.ts +1 -1
  253. package/lib/resources/sku_list_promotion_rules.d.cts +1 -1
  254. package/lib/resources/sku_list_promotion_rules.d.ts +1 -1
  255. package/lib/resources/sku_lists.d.cts +1 -1
  256. package/lib/resources/sku_lists.d.ts +1 -1
  257. package/lib/resources/sku_options.d.cts +1 -1
  258. package/lib/resources/sku_options.d.ts +1 -1
  259. package/lib/resources/skus.d.cts +1 -1
  260. package/lib/resources/skus.d.ts +1 -1
  261. package/lib/resources/stock_items.d.cts +1 -1
  262. package/lib/resources/stock_items.d.ts +1 -1
  263. package/lib/resources/stock_line_items.d.cts +1 -1
  264. package/lib/resources/stock_line_items.d.ts +1 -1
  265. package/lib/resources/stock_locations.d.cts +1 -1
  266. package/lib/resources/stock_locations.d.ts +1 -1
  267. package/lib/resources/stock_reservations.d.cts +1 -1
  268. package/lib/resources/stock_reservations.d.ts +1 -1
  269. package/lib/resources/stock_transfers.d.cts +1 -1
  270. package/lib/resources/stock_transfers.d.ts +1 -1
  271. package/lib/resources/stores.d.cts +1 -1
  272. package/lib/resources/stores.d.ts +1 -1
  273. package/lib/resources/stripe_gateways.d.cts +1 -1
  274. package/lib/resources/stripe_gateways.d.ts +1 -1
  275. package/lib/resources/stripe_payments.d.cts +1 -1
  276. package/lib/resources/stripe_payments.d.ts +1 -1
  277. package/lib/resources/stripe_tax_accounts.d.cts +1 -1
  278. package/lib/resources/stripe_tax_accounts.d.ts +1 -1
  279. package/lib/resources/subscription_models.d.cts +1 -1
  280. package/lib/resources/subscription_models.d.ts +1 -1
  281. package/lib/resources/tags.d.cts +1 -1
  282. package/lib/resources/tags.d.ts +1 -1
  283. package/lib/resources/talon_one_accounts.d.cts +1 -1
  284. package/lib/resources/talon_one_accounts.d.ts +1 -1
  285. package/lib/resources/tax_calculators.d.cts +1 -1
  286. package/lib/resources/tax_calculators.d.ts +1 -1
  287. package/lib/resources/tax_categories.d.cts +1 -1
  288. package/lib/resources/tax_categories.d.ts +1 -1
  289. package/lib/resources/tax_rules.d.cts +1 -1
  290. package/lib/resources/tax_rules.d.ts +1 -1
  291. package/lib/resources/taxjar_accounts.d.cts +1 -1
  292. package/lib/resources/taxjar_accounts.d.ts +1 -1
  293. package/lib/resources/transactions.d.cts +1 -1
  294. package/lib/resources/transactions.d.ts +1 -1
  295. package/lib/resources/versions.d.cts +1 -1
  296. package/lib/resources/versions.d.ts +1 -1
  297. package/lib/resources/vertex_accounts.d.cts +1 -1
  298. package/lib/resources/vertex_accounts.d.ts +1 -1
  299. package/lib/resources/voids.d.cts +1 -1
  300. package/lib/resources/voids.d.ts +1 -1
  301. package/lib/resources/webhooks.d.cts +1 -1
  302. package/lib/resources/webhooks.d.ts +1 -1
  303. package/lib/resources/wire_transfers.d.cts +1 -1
  304. package/lib/resources/wire_transfers.d.ts +1 -1
  305. package/lib/static.cjs +3 -3
  306. package/lib/static.d.cts +1 -1
  307. package/lib/static.d.ts +1 -1
  308. package/lib/static.js +2 -2
  309. package/package.json +5 -5
  310. package/lib/chunk-NKJBVNTV.cjs.map +0 -1
  311. package/lib/chunk-VLLLEX5J.js.map +0 -1
@@ -8806,7 +8806,7 @@ type CustomerGroupRel$2 = ResourceRel & {
8806
8806
  type TagRel$4 = ResourceRel & {
8807
8807
  type: TagType;
8808
8808
  };
8809
- type CustomerSort = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count'> & ResourceSort;
8809
+ type CustomerSort = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count' | 'anonymization_status'> & ResourceSort;
8810
8810
  interface Customer extends Resource {
8811
8811
  readonly type: CustomerType;
8812
8812
  /**
@@ -8853,6 +8853,11 @@ interface Customer extends Resource {
8853
8853
  * @example ```{"status":"requested","requested_at":"2025-03-15 11:39:21 UTC","requester":{"id":"fdgt56hh","first_name":"Travis","last_name":"Muller","email":"test@labadie.test"}}```
8854
8854
  */
8855
8855
  anonymization_info?: Record<string, any> | null;
8856
+ /**
8857
+ * Status of the current anonymization request (if any).
8858
+ * @example ```"requested"```
8859
+ */
8860
+ anonymization_status?: string | null;
8856
8861
  customer_group?: CustomerGroup | null;
8857
8862
  customer_addresses?: CustomerAddress[] | null;
8858
8863
  customer_payment_sources?: CustomerPaymentSource[] | null;
@@ -8806,7 +8806,7 @@ type CustomerGroupRel$2 = ResourceRel & {
8806
8806
  type TagRel$4 = ResourceRel & {
8807
8807
  type: TagType;
8808
8808
  };
8809
- type CustomerSort = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count'> & ResourceSort;
8809
+ type CustomerSort = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count' | 'anonymization_status'> & ResourceSort;
8810
8810
  interface Customer extends Resource {
8811
8811
  readonly type: CustomerType;
8812
8812
  /**
@@ -8853,6 +8853,11 @@ interface Customer extends Resource {
8853
8853
  * @example ```{"status":"requested","requested_at":"2025-03-15 11:39:21 UTC","requester":{"id":"fdgt56hh","first_name":"Travis","last_name":"Muller","email":"test@labadie.test"}}```
8854
8854
  */
8855
8855
  anonymization_info?: Record<string, any> | null;
8856
+ /**
8857
+ * Status of the current anonymization request (if any).
8858
+ * @example ```"requested"```
8859
+ */
8860
+ anonymization_status?: string | null;
8856
8861
  customer_group?: CustomerGroup | null;
8857
8862
  customer_addresses?: CustomerAddress[] | null;
8858
8863
  customer_payment_sources?: CustomerPaymentSource[] | null;
package/lib/api.cjs CHANGED
@@ -109,7 +109,7 @@ var chunkHQ6TJSB7_cjs = require('./chunk-HQ6TJSB7.cjs');
109
109
  var chunkFXE62CPP_cjs = require('./chunk-FXE62CPP.cjs');
110
110
  var chunk627I2FYX_cjs = require('./chunk-627I2FYX.cjs');
111
111
  var chunkZTVQSWSD_cjs = require('./chunk-ZTVQSWSD.cjs');
112
- var chunkNKJBVNTV_cjs = require('./chunk-NKJBVNTV.cjs');
112
+ var chunkKJAD45RP_cjs = require('./chunk-KJAD45RP.cjs');
113
113
  var chunkN6MHUHGE_cjs = require('./chunk-N6MHUHGE.cjs');
114
114
  var chunk4IH4EHXT_cjs = require('./chunk-4IH4EHXT.cjs');
115
115
  var chunkR755X3AG_cjs = require('./chunk-R755X3AG.cjs');
@@ -578,7 +578,7 @@ Object.defineProperty(exports, "customer_subscriptions", {
578
578
  });
579
579
  Object.defineProperty(exports, "customers", {
580
580
  enumerable: true,
581
- get: function () { return chunkNKJBVNTV_cjs.customers_default; }
581
+ get: function () { return chunkKJAD45RP_cjs.customers_default; }
582
582
  });
583
583
  Object.defineProperty(exports, "buy_x_pay_y_promotions", {
584
584
  enumerable: true,
package/lib/api.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as Events, aW as Exports, aY as ExternalGateways, a_ as ExternalPayments, b0 as ExternalPromotions, b2 as ExternalTaxCalculators, b4 as FixedAmountPromotions, b6 as FixedPricePromotions, b8 as FlexPromotions, ba as FreeGiftPromotions, bc as FreeShippingPromotions, be as Geocoders, bg as GiftCardRecipients, bi as GiftCards, bk as GoogleGeocoders, bm as Imports, bo as InStockSubscriptions, bq as InventoryModels, bs as InventoryReturnLocations, bu as InventoryStockLocations, bw as KlarnaGateways, by as KlarnaPayments, bA as LineItemOptions, bC as LineItems, bE as Links, bG as ManualGateways, bI as ManualTaxCalculators, bK as Markets, bM as Merchants, bO as Notifications, bQ as OrderAmountPromotionRules, bS as OrderCopies, bU as OrderFactories, bW as OrderSubscriptionItems, bY as OrderSubscriptions, b_ as Orders, c0 as Organizations, c2 as Packages, c4 as ParcelLineItems, c6 as Parcels, c8 as PaymentGateways, ca as PaymentMethods, cc as PaymentOptions, ce as PaypalGateways, cg as PaypalPayments, ci as PercentageDiscountPromotions, ck as Pickups, cm as PriceFrequencyTiers, co as PriceListSchedulers, cq as PriceLists, cs as PriceTiers, cu as PriceVolumeTiers, cw as Prices, cy as PromotionRules, cA as Promotions, cC as RecurringOrderCopies, cE as Refunds, cG as ReservedStocks, cI as ResourceErrors, cK as ReturnLineItems, cM as Returns, cO as SatispayGateways, cQ as SatispayPayments, cS as Shipments, cU as ShippingCategories, cW as ShippingMethodTiers, cY as ShippingMethods, c_ as ShippingWeightTiers, d0 as ShippingZones, d2 as SkuListItems, d4 as SkuListPromotionRules, d6 as SkuLists, d8 as SkuOptions, da as Skus, dc as StockItems, de as StockLineItems, dg as StockLocations, di as StockReservations, dk as StockTransfers, dm as Stores, dp as StripeGateways, dr as StripePayments, dt as StripeTaxAccounts, dv as SubscriptionModels, dx as Tags, dz as TalonOneAccounts, dB as TaxCalculators, dD as TaxCategories, dF as TaxRules, dH as TaxjarAccounts, dJ as Transactions, dL as Versions, dN as VertexAccounts, dP as Voids, dR as Webhooks, dT as WireTransfers, G as addresses, I as adjustments, K as adyen_gateways, O as adyen_payments, S as application, X as attachments, Z as authorizations, $ as avalara_accounts, a1 as axerve_gateways, a3 as axerve_payments, a5 as bing_geocoders, a7 as braintree_gateways, a9 as braintree_payments, ab as bundles, ad as buy_x_pay_y_promotions, af as captures, ah as carrier_accounts, aj as checkout_com_gateways, al as checkout_com_payments, an as cleanups, ap as coupon_codes_promotion_rules, ar as coupon_recipients, at as coupons, av as custom_promotion_rules, ax as customer_addresses, az as customer_groups, aB as customer_password_resets, aD as customer_payment_sources, aF as customer_subscriptions, aH as customers, aJ as delivery_lead_times, aL as discount_engine_items, aN as discount_engines, aP as easypost_pickups, aR as event_callbacks, aT as events, aV as exports, aX as external_gateways, aZ as external_payments, a$ as external_promotions, b1 as external_tax_calculators, b3 as fixed_amount_promotions, b5 as fixed_price_promotions, b7 as flex_promotions, b9 as free_gift_promotions, bb as free_shipping_promotions, bd as geocoders, bf as gift_card_recipients, bh as gift_cards, bj as google_geocoders, bl as imports, bn as in_stock_subscriptions, bp as inventory_models, br as inventory_return_locations, bt as inventory_stock_locations, bv as klarna_gateways, bx as klarna_payments, bz as line_item_options, bB as line_items, bD as links, bF as manual_gateways, bH as manual_tax_calculators, bJ as markets, bL as merchants, bN as notifications, bP as order_amount_promotion_rules, bR as order_copies, bT as order_factories, bV as order_subscription_items, bX as order_subscriptions, bZ as orders, b$ as organization, c1 as packages, c3 as parcel_line_items, c5 as parcels, c7 as payment_gateways, c9 as payment_methods, cb as payment_options, cd as paypal_gateways, cf as paypal_payments, ch as percentage_discount_promotions, cj as pickups, cl as price_frequency_tiers, cn as price_list_schedulers, cp as price_lists, cr as price_tiers, ct as price_volume_tiers, cv as prices, cx as promotion_rules, cz as promotions, cB as recurring_order_copies, cD as refunds, cF as reserved_stocks, cH as resource_errors, cJ as return_line_items, cL as returns, cN as satispay_gateways, cP as satispay_payments, cR as shipments, cT as shipping_categories, cV as shipping_method_tiers, cX as shipping_methods, cZ as shipping_weight_tiers, c$ as shipping_zones, d1 as sku_list_items, d3 as sku_list_promotion_rules, d5 as sku_lists, d7 as sku_options, d9 as skus, db as stock_items, dd as stock_line_items, df as stock_locations, dh as stock_reservations, dj as stock_transfers, dl as stores, dn as stripe_gateways, dq as stripe_payments, ds as stripe_tax_accounts, du as subscription_models, dw as tags, dy as talon_one_accounts, dA as tax_calculators, dC as tax_categories, dE as tax_rules, dG as taxjar_accounts, dI as transactions, dK as versions, dM as vertex_accounts, dO as voids, dQ as webhooks, dS as wire_transfers } from './api-2OqdnITp.cjs';
1
+ export { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as Events, aW as Exports, aY as ExternalGateways, a_ as ExternalPayments, b0 as ExternalPromotions, b2 as ExternalTaxCalculators, b4 as FixedAmountPromotions, b6 as FixedPricePromotions, b8 as FlexPromotions, ba as FreeGiftPromotions, bc as FreeShippingPromotions, be as Geocoders, bg as GiftCardRecipients, bi as GiftCards, bk as GoogleGeocoders, bm as Imports, bo as InStockSubscriptions, bq as InventoryModels, bs as InventoryReturnLocations, bu as InventoryStockLocations, bw as KlarnaGateways, by as KlarnaPayments, bA as LineItemOptions, bC as LineItems, bE as Links, bG as ManualGateways, bI as ManualTaxCalculators, bK as Markets, bM as Merchants, bO as Notifications, bQ as OrderAmountPromotionRules, bS as OrderCopies, bU as OrderFactories, bW as OrderSubscriptionItems, bY as OrderSubscriptions, b_ as Orders, c0 as Organizations, c2 as Packages, c4 as ParcelLineItems, c6 as Parcels, c8 as PaymentGateways, ca as PaymentMethods, cc as PaymentOptions, ce as PaypalGateways, cg as PaypalPayments, ci as PercentageDiscountPromotions, ck as Pickups, cm as PriceFrequencyTiers, co as PriceListSchedulers, cq as PriceLists, cs as PriceTiers, cu as PriceVolumeTiers, cw as Prices, cy as PromotionRules, cA as Promotions, cC as RecurringOrderCopies, cE as Refunds, cG as ReservedStocks, cI as ResourceErrors, cK as ReturnLineItems, cM as Returns, cO as SatispayGateways, cQ as SatispayPayments, cS as Shipments, cU as ShippingCategories, cW as ShippingMethodTiers, cY as ShippingMethods, c_ as ShippingWeightTiers, d0 as ShippingZones, d2 as SkuListItems, d4 as SkuListPromotionRules, d6 as SkuLists, d8 as SkuOptions, da as Skus, dc as StockItems, de as StockLineItems, dg as StockLocations, di as StockReservations, dk as StockTransfers, dm as Stores, dp as StripeGateways, dr as StripePayments, dt as StripeTaxAccounts, dv as SubscriptionModels, dx as Tags, dz as TalonOneAccounts, dB as TaxCalculators, dD as TaxCategories, dF as TaxRules, dH as TaxjarAccounts, dJ as Transactions, dL as Versions, dN as VertexAccounts, dP as Voids, dR as Webhooks, dT as WireTransfers, G as addresses, I as adjustments, K as adyen_gateways, O as adyen_payments, S as application, X as attachments, Z as authorizations, $ as avalara_accounts, a1 as axerve_gateways, a3 as axerve_payments, a5 as bing_geocoders, a7 as braintree_gateways, a9 as braintree_payments, ab as bundles, ad as buy_x_pay_y_promotions, af as captures, ah as carrier_accounts, aj as checkout_com_gateways, al as checkout_com_payments, an as cleanups, ap as coupon_codes_promotion_rules, ar as coupon_recipients, at as coupons, av as custom_promotion_rules, ax as customer_addresses, az as customer_groups, aB as customer_password_resets, aD as customer_payment_sources, aF as customer_subscriptions, aH as customers, aJ as delivery_lead_times, aL as discount_engine_items, aN as discount_engines, aP as easypost_pickups, aR as event_callbacks, aT as events, aV as exports, aX as external_gateways, aZ as external_payments, a$ as external_promotions, b1 as external_tax_calculators, b3 as fixed_amount_promotions, b5 as fixed_price_promotions, b7 as flex_promotions, b9 as free_gift_promotions, bb as free_shipping_promotions, bd as geocoders, bf as gift_card_recipients, bh as gift_cards, bj as google_geocoders, bl as imports, bn as in_stock_subscriptions, bp as inventory_models, br as inventory_return_locations, bt as inventory_stock_locations, bv as klarna_gateways, bx as klarna_payments, bz as line_item_options, bB as line_items, bD as links, bF as manual_gateways, bH as manual_tax_calculators, bJ as markets, bL as merchants, bN as notifications, bP as order_amount_promotion_rules, bR as order_copies, bT as order_factories, bV as order_subscription_items, bX as order_subscriptions, bZ as orders, b$ as organization, c1 as packages, c3 as parcel_line_items, c5 as parcels, c7 as payment_gateways, c9 as payment_methods, cb as payment_options, cd as paypal_gateways, cf as paypal_payments, ch as percentage_discount_promotions, cj as pickups, cl as price_frequency_tiers, cn as price_list_schedulers, cp as price_lists, cr as price_tiers, ct as price_volume_tiers, cv as prices, cx as promotion_rules, cz as promotions, cB as recurring_order_copies, cD as refunds, cF as reserved_stocks, cH as resource_errors, cJ as return_line_items, cL as returns, cN as satispay_gateways, cP as satispay_payments, cR as shipments, cT as shipping_categories, cV as shipping_method_tiers, cX as shipping_methods, cZ as shipping_weight_tiers, c$ as shipping_zones, d1 as sku_list_items, d3 as sku_list_promotion_rules, d5 as sku_lists, d7 as sku_options, d9 as skus, db as stock_items, dd as stock_line_items, df as stock_locations, dh as stock_reservations, dj as stock_transfers, dl as stores, dn as stripe_gateways, dq as stripe_payments, ds as stripe_tax_accounts, du as subscription_models, dw as tags, dy as talon_one_accounts, dA as tax_calculators, dC as tax_categories, dE as tax_rules, dG as taxjar_accounts, dI as transactions, dK as versions, dM as vertex_accounts, dO as voids, dQ as webhooks, dS as wire_transfers } from './api-DNeGwzrs.cjs';
2
2
  import './client.cjs';
3
3
  import './interceptor-k15jXzf0.cjs';
4
4
  import './types.cjs';
package/lib/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as Events, aW as Exports, aY as ExternalGateways, a_ as ExternalPayments, b0 as ExternalPromotions, b2 as ExternalTaxCalculators, b4 as FixedAmountPromotions, b6 as FixedPricePromotions, b8 as FlexPromotions, ba as FreeGiftPromotions, bc as FreeShippingPromotions, be as Geocoders, bg as GiftCardRecipients, bi as GiftCards, bk as GoogleGeocoders, bm as Imports, bo as InStockSubscriptions, bq as InventoryModels, bs as InventoryReturnLocations, bu as InventoryStockLocations, bw as KlarnaGateways, by as KlarnaPayments, bA as LineItemOptions, bC as LineItems, bE as Links, bG as ManualGateways, bI as ManualTaxCalculators, bK as Markets, bM as Merchants, bO as Notifications, bQ as OrderAmountPromotionRules, bS as OrderCopies, bU as OrderFactories, bW as OrderSubscriptionItems, bY as OrderSubscriptions, b_ as Orders, c0 as Organizations, c2 as Packages, c4 as ParcelLineItems, c6 as Parcels, c8 as PaymentGateways, ca as PaymentMethods, cc as PaymentOptions, ce as PaypalGateways, cg as PaypalPayments, ci as PercentageDiscountPromotions, ck as Pickups, cm as PriceFrequencyTiers, co as PriceListSchedulers, cq as PriceLists, cs as PriceTiers, cu as PriceVolumeTiers, cw as Prices, cy as PromotionRules, cA as Promotions, cC as RecurringOrderCopies, cE as Refunds, cG as ReservedStocks, cI as ResourceErrors, cK as ReturnLineItems, cM as Returns, cO as SatispayGateways, cQ as SatispayPayments, cS as Shipments, cU as ShippingCategories, cW as ShippingMethodTiers, cY as ShippingMethods, c_ as ShippingWeightTiers, d0 as ShippingZones, d2 as SkuListItems, d4 as SkuListPromotionRules, d6 as SkuLists, d8 as SkuOptions, da as Skus, dc as StockItems, de as StockLineItems, dg as StockLocations, di as StockReservations, dk as StockTransfers, dm as Stores, dp as StripeGateways, dr as StripePayments, dt as StripeTaxAccounts, dv as SubscriptionModels, dx as Tags, dz as TalonOneAccounts, dB as TaxCalculators, dD as TaxCategories, dF as TaxRules, dH as TaxjarAccounts, dJ as Transactions, dL as Versions, dN as VertexAccounts, dP as Voids, dR as Webhooks, dT as WireTransfers, G as addresses, I as adjustments, K as adyen_gateways, O as adyen_payments, S as application, X as attachments, Z as authorizations, $ as avalara_accounts, a1 as axerve_gateways, a3 as axerve_payments, a5 as bing_geocoders, a7 as braintree_gateways, a9 as braintree_payments, ab as bundles, ad as buy_x_pay_y_promotions, af as captures, ah as carrier_accounts, aj as checkout_com_gateways, al as checkout_com_payments, an as cleanups, ap as coupon_codes_promotion_rules, ar as coupon_recipients, at as coupons, av as custom_promotion_rules, ax as customer_addresses, az as customer_groups, aB as customer_password_resets, aD as customer_payment_sources, aF as customer_subscriptions, aH as customers, aJ as delivery_lead_times, aL as discount_engine_items, aN as discount_engines, aP as easypost_pickups, aR as event_callbacks, aT as events, aV as exports, aX as external_gateways, aZ as external_payments, a$ as external_promotions, b1 as external_tax_calculators, b3 as fixed_amount_promotions, b5 as fixed_price_promotions, b7 as flex_promotions, b9 as free_gift_promotions, bb as free_shipping_promotions, bd as geocoders, bf as gift_card_recipients, bh as gift_cards, bj as google_geocoders, bl as imports, bn as in_stock_subscriptions, bp as inventory_models, br as inventory_return_locations, bt as inventory_stock_locations, bv as klarna_gateways, bx as klarna_payments, bz as line_item_options, bB as line_items, bD as links, bF as manual_gateways, bH as manual_tax_calculators, bJ as markets, bL as merchants, bN as notifications, bP as order_amount_promotion_rules, bR as order_copies, bT as order_factories, bV as order_subscription_items, bX as order_subscriptions, bZ as orders, b$ as organization, c1 as packages, c3 as parcel_line_items, c5 as parcels, c7 as payment_gateways, c9 as payment_methods, cb as payment_options, cd as paypal_gateways, cf as paypal_payments, ch as percentage_discount_promotions, cj as pickups, cl as price_frequency_tiers, cn as price_list_schedulers, cp as price_lists, cr as price_tiers, ct as price_volume_tiers, cv as prices, cx as promotion_rules, cz as promotions, cB as recurring_order_copies, cD as refunds, cF as reserved_stocks, cH as resource_errors, cJ as return_line_items, cL as returns, cN as satispay_gateways, cP as satispay_payments, cR as shipments, cT as shipping_categories, cV as shipping_method_tiers, cX as shipping_methods, cZ as shipping_weight_tiers, c$ as shipping_zones, d1 as sku_list_items, d3 as sku_list_promotion_rules, d5 as sku_lists, d7 as sku_options, d9 as skus, db as stock_items, dd as stock_line_items, df as stock_locations, dh as stock_reservations, dj as stock_transfers, dl as stores, dn as stripe_gateways, dq as stripe_payments, ds as stripe_tax_accounts, du as subscription_models, dw as tags, dy as talon_one_accounts, dA as tax_calculators, dC as tax_categories, dE as tax_rules, dG as taxjar_accounts, dI as transactions, dK as versions, dM as vertex_accounts, dO as voids, dQ as webhooks, dS as wire_transfers } from './api-DF66S5Gh.js';
1
+ export { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as Events, aW as Exports, aY as ExternalGateways, a_ as ExternalPayments, b0 as ExternalPromotions, b2 as ExternalTaxCalculators, b4 as FixedAmountPromotions, b6 as FixedPricePromotions, b8 as FlexPromotions, ba as FreeGiftPromotions, bc as FreeShippingPromotions, be as Geocoders, bg as GiftCardRecipients, bi as GiftCards, bk as GoogleGeocoders, bm as Imports, bo as InStockSubscriptions, bq as InventoryModels, bs as InventoryReturnLocations, bu as InventoryStockLocations, bw as KlarnaGateways, by as KlarnaPayments, bA as LineItemOptions, bC as LineItems, bE as Links, bG as ManualGateways, bI as ManualTaxCalculators, bK as Markets, bM as Merchants, bO as Notifications, bQ as OrderAmountPromotionRules, bS as OrderCopies, bU as OrderFactories, bW as OrderSubscriptionItems, bY as OrderSubscriptions, b_ as Orders, c0 as Organizations, c2 as Packages, c4 as ParcelLineItems, c6 as Parcels, c8 as PaymentGateways, ca as PaymentMethods, cc as PaymentOptions, ce as PaypalGateways, cg as PaypalPayments, ci as PercentageDiscountPromotions, ck as Pickups, cm as PriceFrequencyTiers, co as PriceListSchedulers, cq as PriceLists, cs as PriceTiers, cu as PriceVolumeTiers, cw as Prices, cy as PromotionRules, cA as Promotions, cC as RecurringOrderCopies, cE as Refunds, cG as ReservedStocks, cI as ResourceErrors, cK as ReturnLineItems, cM as Returns, cO as SatispayGateways, cQ as SatispayPayments, cS as Shipments, cU as ShippingCategories, cW as ShippingMethodTiers, cY as ShippingMethods, c_ as ShippingWeightTiers, d0 as ShippingZones, d2 as SkuListItems, d4 as SkuListPromotionRules, d6 as SkuLists, d8 as SkuOptions, da as Skus, dc as StockItems, de as StockLineItems, dg as StockLocations, di as StockReservations, dk as StockTransfers, dm as Stores, dp as StripeGateways, dr as StripePayments, dt as StripeTaxAccounts, dv as SubscriptionModels, dx as Tags, dz as TalonOneAccounts, dB as TaxCalculators, dD as TaxCategories, dF as TaxRules, dH as TaxjarAccounts, dJ as Transactions, dL as Versions, dN as VertexAccounts, dP as Voids, dR as Webhooks, dT as WireTransfers, G as addresses, I as adjustments, K as adyen_gateways, O as adyen_payments, S as application, X as attachments, Z as authorizations, $ as avalara_accounts, a1 as axerve_gateways, a3 as axerve_payments, a5 as bing_geocoders, a7 as braintree_gateways, a9 as braintree_payments, ab as bundles, ad as buy_x_pay_y_promotions, af as captures, ah as carrier_accounts, aj as checkout_com_gateways, al as checkout_com_payments, an as cleanups, ap as coupon_codes_promotion_rules, ar as coupon_recipients, at as coupons, av as custom_promotion_rules, ax as customer_addresses, az as customer_groups, aB as customer_password_resets, aD as customer_payment_sources, aF as customer_subscriptions, aH as customers, aJ as delivery_lead_times, aL as discount_engine_items, aN as discount_engines, aP as easypost_pickups, aR as event_callbacks, aT as events, aV as exports, aX as external_gateways, aZ as external_payments, a$ as external_promotions, b1 as external_tax_calculators, b3 as fixed_amount_promotions, b5 as fixed_price_promotions, b7 as flex_promotions, b9 as free_gift_promotions, bb as free_shipping_promotions, bd as geocoders, bf as gift_card_recipients, bh as gift_cards, bj as google_geocoders, bl as imports, bn as in_stock_subscriptions, bp as inventory_models, br as inventory_return_locations, bt as inventory_stock_locations, bv as klarna_gateways, bx as klarna_payments, bz as line_item_options, bB as line_items, bD as links, bF as manual_gateways, bH as manual_tax_calculators, bJ as markets, bL as merchants, bN as notifications, bP as order_amount_promotion_rules, bR as order_copies, bT as order_factories, bV as order_subscription_items, bX as order_subscriptions, bZ as orders, b$ as organization, c1 as packages, c3 as parcel_line_items, c5 as parcels, c7 as payment_gateways, c9 as payment_methods, cb as payment_options, cd as paypal_gateways, cf as paypal_payments, ch as percentage_discount_promotions, cj as pickups, cl as price_frequency_tiers, cn as price_list_schedulers, cp as price_lists, cr as price_tiers, ct as price_volume_tiers, cv as prices, cx as promotion_rules, cz as promotions, cB as recurring_order_copies, cD as refunds, cF as reserved_stocks, cH as resource_errors, cJ as return_line_items, cL as returns, cN as satispay_gateways, cP as satispay_payments, cR as shipments, cT as shipping_categories, cV as shipping_method_tiers, cX as shipping_methods, cZ as shipping_weight_tiers, c$ as shipping_zones, d1 as sku_list_items, d3 as sku_list_promotion_rules, d5 as sku_lists, d7 as sku_options, d9 as skus, db as stock_items, dd as stock_line_items, df as stock_locations, dh as stock_reservations, dj as stock_transfers, dl as stores, dn as stripe_gateways, dq as stripe_payments, ds as stripe_tax_accounts, du as subscription_models, dw as tags, dy as talon_one_accounts, dA as tax_calculators, dC as tax_categories, dE as tax_rules, dG as taxjar_accounts, dI as transactions, dK as versions, dM as vertex_accounts, dO as voids, dQ as webhooks, dS as wire_transfers } from './api-Hgzs8bs4.js';
2
2
  import './client.js';
3
3
  import './interceptor-k15jXzf0.js';
4
4
  import './types.js';
package/lib/api.js CHANGED
@@ -107,7 +107,7 @@ export { customer_groups_default as customer_groups } from './chunk-D5E4OGXU.js'
107
107
  export { customer_password_resets_default as customer_password_resets } from './chunk-AW3TRBZ7.js';
108
108
  export { customer_payment_sources_default as customer_payment_sources } from './chunk-7SZY5BWE.js';
109
109
  export { customer_subscriptions_default as customer_subscriptions } from './chunk-4KFJUIFD.js';
110
- export { customers_default as customers } from './chunk-VLLLEX5J.js';
110
+ export { customers_default as customers } from './chunk-FKDKRSPO.js';
111
111
  export { buy_x_pay_y_promotions_default as buy_x_pay_y_promotions } from './chunk-HAAE23MQ.js';
112
112
  export { captures_default as captures } from './chunk-MJRMRWP3.js';
113
113
  export { carrier_accounts_default as carrier_accounts } from './chunk-QK5MFD4L.js';
package/lib/bundle.cjs CHANGED
@@ -109,7 +109,7 @@ var chunkHQ6TJSB7_cjs = require('./chunk-HQ6TJSB7.cjs');
109
109
  var chunkFXE62CPP_cjs = require('./chunk-FXE62CPP.cjs');
110
110
  var chunk627I2FYX_cjs = require('./chunk-627I2FYX.cjs');
111
111
  var chunkZTVQSWSD_cjs = require('./chunk-ZTVQSWSD.cjs');
112
- var chunkNKJBVNTV_cjs = require('./chunk-NKJBVNTV.cjs');
112
+ var chunkKJAD45RP_cjs = require('./chunk-KJAD45RP.cjs');
113
113
  var chunkN6MHUHGE_cjs = require('./chunk-N6MHUHGE.cjs');
114
114
  var chunk4IH4EHXT_cjs = require('./chunk-4IH4EHXT.cjs');
115
115
  var chunkR755X3AG_cjs = require('./chunk-R755X3AG.cjs');
@@ -132,7 +132,7 @@ var chunkH4PUXGNI_cjs = require('./chunk-H4PUXGNI.cjs');
132
132
  var chunkLCLXLB2R_cjs = require('./chunk-LCLXLB2R.cjs');
133
133
  var chunkP3NADEGE_cjs = require('./chunk-P3NADEGE.cjs');
134
134
  var chunkSGWRNEJB_cjs = require('./chunk-SGWRNEJB.cjs');
135
- var chunkRIMDGLIA_cjs = require('./chunk-RIMDGLIA.cjs');
135
+ var chunkJRYILJJY_cjs = require('./chunk-JRYILJJY.cjs');
136
136
  require('./chunk-QYDOENWU.cjs');
137
137
  require('./chunk-YY5ENJSH.cjs');
138
138
  require('./chunk-WAL76UPE.cjs');
@@ -145,7 +145,7 @@ require('./chunk-JEQ2X3Z6.cjs');
145
145
 
146
146
  // src/bundle.ts
147
147
  var debug = chunkJVF5KY2J_cjs.debug_default("bundle");
148
- var CommerceLayerBundle = class _CommerceLayerBundle extends chunkRIMDGLIA_cjs.CommerceLayerClient {
148
+ var CommerceLayerBundle = class _CommerceLayerBundle extends chunkJRYILJJY_cjs.CommerceLayerClient {
149
149
  // ##__CL_RESOURCES_DEF_START__##
150
150
  // ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##
151
151
  // ##__CL_RESOURCES_DEF_STOP__##
@@ -252,7 +252,7 @@ var CommerceLayerBundle = class _CommerceLayerBundle extends chunkRIMDGLIA_cjs.C
252
252
  return chunkZTVQSWSD_cjs.customer_subscriptions_default;
253
253
  }
254
254
  get customers() {
255
- return chunkNKJBVNTV_cjs.customers_default;
255
+ return chunkKJAD45RP_cjs.customers_default;
256
256
  }
257
257
  get delivery_lead_times() {
258
258
  return chunkNJYMO7FP_cjs.delivery_lead_times_default;
package/lib/bundle.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CommerceLayerInitConfig, CommerceLayerClient } from './commercelayer.cjs';
2
- import { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as Events, aW as Exports, aY as ExternalGateways, a_ as ExternalPayments, b0 as ExternalPromotions, b2 as ExternalTaxCalculators, b4 as FixedAmountPromotions, b6 as FixedPricePromotions, b8 as FlexPromotions, ba as FreeGiftPromotions, bc as FreeShippingPromotions, be as Geocoders, bg as GiftCardRecipients, bi as GiftCards, bk as GoogleGeocoders, bm as Imports, bo as InStockSubscriptions, bq as InventoryModels, bs as InventoryReturnLocations, bu as InventoryStockLocations, bw as KlarnaGateways, by as KlarnaPayments, bA as LineItemOptions, bC as LineItems, bE as Links, bG as ManualGateways, bI as ManualTaxCalculators, bK as Markets, bM as Merchants, bO as Notifications, bQ as OrderAmountPromotionRules, bS as OrderCopies, bU as OrderFactories, bW as OrderSubscriptionItems, bY as OrderSubscriptions, b_ as Orders, c0 as Organizations, c2 as Packages, c4 as ParcelLineItems, c6 as Parcels, c8 as PaymentGateways, ca as PaymentMethods, cc as PaymentOptions, ce as PaypalGateways, cg as PaypalPayments, ci as PercentageDiscountPromotions, ck as Pickups, cm as PriceFrequencyTiers, co as PriceListSchedulers, cq as PriceLists, cs as PriceTiers, cu as PriceVolumeTiers, cw as Prices, cy as PromotionRules, cA as Promotions, cC as RecurringOrderCopies, cE as Refunds, cG as ReservedStocks, cI as ResourceErrors, cK as ReturnLineItems, cM as Returns, cO as SatispayGateways, cQ as SatispayPayments, cS as Shipments, cU as ShippingCategories, cW as ShippingMethodTiers, cY as ShippingMethods, c_ as ShippingWeightTiers, d0 as ShippingZones, d2 as SkuListItems, d4 as SkuListPromotionRules, d6 as SkuLists, d8 as SkuOptions, da as Skus, dc as StockItems, de as StockLineItems, dg as StockLocations, di as StockReservations, dk as StockTransfers, dm as Stores, dp as StripeGateways, dr as StripePayments, dt as StripeTaxAccounts, dv as SubscriptionModels, dx as Tags, dz as TalonOneAccounts, dB as TaxCalculators, dD as TaxCategories, dF as TaxRules, dH as TaxjarAccounts, dJ as Transactions, dL as Versions, dN as VertexAccounts, dP as Voids, dR as Webhooks, dT as WireTransfers } from './api-2OqdnITp.cjs';
2
+ import { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as Events, aW as Exports, aY as ExternalGateways, a_ as ExternalPayments, b0 as ExternalPromotions, b2 as ExternalTaxCalculators, b4 as FixedAmountPromotions, b6 as FixedPricePromotions, b8 as FlexPromotions, ba as FreeGiftPromotions, bc as FreeShippingPromotions, be as Geocoders, bg as GiftCardRecipients, bi as GiftCards, bk as GoogleGeocoders, bm as Imports, bo as InStockSubscriptions, bq as InventoryModels, bs as InventoryReturnLocations, bu as InventoryStockLocations, bw as KlarnaGateways, by as KlarnaPayments, bA as LineItemOptions, bC as LineItems, bE as Links, bG as ManualGateways, bI as ManualTaxCalculators, bK as Markets, bM as Merchants, bO as Notifications, bQ as OrderAmountPromotionRules, bS as OrderCopies, bU as OrderFactories, bW as OrderSubscriptionItems, bY as OrderSubscriptions, b_ as Orders, c0 as Organizations, c2 as Packages, c4 as ParcelLineItems, c6 as Parcels, c8 as PaymentGateways, ca as PaymentMethods, cc as PaymentOptions, ce as PaypalGateways, cg as PaypalPayments, ci as PercentageDiscountPromotions, ck as Pickups, cm as PriceFrequencyTiers, co as PriceListSchedulers, cq as PriceLists, cs as PriceTiers, cu as PriceVolumeTiers, cw as Prices, cy as PromotionRules, cA as Promotions, cC as RecurringOrderCopies, cE as Refunds, cG as ReservedStocks, cI as ResourceErrors, cK as ReturnLineItems, cM as Returns, cO as SatispayGateways, cQ as SatispayPayments, cS as Shipments, cU as ShippingCategories, cW as ShippingMethodTiers, cY as ShippingMethods, c_ as ShippingWeightTiers, d0 as ShippingZones, d2 as SkuListItems, d4 as SkuListPromotionRules, d6 as SkuLists, d8 as SkuOptions, da as Skus, dc as StockItems, de as StockLineItems, dg as StockLocations, di as StockReservations, dk as StockTransfers, dm as Stores, dp as StripeGateways, dr as StripePayments, dt as StripeTaxAccounts, dv as SubscriptionModels, dx as Tags, dz as TalonOneAccounts, dB as TaxCalculators, dD as TaxCategories, dF as TaxRules, dH as TaxjarAccounts, dJ as Transactions, dL as Versions, dN as VertexAccounts, dP as Voids, dR as Webhooks, dT as WireTransfers } from './api-DNeGwzrs.cjs';
3
3
  import './error.cjs';
4
4
  import './interceptor-k15jXzf0.cjs';
5
5
  import './client.cjs';
package/lib/bundle.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CommerceLayerInitConfig, CommerceLayerClient } from './commercelayer.js';
2
- import { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as Events, aW as Exports, aY as ExternalGateways, a_ as ExternalPayments, b0 as ExternalPromotions, b2 as ExternalTaxCalculators, b4 as FixedAmountPromotions, b6 as FixedPricePromotions, b8 as FlexPromotions, ba as FreeGiftPromotions, bc as FreeShippingPromotions, be as Geocoders, bg as GiftCardRecipients, bi as GiftCards, bk as GoogleGeocoders, bm as Imports, bo as InStockSubscriptions, bq as InventoryModels, bs as InventoryReturnLocations, bu as InventoryStockLocations, bw as KlarnaGateways, by as KlarnaPayments, bA as LineItemOptions, bC as LineItems, bE as Links, bG as ManualGateways, bI as ManualTaxCalculators, bK as Markets, bM as Merchants, bO as Notifications, bQ as OrderAmountPromotionRules, bS as OrderCopies, bU as OrderFactories, bW as OrderSubscriptionItems, bY as OrderSubscriptions, b_ as Orders, c0 as Organizations, c2 as Packages, c4 as ParcelLineItems, c6 as Parcels, c8 as PaymentGateways, ca as PaymentMethods, cc as PaymentOptions, ce as PaypalGateways, cg as PaypalPayments, ci as PercentageDiscountPromotions, ck as Pickups, cm as PriceFrequencyTiers, co as PriceListSchedulers, cq as PriceLists, cs as PriceTiers, cu as PriceVolumeTiers, cw as Prices, cy as PromotionRules, cA as Promotions, cC as RecurringOrderCopies, cE as Refunds, cG as ReservedStocks, cI as ResourceErrors, cK as ReturnLineItems, cM as Returns, cO as SatispayGateways, cQ as SatispayPayments, cS as Shipments, cU as ShippingCategories, cW as ShippingMethodTiers, cY as ShippingMethods, c_ as ShippingWeightTiers, d0 as ShippingZones, d2 as SkuListItems, d4 as SkuListPromotionRules, d6 as SkuLists, d8 as SkuOptions, da as Skus, dc as StockItems, de as StockLineItems, dg as StockLocations, di as StockReservations, dk as StockTransfers, dm as Stores, dp as StripeGateways, dr as StripePayments, dt as StripeTaxAccounts, dv as SubscriptionModels, dx as Tags, dz as TalonOneAccounts, dB as TaxCalculators, dD as TaxCategories, dF as TaxRules, dH as TaxjarAccounts, dJ as Transactions, dL as Versions, dN as VertexAccounts, dP as Voids, dR as Webhooks, dT as WireTransfers } from './api-DF66S5Gh.js';
2
+ import { H as Addresses, J as Adjustments, N as AdyenGateways, P as AdyenPayments, W as Applications, Y as Attachments, _ as Authorizations, a0 as AvalaraAccounts, a2 as AxerveGateways, a4 as AxervePayments, a6 as BingGeocoders, a8 as BraintreeGateways, aa as BraintreePayments, ac as Bundles, ae as BuyXPayYPromotions, ag as Captures, ai as CarrierAccounts, ak as CheckoutComGateways, am as CheckoutComPayments, ao as Cleanups, aq as CouponCodesPromotionRules, as as CouponRecipients, au as Coupons, aw as CustomPromotionRules, ay as CustomerAddresses, aA as CustomerGroups, aC as CustomerPasswordResets, aE as CustomerPaymentSources, aG as CustomerSubscriptions, aI as Customers, aK as DeliveryLeadTimes, aM as DiscountEngineItems, aO as DiscountEngines, aQ as EasypostPickups, aS as EventCallbacks, aU as Events, aW as Exports, aY as ExternalGateways, a_ as ExternalPayments, b0 as ExternalPromotions, b2 as ExternalTaxCalculators, b4 as FixedAmountPromotions, b6 as FixedPricePromotions, b8 as FlexPromotions, ba as FreeGiftPromotions, bc as FreeShippingPromotions, be as Geocoders, bg as GiftCardRecipients, bi as GiftCards, bk as GoogleGeocoders, bm as Imports, bo as InStockSubscriptions, bq as InventoryModels, bs as InventoryReturnLocations, bu as InventoryStockLocations, bw as KlarnaGateways, by as KlarnaPayments, bA as LineItemOptions, bC as LineItems, bE as Links, bG as ManualGateways, bI as ManualTaxCalculators, bK as Markets, bM as Merchants, bO as Notifications, bQ as OrderAmountPromotionRules, bS as OrderCopies, bU as OrderFactories, bW as OrderSubscriptionItems, bY as OrderSubscriptions, b_ as Orders, c0 as Organizations, c2 as Packages, c4 as ParcelLineItems, c6 as Parcels, c8 as PaymentGateways, ca as PaymentMethods, cc as PaymentOptions, ce as PaypalGateways, cg as PaypalPayments, ci as PercentageDiscountPromotions, ck as Pickups, cm as PriceFrequencyTiers, co as PriceListSchedulers, cq as PriceLists, cs as PriceTiers, cu as PriceVolumeTiers, cw as Prices, cy as PromotionRules, cA as Promotions, cC as RecurringOrderCopies, cE as Refunds, cG as ReservedStocks, cI as ResourceErrors, cK as ReturnLineItems, cM as Returns, cO as SatispayGateways, cQ as SatispayPayments, cS as Shipments, cU as ShippingCategories, cW as ShippingMethodTiers, cY as ShippingMethods, c_ as ShippingWeightTiers, d0 as ShippingZones, d2 as SkuListItems, d4 as SkuListPromotionRules, d6 as SkuLists, d8 as SkuOptions, da as Skus, dc as StockItems, de as StockLineItems, dg as StockLocations, di as StockReservations, dk as StockTransfers, dm as Stores, dp as StripeGateways, dr as StripePayments, dt as StripeTaxAccounts, dv as SubscriptionModels, dx as Tags, dz as TalonOneAccounts, dB as TaxCalculators, dD as TaxCategories, dF as TaxRules, dH as TaxjarAccounts, dJ as Transactions, dL as Versions, dN as VertexAccounts, dP as Voids, dR as Webhooks, dT as WireTransfers } from './api-Hgzs8bs4.js';
3
3
  import './error.js';
4
4
  import './interceptor-k15jXzf0.js';
5
5
  import './client.js';
package/lib/bundle.js CHANGED
@@ -107,7 +107,7 @@ import { customer_groups_default } from './chunk-D5E4OGXU.js';
107
107
  import { customer_password_resets_default } from './chunk-AW3TRBZ7.js';
108
108
  import { customer_payment_sources_default } from './chunk-7SZY5BWE.js';
109
109
  import { customer_subscriptions_default } from './chunk-4KFJUIFD.js';
110
- import { customers_default } from './chunk-VLLLEX5J.js';
110
+ import { customers_default } from './chunk-FKDKRSPO.js';
111
111
  import { buy_x_pay_y_promotions_default } from './chunk-HAAE23MQ.js';
112
112
  import { captures_default } from './chunk-MJRMRWP3.js';
113
113
  import { carrier_accounts_default } from './chunk-QK5MFD4L.js';
@@ -130,7 +130,7 @@ import { adyen_gateways_default } from './chunk-NDPDO54G.js';
130
130
  import { adyen_payments_default } from './chunk-JENLN6VJ.js';
131
131
  import { applications_default } from './chunk-7X36B7N6.js';
132
132
  import { attachments_default } from './chunk-DYZGWPZ6.js';
133
- import { CommerceLayerClient } from './chunk-IIR3UVU2.js';
133
+ import { CommerceLayerClient } from './chunk-M55NSZVW.js';
134
134
  import './chunk-NAWKHFBZ.js';
135
135
  import './chunk-CHYP5F26.js';
136
136
  import './chunk-H4SVEI6E.js';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkRIMDGLIA_cjs = require('./chunk-RIMDGLIA.cjs');
3
+ var chunkJRYILJJY_cjs = require('./chunk-JRYILJJY.cjs');
4
4
  var chunkSRW7OWVS_cjs = require('./chunk-SRW7OWVS.cjs');
5
5
  var chunkX6PHZA6P_cjs = require('./chunk-X6PHZA6P.cjs');
6
6
  var chunkIKHD5UQP_cjs = require('./chunk-IKHD5UQP.cjs');
@@ -41,10 +41,10 @@ var CommerceLayerStatic = {
41
41
  return chunkSRW7OWVS_cjs.isTokenExpired(token);
42
42
  },
43
43
  get schemaVersion() {
44
- return chunkRIMDGLIA_cjs.OPEN_API_SCHEMA_VERSION;
44
+ return chunkJRYILJJY_cjs.OPEN_API_SCHEMA_VERSION;
45
45
  }
46
46
  };
47
47
 
48
48
  exports.CommerceLayerStatic = CommerceLayerStatic;
49
- //# sourceMappingURL=chunk-RTLW5O74.cjs.map
50
- //# sourceMappingURL=chunk-RTLW5O74.cjs.map
49
+ //# sourceMappingURL=chunk-3LTCO2OB.cjs.map
50
+ //# sourceMappingURL=chunk-3LTCO2OB.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/static.ts"],"names":["getResources","getSingletons","isSingleton","isCreatable","isUpdatable","isDeletable","isTaggable","isVersionable","isSdkError","isApiError","isTokenExpired","OPEN_API_SCHEMA_VERSION"],"mappings":";;;;;;;;AASO,IAAM,mBAAsB,GAAA;AAAA,EAElC,SAAA,EAAW,CAAC,IAAsC,KAAA;AACjD,IAAA,OAAOA,+BAAa,IAAI,CAAA;AAAA,GACzB;AAAA,EAEA,UAAA,EAAY,CAAC,IAAsC,KAAA;AAClD,IAAA,OAAOC,gCAAc,IAAI,CAAA;AAAA,GAC1B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,UAAA,EAAY,CAAC,QAAwC,KAAA;AACpD,IAAA,OAAOC,6BAAW,QAAQ,CAAA;AAAA,GAC3B;AAAA,EAEA,aAAA,EAAe,CAAC,QAAwC,KAAA;AACvD,IAAA,OAAOC,gCAAc,QAAQ,CAAA;AAAA,GAC9B;AAAA,EAEA,UAAA,EAAY,CAAC,KAAsC,KAAA;AAClD,IAAA,OAAOC,6BAAW,KAAK,CAAA;AAAA,GACxB;AAAA,EAEA,UAAA,EAAY,CAAC,KAAsC,KAAA;AAClD,IAAA,OAAOC,6BAAW,KAAK,CAAA;AAAA,GACxB;AAAA,EAEA,cAAA,EAAgB,CAAC,KAA2B,KAAA;AAC3C,IAAA,OAAOC,iCAAe,KAAK,CAAA;AAAA,GAC5B;AAAA,EAEA,IAAI,aAAwB,GAAA;AAAE,IAAO,OAAAC,yCAAA;AAAA;AAEtC","file":"chunk-RTLW5O74.cjs","sourcesContent":["\nimport type { ResourceTypeLock } from './enum'\nimport { getResources, getSingletons, isCreatable, isDeletable, isSingleton, isTaggable, isUpdatable, isVersionable } from './enum'\nimport { OPEN_API_SCHEMA_VERSION } from './commercelayer'\nimport { SdkError, ApiError, isSdkError, isApiError} from './error'\nimport { isTokenExpired } from './util'\n\n\n/* Static functions */\nexport const CommerceLayerStatic = {\n\n\tresources: (sort?: boolean): readonly string[] => {\n\t\treturn getResources(sort)\n\t},\n\n\tsingletons: (sort?: boolean): readonly string[] => {\n\t\treturn getSingletons(sort)\n\t},\n\n\tisSingleton: (resource: ResourceTypeLock): boolean => {\n\t\treturn isSingleton(resource)\n\t},\n\n\tisCreatable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isCreatable(resource)\n\t},\n\n\tisUpdatable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isUpdatable(resource)\n\t},\n\n\tisDeletable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isDeletable(resource)\n\t},\n\n\tisTaggable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isTaggable(resource)\n\t},\n\n\tisVersionable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isVersionable(resource)\n\t},\n\n\tisSdkError: (error: unknown): error is SdkError => {\n\t\treturn isSdkError(error)\n\t},\n\n\tisApiError: (error: unknown): error is ApiError => {\n\t\treturn isApiError(error)\n\t},\n\n\tisTokenExpired: (token: string): boolean => {\n\t\treturn isTokenExpired(token)\n\t},\n\n\tget schemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\n}\n"]}
1
+ {"version":3,"sources":["../src/static.ts"],"names":["getResources","getSingletons","isSingleton","isCreatable","isUpdatable","isDeletable","isTaggable","isVersionable","isSdkError","isApiError","isTokenExpired","OPEN_API_SCHEMA_VERSION"],"mappings":";;;;;;;;AASO,IAAM,mBAAsB,GAAA;AAAA,EAElC,SAAA,EAAW,CAAC,IAAsC,KAAA;AACjD,IAAA,OAAOA,+BAAa,IAAI,CAAA;AAAA,GACzB;AAAA,EAEA,UAAA,EAAY,CAAC,IAAsC,KAAA;AAClD,IAAA,OAAOC,gCAAc,IAAI,CAAA;AAAA,GAC1B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAOC,8BAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,UAAA,EAAY,CAAC,QAAwC,KAAA;AACpD,IAAA,OAAOC,6BAAW,QAAQ,CAAA;AAAA,GAC3B;AAAA,EAEA,aAAA,EAAe,CAAC,QAAwC,KAAA;AACvD,IAAA,OAAOC,gCAAc,QAAQ,CAAA;AAAA,GAC9B;AAAA,EAEA,UAAA,EAAY,CAAC,KAAsC,KAAA;AAClD,IAAA,OAAOC,6BAAW,KAAK,CAAA;AAAA,GACxB;AAAA,EAEA,UAAA,EAAY,CAAC,KAAsC,KAAA;AAClD,IAAA,OAAOC,6BAAW,KAAK,CAAA;AAAA,GACxB;AAAA,EAEA,cAAA,EAAgB,CAAC,KAA2B,KAAA;AAC3C,IAAA,OAAOC,iCAAe,KAAK,CAAA;AAAA,GAC5B;AAAA,EAEA,IAAI,aAAwB,GAAA;AAAE,IAAO,OAAAC,yCAAA;AAAA;AAEtC","file":"chunk-3LTCO2OB.cjs","sourcesContent":["\nimport type { ResourceTypeLock } from './enum'\nimport { getResources, getSingletons, isCreatable, isDeletable, isSingleton, isTaggable, isUpdatable, isVersionable } from './enum'\nimport { OPEN_API_SCHEMA_VERSION } from './commercelayer'\nimport { SdkError, ApiError, isSdkError, isApiError} from './error'\nimport { isTokenExpired } from './util'\n\n\n/* Static functions */\nexport const CommerceLayerStatic = {\n\n\tresources: (sort?: boolean): readonly string[] => {\n\t\treturn getResources(sort)\n\t},\n\n\tsingletons: (sort?: boolean): readonly string[] => {\n\t\treturn getSingletons(sort)\n\t},\n\n\tisSingleton: (resource: ResourceTypeLock): boolean => {\n\t\treturn isSingleton(resource)\n\t},\n\n\tisCreatable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isCreatable(resource)\n\t},\n\n\tisUpdatable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isUpdatable(resource)\n\t},\n\n\tisDeletable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isDeletable(resource)\n\t},\n\n\tisTaggable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isTaggable(resource)\n\t},\n\n\tisVersionable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isVersionable(resource)\n\t},\n\n\tisSdkError: (error: unknown): error is SdkError => {\n\t\treturn isSdkError(error)\n\t},\n\n\tisApiError: (error: unknown): error is ApiError => {\n\t\treturn isApiError(error)\n\t},\n\n\tisTokenExpired: (token: string): boolean => {\n\t\treturn isTokenExpired(token)\n\t},\n\n\tget schemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { OPEN_API_SCHEMA_VERSION } from './chunk-IIR3UVU2.js';
1
+ import { OPEN_API_SCHEMA_VERSION } from './chunk-M55NSZVW.js';
2
2
  import { isTokenExpired } from './chunk-R2LRLUUY.js';
3
3
  import { isVersionable, isTaggable, isDeletable, isUpdatable, isCreatable, isSingleton, getSingletons, getResources } from './chunk-GD4WRDF2.js';
4
4
  import { isApiError, isSdkError } from './chunk-ZU7GFVQ6.js';
@@ -44,5 +44,5 @@ var CommerceLayerStatic = {
44
44
  };
45
45
 
46
46
  export { CommerceLayerStatic };
47
- //# sourceMappingURL=chunk-EJSNNH47.js.map
48
- //# sourceMappingURL=chunk-EJSNNH47.js.map
47
+ //# sourceMappingURL=chunk-5U5QLF2Z.js.map
48
+ //# sourceMappingURL=chunk-5U5QLF2Z.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/static.ts"],"names":[],"mappings":";;;;;;AASO,IAAM,mBAAsB,GAAA;AAAA,EAElC,SAAA,EAAW,CAAC,IAAsC,KAAA;AACjD,IAAA,OAAO,aAAa,IAAI,CAAA;AAAA,GACzB;AAAA,EAEA,UAAA,EAAY,CAAC,IAAsC,KAAA;AAClD,IAAA,OAAO,cAAc,IAAI,CAAA;AAAA,GAC1B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,UAAA,EAAY,CAAC,QAAwC,KAAA;AACpD,IAAA,OAAO,WAAW,QAAQ,CAAA;AAAA,GAC3B;AAAA,EAEA,aAAA,EAAe,CAAC,QAAwC,KAAA;AACvD,IAAA,OAAO,cAAc,QAAQ,CAAA;AAAA,GAC9B;AAAA,EAEA,UAAA,EAAY,CAAC,KAAsC,KAAA;AAClD,IAAA,OAAO,WAAW,KAAK,CAAA;AAAA,GACxB;AAAA,EAEA,UAAA,EAAY,CAAC,KAAsC,KAAA;AAClD,IAAA,OAAO,WAAW,KAAK,CAAA;AAAA,GACxB;AAAA,EAEA,cAAA,EAAgB,CAAC,KAA2B,KAAA;AAC3C,IAAA,OAAO,eAAe,KAAK,CAAA;AAAA,GAC5B;AAAA,EAEA,IAAI,aAAwB,GAAA;AAAE,IAAO,OAAA,uBAAA;AAAA;AAEtC","file":"chunk-EJSNNH47.js","sourcesContent":["\nimport type { ResourceTypeLock } from './enum'\nimport { getResources, getSingletons, isCreatable, isDeletable, isSingleton, isTaggable, isUpdatable, isVersionable } from './enum'\nimport { OPEN_API_SCHEMA_VERSION } from './commercelayer'\nimport { SdkError, ApiError, isSdkError, isApiError} from './error'\nimport { isTokenExpired } from './util'\n\n\n/* Static functions */\nexport const CommerceLayerStatic = {\n\n\tresources: (sort?: boolean): readonly string[] => {\n\t\treturn getResources(sort)\n\t},\n\n\tsingletons: (sort?: boolean): readonly string[] => {\n\t\treturn getSingletons(sort)\n\t},\n\n\tisSingleton: (resource: ResourceTypeLock): boolean => {\n\t\treturn isSingleton(resource)\n\t},\n\n\tisCreatable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isCreatable(resource)\n\t},\n\n\tisUpdatable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isUpdatable(resource)\n\t},\n\n\tisDeletable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isDeletable(resource)\n\t},\n\n\tisTaggable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isTaggable(resource)\n\t},\n\n\tisVersionable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isVersionable(resource)\n\t},\n\n\tisSdkError: (error: unknown): error is SdkError => {\n\t\treturn isSdkError(error)\n\t},\n\n\tisApiError: (error: unknown): error is ApiError => {\n\t\treturn isApiError(error)\n\t},\n\n\tisTokenExpired: (token: string): boolean => {\n\t\treturn isTokenExpired(token)\n\t},\n\n\tget schemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\n}\n"]}
1
+ {"version":3,"sources":["../src/static.ts"],"names":[],"mappings":";;;;;;AASO,IAAM,mBAAsB,GAAA;AAAA,EAElC,SAAA,EAAW,CAAC,IAAsC,KAAA;AACjD,IAAA,OAAO,aAAa,IAAI,CAAA;AAAA,GACzB;AAAA,EAEA,UAAA,EAAY,CAAC,IAAsC,KAAA;AAClD,IAAA,OAAO,cAAc,IAAI,CAAA;AAAA,GAC1B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,WAAA,EAAa,CAAC,QAAwC,KAAA;AACrD,IAAA,OAAO,YAAY,QAAQ,CAAA;AAAA,GAC5B;AAAA,EAEA,UAAA,EAAY,CAAC,QAAwC,KAAA;AACpD,IAAA,OAAO,WAAW,QAAQ,CAAA;AAAA,GAC3B;AAAA,EAEA,aAAA,EAAe,CAAC,QAAwC,KAAA;AACvD,IAAA,OAAO,cAAc,QAAQ,CAAA;AAAA,GAC9B;AAAA,EAEA,UAAA,EAAY,CAAC,KAAsC,KAAA;AAClD,IAAA,OAAO,WAAW,KAAK,CAAA;AAAA,GACxB;AAAA,EAEA,UAAA,EAAY,CAAC,KAAsC,KAAA;AAClD,IAAA,OAAO,WAAW,KAAK,CAAA;AAAA,GACxB;AAAA,EAEA,cAAA,EAAgB,CAAC,KAA2B,KAAA;AAC3C,IAAA,OAAO,eAAe,KAAK,CAAA;AAAA,GAC5B;AAAA,EAEA,IAAI,aAAwB,GAAA;AAAE,IAAO,OAAA,uBAAA;AAAA;AAEtC","file":"chunk-5U5QLF2Z.js","sourcesContent":["\nimport type { ResourceTypeLock } from './enum'\nimport { getResources, getSingletons, isCreatable, isDeletable, isSingleton, isTaggable, isUpdatable, isVersionable } from './enum'\nimport { OPEN_API_SCHEMA_VERSION } from './commercelayer'\nimport { SdkError, ApiError, isSdkError, isApiError} from './error'\nimport { isTokenExpired } from './util'\n\n\n/* Static functions */\nexport const CommerceLayerStatic = {\n\n\tresources: (sort?: boolean): readonly string[] => {\n\t\treturn getResources(sort)\n\t},\n\n\tsingletons: (sort?: boolean): readonly string[] => {\n\t\treturn getSingletons(sort)\n\t},\n\n\tisSingleton: (resource: ResourceTypeLock): boolean => {\n\t\treturn isSingleton(resource)\n\t},\n\n\tisCreatable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isCreatable(resource)\n\t},\n\n\tisUpdatable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isUpdatable(resource)\n\t},\n\n\tisDeletable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isDeletable(resource)\n\t},\n\n\tisTaggable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isTaggable(resource)\n\t},\n\n\tisVersionable: (resource: ResourceTypeLock): boolean => {\n\t\treturn isVersionable(resource)\n\t},\n\n\tisSdkError: (error: unknown): error is SdkError => {\n\t\treturn isSdkError(error)\n\t},\n\n\tisApiError: (error: unknown): error is ApiError => {\n\t\treturn isApiError(error)\n\t},\n\n\tisTokenExpired: (token: string): boolean => {\n\t\treturn isTokenExpired(token)\n\t},\n\n\tget schemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\n}\n"]}
@@ -97,5 +97,5 @@ var instance = new Customers();
97
97
  var customers_default = instance;
98
98
 
99
99
  export { customers_default };
100
- //# sourceMappingURL=chunk-VLLLEX5J.js.map
101
- //# sourceMappingURL=chunk-VLLLEX5J.js.map
100
+ //# sourceMappingURL=chunk-FKDKRSPO.js.map
101
+ //# sourceMappingURL=chunk-FKDKRSPO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/customers.ts"],"names":[],"mappings":";;;AA2LA,IAAM,SAAA,GAAN,MAAM,UAAA,SAAkB,WAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,WAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,UAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,UAAU,CAAA,IAAA,EAA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, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { CustomerAddress } from './customer_addresses'\nimport type { CustomerPaymentSource } from './customer_payment_sources'\nimport type { CustomerSubscription } from './customer_subscriptions'\nimport type { Order } from './orders'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { Return } from './returns'\nimport type { SkuList } from './sku_lists'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Market } from './markets'\nimport type { StockLocation } from './stock_locations'\n\n\ntype CustomerType = 'customers'\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type CustomerSort = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count' | 'anonymization_status'> & ResourceSort\n// export type CustomerFilter = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count' | 'anonymization_status'> & ResourceFilter\n\n\ninterface Customer extends Resource {\n\t\n\treadonly type: CustomerType\n\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The customer's status. One of 'prospect' (default), 'acquired', or 'repeat'.\n\t * @example ```\"prospect\"```\n\t */\n\tstatus: 'prospect' | 'acquired' | 'repeat'\n\t/** \n\t * Indicates if the customer has a password.\n\t */\n\thas_password?: boolean | null\n\t/** \n\t * The total number of orders for the customer.\n\t * @example ```6```\n\t */\n\ttotal_orders_count?: number | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\t/** \n\t * The custom_claim attached to the current JWT (if any).\n\t * @example ```{}```\n\t */\n\tjwt_custom_claim?: Record<string, any> | null\n\t/** \n\t * The anonymization info object.\n\t * @example ```{\"status\":\"requested\",\"requested_at\":\"2025-03-15 11:39:21 UTC\",\"requester\":{\"id\":\"fdgt56hh\",\"first_name\":\"Travis\",\"last_name\":\"Muller\",\"email\":\"test@labadie.test\"}}```\n\t */\n\tanonymization_info?: Record<string, any> | null\n\t/** \n\t * Status of the current anonymization request (if any).\n\t * @example ```\"requested\"```\n\t */\n\tanonymization_status?: string | null\n\n\tcustomer_group?: CustomerGroup | null\n\tcustomer_addresses?: CustomerAddress[] | null\n\tcustomer_payment_sources?: CustomerPaymentSource[] | null\n\tcustomer_subscriptions?: CustomerSubscription[] | null\n\torders?: Order[] | null\n\torder_subscriptions?: OrderSubscription[] | null\n\treturns?: Return[] | null\n\tsku_lists?: SkuList[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tjwt_customer?: Customer | null\n\tjwt_markets?: Market[] | null\n\tjwt_stock_locations?: StockLocation[] | null\n\n}\n\n\ninterface CustomerCreate extends ResourceCreate {\n\t\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The customer's password. Initiate a customer password reset flow if you need to change it.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\n\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface CustomerUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * The customer's password. Initiate a customer password reset flow if you need to change it.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\t/** \n\t * Send this attribute if you want to trigger anonymization.\n\t * @example ```true```\n\t */\n\t_request_anonymization?: boolean | null\n\t/** \n\t * Send this attribute if you want to trigger a cancellation of anonymization.\n\t * @example ```true```\n\t */\n\t_cancel_anonymization?: boolean | null\n\n\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Customers extends ApiResource<Customer> {\n\n\tstatic readonly TYPE: CustomerType = 'customers' as const\n\n\tasync create(resource: CustomerCreate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.create<CustomerCreate, Customer>({ ...resource, type: Customers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerUpdate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ ...resource, type: Customers.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Customers.TYPE } : id, options)\n\t}\n\n\tasync customer_group(customerId: string | Customer, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerGroup>({ type: 'customer_groups' }, `customers/${_customerId}/customer_group`, params, options) as unknown as CustomerGroup\n\t}\n\n\tasync customer_addresses(customerId: string | Customer, params?: QueryParamsList<CustomerAddress>, options?: ResourcesConfig): Promise<ListResponse<CustomerAddress>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerAddress>({ type: 'customer_addresses' }, `customers/${_customerId}/customer_addresses`, params, options) as unknown as ListResponse<CustomerAddress>\n\t}\n\n\tasync customer_payment_sources(customerId: string | Customer, params?: QueryParamsList<CustomerPaymentSource>, options?: ResourcesConfig): Promise<ListResponse<CustomerPaymentSource>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `customers/${_customerId}/customer_payment_sources`, params, options) as unknown as ListResponse<CustomerPaymentSource>\n\t}\n\n\tasync customer_subscriptions(customerId: string | Customer, params?: QueryParamsList<CustomerSubscription>, options?: ResourcesConfig): Promise<ListResponse<CustomerSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerSubscription>({ type: 'customer_subscriptions' }, `customers/${_customerId}/customer_subscriptions`, params, options) as unknown as ListResponse<CustomerSubscription>\n\t}\n\n\tasync orders(customerId: string | Customer, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `customers/${_customerId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync order_subscriptions(customerId: string | Customer, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `customers/${_customerId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync returns(customerId: string | Customer, params?: QueryParamsList<Return>, options?: ResourcesConfig): Promise<ListResponse<Return>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `customers/${_customerId}/returns`, params, options) as unknown as ListResponse<Return>\n\t}\n\n\tasync sku_lists(customerId: string | Customer, params?: QueryParamsList<SkuList>, options?: ResourcesConfig): Promise<ListResponse<SkuList>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `customers/${_customerId}/sku_lists`, params, options) as unknown as ListResponse<SkuList>\n\t}\n\n\tasync attachments(customerId: string | Customer, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `customers/${_customerId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(customerId: string | Customer, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customers/${_customerId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(customerId: string | Customer, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `customers/${_customerId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync jwt_customer(customerId: string | Customer, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customers/${_customerId}/jwt_customer`, params, options) as unknown as Customer\n\t}\n\n\tasync jwt_markets(customerId: string | Customer, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `customers/${_customerId}/jwt_markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync jwt_stock_locations(customerId: string | Customer, params?: QueryParamsList<StockLocation>, options?: ResourcesConfig): Promise<ListResponse<StockLocation>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `customers/${_customerId}/jwt_stock_locations`, params, options) as unknown as ListResponse<StockLocation>\n\t}\n\n\tasync _add_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\tasync _request_anonymization(id: string | Customer, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _request_anonymization: true }, params, options)\n\t}\n\n\tasync _cancel_anonymization(id: string | Customer, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _cancel_anonymization: true }, params, options)\n\t}\n\n\n\tisCustomer(resource: any): resource is Customer {\n\t\treturn resource.type && (resource.type === Customers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerRel {\n\t\treturn super.relationshipOneToOne<CustomerRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerRel[] {\n\t\treturn super.relationshipOneToMany<CustomerRel>(...ids)\n\t}\n\n\n\ttype(): CustomerType {\n\t\treturn Customers.TYPE\n\t}\n\n}\n\n\nconst instance = new Customers()\nexport default instance\n\nexport type { Customers, Customer, CustomerCreate, CustomerUpdate, CustomerType }\n"]}
@@ -7,7 +7,7 @@ var chunkJVF5KY2J_cjs = require('./chunk-JVF5KY2J.cjs');
7
7
 
8
8
  // src/commercelayer.ts
9
9
  var debug = chunkJVF5KY2J_cjs.debug_default("commercelayer");
10
- var OPEN_API_SCHEMA_VERSION = "7.8.6";
10
+ var OPEN_API_SCHEMA_VERSION = "7.8.7";
11
11
  var CommerceLayerClient = class _CommerceLayerClient {
12
12
  static get openApiSchemaVersion() {
13
13
  return OPEN_API_SCHEMA_VERSION;
@@ -106,5 +106,5 @@ exports.CommerceLayer = CommerceLayer;
106
106
  exports.CommerceLayerClient = CommerceLayerClient;
107
107
  exports.OPEN_API_SCHEMA_VERSION = OPEN_API_SCHEMA_VERSION;
108
108
  exports.commercelayer_default = commercelayer_default;
109
- //# sourceMappingURL=chunk-RIMDGLIA.cjs.map
110
- //# sourceMappingURL=chunk-RIMDGLIA.cjs.map
109
+ //# sourceMappingURL=chunk-JRYILJJY.cjs.map
110
+ //# sourceMappingURL=chunk-JRYILJJY.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/commercelayer.ts"],"names":["debug_default","ApiResourceAdapter","getResources","isApiError"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,EAAC;AACxB,QAAA,QAAA,CAAS,OAAQ,CAAA,OAAA,CAAQ,CAAC,KAAA,EAAO,GAAQ,KAAA;AAAE,UAAA,EAAA,CAAG,GAAG,CAAI,GAAA,KAAA;AAAA,SAAO,CAAA;AAC5D,QAAA,MAAA,CAAO,OAAU,GAAA,EAAA;AAAA;AAElB,MAAO,OAAA,QAAA;AAAA;AAGiB,IAAA,IAAA,CAAK,aAAa,SAAY,GAAA,EAAE,SAAW,EAAA,sBAAA,EAAwB,WAAW,sBAAuB,EAAA;AAC9H,IAAA,MAAA,CAAO,EAAK,GAAA,CAAA;AAEZ,IAAO,OAAA,MAAA;AAAA;AAER,EAEA,uBAAwE,GAAA;AAKvE,IAAA,IAAA,CAAK,aAAa,SAAY,GAAA,MAAA;AAAA;AAGhC;AAIM,IAAA,aAAA,GAAgB,CAAC,MAAyD,KAAA;AAC/E,EAAO,OAAA,mBAAA,CAAoB,IAAI,MAAM,CAAA;AACtC;AAGA,IAAO,qBAAQ,GAAA","file":"chunk-RIMDGLIA.cjs","sourcesContent":["\n// import * as api from './api'\nimport { getResources } from './enum'\nimport { isApiError, type ApiError } from './error'\nimport type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor, ResponseObj, HeadersObj, InterceptorManager } from './interceptor'\nimport { ApiResourceAdapter, type ResourcesInitConfig } from './resource'\n\n\nimport Debug from './debug'\nconst debug = Debug('commercelayer')\n\n\n// Autogenerated schema version number, do not remove this line\nexport const OPEN_API_SCHEMA_VERSION = '7.8.6'\n\n\n// SDK local configuration\ntype SdkConfig = {\n\t// abc?: string\n}\n\ntype CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig\ntype CommerceLayerConfig = Partial<CommerceLayerInitConfig>\n\n\n\nclass CommerceLayerClient {\n\n\tstatic get openApiSchemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\treadonly openApiSchemaVersion = OPEN_API_SCHEMA_VERSION\n\n\tprotected static cl: CommerceLayerClient\n\n\t// ##__CL_RESOURCES_DEF_START__##\n\t// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##\n\t// ##__CL_RESOURCES_DEF_STOP__##\n\n\n\tstatic get (config?: CommerceLayerInitConfig): CommerceLayerClient {\n\t\tif (config) return (CommerceLayerClient.cl = new CommerceLayerClient(config))\n\t\telse\n\t\tif (!CommerceLayerClient.cl) throw new Error('CommerceLayer client not initialized')\n\t\treturn CommerceLayerClient.cl\n\t}\n\n\n\tprotected constructor(config: CommerceLayerInitConfig) {\n\n\t\tdebug('new commercelayer instance %O', config)\n\n\t\tApiResourceAdapter.init(config)\n\n\t\t// ##__CL_RESOURCES_INIT_START__##\n\t\t// ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)\n\t\t// ##__CL_RESOURCES_INIT_STOP__##\n\n\t}\n\n\t// ##__CL_RESOURCES_LEAZY_LOADING_START__##\n\t// ##__CL_RESOURCES_LEAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)) }\n\t// ##__CL_RESOURCES_LEAZY_LOADING_STOP__##\n\n\t// private get adapter(): ResourceAdapter { return ApiResourceAdapter.get() }\n\tget currentOrganization(): string { return ApiResourceAdapter.get().client?.currentOrganization }\n\tget currentAccessToken(): string { return ApiResourceAdapter.get().client?.currentAccessToken }\n\tprivate get interceptors(): InterceptorManager { return ApiResourceAdapter.get().client?.interceptors }\n\n\n\tprivate localConfig(config: Partial<SdkConfig>): void {\n\t\t// if (config.abc) this.abc = config.abc\n\t}\n\n\n\tconfig(config: CommerceLayerConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\t// CommerceLayer config\n\t\tthis.localConfig(config)\n\t\t// ResourceAdapter config\n\t\tApiResourceAdapter.config(config)\n\n\t\treturn this\n\n\t}\n\n\t\n\tresources(sort?: boolean): readonly string[] {\n\t\treturn getResources(sort)\n\t}\n\n\tisApiError(error: any): error is ApiError {\n\t\treturn isApiError(error)\n\t}\n\n\n\taddRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.request = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\taddResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.response = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\tremoveInterceptor(type: InterceptorType, id: number = 1): void {\n\t\tthis.interceptors[type] = undefined\n\t}\n\n\tremoveInterceptors(): void {\n\t\tthis.removeInterceptor('request')\n\t\tthis.removeInterceptor('response')\n\t\tthis.removeRawResponseReader()\n\t}\n\n\taddRawResponseReader(options?: { headers: boolean }): RawResponseReader {\n\n\t\tconst reader: RawResponseReader = {\n\t\t\tid: 0,\n\t\t\trawResponse: undefined,\n\t\t\theaders: undefined,\n\t\t\tok: true\n\t\t}\n\n\t\tasync function rawResponseInterceptor(response: ResponseObj): Promise<ResponseObj> {\n\t\t\treader.rawResponse = await response?.clone().json().catch(() => {})\n\t\t\treader.ok = response.ok\n\t\t\tif (options?.headers) {\n\t\t\t\tconst ho: HeadersObj = {}\n\t\t\t\tresponse.headers.forEach((value, key) => { ho[key] = value })\n\t\t\t\treader.headers = ho\n\t\t\t}\n\t\t\treturn response\n\t\t}\n\t\t\n\t\t/* const interceptor = */this.interceptors.rawReader = { onSuccess: rawResponseInterceptor, onFailure: rawResponseInterceptor }\n\t\treader.id = 1 // interceptor\n\n\t\treturn reader\n\n\t}\n\n\tremoveRawResponseReader(/* reader: number | RawResponseReader */): void {\n\t\t/*\n\t\tconst id = (typeof reader === 'number') ? reader : reader?.id\n\t\tif (id && (id >= 0)) this.removeInterceptor('response', id)\n\t\t*/\n\t\tthis.interceptors.rawReader = undefined\n\t}\n\n}\n\n\n\nconst CommerceLayer = (config: CommerceLayerInitConfig): CommerceLayerClient => {\n\treturn CommerceLayerClient.get(config)\n}\n\n\nexport default CommerceLayer\nexport { CommerceLayer }\n\nexport { CommerceLayerClient }\nexport type { CommerceLayerConfig, CommerceLayerInitConfig }\n"]}
1
+ {"version":3,"sources":["../src/commercelayer.ts"],"names":["debug_default","ApiResourceAdapter","getResources","isApiError"],"mappings":";;;;;;;;AASA,IAAM,KAAA,GAAQA,gCAAM,eAAe,CAAA;AAI5B,IAAM,uBAA0B,GAAA;AAajC,IAAA,mBAAA,GAAN,MAAM,oBAAoB,CAAA;AAAA,EAEzB,WAAW,oBAA+B,GAAA;AAAE,IAAO,OAAA,uBAAA;AAAA;AAAwB,EAClE,oBAAuB,GAAA,uBAAA;AAAA,EAEhC,OAAiB,EAAA;AAAA;AAAA;AAAA;AAAA,EAOjB,OAAO,IAAK,MAAuD,EAAA;AAClE,IAAA,IAAI,QAAgB,OAAA,oBAAA,CAAoB,EAAK,GAAA,IAAI,qBAAoB,MAAM,CAAA;AAAA,SAAA,IAEvE,CAAC,oBAAoB,CAAA,EAAA,EAAU,MAAA,IAAI,MAAM,sCAAsC,CAAA;AACnF,IAAA,OAAO,oBAAoB,CAAA,EAAA;AAAA;AAC5B,EAGU,YAAY,MAAiC,EAAA;AAEtD,IAAA,KAAA,CAAM,iCAAiC,MAAM,CAAA;AAE7C,IAAAC,oCAAA,CAAmB,KAAK,MAAM,CAAA;AAAA;AAM/B;AAAA;AAAA;AAAA;AAAA,EAOA,IAAI,mBAA8B,GAAA;AAAE,IAAO,OAAAA,oCAAA,CAAmB,GAAI,EAAA,CAAE,MAAQ,EAAA,mBAAA;AAAA;AAAoB,EAChG,IAAI,kBAA6B,GAAA;AAAE,IAAO,OAAAA,oCAAA,CAAmB,GAAI,EAAA,CAAE,MAAQ,EAAA,kBAAA;AAAA;AAAmB,EAC9F,IAAY,YAAmC,GAAA;AAAE,I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I,EAAA;AAAA,KACL;AAEA,IAAA,eAAe,uBAAuB,QAA6C,EAAA;AAClF,MAAO,MAAA,CAAA,WAAA,GAAc,MAAM,QAAU,EAAA,KAAA,GAAQ,IAAK,EAAA,CAAE,MAAM,MAAM;AAAA,OAAE,CAAA;AAClE,MAAA,MAAA,CAAO,KAAK,QAAS,CAAA,EAAA;AACrB,MAAA,IAAI,SAAS,OAAS,EAAA;AACrB,QAAA,MAAM,KAAiB,EAAC;AACxB,QAAA,QAAA,CAAS,OAAQ,CAAA,OAAA,CAAQ,CAAC,KAAA,EAAO,GAAQ,KAAA;AAAE,UAAA,EAAA,CAAG,GAAG,CAAI,GAAA,KAAA;AAAA,SAAO,CAAA;AAC5D,QAAA,MAAA,CAAO,OAAU,GAAA,EAAA;AAAA;AAElB,MAAO,OAAA,QAAA;AAAA;AAGiB,IAAA,IAAA,CAAK,aAAa,SAAY,GAAA,EAAE,SAAW,EAAA,sBAAA,EAAwB,WAAW,sBAAuB,EAAA;AAC9H,IAAA,MAAA,CAAO,EAAK,GAAA,CAAA;AAEZ,IAAO,OAAA,MAAA;AAAA;AAER,EAEA,uBAAwE,GAAA;AAKvE,IAAA,IAAA,CAAK,aAAa,SAAY,GAAA,MAAA;AAAA;AAGhC;AAIM,IAAA,aAAA,GAAgB,CAAC,MAAyD,KAAA;AAC/E,EAAO,OAAA,mBAAA,CAAoB,IAAI,MAAM,CAAA;AACtC;AAGA,IAAO,qBAAQ,GAAA","file":"chunk-JRYILJJY.cjs","sourcesContent":["\n// import * as api from './api'\nimport { getResources } from './enum'\nimport { isApiError, type ApiError } from './error'\nimport type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor, ResponseObj, HeadersObj, InterceptorManager } from './interceptor'\nimport { ApiResourceAdapter, type ResourcesInitConfig } from './resource'\n\n\nimport Debug from './debug'\nconst debug = Debug('commercelayer')\n\n\n// Autogenerated schema version number, do not remove this line\nexport const OPEN_API_SCHEMA_VERSION = '7.8.7'\n\n\n// SDK local configuration\ntype SdkConfig = {\n\t// abc?: string\n}\n\ntype CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig\ntype CommerceLayerConfig = Partial<CommerceLayerInitConfig>\n\n\n\nclass CommerceLayerClient {\n\n\tstatic get openApiSchemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\treadonly openApiSchemaVersion = OPEN_API_SCHEMA_VERSION\n\n\tprotected static cl: CommerceLayerClient\n\n\t// ##__CL_RESOURCES_DEF_START__##\n\t// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##\n\t// ##__CL_RESOURCES_DEF_STOP__##\n\n\n\tstatic get (config?: CommerceLayerInitConfig): CommerceLayerClient {\n\t\tif (config) return (CommerceLayerClient.cl = new CommerceLayerClient(config))\n\t\telse\n\t\tif (!CommerceLayerClient.cl) throw new Error('CommerceLayer client not initialized')\n\t\treturn CommerceLayerClient.cl\n\t}\n\n\n\tprotected constructor(config: CommerceLayerInitConfig) {\n\n\t\tdebug('new commercelayer instance %O', config)\n\n\t\tApiResourceAdapter.init(config)\n\n\t\t// ##__CL_RESOURCES_INIT_START__##\n\t\t// ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)\n\t\t// ##__CL_RESOURCES_INIT_STOP__##\n\n\t}\n\n\t// ##__CL_RESOURCES_LEAZY_LOADING_START__##\n\t// ##__CL_RESOURCES_LEAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)) }\n\t// ##__CL_RESOURCES_LEAZY_LOADING_STOP__##\n\n\t// private get adapter(): ResourceAdapter { return ApiResourceAdapter.get() }\n\tget currentOrganization(): string { return ApiResourceAdapter.get().client?.currentOrganization }\n\tget currentAccessToken(): string { return ApiResourceAdapter.get().client?.currentAccessToken }\n\tprivate get interceptors(): InterceptorManager { return ApiResourceAdapter.get().client?.interceptors }\n\n\n\tprivate localConfig(config: Partial<SdkConfig>): void {\n\t\t// if (config.abc) this.abc = config.abc\n\t}\n\n\n\tconfig(config: CommerceLayerConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\t// CommerceLayer config\n\t\tthis.localConfig(config)\n\t\t// ResourceAdapter config\n\t\tApiResourceAdapter.config(config)\n\n\t\treturn this\n\n\t}\n\n\t\n\tresources(sort?: boolean): readonly string[] {\n\t\treturn getResources(sort)\n\t}\n\n\tisApiError(error: any): error is ApiError {\n\t\treturn isApiError(error)\n\t}\n\n\n\taddRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.request = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\taddResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.response = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\tremoveInterceptor(type: InterceptorType, id: number = 1): void {\n\t\tthis.interceptors[type] = undefined\n\t}\n\n\tremoveInterceptors(): void {\n\t\tthis.removeInterceptor('request')\n\t\tthis.removeInterceptor('response')\n\t\tthis.removeRawResponseReader()\n\t}\n\n\taddRawResponseReader(options?: { headers: boolean }): RawResponseReader {\n\n\t\tconst reader: RawResponseReader = {\n\t\t\tid: 0,\n\t\t\trawResponse: undefined,\n\t\t\theaders: undefined,\n\t\t\tok: true\n\t\t}\n\n\t\tasync function rawResponseInterceptor(response: ResponseObj): Promise<ResponseObj> {\n\t\t\treader.rawResponse = await response?.clone().json().catch(() => {})\n\t\t\treader.ok = response.ok\n\t\t\tif (options?.headers) {\n\t\t\t\tconst ho: HeadersObj = {}\n\t\t\t\tresponse.headers.forEach((value, key) => { ho[key] = value })\n\t\t\t\treader.headers = ho\n\t\t\t}\n\t\t\treturn response\n\t\t}\n\t\t\n\t\t/* const interceptor = */this.interceptors.rawReader = { onSuccess: rawResponseInterceptor, onFailure: rawResponseInterceptor }\n\t\treader.id = 1 // interceptor\n\n\t\treturn reader\n\n\t}\n\n\tremoveRawResponseReader(/* reader: number | RawResponseReader */): void {\n\t\t/*\n\t\tconst id = (typeof reader === 'number') ? reader : reader?.id\n\t\tif (id && (id >= 0)) this.removeInterceptor('response', id)\n\t\t*/\n\t\tthis.interceptors.rawReader = undefined\n\t}\n\n}\n\n\n\nconst CommerceLayer = (config: CommerceLayerInitConfig): CommerceLayerClient => {\n\treturn CommerceLayerClient.get(config)\n}\n\n\nexport default CommerceLayer\nexport { CommerceLayer }\n\nexport { CommerceLayerClient }\nexport type { CommerceLayerConfig, CommerceLayerInitConfig }\n"]}
@@ -99,5 +99,5 @@ var instance = new Customers();
99
99
  var customers_default = instance;
100
100
 
101
101
  exports.customers_default = customers_default;
102
- //# sourceMappingURL=chunk-NKJBVNTV.cjs.map
103
- //# sourceMappingURL=chunk-NKJBVNTV.cjs.map
102
+ //# sourceMappingURL=chunk-KJAD45RP.cjs.map
103
+ //# sourceMappingURL=chunk-KJAD45RP.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resources/customers.ts"],"names":["ApiResource"],"mappings":";;;;;AA2LA,IAAM,SAAA,GAAN,MAAM,UAAA,SAAkBA,6BAAsB,CAAA;AAAA,EAE7C,OAAgB,IAAqB,GAAA,WAAA;AAAA,EAErC,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,CAAK,SAAU,CAAA,MAAA,CAAiC,EAAE,GAAG,QAAU,EAAA,IAAA,EAAM,UAAU,CAAA,IAAA,EAAQ,EAAA,MAAA,EAAQ,OAAO,CAAA;AAAA;AAC9G,EAEA,MAAM,MAAA,CAAO,QAA0B,EAAA,MAAA,EAAwC,OAA8C,EAAA;AAC5H,IAAO,OAAA,IAAA,C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JAD45RP.cjs","sourcesContent":["import { ApiResource } from '../resource'\nimport type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse, ResourceSort, /* ResourceFilter */ } from '../resource'\nimport type { QueryParamsRetrieve, QueryParamsList } from '../query'\n\nimport type { CustomerGroup, CustomerGroupType } from './customer_groups'\nimport type { CustomerAddress } from './customer_addresses'\nimport type { CustomerPaymentSource } from './customer_payment_sources'\nimport type { CustomerSubscription } from './customer_subscriptions'\nimport type { Order } from './orders'\nimport type { OrderSubscription } from './order_subscriptions'\nimport type { Return } from './returns'\nimport type { SkuList } from './sku_lists'\nimport type { Attachment } from './attachments'\nimport type { Event } from './events'\nimport type { Tag, TagType } from './tags'\nimport type { Market } from './markets'\nimport type { StockLocation } from './stock_locations'\n\n\ntype CustomerType = 'customers'\ntype CustomerRel = ResourceRel & { type: CustomerType }\ntype CustomerGroupRel = ResourceRel & { type: CustomerGroupType }\ntype TagRel = ResourceRel & { type: TagType }\n\n\nexport type CustomerSort = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count' | 'anonymization_status'> & ResourceSort\n// export type CustomerFilter = Pick<Customer, 'id' | 'email' | 'status' | 'total_orders_count' | 'anonymization_status'> & ResourceFilter\n\n\ninterface Customer extends Resource {\n\t\n\treadonly type: CustomerType\n\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The customer's status. One of 'prospect' (default), 'acquired', or 'repeat'.\n\t * @example ```\"prospect\"```\n\t */\n\tstatus: 'prospect' | 'acquired' | 'repeat'\n\t/** \n\t * Indicates if the customer has a password.\n\t */\n\thas_password?: boolean | null\n\t/** \n\t * The total number of orders for the customer.\n\t * @example ```6```\n\t */\n\ttotal_orders_count?: number | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\t/** \n\t * The custom_claim attached to the current JWT (if any).\n\t * @example ```{}```\n\t */\n\tjwt_custom_claim?: Record<string, any> | null\n\t/** \n\t * The anonymization info object.\n\t * @example ```{\"status\":\"requested\",\"requested_at\":\"2025-03-15 11:39:21 UTC\",\"requester\":{\"id\":\"fdgt56hh\",\"first_name\":\"Travis\",\"last_name\":\"Muller\",\"email\":\"test@labadie.test\"}}```\n\t */\n\tanonymization_info?: Record<string, any> | null\n\t/** \n\t * Status of the current anonymization request (if any).\n\t * @example ```\"requested\"```\n\t */\n\tanonymization_status?: string | null\n\n\tcustomer_group?: CustomerGroup | null\n\tcustomer_addresses?: CustomerAddress[] | null\n\tcustomer_payment_sources?: CustomerPaymentSource[] | null\n\tcustomer_subscriptions?: CustomerSubscription[] | null\n\torders?: Order[] | null\n\torder_subscriptions?: OrderSubscription[] | null\n\treturns?: Return[] | null\n\tsku_lists?: SkuList[] | null\n\tattachments?: Attachment[] | null\n\tevents?: Event[] | null\n\ttags?: Tag[] | null\n\tjwt_customer?: Customer | null\n\tjwt_markets?: Market[] | null\n\tjwt_stock_locations?: StockLocation[] | null\n\n}\n\n\ninterface CustomerCreate extends ResourceCreate {\n\t\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail: string\n\t/** \n\t * The customer's password. Initiate a customer password reset flow if you need to change it.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\n\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\ninterface CustomerUpdate extends ResourceUpdate {\n\t\n\t/** \n\t * The customer's email address.\n\t * @example ```\"john@example.com\"```\n\t */\n\temail?: string | null\n\t/** \n\t * The customer's password. Initiate a customer password reset flow if you need to change it.\n\t * @example ```\"secret\"```\n\t */\n\tpassword?: string | null\n\t/** \n\t * A reference to uniquely identify the shopper during payment sessions.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tshopper_reference?: string | null\n\t/** \n\t * A reference to uniquely identify the customer on any connected external services.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\tprofile_id?: string | null\n\t/** \n\t * A specific code to identify the tax exemption reason for this customer.\n\t * @example ```\"xxx-yyy-zzz\"```\n\t */\n\ttax_exemption_code?: string | null\n\t/** \n\t * Comma separated list of tags to be added. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_add_tags?: string | null\n\t/** \n\t * Comma separated list of tags to be removed. Duplicates, invalid and non existing ones are discarded. Cannot be passed by sales channels.\n\t */\n\t_remove_tags?: string | null\n\t/** \n\t * Send this attribute if you want to trigger anonymization.\n\t * @example ```true```\n\t */\n\t_request_anonymization?: boolean | null\n\t/** \n\t * Send this attribute if you want to trigger a cancellation of anonymization.\n\t * @example ```true```\n\t */\n\t_cancel_anonymization?: boolean | null\n\n\tcustomer_group?: CustomerGroupRel | null\n\ttags?: TagRel[] | null\n\n}\n\n\nclass Customers extends ApiResource<Customer> {\n\n\tstatic readonly TYPE: CustomerType = 'customers' as const\n\n\tasync create(resource: CustomerCreate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.create<CustomerCreate, Customer>({ ...resource, type: Customers.TYPE }, params, options)\n\t}\n\n\tasync update(resource: CustomerUpdate, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ ...resource, type: Customers.TYPE }, params, options)\n\t}\n\n\tasync delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void> {\n\t\tawait this.resources.delete((typeof id === 'string')? { id, type: Customers.TYPE } : id, options)\n\t}\n\n\tasync customer_group(customerId: string | Customer, params?: QueryParamsRetrieve<CustomerGroup>, options?: ResourcesConfig): Promise<CustomerGroup> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerGroup>({ type: 'customer_groups' }, `customers/${_customerId}/customer_group`, params, options) as unknown as CustomerGroup\n\t}\n\n\tasync customer_addresses(customerId: string | Customer, params?: QueryParamsList<CustomerAddress>, options?: ResourcesConfig): Promise<ListResponse<CustomerAddress>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerAddress>({ type: 'customer_addresses' }, `customers/${_customerId}/customer_addresses`, params, options) as unknown as ListResponse<CustomerAddress>\n\t}\n\n\tasync customer_payment_sources(customerId: string | Customer, params?: QueryParamsList<CustomerPaymentSource>, options?: ResourcesConfig): Promise<ListResponse<CustomerPaymentSource>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerPaymentSource>({ type: 'customer_payment_sources' }, `customers/${_customerId}/customer_payment_sources`, params, options) as unknown as ListResponse<CustomerPaymentSource>\n\t}\n\n\tasync customer_subscriptions(customerId: string | Customer, params?: QueryParamsList<CustomerSubscription>, options?: ResourcesConfig): Promise<ListResponse<CustomerSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<CustomerSubscription>({ type: 'customer_subscriptions' }, `customers/${_customerId}/customer_subscriptions`, params, options) as unknown as ListResponse<CustomerSubscription>\n\t}\n\n\tasync orders(customerId: string | Customer, params?: QueryParamsList<Order>, options?: ResourcesConfig): Promise<ListResponse<Order>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Order>({ type: 'orders' }, `customers/${_customerId}/orders`, params, options) as unknown as ListResponse<Order>\n\t}\n\n\tasync order_subscriptions(customerId: string | Customer, params?: QueryParamsList<OrderSubscription>, options?: ResourcesConfig): Promise<ListResponse<OrderSubscription>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<OrderSubscription>({ type: 'order_subscriptions' }, `customers/${_customerId}/order_subscriptions`, params, options) as unknown as ListResponse<OrderSubscription>\n\t}\n\n\tasync returns(customerId: string | Customer, params?: QueryParamsList<Return>, options?: ResourcesConfig): Promise<ListResponse<Return>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Return>({ type: 'returns' }, `customers/${_customerId}/returns`, params, options) as unknown as ListResponse<Return>\n\t}\n\n\tasync sku_lists(customerId: string | Customer, params?: QueryParamsList<SkuList>, options?: ResourcesConfig): Promise<ListResponse<SkuList>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<SkuList>({ type: 'sku_lists' }, `customers/${_customerId}/sku_lists`, params, options) as unknown as ListResponse<SkuList>\n\t}\n\n\tasync attachments(customerId: string | Customer, params?: QueryParamsList<Attachment>, options?: ResourcesConfig): Promise<ListResponse<Attachment>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Attachment>({ type: 'attachments' }, `customers/${_customerId}/attachments`, params, options) as unknown as ListResponse<Attachment>\n\t}\n\n\tasync events(customerId: string | Customer, params?: QueryParamsList<Event>, options?: ResourcesConfig): Promise<ListResponse<Event>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Event>({ type: 'events' }, `customers/${_customerId}/events`, params, options) as unknown as ListResponse<Event>\n\t}\n\n\tasync tags(customerId: string | Customer, params?: QueryParamsList<Tag>, options?: ResourcesConfig): Promise<ListResponse<Tag>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Tag>({ type: 'tags' }, `customers/${_customerId}/tags`, params, options) as unknown as ListResponse<Tag>\n\t}\n\n\tasync jwt_customer(customerId: string | Customer, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Customer>({ type: 'customers' }, `customers/${_customerId}/jwt_customer`, params, options) as unknown as Customer\n\t}\n\n\tasync jwt_markets(customerId: string | Customer, params?: QueryParamsList<Market>, options?: ResourcesConfig): Promise<ListResponse<Market>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<Market>({ type: 'markets' }, `customers/${_customerId}/jwt_markets`, params, options) as unknown as ListResponse<Market>\n\t}\n\n\tasync jwt_stock_locations(customerId: string | Customer, params?: QueryParamsList<StockLocation>, options?: ResourcesConfig): Promise<ListResponse<StockLocation>> {\n\t\tconst _customerId = (customerId as Customer).id || customerId as string\n\t\treturn this.resources.fetch<StockLocation>({ type: 'stock_locations' }, `customers/${_customerId}/jwt_stock_locations`, params, options) as unknown as ListResponse<StockLocation>\n\t}\n\n\tasync _add_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _add_tags: triggerValue }, params, options)\n\t}\n\n\tasync _remove_tags(id: string | Customer, triggerValue: string, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _remove_tags: triggerValue }, params, options)\n\t}\n\n\tasync _request_anonymization(id: string | Customer, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _request_anonymization: true }, params, options)\n\t}\n\n\tasync _cancel_anonymization(id: string | Customer, params?: QueryParamsRetrieve<Customer>, options?: ResourcesConfig): Promise<Customer> {\n\t\treturn this.resources.update<CustomerUpdate, Customer>({ id: (typeof id === 'string')? id: id.id, type: Customers.TYPE, _cancel_anonymization: true }, params, options)\n\t}\n\n\n\tisCustomer(resource: any): resource is Customer {\n\t\treturn resource.type && (resource.type === Customers.TYPE)\n\t}\n\n\n\trelationship(id: string | ResourceId | null): CustomerRel {\n\t\treturn super.relationshipOneToOne<CustomerRel>(id)\n\t}\n\n\trelationshipToMany(...ids: string[]): CustomerRel[] {\n\t\treturn super.relationshipOneToMany<CustomerRel>(...ids)\n\t}\n\n\n\ttype(): CustomerType {\n\t\treturn Customers.TYPE\n\t}\n\n}\n\n\nconst instance = new Customers()\nexport default instance\n\nexport type { Customers, Customer, CustomerCreate, CustomerUpdate, CustomerType }\n"]}
@@ -5,7 +5,7 @@ import { debug_default } from './chunk-XD7GS4QW.js';
5
5
 
6
6
  // src/commercelayer.ts
7
7
  var debug = debug_default("commercelayer");
8
- var OPEN_API_SCHEMA_VERSION = "7.8.6";
8
+ var OPEN_API_SCHEMA_VERSION = "7.8.7";
9
9
  var CommerceLayerClient = class _CommerceLayerClient {
10
10
  static get openApiSchemaVersion() {
11
11
  return OPEN_API_SCHEMA_VERSION;
@@ -101,5 +101,5 @@ var CommerceLayer = (config) => {
101
101
  var commercelayer_default = CommerceLayer;
102
102
 
103
103
  export { CommerceLayer, CommerceLayerClient, OPEN_API_SCHEMA_VERSION, commercelayer_default };
104
- //# sourceMappingURL=chunk-IIR3UVU2.js.map
105
- //# sourceMappingURL=chunk-IIR3UVU2.js.map
104
+ //# sourceMappingURL=chunk-M55NSZVW.js.map
105
+ //# sourceMappingURL=chunk-M55NSZVW.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/commercelayer.ts"],"names":[],"mappings":";;;;;;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S,OAAQ,CAAA,OAAA,CAAQ,CAAC,KAAA,EAAO,GAAQ,KAAA;AAAE,UAAA,EAAA,CAAG,GAAG,CAAI,GAAA,KAAA;AAAA,SAAO,CAAA;AAC5D,QAAA,MAAA,CAAO,OAAU,GAAA,EAAA;AAAA;AAElB,MAAO,OAAA,QAAA;AAAA;AAGiB,IAAA,IAAA,CAAK,aAAa,SAAY,GAAA,EAAE,SAAW,EAAA,sBAAA,EAAwB,WAAW,sBAAuB,EAAA;AAC9H,IAAA,MAAA,CAAO,EAAK,GAAA,CAAA;AAEZ,IAAO,OAAA,MAAA;AAAA;AAER,EAEA,uBAAwE,GAAA;AAKvE,IAAA,IAAA,CAAK,aAAa,SAAY,GAAA,MAAA;AAAA;AAGhC;AAIM,IAAA,aAAA,GAAgB,CAAC,MAAyD,KAAA;AAC/E,EAAO,OAAA,mBAAA,CAAoB,IAAI,MAAM,CAAA;AACtC;AAGA,IAAO,qBAAQ,GAAA","file":"chunk-IIR3UVU2.js","sourcesContent":["\n// import * as api from './api'\nimport { getResources } from './enum'\nimport { isApiError, type ApiError } from './error'\nimport type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor, ResponseObj, HeadersObj, InterceptorManager } from './interceptor'\nimport { ApiResourceAdapter, type ResourcesInitConfig } from './resource'\n\n\nimport Debug from './debug'\nconst debug = Debug('commercelayer')\n\n\n// Autogenerated schema version number, do not remove this line\nexport const OPEN_API_SCHEMA_VERSION = '7.8.6'\n\n\n// SDK local configuration\ntype SdkConfig = {\n\t// abc?: string\n}\n\ntype CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig\ntype CommerceLayerConfig = Partial<CommerceLayerInitConfig>\n\n\n\nclass CommerceLayerClient {\n\n\tstatic get openApiSchemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\treadonly openApiSchemaVersion = OPEN_API_SCHEMA_VERSION\n\n\tprotected static cl: CommerceLayerClient\n\n\t// ##__CL_RESOURCES_DEF_START__##\n\t// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##\n\t// ##__CL_RESOURCES_DEF_STOP__##\n\n\n\tstatic get (config?: CommerceLayerInitConfig): CommerceLayerClient {\n\t\tif (config) return (CommerceLayerClient.cl = new CommerceLayerClient(config))\n\t\telse\n\t\tif (!CommerceLayerClient.cl) throw new Error('CommerceLayer client not initialized')\n\t\treturn CommerceLayerClient.cl\n\t}\n\n\n\tprotected constructor(config: CommerceLayerInitConfig) {\n\n\t\tdebug('new commercelayer instance %O', config)\n\n\t\tApiResourceAdapter.init(config)\n\n\t\t// ##__CL_RESOURCES_INIT_START__##\n\t\t// ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)\n\t\t// ##__CL_RESOURCES_INIT_STOP__##\n\n\t}\n\n\t// ##__CL_RESOURCES_LEAZY_LOADING_START__##\n\t// ##__CL_RESOURCES_LEAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)) }\n\t// ##__CL_RESOURCES_LEAZY_LOADING_STOP__##\n\n\t// private get adapter(): ResourceAdapter { return ApiResourceAdapter.get() }\n\tget currentOrganization(): string { return ApiResourceAdapter.get().client?.currentOrganization }\n\tget currentAccessToken(): string { return ApiResourceAdapter.get().client?.currentAccessToken }\n\tprivate get interceptors(): InterceptorManager { return ApiResourceAdapter.get().client?.interceptors }\n\n\n\tprivate localConfig(config: Partial<SdkConfig>): void {\n\t\t// if (config.abc) this.abc = config.abc\n\t}\n\n\n\tconfig(config: CommerceLayerConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\t// CommerceLayer config\n\t\tthis.localConfig(config)\n\t\t// ResourceAdapter config\n\t\tApiResourceAdapter.config(config)\n\n\t\treturn this\n\n\t}\n\n\t\n\tresources(sort?: boolean): readonly string[] {\n\t\treturn getResources(sort)\n\t}\n\n\tisApiError(error: any): error is ApiError {\n\t\treturn isApiError(error)\n\t}\n\n\n\taddRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.request = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\taddResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.response = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\tremoveInterceptor(type: InterceptorType, id: number = 1): void {\n\t\tthis.interceptors[type] = undefined\n\t}\n\n\tremoveInterceptors(): void {\n\t\tthis.removeInterceptor('request')\n\t\tthis.removeInterceptor('response')\n\t\tthis.removeRawResponseReader()\n\t}\n\n\taddRawResponseReader(options?: { headers: boolean }): RawResponseReader {\n\n\t\tconst reader: RawResponseReader = {\n\t\t\tid: 0,\n\t\t\trawResponse: undefined,\n\t\t\theaders: undefined,\n\t\t\tok: true\n\t\t}\n\n\t\tasync function rawResponseInterceptor(response: ResponseObj): Promise<ResponseObj> {\n\t\t\treader.rawResponse = await response?.clone().json().catch(() => {})\n\t\t\treader.ok = response.ok\n\t\t\tif (options?.headers) {\n\t\t\t\tconst ho: HeadersObj = {}\n\t\t\t\tresponse.headers.forEach((value, key) => { ho[key] = value })\n\t\t\t\treader.headers = ho\n\t\t\t}\n\t\t\treturn response\n\t\t}\n\t\t\n\t\t/* const interceptor = */this.interceptors.rawReader = { onSuccess: rawResponseInterceptor, onFailure: rawResponseInterceptor }\n\t\treader.id = 1 // interceptor\n\n\t\treturn reader\n\n\t}\n\n\tremoveRawResponseReader(/* reader: number | RawResponseReader */): void {\n\t\t/*\n\t\tconst id = (typeof reader === 'number') ? reader : reader?.id\n\t\tif (id && (id >= 0)) this.removeInterceptor('response', id)\n\t\t*/\n\t\tthis.interceptors.rawReader = undefined\n\t}\n\n}\n\n\n\nconst CommerceLayer = (config: CommerceLayerInitConfig): CommerceLayerClient => {\n\treturn CommerceLayerClient.get(config)\n}\n\n\nexport default CommerceLayer\nexport { CommerceLayer }\n\nexport { CommerceLayerClient }\nexport type { CommerceLayerConfig, CommerceLayerInitConfig }\n"]}
1
+ {"version":3,"sources":["../src/commercelayer.ts"],"names":[],"mappings":";;;;;;AASA,IAAM,KAAA,GAAQ,cAAM,eAAe,CAAA;AAI5B,IAAM,uBAA0B,GAAA;AAajC,IAAA,mBAAA,GAAN,MAAM,oBAAoB,CAAA;AAAA,EAEzB,WAAW,oBAA+B,GAAA;AAAE,IAAO,OAAA,uBAAA;AAAA;AAAwB,EAClE,oBAAuB,GAAA,uBAAA;AAAA,EAEhC,OAAiB,EAAA;AAAA;AAAA;AAAA;AAAA,EAOjB,OAAO,IAAK,MAAuD,EAAA;AAClE,IAAA,IAAI,QAAgB,OAAA,oBAAA,CAAoB,EAAK,GAAA,IAAI,qBAAoB,MAAM,CAAA;AAAA,SAAA,IAEvE,CAAC,oBAAoB,CAAA,EAAA,EAAU,MAAA,IAAI,MAAM,sCAAsC,CAAA;AACnF,IAAA,OAAO,oBAAoB,CAAA,EAAA;AAAA;AAC5B,EAGU,YAAY,MAAiC,EAAA;AAEtD,IAAA,KAAA,CAAM,iCAAiC,MAAM,CAAA;AAE7C,IAAA,kBAAA,CAAmB,KAAK,MAAM,CAAA;AAAA;AAM/B;AAAA;AAAA;AAAA;AAAA,EAOA,IAAI,mBAA8B,GAAA;AAAE,IAAO,OAAA,kBAAA,CAAmB,GAAI,EAAA,CAAE,MAAQ,EAAA,mBAAA;AAAA;AAAoB,EAChG,IAAI,kBAA6B,GAAA;AAAE,IAAO,OAAA,kBAAA,CAAmB,GAAI,EAAA,CAAE,MAAQ,EAAA,kBAAA;AAAA;AAAmB,EAC9F,IAAY,YAAmC,GAAA;AAAE,IAAO,OAAA,kBAAA,CAAmB,GAAI,EAAA,CAAE,MAAQ,EAAA,YAAA;AAAA;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,CAAA,WAAA,GAAc,MAAM,QAAU,EAAA,KAAA,GAAQ,IAAK,EAAA,CAAE,MAAM,MAAM;AAAA,OAAE,CAAA;AAClE,MAAA,MAAA,CAAO,KAAK,QAAS,CAAA,EAAA;AACrB,MAAA,IAAI,SAAS,OAAS,EAAA;AACrB,QAAA,MAAM,KAAiB,EAAC;AACxB,QAAA,QAAA,CAAS,OAAQ,CAAA,OAAA,CAAQ,CAAC,KAAA,EAAO,GAAQ,KAAA;AAAE,UAAA,EAAA,CAAG,GAAG,CAAI,GAAA,KAAA;AAAA,SAAO,CAAA;AAC5D,QAAA,MAAA,CAAO,OAAU,GAAA,EAAA;AAAA;AAElB,MAAO,OAAA,QAAA;AAAA;AAGiB,IAAA,IAAA,CAAK,aAAa,SAAY,GAAA,EAAE,SAAW,EAAA,sBAAA,EAAwB,WAAW,sBAAuB,EAAA;AAC9H,IAAA,MAAA,CAAO,EAAK,GAAA,CAAA;AAEZ,IAAO,OAAA,MAAA;AAAA;AAER,EAEA,uBAAwE,GAAA;AAKvE,IAAA,IAAA,CAAK,aAAa,SAAY,GAAA,MAAA;AAAA;AAGhC;AAIM,IAAA,aAAA,GAAgB,CAAC,MAAyD,KAAA;AAC/E,EAAO,OAAA,mBAAA,CAAoB,IAAI,MAAM,CAAA;AACtC;AAGA,IAAO,qBAAQ,GAAA","file":"chunk-M55NSZVW.js","sourcesContent":["\n// import * as api from './api'\nimport { getResources } from './enum'\nimport { isApiError, type ApiError } from './error'\nimport type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor, ResponseObj, HeadersObj, InterceptorManager } from './interceptor'\nimport { ApiResourceAdapter, type ResourcesInitConfig } from './resource'\n\n\nimport Debug from './debug'\nconst debug = Debug('commercelayer')\n\n\n// Autogenerated schema version number, do not remove this line\nexport const OPEN_API_SCHEMA_VERSION = '7.8.7'\n\n\n// SDK local configuration\ntype SdkConfig = {\n\t// abc?: string\n}\n\ntype CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig\ntype CommerceLayerConfig = Partial<CommerceLayerInitConfig>\n\n\n\nclass CommerceLayerClient {\n\n\tstatic get openApiSchemaVersion(): string { return OPEN_API_SCHEMA_VERSION }\n\treadonly openApiSchemaVersion = OPEN_API_SCHEMA_VERSION\n\n\tprotected static cl: CommerceLayerClient\n\n\t// ##__CL_RESOURCES_DEF_START__##\n\t// ##__CL_RESOURCES_DEF_TEMPLATE:: ##__TAB__#####__RESOURCE_TYPE__##?: api.##__RESOURCE_CLASS__##\n\t// ##__CL_RESOURCES_DEF_STOP__##\n\n\n\tstatic get (config?: CommerceLayerInitConfig): CommerceLayerClient {\n\t\tif (config) return (CommerceLayerClient.cl = new CommerceLayerClient(config))\n\t\telse\n\t\tif (!CommerceLayerClient.cl) throw new Error('CommerceLayer client not initialized')\n\t\treturn CommerceLayerClient.cl\n\t}\n\n\n\tprotected constructor(config: CommerceLayerInitConfig) {\n\n\t\tdebug('new commercelayer instance %O', config)\n\n\t\tApiResourceAdapter.init(config)\n\n\t\t// ##__CL_RESOURCES_INIT_START__##\n\t\t// ##__CL_RESOURCES_INIT_TEMPLATE:: ##__TAB__####__TAB__##this.##__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)\n\t\t// ##__CL_RESOURCES_INIT_STOP__##\n\n\t}\n\n\t// ##__CL_RESOURCES_LEAZY_LOADING_START__##\n\t// ##__CL_RESOURCES_LEAZY_LOADING_TEMPLATE:: ##__TAB__##get ##__RESOURCE_TYPE__##(): api.##__RESOURCE_CLASS__## { return this.###__RESOURCE_TYPE__## || (this.###__RESOURCE_TYPE__## = new api.##__RESOURCE_CLASS__##(this.#adapter)) }\n\t// ##__CL_RESOURCES_LEAZY_LOADING_STOP__##\n\n\t// private get adapter(): ResourceAdapter { return ApiResourceAdapter.get() }\n\tget currentOrganization(): string { return ApiResourceAdapter.get().client?.currentOrganization }\n\tget currentAccessToken(): string { return ApiResourceAdapter.get().client?.currentAccessToken }\n\tprivate get interceptors(): InterceptorManager { return ApiResourceAdapter.get().client?.interceptors }\n\n\n\tprivate localConfig(config: Partial<SdkConfig>): void {\n\t\t// if (config.abc) this.abc = config.abc\n\t}\n\n\n\tconfig(config: CommerceLayerConfig): this {\n\n\t\tdebug('config %o', config)\n\n\t\t// CommerceLayer config\n\t\tthis.localConfig(config)\n\t\t// ResourceAdapter config\n\t\tApiResourceAdapter.config(config)\n\n\t\treturn this\n\n\t}\n\n\t\n\tresources(sort?: boolean): readonly string[] {\n\t\treturn getResources(sort)\n\t}\n\n\tisApiError(error: any): error is ApiError {\n\t\treturn isApiError(error)\n\t}\n\n\n\taddRequestInterceptor(onSuccess?: RequestInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.request = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\taddResponseInterceptor(onSuccess?: ResponseInterceptor, onFailure?: ErrorInterceptor): number {\n\t\tthis.interceptors.response = { onSuccess, onFailure }\n\t\treturn 1\n\t}\n\n\tremoveInterceptor(type: InterceptorType, id: number = 1): void {\n\t\tthis.interceptors[type] = undefined\n\t}\n\n\tremoveInterceptors(): void {\n\t\tthis.removeInterceptor('request')\n\t\tthis.removeInterceptor('response')\n\t\tthis.removeRawResponseReader()\n\t}\n\n\taddRawResponseReader(options?: { headers: boolean }): RawResponseReader {\n\n\t\tconst reader: RawResponseReader = {\n\t\t\tid: 0,\n\t\t\trawResponse: undefined,\n\t\t\theaders: undefined,\n\t\t\tok: true\n\t\t}\n\n\t\tasync function rawResponseInterceptor(response: ResponseObj): Promise<ResponseObj> {\n\t\t\treader.rawResponse = await response?.clone().json().catch(() => {})\n\t\t\treader.ok = response.ok\n\t\t\tif (options?.headers) {\n\t\t\t\tconst ho: HeadersObj = {}\n\t\t\t\tresponse.headers.forEach((value, key) => { ho[key] = value })\n\t\t\t\treader.headers = ho\n\t\t\t}\n\t\t\treturn response\n\t\t}\n\t\t\n\t\t/* const interceptor = */this.interceptors.rawReader = { onSuccess: rawResponseInterceptor, onFailure: rawResponseInterceptor }\n\t\treader.id = 1 // interceptor\n\n\t\treturn reader\n\n\t}\n\n\tremoveRawResponseReader(/* reader: number | RawResponseReader */): void {\n\t\t/*\n\t\tconst id = (typeof reader === 'number') ? reader : reader?.id\n\t\tif (id && (id >= 0)) this.removeInterceptor('response', id)\n\t\t*/\n\t\tthis.interceptors.rawReader = undefined\n\t}\n\n}\n\n\n\nconst CommerceLayer = (config: CommerceLayerInitConfig): CommerceLayerClient => {\n\treturn CommerceLayerClient.get(config)\n}\n\n\nexport default CommerceLayer\nexport { CommerceLayer }\n\nexport { CommerceLayerClient }\nexport type { CommerceLayerConfig, CommerceLayerInitConfig }\n"]}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkRIMDGLIA_cjs = require('./chunk-RIMDGLIA.cjs');
5
+ var chunkJRYILJJY_cjs = require('./chunk-JRYILJJY.cjs');
6
6
  require('./chunk-QYDOENWU.cjs');
7
7
  require('./chunk-YY5ENJSH.cjs');
8
8
  require('./chunk-WAL76UPE.cjs');
@@ -17,19 +17,19 @@ require('./chunk-JEQ2X3Z6.cjs');
17
17
 
18
18
  Object.defineProperty(exports, "CommerceLayer", {
19
19
  enumerable: true,
20
- get: function () { return chunkRIMDGLIA_cjs.CommerceLayer; }
20
+ get: function () { return chunkJRYILJJY_cjs.CommerceLayer; }
21
21
  });
22
22
  Object.defineProperty(exports, "CommerceLayerClient", {
23
23
  enumerable: true,
24
- get: function () { return chunkRIMDGLIA_cjs.CommerceLayerClient; }
24
+ get: function () { return chunkJRYILJJY_cjs.CommerceLayerClient; }
25
25
  });
26
26
  Object.defineProperty(exports, "OPEN_API_SCHEMA_VERSION", {
27
27
  enumerable: true,
28
- get: function () { return chunkRIMDGLIA_cjs.OPEN_API_SCHEMA_VERSION; }
28
+ get: function () { return chunkJRYILJJY_cjs.OPEN_API_SCHEMA_VERSION; }
29
29
  });
30
30
  Object.defineProperty(exports, "default", {
31
31
  enumerable: true,
32
- get: function () { return chunkRIMDGLIA_cjs.commercelayer_default; }
32
+ get: function () { return chunkJRYILJJY_cjs.commercelayer_default; }
33
33
  });
34
34
  //# sourceMappingURL=commercelayer.cjs.map
35
35
  //# sourceMappingURL=commercelayer.cjs.map