@commercelayer/sdk 2.3.12 → 3.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/lib/cjs/api.d.ts +1 -1
  2. package/lib/cjs/client.d.ts +1 -1
  3. package/lib/cjs/commercelayer.d.ts +1 -0
  4. package/lib/cjs/commercelayer.js +1 -1
  5. package/lib/cjs/jsonapi.d.ts +0 -2
  6. package/lib/cjs/jsonapi.js +1 -1
  7. package/lib/cjs/model.d.ts +2 -2
  8. package/lib/cjs/query.js +1 -1
  9. package/lib/cjs/resource.d.ts +1 -1
  10. package/lib/cjs/resource.js +1 -1
  11. package/lib/cjs/resources/addresses.d.ts +0 -4
  12. package/lib/cjs/resources/adjustments.d.ts +0 -4
  13. package/lib/cjs/resources/adyen_gateways.d.ts +0 -4
  14. package/lib/cjs/resources/adyen_payments.d.ts +0 -5
  15. package/lib/cjs/resources/application.d.ts +0 -4
  16. package/lib/cjs/resources/attachments.d.ts +0 -4
  17. package/lib/cjs/resources/authorizations.d.ts +0 -4
  18. package/lib/cjs/resources/avalara_accounts.d.ts +0 -4
  19. package/lib/cjs/resources/billing_info_validation_rules.d.ts +0 -4
  20. package/lib/cjs/resources/bing_geocoders.d.ts +0 -4
  21. package/lib/cjs/resources/braintree_gateways.d.ts +0 -4
  22. package/lib/cjs/resources/braintree_payments.d.ts +0 -4
  23. package/lib/cjs/resources/bundles.d.ts +0 -4
  24. package/lib/cjs/resources/captures.d.ts +0 -4
  25. package/lib/cjs/resources/carrier_accounts.d.ts +0 -4
  26. package/lib/cjs/resources/checkout_com_gateways.d.ts +0 -4
  27. package/lib/cjs/resources/checkout_com_payments.d.ts +0 -5
  28. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +0 -4
  29. package/lib/cjs/resources/coupon_recipients.d.ts +0 -4
  30. package/lib/cjs/resources/coupons.d.ts +3 -4
  31. package/lib/cjs/resources/customer_addresses.d.ts +0 -4
  32. package/lib/cjs/resources/customer_groups.d.ts +0 -4
  33. package/lib/cjs/resources/customer_password_resets.d.ts +0 -4
  34. package/lib/cjs/resources/customer_payment_sources.d.ts +0 -4
  35. package/lib/cjs/resources/customer_subscriptions.d.ts +0 -4
  36. package/lib/cjs/resources/customers.d.ts +0 -4
  37. package/lib/cjs/resources/delivery_lead_times.d.ts +0 -4
  38. package/lib/cjs/resources/event_callbacks.d.ts +0 -4
  39. package/lib/cjs/resources/external_gateways.d.ts +0 -4
  40. package/lib/cjs/resources/external_payments.d.ts +0 -4
  41. package/lib/cjs/resources/external_promotions.d.ts +0 -4
  42. package/lib/cjs/resources/external_tax_calculators.d.ts +0 -4
  43. package/lib/cjs/resources/fixed_amount_promotions.d.ts +0 -4
  44. package/lib/cjs/resources/fixed_price_promotions.d.ts +0 -4
  45. package/lib/cjs/resources/free_gift_promotions.d.ts +0 -4
  46. package/lib/cjs/resources/free_shipping_promotions.d.ts +0 -4
  47. package/lib/cjs/resources/geocoders.d.ts +2 -5
  48. package/lib/cjs/resources/geocoders.js +1 -1
  49. package/lib/cjs/resources/gift_card_recipients.d.ts +0 -4
  50. package/lib/cjs/resources/gift_cards.d.ts +0 -4
  51. package/lib/cjs/resources/google_geocoders.d.ts +0 -4
  52. package/lib/cjs/resources/imports.d.ts +0 -4
  53. package/lib/cjs/resources/in_stock_subscriptions.d.ts +0 -4
  54. package/lib/cjs/resources/inventory_models.d.ts +0 -4
  55. package/lib/cjs/resources/inventory_return_locations.d.ts +0 -4
  56. package/lib/cjs/resources/inventory_stock_locations.d.ts +0 -4
  57. package/lib/cjs/resources/line_item_options.d.ts +0 -4
  58. package/lib/cjs/resources/line_items.d.ts +0 -4
  59. package/lib/cjs/resources/manual_gateways.d.ts +0 -4
  60. package/lib/cjs/resources/manual_tax_calculators.d.ts +0 -4
  61. package/lib/cjs/resources/markets.d.ts +0 -4
  62. package/lib/cjs/resources/merchants.d.ts +0 -4
  63. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +0 -4
  64. package/lib/cjs/resources/order_copies.d.ts +0 -4
  65. package/lib/cjs/resources/order_subscriptions.d.ts +0 -4
  66. package/lib/cjs/resources/order_validation_rules.d.ts +2 -5
  67. package/lib/cjs/resources/order_validation_rules.js +1 -1
  68. package/lib/cjs/resources/orders.d.ts +0 -4
  69. package/lib/cjs/resources/organization.d.ts +0 -4
  70. package/lib/cjs/resources/packages.d.ts +0 -4
  71. package/lib/cjs/resources/parcel_line_items.d.ts +0 -4
  72. package/lib/cjs/resources/parcels.d.ts +0 -4
  73. package/lib/cjs/resources/payment_gateways.d.ts +2 -15
  74. package/lib/cjs/resources/payment_gateways.js +1 -1
  75. package/lib/cjs/resources/payment_methods.d.ts +3 -4
  76. package/lib/cjs/resources/paypal_gateways.d.ts +0 -4
  77. package/lib/cjs/resources/paypal_payments.d.ts +0 -4
  78. package/lib/cjs/resources/percentage_discount_promotions.d.ts +0 -4
  79. package/lib/cjs/resources/price_lists.d.ts +0 -4
  80. package/lib/cjs/resources/prices.d.ts +0 -4
  81. package/lib/cjs/resources/promotion_rules.d.ts +2 -5
  82. package/lib/cjs/resources/promotion_rules.js +1 -1
  83. package/lib/cjs/resources/promotions.d.ts +2 -5
  84. package/lib/cjs/resources/promotions.js +1 -1
  85. package/lib/cjs/resources/refunds.d.ts +0 -4
  86. package/lib/cjs/resources/return_line_items.d.ts +0 -4
  87. package/lib/cjs/resources/returns.d.ts +0 -4
  88. package/lib/cjs/resources/shipments.d.ts +0 -4
  89. package/lib/cjs/resources/shipping_categories.d.ts +0 -4
  90. package/lib/cjs/resources/shipping_methods.d.ts +0 -4
  91. package/lib/cjs/resources/shipping_zones.d.ts +0 -4
  92. package/lib/cjs/resources/sku_list_items.d.ts +5 -6
  93. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +0 -4
  94. package/lib/cjs/resources/sku_lists.d.ts +0 -4
  95. package/lib/cjs/resources/sku_options.d.ts +0 -4
  96. package/lib/cjs/resources/skus.d.ts +0 -4
  97. package/lib/cjs/resources/stock_items.d.ts +0 -4
  98. package/lib/cjs/resources/stock_line_items.d.ts +0 -4
  99. package/lib/cjs/resources/stock_locations.d.ts +0 -4
  100. package/lib/cjs/resources/stock_transfers.d.ts +0 -4
  101. package/lib/cjs/resources/stripe_gateways.d.ts +0 -4
  102. package/lib/cjs/resources/stripe_payments.d.ts +0 -4
  103. package/lib/cjs/resources/tax_calculators.d.ts +2 -5
  104. package/lib/cjs/resources/tax_calculators.js +1 -1
  105. package/lib/cjs/resources/tax_categories.d.ts +0 -4
  106. package/lib/cjs/resources/tax_rules.d.ts +0 -4
  107. package/lib/cjs/resources/taxjar_accounts.d.ts +0 -4
  108. package/lib/cjs/resources/transactions.d.ts +2 -5
  109. package/lib/cjs/resources/transactions.js +1 -1
  110. package/lib/cjs/resources/voids.d.ts +0 -4
  111. package/lib/cjs/resources/webhooks.d.ts +0 -4
  112. package/lib/cjs/resources/wire_transfers.d.ts +0 -4
  113. package/lib/esm/api.d.ts +1 -1
  114. package/lib/esm/client.d.ts +1 -1
  115. package/lib/esm/client.js +1 -1
  116. package/lib/esm/commercelayer.d.ts +1 -0
  117. package/lib/esm/commercelayer.js +1 -1
  118. package/lib/esm/common.js +1 -1
  119. package/lib/esm/error.js +1 -1
  120. package/lib/esm/jsonapi.d.ts +0 -2
  121. package/lib/esm/jsonapi.js +1 -1
  122. package/lib/esm/model.d.ts +2 -2
  123. package/lib/esm/query.js +1 -1
  124. package/lib/esm/resource.d.ts +1 -1
  125. package/lib/esm/resource.js +1 -1
  126. package/lib/esm/resources/addresses.d.ts +0 -4
  127. package/lib/esm/resources/addresses.js +1 -1
  128. package/lib/esm/resources/adjustments.d.ts +0 -4
  129. package/lib/esm/resources/adjustments.js +1 -1
  130. package/lib/esm/resources/adyen_gateways.d.ts +0 -4
  131. package/lib/esm/resources/adyen_gateways.js +1 -1
  132. package/lib/esm/resources/adyen_payments.d.ts +0 -5
  133. package/lib/esm/resources/adyen_payments.js +1 -1
  134. package/lib/esm/resources/application.d.ts +0 -4
  135. package/lib/esm/resources/application.js +1 -1
  136. package/lib/esm/resources/attachments.d.ts +0 -4
  137. package/lib/esm/resources/authorizations.d.ts +0 -4
  138. package/lib/esm/resources/authorizations.js +1 -1
  139. package/lib/esm/resources/avalara_accounts.d.ts +0 -4
  140. package/lib/esm/resources/avalara_accounts.js +1 -1
  141. package/lib/esm/resources/billing_info_validation_rules.d.ts +0 -4
  142. package/lib/esm/resources/billing_info_validation_rules.js +1 -1
  143. package/lib/esm/resources/bing_geocoders.d.ts +0 -4
  144. package/lib/esm/resources/bing_geocoders.js +1 -1
  145. package/lib/esm/resources/braintree_gateways.d.ts +0 -4
  146. package/lib/esm/resources/braintree_gateways.js +1 -1
  147. package/lib/esm/resources/braintree_payments.d.ts +0 -4
  148. package/lib/esm/resources/braintree_payments.js +1 -1
  149. package/lib/esm/resources/bundles.d.ts +0 -4
  150. package/lib/esm/resources/captures.d.ts +0 -4
  151. package/lib/esm/resources/captures.js +1 -1
  152. package/lib/esm/resources/carrier_accounts.d.ts +0 -4
  153. package/lib/esm/resources/carrier_accounts.js +1 -1
  154. package/lib/esm/resources/checkout_com_gateways.d.ts +0 -4
  155. package/lib/esm/resources/checkout_com_gateways.js +1 -1
  156. package/lib/esm/resources/checkout_com_payments.d.ts +0 -5
  157. package/lib/esm/resources/checkout_com_payments.js +1 -1
  158. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +0 -4
  159. package/lib/esm/resources/coupon_recipients.d.ts +0 -4
  160. package/lib/esm/resources/coupon_recipients.js +1 -1
  161. package/lib/esm/resources/coupons.d.ts +3 -4
  162. package/lib/esm/resources/customer_addresses.d.ts +0 -4
  163. package/lib/esm/resources/customer_addresses.js +1 -1
  164. package/lib/esm/resources/customer_groups.d.ts +0 -4
  165. package/lib/esm/resources/customer_groups.js +1 -1
  166. package/lib/esm/resources/customer_password_resets.d.ts +0 -4
  167. package/lib/esm/resources/customer_payment_sources.d.ts +0 -4
  168. package/lib/esm/resources/customer_subscriptions.d.ts +0 -4
  169. package/lib/esm/resources/customers.d.ts +0 -4
  170. package/lib/esm/resources/delivery_lead_times.d.ts +0 -4
  171. package/lib/esm/resources/event_callbacks.d.ts +0 -4
  172. package/lib/esm/resources/external_gateways.d.ts +0 -4
  173. package/lib/esm/resources/external_gateways.js +1 -1
  174. package/lib/esm/resources/external_payments.d.ts +0 -4
  175. package/lib/esm/resources/external_payments.js +1 -1
  176. package/lib/esm/resources/external_promotions.d.ts +0 -4
  177. package/lib/esm/resources/external_promotions.js +1 -1
  178. package/lib/esm/resources/external_tax_calculators.d.ts +0 -4
  179. package/lib/esm/resources/external_tax_calculators.js +1 -1
  180. package/lib/esm/resources/fixed_amount_promotions.d.ts +0 -4
  181. package/lib/esm/resources/fixed_amount_promotions.js +1 -1
  182. package/lib/esm/resources/fixed_price_promotions.d.ts +0 -4
  183. package/lib/esm/resources/free_gift_promotions.d.ts +0 -4
  184. package/lib/esm/resources/free_gift_promotions.js +1 -1
  185. package/lib/esm/resources/free_shipping_promotions.d.ts +0 -4
  186. package/lib/esm/resources/geocoders.d.ts +2 -5
  187. package/lib/esm/resources/geocoders.js +1 -1
  188. package/lib/esm/resources/gift_card_recipients.d.ts +0 -4
  189. package/lib/esm/resources/gift_card_recipients.js +1 -1
  190. package/lib/esm/resources/gift_cards.d.ts +0 -4
  191. package/lib/esm/resources/gift_cards.js +1 -1
  192. package/lib/esm/resources/google_geocoders.d.ts +0 -4
  193. package/lib/esm/resources/imports.d.ts +0 -4
  194. package/lib/esm/resources/imports.js +1 -1
  195. package/lib/esm/resources/in_stock_subscriptions.d.ts +0 -4
  196. package/lib/esm/resources/in_stock_subscriptions.js +1 -1
  197. package/lib/esm/resources/inventory_models.d.ts +0 -4
  198. package/lib/esm/resources/inventory_models.js +1 -1
  199. package/lib/esm/resources/inventory_return_locations.d.ts +0 -4
  200. package/lib/esm/resources/inventory_return_locations.js +1 -1
  201. package/lib/esm/resources/inventory_stock_locations.d.ts +0 -4
  202. package/lib/esm/resources/inventory_stock_locations.js +1 -1
  203. package/lib/esm/resources/line_item_options.d.ts +0 -4
  204. package/lib/esm/resources/line_item_options.js +1 -1
  205. package/lib/esm/resources/line_items.d.ts +0 -4
  206. package/lib/esm/resources/line_items.js +1 -1
  207. package/lib/esm/resources/manual_gateways.d.ts +0 -4
  208. package/lib/esm/resources/manual_gateways.js +1 -1
  209. package/lib/esm/resources/manual_tax_calculators.d.ts +0 -4
  210. package/lib/esm/resources/manual_tax_calculators.js +1 -1
  211. package/lib/esm/resources/markets.d.ts +0 -4
  212. package/lib/esm/resources/markets.js +1 -1
  213. package/lib/esm/resources/merchants.d.ts +0 -4
  214. package/lib/esm/resources/merchants.js +1 -1
  215. package/lib/esm/resources/order_amount_promotion_rules.d.ts +0 -4
  216. package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
  217. package/lib/esm/resources/order_copies.d.ts +0 -4
  218. package/lib/esm/resources/order_copies.js +1 -1
  219. package/lib/esm/resources/order_subscriptions.d.ts +0 -4
  220. package/lib/esm/resources/order_validation_rules.d.ts +2 -5
  221. package/lib/esm/resources/order_validation_rules.js +1 -1
  222. package/lib/esm/resources/orders.d.ts +0 -4
  223. package/lib/esm/resources/organization.d.ts +0 -4
  224. package/lib/esm/resources/packages.d.ts +0 -4
  225. package/lib/esm/resources/parcel_line_items.d.ts +0 -4
  226. package/lib/esm/resources/parcel_line_items.js +1 -1
  227. package/lib/esm/resources/parcels.d.ts +0 -4
  228. package/lib/esm/resources/parcels.js +1 -1
  229. package/lib/esm/resources/payment_gateways.d.ts +2 -15
  230. package/lib/esm/resources/payment_gateways.js +1 -1
  231. package/lib/esm/resources/payment_methods.d.ts +3 -4
  232. package/lib/esm/resources/payment_methods.js +1 -1
  233. package/lib/esm/resources/paypal_gateways.d.ts +0 -4
  234. package/lib/esm/resources/paypal_gateways.js +1 -1
  235. package/lib/esm/resources/paypal_payments.d.ts +0 -4
  236. package/lib/esm/resources/paypal_payments.js +1 -1
  237. package/lib/esm/resources/percentage_discount_promotions.d.ts +0 -4
  238. package/lib/esm/resources/percentage_discount_promotions.js +1 -1
  239. package/lib/esm/resources/price_lists.d.ts +0 -4
  240. package/lib/esm/resources/prices.d.ts +0 -4
  241. package/lib/esm/resources/prices.js +1 -1
  242. package/lib/esm/resources/promotion_rules.d.ts +2 -5
  243. package/lib/esm/resources/promotion_rules.js +1 -1
  244. package/lib/esm/resources/promotions.d.ts +2 -5
  245. package/lib/esm/resources/promotions.js +1 -1
  246. package/lib/esm/resources/refunds.d.ts +0 -4
  247. package/lib/esm/resources/refunds.js +1 -1
  248. package/lib/esm/resources/return_line_items.d.ts +0 -4
  249. package/lib/esm/resources/return_line_items.js +1 -1
  250. package/lib/esm/resources/returns.d.ts +0 -4
  251. package/lib/esm/resources/shipments.d.ts +0 -4
  252. package/lib/esm/resources/shipments.js +1 -1
  253. package/lib/esm/resources/shipping_categories.d.ts +0 -4
  254. package/lib/esm/resources/shipping_methods.d.ts +0 -4
  255. package/lib/esm/resources/shipping_methods.js +1 -1
  256. package/lib/esm/resources/shipping_zones.d.ts +0 -4
  257. package/lib/esm/resources/sku_list_items.d.ts +5 -6
  258. package/lib/esm/resources/sku_list_items.js +1 -1
  259. package/lib/esm/resources/sku_list_promotion_rules.d.ts +0 -4
  260. package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
  261. package/lib/esm/resources/sku_lists.d.ts +0 -4
  262. package/lib/esm/resources/sku_lists.js +1 -1
  263. package/lib/esm/resources/sku_options.d.ts +0 -4
  264. package/lib/esm/resources/sku_options.js +1 -1
  265. package/lib/esm/resources/skus.d.ts +0 -4
  266. package/lib/esm/resources/stock_items.d.ts +0 -4
  267. package/lib/esm/resources/stock_items.js +1 -1
  268. package/lib/esm/resources/stock_line_items.d.ts +0 -4
  269. package/lib/esm/resources/stock_line_items.js +1 -1
  270. package/lib/esm/resources/stock_locations.d.ts +0 -4
  271. package/lib/esm/resources/stock_locations.js +1 -1
  272. package/lib/esm/resources/stock_transfers.d.ts +0 -4
  273. package/lib/esm/resources/stripe_gateways.d.ts +0 -4
  274. package/lib/esm/resources/stripe_gateways.js +1 -1
  275. package/lib/esm/resources/stripe_payments.d.ts +0 -4
  276. package/lib/esm/resources/stripe_payments.js +1 -1
  277. package/lib/esm/resources/tax_calculators.d.ts +2 -5
  278. package/lib/esm/resources/tax_calculators.js +1 -1
  279. package/lib/esm/resources/tax_categories.d.ts +0 -4
  280. package/lib/esm/resources/tax_categories.js +1 -1
  281. package/lib/esm/resources/tax_rules.d.ts +0 -4
  282. package/lib/esm/resources/taxjar_accounts.d.ts +0 -4
  283. package/lib/esm/resources/taxjar_accounts.js +1 -1
  284. package/lib/esm/resources/transactions.d.ts +2 -5
  285. package/lib/esm/resources/transactions.js +1 -1
  286. package/lib/esm/resources/voids.d.ts +0 -4
  287. package/lib/esm/resources/webhooks.d.ts +0 -4
  288. package/lib/esm/resources/wire_transfers.d.ts +0 -4
  289. package/lib/esm/resources/wire_transfers.js +1 -1
  290. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  291. package/lib/tsconfig.tsbuildinfo +1 -1
  292. package/package.json +13 -13
package/lib/cjs/api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
3
+ * OpenAPI schema, version 2.7.6
4
4
  **/
5
5
  export { default as Addresses } from './resources/addresses';
6
6
  export { default as Adjustments } from './resources/adjustments';
@@ -1,5 +1,5 @@
1
1
  import { Method } from 'axios';
2
- import { DocWithData as JSONApiDocument, ResourceObject as JSONApiResource } from 'jsonapi-typescript';
2
+ import type { DocWithData as JSONApiDocument, ResourceObject as JSONApiResource } from 'jsonapi-typescript';
3
3
  import type { InterceptorManager } from './interceptor';
4
4
  declare type RequestConfig = {
5
5
  timeout?: number;
@@ -7,6 +7,7 @@ declare type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
7
7
  declare type CommerceLayerConfig = SdkConfig & ResourcesConfig;
8
8
  declare class CommerceLayerClient {
9
9
  #private;
10
+ static get openApiSchemaVersion(): string;
10
11
  addresses: api.Addresses;
11
12
  adjustments: api.Adjustments;
12
13
  adyen_gateways: api.AdyenGateways;
@@ -1 +1 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,s,i){i===void 0&&(i=s),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,i){i===void 0&&(i=s),e[i]=t[s]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)&&__createBinding(t,e,s);return __setModuleDefault(t,e),t},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,s,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,s,i){if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?i:s==="a"?i.call(e):i?i.value:t.get(e)},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_CommerceLayerClient_adapter,_CommerceLayerClient_organization;Object.defineProperty(exports,"__esModule",{value:!0});const api=__importStar(require("./api")),static_1=require("./static"),resource_1=__importDefault(require("./resource"));class CommerceLayerClient{constructor(t){_CommerceLayerClient_adapter.set(this,void 0),_CommerceLayerClient_organization.set(this,void 0),__classPrivateFieldSet(this,_CommerceLayerClient_adapter,new resource_1.default(t),"f"),__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.organization,"f"),this.addresses=new api.Addresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adjustments=new api.Adjustments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_gateways=new api.AdyenGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_payments=new api.AdyenPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.application=new api.Applications(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.attachments=new api.Attachments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.authorizations=new api.Authorizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.avalara_accounts=new api.AvalaraAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.billing_info_validation_rules=new api.BillingInfoValidationRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bing_geocoders=new api.BingGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_gateways=new api.BraintreeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_payments=new api.BraintreePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bundles=new api.Bundles(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.captures=new api.Captures(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.carrier_accounts=new api.CarrierAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_gateways=new api.CheckoutComGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_payments=new api.CheckoutComPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupon_codes_promotion_rules=new api.CouponCodesPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupon_recipients=new api.CouponRecipients(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupons=new api.Coupons(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_addresses=new api.CustomerAddresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_groups=new api.CustomerGroups(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_password_resets=new api.CustomerPasswordResets(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_payment_sources=new api.CustomerPaymentSources(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_subscriptions=new api.CustomerSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customers=new api.Customers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.delivery_lead_times=new api.DeliveryLeadTimes(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.event_callbacks=new api.EventCallbacks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_gateways=new api.ExternalGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_payments=new api.ExternalPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_promotions=new api.ExternalPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_tax_calculators=new api.ExternalTaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.fixed_amount_promotions=new api.FixedAmountPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.fixed_price_promotions=new api.FixedPricePromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.free_gift_promotions=new api.FreeGiftPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.free_shipping_promotions=new api.FreeShippingPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.geocoders=new api.Geocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.gift_card_recipients=new api.GiftCardRecipients(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.gift_cards=new api.GiftCards(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.google_geocoders=new api.GoogleGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.imports=new api.Imports(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.in_stock_subscriptions=new api.InStockSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_models=new api.InventoryModels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_return_locations=new api.InventoryReturnLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_stock_locations=new api.InventoryStockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.line_item_options=new api.LineItemOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.line_items=new api.LineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.manual_gateways=new api.ManualGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.manual_tax_calculators=new api.ManualTaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.markets=new api.Markets(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.merchants=new api.Merchants(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_amount_promotion_rules=new api.OrderAmountPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_copies=new api.OrderCopies(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_subscriptions=new api.OrderSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_validation_rules=new api.OrderValidationRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.orders=new api.Orders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.organization=new api.Organizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.packages=new api.Packages(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.parcel_line_items=new api.ParcelLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.parcels=new api.Parcels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.payment_gateways=new api.PaymentGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.payment_methods=new api.PaymentMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.paypal_gateways=new api.PaypalGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.paypal_payments=new api.PaypalPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.percentage_discount_promotions=new api.PercentageDiscountPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_lists=new api.PriceLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.prices=new api.Prices(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.promotion_rules=new api.PromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.promotions=new api.Promotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.refunds=new api.Refunds(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.return_line_items=new api.ReturnLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.returns=new api.Returns(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipments=new api.Shipments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_categories=new api.ShippingCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_methods=new api.ShippingMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_zones=new api.ShippingZones(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_list_items=new api.SkuListItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_list_promotion_rules=new api.SkuListPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_lists=new api.SkuLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_options=new api.SkuOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.skus=new api.Skus(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_items=new api.StockItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_line_items=new api.StockLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_locations=new api.StockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_transfers=new api.StockTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stripe_gateways=new api.StripeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stripe_payments=new api.StripePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_calculators=new api.TaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_categories=new api.TaxCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_rules=new api.TaxRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.taxjar_accounts=new api.TaxjarAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.transactions=new api.Transactions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.voids=new api.Voids(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.webhooks=new api.Webhooks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.wire_transfers=new api.WireTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"))}get currentOrganization(){return __classPrivateFieldGet(this,_CommerceLayerClient_organization,"f")}config(t){!t||(t.organization&&__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.organization,"f"),__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").config(t))}resources(){return static_1.CommerceLayerStatic.resources()}isApiError(t){return static_1.CommerceLayerStatic.isApiError(t)}addRequestInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.request.use(t,s)}addResponseInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.response.use(t,s)}removeInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors[t].eject(s)}addRawResponseReader(){const t={id:void 0,rawResponse:void 0};function s(n){return t.rawResponse=n==null?void 0:n.data,n}const i=this.addResponseInterceptor(s);return t.id=i,t}removeRawResponseReader(t){const s=typeof t=="number"?t:t.id;if(s)return this.removeInterceptor("response",s)}}_CommerceLayerClient_adapter=new WeakMap,_CommerceLayerClient_organization=new WeakMap;const CommerceLayer=e=>new CommerceLayerClient(e);exports.default=CommerceLayer;
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,t,s,i){i===void 0&&(i=s),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[s]}})}:function(e,t,s,i){i===void 0&&(i=s),e[i]=t[s]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var s in e)s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)&&__createBinding(t,e,s);return __setModuleDefault(t,e),t},__classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,s,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,s):n?n.value=s:t.set(e,s),s},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,s,i){if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return s==="m"?i:s==="a"?i.call(e):i?i.value:t.get(e)},__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_CommerceLayerClient_adapter,_CommerceLayerClient_organization;Object.defineProperty(exports,"__esModule",{value:!0});const api=__importStar(require("./api")),static_1=require("./static"),resource_1=__importDefault(require("./resource")),OPEN_API_SCHEMA_VERSION="2.7.6";class CommerceLayerClient{constructor(t){_CommerceLayerClient_adapter.set(this,void 0),_CommerceLayerClient_organization.set(this,void 0),__classPrivateFieldSet(this,_CommerceLayerClient_adapter,new resource_1.default(t),"f"),__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.organization,"f"),this.addresses=new api.Addresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adjustments=new api.Adjustments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_gateways=new api.AdyenGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.adyen_payments=new api.AdyenPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.application=new api.Applications(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.attachments=new api.Attachments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.authorizations=new api.Authorizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.avalara_accounts=new api.AvalaraAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.billing_info_validation_rules=new api.BillingInfoValidationRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bing_geocoders=new api.BingGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_gateways=new api.BraintreeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.braintree_payments=new api.BraintreePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.bundles=new api.Bundles(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.captures=new api.Captures(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.carrier_accounts=new api.CarrierAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_gateways=new api.CheckoutComGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.checkout_com_payments=new api.CheckoutComPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupon_codes_promotion_rules=new api.CouponCodesPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupon_recipients=new api.CouponRecipients(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.coupons=new api.Coupons(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_addresses=new api.CustomerAddresses(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_groups=new api.CustomerGroups(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_password_resets=new api.CustomerPasswordResets(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_payment_sources=new api.CustomerPaymentSources(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customer_subscriptions=new api.CustomerSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.customers=new api.Customers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.delivery_lead_times=new api.DeliveryLeadTimes(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.event_callbacks=new api.EventCallbacks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_gateways=new api.ExternalGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_payments=new api.ExternalPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_promotions=new api.ExternalPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.external_tax_calculators=new api.ExternalTaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.fixed_amount_promotions=new api.FixedAmountPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.fixed_price_promotions=new api.FixedPricePromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.free_gift_promotions=new api.FreeGiftPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.free_shipping_promotions=new api.FreeShippingPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.geocoders=new api.Geocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.gift_card_recipients=new api.GiftCardRecipients(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.gift_cards=new api.GiftCards(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.google_geocoders=new api.GoogleGeocoders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.imports=new api.Imports(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.in_stock_subscriptions=new api.InStockSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_models=new api.InventoryModels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_return_locations=new api.InventoryReturnLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.inventory_stock_locations=new api.InventoryStockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.line_item_options=new api.LineItemOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.line_items=new api.LineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.manual_gateways=new api.ManualGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.manual_tax_calculators=new api.ManualTaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.markets=new api.Markets(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.merchants=new api.Merchants(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_amount_promotion_rules=new api.OrderAmountPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_copies=new api.OrderCopies(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_subscriptions=new api.OrderSubscriptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.order_validation_rules=new api.OrderValidationRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.orders=new api.Orders(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.organization=new api.Organizations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.packages=new api.Packages(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.parcel_line_items=new api.ParcelLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.parcels=new api.Parcels(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.payment_gateways=new api.PaymentGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.payment_methods=new api.PaymentMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.paypal_gateways=new api.PaypalGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.paypal_payments=new api.PaypalPayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.percentage_discount_promotions=new api.PercentageDiscountPromotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.price_lists=new api.PriceLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.prices=new api.Prices(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.promotion_rules=new api.PromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.promotions=new api.Promotions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.refunds=new api.Refunds(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.return_line_items=new api.ReturnLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.returns=new api.Returns(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipments=new api.Shipments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_categories=new api.ShippingCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_methods=new api.ShippingMethods(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.shipping_zones=new api.ShippingZones(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_list_items=new api.SkuListItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_list_promotion_rules=new api.SkuListPromotionRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_lists=new api.SkuLists(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.sku_options=new api.SkuOptions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.skus=new api.Skus(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_items=new api.StockItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_line_items=new api.StockLineItems(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_locations=new api.StockLocations(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stock_transfers=new api.StockTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stripe_gateways=new api.StripeGateways(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.stripe_payments=new api.StripePayments(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_calculators=new api.TaxCalculators(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_categories=new api.TaxCategories(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.tax_rules=new api.TaxRules(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.taxjar_accounts=new api.TaxjarAccounts(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.transactions=new api.Transactions(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.voids=new api.Voids(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.webhooks=new api.Webhooks(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f")),this.wire_transfers=new api.WireTransfers(__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f"))}static get openApiSchemaVersion(){return OPEN_API_SCHEMA_VERSION}get currentOrganization(){return __classPrivateFieldGet(this,_CommerceLayerClient_organization,"f")}config(t){!t||(t.organization&&__classPrivateFieldSet(this,_CommerceLayerClient_organization,t.organization,"f"),__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").config(t))}resources(){return static_1.CommerceLayerStatic.resources()}isApiError(t){return static_1.CommerceLayerStatic.isApiError(t)}addRequestInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.request.use(t,s)}addResponseInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.response.use(t,s)}removeInterceptor(t,s){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors[t].eject(s)}addRawResponseReader(){const t={id:void 0,rawResponse:void 0};function s(n){return t.rawResponse=n==null?void 0:n.data,n}const i=this.addResponseInterceptor(s);return t.id=i,t}removeRawResponseReader(t){const s=typeof t=="number"?t:t.id;if(s)return this.removeInterceptor("response",s)}}_CommerceLayerClient_adapter=new WeakMap,_CommerceLayerClient_organization=new WeakMap;const CommerceLayer=e=>new CommerceLayerClient(e);exports.default=CommerceLayer;
@@ -1,7 +1,5 @@
1
- import { Value } from 'json-typescript';
2
1
  import { DocWithData, ResourceObject } from 'jsonapi-typescript';
3
2
  import type { ResourceCreate, ResourceUpdate, ResourceId, ResourceType, Resource } from './resource';
4
- export type { DocWithData, Value as JSONValue };
5
3
  declare const denormalize: <R extends Resource>(response: DocWithData) => R | R[];
6
4
  declare const normalize: (resource: (ResourceCreate & ResourceType) | (ResourceUpdate & ResourceId)) => ResourceObject;
7
5
  export { denormalize, normalize };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.normalize=exports.denormalize=void 0;const common_1=require("./common"),denormalize=e=>{let i;e.links&&delete e.links;const t=e.data,n=e.included;return Array.isArray(t)?i=t.map(s=>denormalizeResource(s,n)):i=denormalizeResource(t,n),i};exports.denormalize=denormalize;const findIncluded=(e,i=[])=>i.find(t=>e.id===t.id&&e.type===t.type)||e,denormalizeResource=(e,i)=>{const t=Object.assign({id:e.id,type:e.type},e.attributes);return e.relationships&&Object.keys(e.relationships).forEach(n=>{const s=e.relationships[n].data;s?Array.isArray(s)?t[n]=s.map(o=>denormalizeResource(findIncluded(o,i),i)):t[n]=denormalizeResource(findIncluded(s,i),i):s===null&&(t[n]=null)}),t},normalize=e=>{const i={},t={};for(const s in e){if(["type","id"].includes(s))continue;const o=e[s];o&&((0,common_1.isResourceId)(o)||Array.isArray(o)&&(0,common_1.isResourceId)(o[0]))?t[s]={data:o}:i[s]=o}const n={type:e.type,attributes:i,relationships:t};return(0,common_1.isResourceId)(e)&&(n.id=e.id),n};exports.normalize=normalize;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.normalize=exports.denormalize=void 0;const common_1=require("./common"),denormalize=e=>{let t;e.links&&delete e.links;const r=e.data,i=e.included;return Array.isArray(r)?t=r.map(s=>denormalizeResource(s,i)):t=denormalizeResource(r,i),t};exports.denormalize=denormalize;const findIncluded=(e,t=[])=>t.find(r=>e.id===r.id&&e.type===r.type)||e,denormalizeResource=(e,t)=>{const r=Object.assign({id:e.id,type:e.type},e.attributes);return e.relationships&&Object.keys(e.relationships).forEach(i=>{const s=e.relationships[i].data;s?Array.isArray(s)?r[i]=s.map(n=>denormalizeResource(findIncluded(n,t),t)):r[i]=denormalizeResource(findIncluded(s,t),t):s===null&&(r[i]=null)}),r},normalize=e=>{const t={},r={};for(const s in e){if(["type","id"].includes(s))continue;const n=e[s];n&&((0,common_1.isResourceId)(n)||Array.isArray(n)&&(0,common_1.isResourceId)(n[0]))?r[s]={data:n}:t[s]=n}const i={type:e.type,attributes:t,relationships:r};return(0,common_1.isResourceId)(e)&&(i.id=e.id),i};exports.normalize=normalize;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
3
+ * OpenAPI schema, version 2.7.6
4
4
  **/
5
5
  export type { Address, AddressCreate, AddressUpdate } from './resources/addresses';
6
6
  export type { Adjustment, AdjustmentCreate, AdjustmentUpdate } from './resources/adjustments';
@@ -62,7 +62,7 @@ export type { Organization } from './resources/organization';
62
62
  export type { Package, PackageCreate, PackageUpdate } from './resources/packages';
63
63
  export type { ParcelLineItem, ParcelLineItemCreate, ParcelLineItemUpdate } from './resources/parcel_line_items';
64
64
  export type { Parcel, ParcelCreate, ParcelUpdate } from './resources/parcels';
65
- export type { PaymentGateway, PaymentGatewayCreate, PaymentGatewayUpdate } from './resources/payment_gateways';
65
+ export type { PaymentGateway } from './resources/payment_gateways';
66
66
  export type { PaymentMethod, PaymentMethodCreate, PaymentMethodUpdate } from './resources/payment_methods';
67
67
  export type { PaypalGateway, PaypalGatewayCreate, PaypalGatewayUpdate } from './resources/paypal_gateways';
68
68
  export type { PaypalPayment, PaypalPaymentCreate, PaypalPaymentUpdate } from './resources/paypal_payments';
package/lib/cjs/query.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.generateQueryStringParams=void 0;const isParamsList=r=>r.filters||r.pageNumber||r.pageSize||r.sort,generateQueryStringParams=r=>{const e={};return r&&(r.include&&(e.include=r.include.join(",")),r.fields&&Object.entries(r.fields).forEach(([t,i])=>{e[`fields[${t}]`]=i.join(",")}),isParamsList(r)&&(r.sort&&(Array.isArray(r.sort)?e.sort=r.sort.join(","):e.sort=Object.entries(r.sort).map(([t,i])=>`${i==="desc"?"-":""}${t}`).join(",")),r.pageNumber&&(e["page[number]"]=String(r.pageNumber)),r.pageSize&&(e["page[size]"]=String(r.pageSize)),r.filters&&Object.entries(r.filters).forEach(([t,i])=>{e[`filter[q][${t}]`]=String(i)}))),e};exports.generateQueryStringParams=generateQueryStringParams;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.generateQueryStringParams=void 0;const isParamsList=e=>e.filters||e.pageNumber||e.pageSize||e.sort,generateQueryStringParams=e=>{const t={};return e&&(e.include&&(t.include=e.include.join(",")),e.fields&&Object.entries(e.fields).forEach(([i,s])=>{t[`fields[${i}]`]=s.join(",")}),isParamsList(e)&&(e.sort&&(Array.isArray(e.sort)?t.sort=e.sort.join(","):t.sort=Object.entries(e.sort).map(([i,s])=>`${s==="desc"?"-":""}${i}`).join(",")),e.pageNumber&&(t["page[number]"]=String(e.pageNumber)),e.pageSize&&(t["page[size]"]=String(e.pageSize)),e.filters&&Object.entries(e.filters).forEach(([i,s])=>{t[`filter[q][${i}]`]=String(s)}))),t};exports.generateQueryStringParams=generateQueryStringParams;
@@ -1,8 +1,8 @@
1
1
  import { ApiClientConfig, ApiClientInitConfig } from './client';
2
- import { JSONValue } from './jsonapi';
3
2
  import { QueryParamsRetrieve, QueryParamsList } from './query';
4
3
  import { ResourceTypeLock } from './api';
5
4
  import { InterceptorManager } from './interceptor';
5
+ import { Value as JSONValue } from 'json-typescript';
6
6
  declare type Metadata = {
7
7
  [key: string]: JSONValue;
8
8
  };
@@ -1 +1 @@
1
- "use strict";var __classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(s,t,r,e,i){if(e==="m")throw new TypeError("Private method is not writable");if(e==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?s!==t||!i:!t.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e==="a"?i.call(s,r):i?i.value=r:t.set(s,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(s,t,r,e){if(r==="a"&&!e)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?s!==t||!e:!t.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?e:r==="a"?e.call(s):e?e.value:t.get(s)},__importDefault=this&&this.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},_ResourceAdapter_client,_ResourceAdapter_config;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApiResource=void 0;const client_1=__importDefault(require("./client")),jsonapi_1=require("./jsonapi"),query_1=require("./query"),config_1=__importDefault(require("./config"));class ListResponse extends Array{constructor(t,r){super(...r||[]);this.meta=t}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(t){return this.length&&t>=0?this[t]:void 0}}class ResourceAdapter{constructor(t){_ResourceAdapter_client.set(this,void 0),_ResourceAdapter_config.set(this,{}),__classPrivateFieldSet(this,_ResourceAdapter_client,client_1.default.create(t),"f"),this.config(t)}get interceptors(){return __classPrivateFieldGet(this,_ResourceAdapter_client,"f").interceptors}config(t){!t||__classPrivateFieldGet(this,_ResourceAdapter_client,"f").config(t)}async singleton(t,r,e){const i=(0,query_1.generateQueryStringParams)(r);(e==null?void 0:e.params)&&Object.assign(i,e==null?void 0:e.params);const a=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("get",`${t.type}`,void 0,Object.assign(Object.assign({},e),{params:i}));return(0,jsonapi_1.denormalize)(a)}async retrieve(t,r,e){const i=(0,query_1.generateQueryStringParams)(r);(e==null?void 0:e.params)&&Object.assign(i,e==null?void 0:e.params);const a=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("get",`${t.type}/${t.id}`,void 0,Object.assign(Object.assign({},e),{params:i}));return(0,jsonapi_1.denormalize)(a)}async list(t,r,e){var i,a;const n=(0,query_1.generateQueryStringParams)(r);(e==null?void 0:e.params)&&Object.assign(n,e==null?void 0:e.params);const o=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("get",`${t.type}`,void 0,Object.assign(Object.assign({},e),{params:n})),c=(0,jsonapi_1.denormalize)(o),u={pageCount:Number((i=o.meta)===null||i===void 0?void 0:i.page_count),recordCount:Number((a=o.meta)===null||a===void 0?void 0:a.record_count),currentPage:(r==null?void 0:r.pageNumber)||config_1.default.default.pageNumber,recordsPerPage:(r==null?void 0:r.pageSize)||config_1.default.default.pageSize};return new ListResponse(u,c)}async create(t,r,e){const i=(0,query_1.generateQueryStringParams)(r);(e==null?void 0:e.params)&&Object.assign(i,e==null?void 0:e.params);const a=(0,jsonapi_1.normalize)(t),n=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("post",t.type,a,Object.assign(Object.assign({},e),{params:i}));return(0,jsonapi_1.denormalize)(n)}async update(t,r,e){const i=(0,query_1.generateQueryStringParams)(r);(e==null?void 0:e.params)&&Object.assign(i,e==null?void 0:e.params);const a=(0,jsonapi_1.normalize)(t),n=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("patch",`${t.type}/${t.id}`,a,Object.assign(Object.assign({},e),{params:i}));return(0,jsonapi_1.denormalize)(n)}async delete(t,r){await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("delete",`${t.type}/${t.id}`,void 0,r)}}_ResourceAdapter_client=new WeakMap,_ResourceAdapter_config=new WeakMap;class ApiResource{constructor(t){this.resources=t}}exports.ApiResource=ApiResource,exports.default=ResourceAdapter;
1
+ "use strict";var __classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(i,t,r,e,a){if(e==="m")throw new TypeError("Private method is not writable");if(e==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?i!==t||!a:!t.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e==="a"?a.call(i,r):a?a.value=r:t.set(i,r),r},__classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(i,t,r,e){if(r==="a"&&!e)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?i!==t||!e:!t.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?e:r==="a"?e.call(i):e?e.value:t.get(i)},__importDefault=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},_ResourceAdapter_client,_ResourceAdapter_config;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ApiResource=void 0;const client_1=__importDefault(require("./client")),jsonapi_1=require("./jsonapi"),query_1=require("./query"),config_1=__importDefault(require("./config"));class ListResponse extends Array{constructor(t,r){super(...r||[]);this.meta=t}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(t){return this.length&&t>=0?this[t]:void 0}}class ResourceAdapter{constructor(t){_ResourceAdapter_client.set(this,void 0),_ResourceAdapter_config.set(this,{}),__classPrivateFieldSet(this,_ResourceAdapter_client,client_1.default.create(t),"f"),this.config(t)}get interceptors(){return __classPrivateFieldGet(this,_ResourceAdapter_client,"f").interceptors}config(t){!t||__classPrivateFieldGet(this,_ResourceAdapter_client,"f").config(t)}async singleton(t,r,e){const a=(0,query_1.generateQueryStringParams)(r);(e==null?void 0:e.params)&&Object.assign(a,e==null?void 0:e.params);const s=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("get",`${t.type}`,void 0,Object.assign(Object.assign({},e),{params:a}));return(0,jsonapi_1.denormalize)(s)}async retrieve(t,r,e){const a=(0,query_1.generateQueryStringParams)(r);(e==null?void 0:e.params)&&Object.assign(a,e==null?void 0:e.params);const s=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("get",`${t.type}/${t.id}`,void 0,Object.assign(Object.assign({},e),{params:a}));return(0,jsonapi_1.denormalize)(s)}async list(t,r,e){var a,s;const n=(0,query_1.generateQueryStringParams)(r);(e==null?void 0:e.params)&&Object.assign(n,e==null?void 0:e.params);const o=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("get",`${t.type}`,void 0,Object.assign(Object.assign({},e),{params:n})),c=(0,jsonapi_1.denormalize)(o),u={pageCount:Number((a=o.meta)===null||a===void 0?void 0:a.page_count),recordCount:Number((s=o.meta)===null||s===void 0?void 0:s.record_count),currentPage:(r==null?void 0:r.pageNumber)||config_1.default.default.pageNumber,recordsPerPage:(r==null?void 0:r.pageSize)||config_1.default.default.pageSize};return new ListResponse(u,c)}async create(t,r,e){const a=(0,query_1.generateQueryStringParams)(r);(e==null?void 0:e.params)&&Object.assign(a,e==null?void 0:e.params);const s=(0,jsonapi_1.normalize)(t),n=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("post",t.type,s,Object.assign(Object.assign({},e),{params:a}));return(0,jsonapi_1.denormalize)(n)}async update(t,r,e){const a=(0,query_1.generateQueryStringParams)(r);(e==null?void 0:e.params)&&Object.assign(a,e==null?void 0:e.params);const s=(0,jsonapi_1.normalize)(t),n=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("patch",`${t.type}/${t.id}`,s,Object.assign(Object.assign({},e),{params:a}));return(0,jsonapi_1.denormalize)(n)}async delete(t,r){await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("delete",`${t.type}/${t.id}`,void 0,r)}}_ResourceAdapter_client=new WeakMap,_ResourceAdapter_config=new WeakMap;class ApiResource{constructor(t){this.resources=t}}exports.ApiResource=ApiResource,exports.default=ResourceAdapter;
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Geocoder } from './geocoders';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  declare type AdjustmentRel = ResourceId & {
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { PaymentMethod } from './payment_methods';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Order } from './orders';
@@ -28,7 +24,6 @@ interface AdyenPaymentUpdate extends ResourceUpdate {
28
24
  payment_request_data?: object;
29
25
  payment_request_details?: object;
30
26
  payment_response?: object;
31
- _authorize?: boolean;
32
27
  _details?: boolean;
33
28
  order?: OrderRel;
34
29
  }
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourcesConfig, ResourceId } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsRetrieve } from '../query';
7
3
  declare type ApplicationRel = ResourceId & {
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Bundle } from './bundles';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Order } from './orders';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { TaxCategory } from './tax_categories';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Market } from './markets';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Address } from './addresses';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { PaymentMethod } from './payment_methods';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Order } from './orders';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Market } from './markets';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Order } from './orders';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Market } from './markets';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { PaymentMethod } from './payment_methods';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Order } from './orders';
@@ -33,7 +29,6 @@ interface CheckoutComPaymentUpdate extends ResourceUpdate {
33
29
  payment_type?: string;
34
30
  token?: string;
35
31
  session_id?: string;
36
- _authorize?: boolean;
37
32
  _details?: boolean;
38
33
  _refresh?: boolean;
39
34
  order?: OrderRel;
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { PercentageDiscountPromotion } from './percentage_discount_promotions';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Customer } from './customers';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
@@ -13,6 +9,7 @@ declare type CouponCodesPromotionRuleRel = ResourceId & {
13
9
  };
14
10
  interface Coupon extends Resource {
15
11
  code?: string;
12
+ customer_single_use?: boolean;
16
13
  usage_limit?: number;
17
14
  usage_count?: number;
18
15
  recipient_email?: string;
@@ -20,12 +17,14 @@ interface Coupon extends Resource {
20
17
  }
21
18
  interface CouponCreate extends ResourceCreate {
22
19
  code: string;
20
+ customer_single_use?: boolean;
23
21
  usage_limit: number;
24
22
  recipient_email?: string;
25
23
  promotion_rule?: CouponCodesPromotionRuleRel;
26
24
  }
27
25
  interface CouponUpdate extends ResourceUpdate {
28
26
  code?: string;
27
+ customer_single_use?: boolean;
29
28
  usage_limit?: number;
30
29
  recipient_email?: string;
31
30
  promotion_rule?: CouponCodesPromotionRuleRel;
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Customer } from './customers';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Customer } from './customers';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Customer } from './customers';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Customer } from './customers';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Customer } from './customers';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { CustomerGroup } from './customer_groups';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { StockLocation } from './stock_locations';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Webhook } from './webhooks';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { PaymentMethod } from './payment_methods';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Order } from './orders';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Market } from './markets';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { TaxCategory } from './tax_categories';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Market } from './markets';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Market } from './markets';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Market } from './markets';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Market } from './markets';
@@ -1,9 +1,5 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
- import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList } from '../query';
2
+ import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Address } from './addresses';
8
4
  import { Attachment } from './attachments';
9
5
  declare type GeocoderRel = ResourceId & {
@@ -17,6 +13,7 @@ interface Geocoder extends Resource {
17
13
  declare class Geocoders extends ApiResource {
18
14
  static readonly TYPE: 'geocoders';
19
15
  list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Geocoder>>;
16
+ retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Geocoder>;
20
17
  isGeocoder(resource: any): resource is Geocoder;
21
18
  relationship(id: string | ResourceId): GeocoderRel;
22
19
  type(): string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Geocoders extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Geocoders.TYPE},e,t)}isGeocoder(e){return e.type&&e.type===Geocoders.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Geocoders.TYPE}:{id:e.id,type:Geocoders.TYPE}}type(){return Geocoders.TYPE}}Geocoders.TYPE="geocoders",exports.default=Geocoders;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class Geocoders extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:Geocoders.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:Geocoders.TYPE,id:e},t,r)}isGeocoder(e){return e.type&&e.type===Geocoders.TYPE}relationship(e){return typeof e=="string"?{id:e,type:Geocoders.TYPE}:{id:e.id,type:Geocoders.TYPE}}type(){return Geocoders.TYPE}}Geocoders.TYPE="geocoders",exports.default=Geocoders;
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Customer } from './customers';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Market } from './markets';
@@ -1,7 +1,3 @@
1
- /**
2
- * ©2021 Commerce Layer Inc.
3
- * Source code generated automatically by SDK codegen from OpenAPI schema 2.7.4
4
- **/
5
1
  import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ListResponse } from '../resource';
6
2
  import { /* QueryBuilderRetrieve, QueryBuilderList, */ QueryParamsList, QueryParamsRetrieve } from '../query';
7
3
  import { Address } from './addresses';