@commercelayer/sdk 2.3.11 → 2.3.12

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 (217) hide show
  1. package/lib/cjs/api.js +1 -1
  2. package/lib/cjs/client.js +1 -1
  3. package/lib/cjs/commercelayer.js +1 -1
  4. package/lib/cjs/common.js +1 -1
  5. package/lib/cjs/config.js +1 -1
  6. package/lib/cjs/error.js +1 -1
  7. package/lib/cjs/index.js +1 -1
  8. package/lib/cjs/interceptor.js +1 -1
  9. package/lib/cjs/jsonapi.js +1 -1
  10. package/lib/cjs/model.js +1 -1
  11. package/lib/cjs/query.js +1 -1
  12. package/lib/cjs/resource.js +1 -1
  13. package/lib/cjs/resources/addresses.js +1 -1
  14. package/lib/cjs/resources/adjustments.js +1 -1
  15. package/lib/cjs/resources/adyen_gateways.js +1 -1
  16. package/lib/cjs/resources/adyen_payments.js +1 -1
  17. package/lib/cjs/resources/application.js +1 -1
  18. package/lib/cjs/resources/attachments.js +1 -1
  19. package/lib/cjs/resources/authorizations.js +1 -1
  20. package/lib/cjs/resources/avalara_accounts.js +1 -1
  21. package/lib/cjs/resources/billing_info_validation_rules.js +1 -1
  22. package/lib/cjs/resources/bing_geocoders.js +1 -1
  23. package/lib/cjs/resources/braintree_gateways.js +1 -1
  24. package/lib/cjs/resources/braintree_payments.js +1 -1
  25. package/lib/cjs/resources/bundles.js +1 -1
  26. package/lib/cjs/resources/captures.js +1 -1
  27. package/lib/cjs/resources/carrier_accounts.js +1 -1
  28. package/lib/cjs/resources/checkout_com_gateways.js +1 -1
  29. package/lib/cjs/resources/checkout_com_payments.js +1 -1
  30. package/lib/cjs/resources/coupon_codes_promotion_rules.js +1 -1
  31. package/lib/cjs/resources/coupon_recipients.js +1 -1
  32. package/lib/cjs/resources/coupons.js +1 -1
  33. package/lib/cjs/resources/customer_addresses.js +1 -1
  34. package/lib/cjs/resources/customer_groups.js +1 -1
  35. package/lib/cjs/resources/customer_password_resets.js +1 -1
  36. package/lib/cjs/resources/customer_payment_sources.js +1 -1
  37. package/lib/cjs/resources/customer_subscriptions.js +1 -1
  38. package/lib/cjs/resources/customers.js +1 -1
  39. package/lib/cjs/resources/delivery_lead_times.js +1 -1
  40. package/lib/cjs/resources/event_callbacks.js +1 -1
  41. package/lib/cjs/resources/external_gateways.js +1 -1
  42. package/lib/cjs/resources/external_payments.js +1 -1
  43. package/lib/cjs/resources/external_promotions.js +1 -1
  44. package/lib/cjs/resources/external_tax_calculators.js +1 -1
  45. package/lib/cjs/resources/fixed_amount_promotions.js +1 -1
  46. package/lib/cjs/resources/fixed_price_promotions.js +1 -1
  47. package/lib/cjs/resources/free_gift_promotions.js +1 -1
  48. package/lib/cjs/resources/free_shipping_promotions.js +1 -1
  49. package/lib/cjs/resources/geocoders.js +1 -1
  50. package/lib/cjs/resources/gift_card_recipients.js +1 -1
  51. package/lib/cjs/resources/gift_cards.js +1 -1
  52. package/lib/cjs/resources/google_geocoders.js +1 -1
  53. package/lib/cjs/resources/imports.js +1 -1
  54. package/lib/cjs/resources/in_stock_subscriptions.js +1 -1
  55. package/lib/cjs/resources/inventory_models.js +1 -1
  56. package/lib/cjs/resources/inventory_return_locations.js +1 -1
  57. package/lib/cjs/resources/inventory_stock_locations.js +1 -1
  58. package/lib/cjs/resources/line_item_options.js +1 -1
  59. package/lib/cjs/resources/line_items.js +1 -1
  60. package/lib/cjs/resources/manual_gateways.js +1 -1
  61. package/lib/cjs/resources/manual_tax_calculators.js +1 -1
  62. package/lib/cjs/resources/markets.js +1 -1
  63. package/lib/cjs/resources/merchants.js +1 -1
  64. package/lib/cjs/resources/order_amount_promotion_rules.js +1 -1
  65. package/lib/cjs/resources/order_copies.js +1 -1
  66. package/lib/cjs/resources/order_subscriptions.js +1 -1
  67. package/lib/cjs/resources/order_validation_rules.js +1 -1
  68. package/lib/cjs/resources/orders.js +1 -1
  69. package/lib/cjs/resources/organization.js +1 -1
  70. package/lib/cjs/resources/packages.js +1 -1
  71. package/lib/cjs/resources/parcel_line_items.js +1 -1
  72. package/lib/cjs/resources/parcels.js +1 -1
  73. package/lib/cjs/resources/payment_gateways.js +1 -1
  74. package/lib/cjs/resources/payment_methods.js +1 -1
  75. package/lib/cjs/resources/paypal_gateways.js +1 -1
  76. package/lib/cjs/resources/paypal_payments.js +1 -1
  77. package/lib/cjs/resources/percentage_discount_promotions.js +1 -1
  78. package/lib/cjs/resources/price_lists.js +1 -1
  79. package/lib/cjs/resources/prices.js +1 -1
  80. package/lib/cjs/resources/promotion_rules.js +1 -1
  81. package/lib/cjs/resources/promotions.js +1 -1
  82. package/lib/cjs/resources/refunds.js +1 -1
  83. package/lib/cjs/resources/return_line_items.js +1 -1
  84. package/lib/cjs/resources/returns.js +1 -1
  85. package/lib/cjs/resources/shipments.js +1 -1
  86. package/lib/cjs/resources/shipping_categories.js +1 -1
  87. package/lib/cjs/resources/shipping_methods.js +1 -1
  88. package/lib/cjs/resources/shipping_zones.js +1 -1
  89. package/lib/cjs/resources/sku_list_items.js +1 -1
  90. package/lib/cjs/resources/sku_list_promotion_rules.js +1 -1
  91. package/lib/cjs/resources/sku_lists.js +1 -1
  92. package/lib/cjs/resources/sku_options.js +1 -1
  93. package/lib/cjs/resources/skus.js +1 -1
  94. package/lib/cjs/resources/stock_items.js +1 -1
  95. package/lib/cjs/resources/stock_line_items.js +1 -1
  96. package/lib/cjs/resources/stock_locations.js +1 -1
  97. package/lib/cjs/resources/stock_transfers.js +1 -1
  98. package/lib/cjs/resources/stripe_gateways.js +1 -1
  99. package/lib/cjs/resources/stripe_payments.js +1 -1
  100. package/lib/cjs/resources/tax_calculators.js +1 -1
  101. package/lib/cjs/resources/tax_categories.js +1 -1
  102. package/lib/cjs/resources/tax_rules.js +1 -1
  103. package/lib/cjs/resources/taxjar_accounts.js +1 -1
  104. package/lib/cjs/resources/transactions.js +1 -1
  105. package/lib/cjs/resources/voids.js +1 -1
  106. package/lib/cjs/resources/webhooks.js +1 -1
  107. package/lib/cjs/resources/wire_transfers.js +1 -1
  108. package/lib/cjs/static.js +1 -1
  109. package/lib/cjs/util.js +1 -1
  110. package/lib/esm/client.js +1 -1
  111. package/lib/esm/commercelayer.js +1 -1
  112. package/lib/esm/common.js +1 -1
  113. package/lib/esm/config.js +1 -1
  114. package/lib/esm/error.js +1 -1
  115. package/lib/esm/jsonapi.js +1 -1
  116. package/lib/esm/query.js +1 -1
  117. package/lib/esm/resource.js +1 -1
  118. package/lib/esm/resources/addresses.js +1 -1
  119. package/lib/esm/resources/adjustments.js +1 -1
  120. package/lib/esm/resources/adyen_gateways.js +1 -1
  121. package/lib/esm/resources/adyen_payments.js +1 -1
  122. package/lib/esm/resources/application.js +1 -1
  123. package/lib/esm/resources/attachments.js +1 -1
  124. package/lib/esm/resources/authorizations.js +1 -1
  125. package/lib/esm/resources/avalara_accounts.js +1 -1
  126. package/lib/esm/resources/billing_info_validation_rules.js +1 -1
  127. package/lib/esm/resources/bing_geocoders.js +1 -1
  128. package/lib/esm/resources/braintree_gateways.js +1 -1
  129. package/lib/esm/resources/braintree_payments.js +1 -1
  130. package/lib/esm/resources/bundles.js +1 -1
  131. package/lib/esm/resources/captures.js +1 -1
  132. package/lib/esm/resources/carrier_accounts.js +1 -1
  133. package/lib/esm/resources/checkout_com_gateways.js +1 -1
  134. package/lib/esm/resources/checkout_com_payments.js +1 -1
  135. package/lib/esm/resources/coupon_codes_promotion_rules.js +1 -1
  136. package/lib/esm/resources/coupon_recipients.js +1 -1
  137. package/lib/esm/resources/coupons.js +1 -1
  138. package/lib/esm/resources/customer_addresses.js +1 -1
  139. package/lib/esm/resources/customer_groups.js +1 -1
  140. package/lib/esm/resources/customer_password_resets.js +1 -1
  141. package/lib/esm/resources/customer_payment_sources.js +1 -1
  142. package/lib/esm/resources/customer_subscriptions.js +1 -1
  143. package/lib/esm/resources/customers.js +1 -1
  144. package/lib/esm/resources/delivery_lead_times.js +1 -1
  145. package/lib/esm/resources/event_callbacks.js +1 -1
  146. package/lib/esm/resources/external_gateways.js +1 -1
  147. package/lib/esm/resources/external_payments.js +1 -1
  148. package/lib/esm/resources/external_promotions.js +1 -1
  149. package/lib/esm/resources/external_tax_calculators.js +1 -1
  150. package/lib/esm/resources/fixed_amount_promotions.js +1 -1
  151. package/lib/esm/resources/fixed_price_promotions.js +1 -1
  152. package/lib/esm/resources/free_gift_promotions.js +1 -1
  153. package/lib/esm/resources/free_shipping_promotions.js +1 -1
  154. package/lib/esm/resources/geocoders.js +1 -1
  155. package/lib/esm/resources/gift_card_recipients.js +1 -1
  156. package/lib/esm/resources/gift_cards.js +1 -1
  157. package/lib/esm/resources/google_geocoders.js +1 -1
  158. package/lib/esm/resources/imports.js +1 -1
  159. package/lib/esm/resources/in_stock_subscriptions.js +1 -1
  160. package/lib/esm/resources/inventory_models.js +1 -1
  161. package/lib/esm/resources/inventory_return_locations.js +1 -1
  162. package/lib/esm/resources/inventory_stock_locations.js +1 -1
  163. package/lib/esm/resources/line_item_options.js +1 -1
  164. package/lib/esm/resources/line_items.js +1 -1
  165. package/lib/esm/resources/manual_gateways.js +1 -1
  166. package/lib/esm/resources/manual_tax_calculators.js +1 -1
  167. package/lib/esm/resources/markets.js +1 -1
  168. package/lib/esm/resources/merchants.js +1 -1
  169. package/lib/esm/resources/order_amount_promotion_rules.js +1 -1
  170. package/lib/esm/resources/order_copies.js +1 -1
  171. package/lib/esm/resources/order_subscriptions.js +1 -1
  172. package/lib/esm/resources/order_validation_rules.js +1 -1
  173. package/lib/esm/resources/orders.js +1 -1
  174. package/lib/esm/resources/organization.js +1 -1
  175. package/lib/esm/resources/packages.js +1 -1
  176. package/lib/esm/resources/parcel_line_items.js +1 -1
  177. package/lib/esm/resources/parcels.js +1 -1
  178. package/lib/esm/resources/payment_gateways.js +1 -1
  179. package/lib/esm/resources/payment_methods.js +1 -1
  180. package/lib/esm/resources/paypal_gateways.js +1 -1
  181. package/lib/esm/resources/paypal_payments.js +1 -1
  182. package/lib/esm/resources/percentage_discount_promotions.js +1 -1
  183. package/lib/esm/resources/price_lists.js +1 -1
  184. package/lib/esm/resources/prices.js +1 -1
  185. package/lib/esm/resources/promotion_rules.js +1 -1
  186. package/lib/esm/resources/promotions.js +1 -1
  187. package/lib/esm/resources/refunds.js +1 -1
  188. package/lib/esm/resources/return_line_items.js +1 -1
  189. package/lib/esm/resources/returns.js +1 -1
  190. package/lib/esm/resources/shipments.js +1 -1
  191. package/lib/esm/resources/shipping_categories.js +1 -1
  192. package/lib/esm/resources/shipping_methods.js +1 -1
  193. package/lib/esm/resources/shipping_zones.js +1 -1
  194. package/lib/esm/resources/sku_list_items.js +1 -1
  195. package/lib/esm/resources/sku_list_promotion_rules.js +1 -1
  196. package/lib/esm/resources/sku_lists.js +1 -1
  197. package/lib/esm/resources/sku_options.js +1 -1
  198. package/lib/esm/resources/skus.js +1 -1
  199. package/lib/esm/resources/stock_items.js +1 -1
  200. package/lib/esm/resources/stock_line_items.js +1 -1
  201. package/lib/esm/resources/stock_locations.js +1 -1
  202. package/lib/esm/resources/stock_transfers.js +1 -1
  203. package/lib/esm/resources/stripe_gateways.js +1 -1
  204. package/lib/esm/resources/stripe_payments.js +1 -1
  205. package/lib/esm/resources/tax_calculators.js +1 -1
  206. package/lib/esm/resources/tax_categories.js +1 -1
  207. package/lib/esm/resources/tax_rules.js +1 -1
  208. package/lib/esm/resources/taxjar_accounts.js +1 -1
  209. package/lib/esm/resources/transactions.js +1 -1
  210. package/lib/esm/resources/voids.js +1 -1
  211. package/lib/esm/resources/webhooks.js +1 -1
  212. package/lib/esm/resources/wire_transfers.js +1 -1
  213. package/lib/esm/static.js +1 -1
  214. package/lib/esm/util.js +1 -1
  215. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  216. package/lib/tsconfig.tsbuildinfo +1 -1
  217. package/package.json +3 -2
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});const resource_1=require("../resource");class WireTransfers extends resource_1.ApiResource{async list(e,r){return this.resources.list({type:WireTransfers.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:WireTransfers.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:WireTransfers.TYPE,id:e},r)}isWireTransfer(e){return e.type&&e.type===WireTransfers.TYPE}relationship(e){return typeof e==="string"?{id:e,type:WireTransfers.TYPE}:{id:e.id,type:WireTransfers.TYPE}}type(){return WireTransfers.TYPE}}WireTransfers.TYPE="wire_transfers";exports.default=WireTransfers;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const resource_1=require("../resource");class WireTransfers extends resource_1.ApiResource{async list(e,t){return this.resources.list({type:WireTransfers.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:WireTransfers.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:WireTransfers.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:WireTransfers.TYPE,id:e},t)}isWireTransfer(e){return e.type&&e.type===WireTransfers.TYPE}relationship(e){return typeof e=="string"?{id:e,type:WireTransfers.TYPE}:{id:e.id,type:WireTransfers.TYPE}}type(){return WireTransfers.TYPE}}WireTransfers.TYPE="wire_transfers",exports.default=WireTransfers;
package/lib/cjs/static.js CHANGED
@@ -1 +1 @@
1
- "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(e,r,t,i){if(i===undefined)i=t;Object.defineProperty(e,i,{enumerable:true,get:function(){return r[t]}})}:function(e,r,t,i){if(i===undefined)i=t;e[i]=r[t]});var __setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:true,value:r})}:function(e,r){e["default"]=r});var __importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)if(t!=="default"&&Object.prototype.hasOwnProperty.call(e,t))__createBinding(r,e,t);__setModuleDefault(r,e);return r};Object.defineProperty(exports,"__esModule",{value:true});exports.CommerceLayerStatic=void 0;const api=__importStar(require("./api"));const error_1=require("./error");exports.CommerceLayerStatic={resources:()=>api.resourceList,isSdkError:e=>error_1.SdkError.isSdkError(e),isApiError:e=>error_1.ApiError.isApiError(e)};
1
+ "use strict";var __createBinding=this&&this.__createBinding||(Object.create?function(r,e,t,i){i===void 0&&(i=t),Object.defineProperty(r,i,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),__importStar=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&__createBinding(e,r,t);return __setModuleDefault(e,r),e};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CommerceLayerStatic=void 0;const api=__importStar(require("./api")),error_1=require("./error");exports.CommerceLayerStatic={resources:()=>api.resourceList,isSdkError:r=>error_1.SdkError.isSdkError(r),isApiError:r=>error_1.ApiError.isApiError(r)};
package/lib/cjs/util.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.sleep=void 0;const sleep=async e=>new Promise((s=>setTimeout(s,e)));exports.sleep=sleep;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.sleep=void 0;const sleep=async e=>new Promise(s=>setTimeout(s,e));exports.sleep=sleep;
package/lib/esm/client.js CHANGED
@@ -1 +1 @@
1
- var __classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,i,r,s){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?s.call(e,i):s?s.value=i:t.set(e,i),i};var __classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,i,r){if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t==="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?r:i==="a"?r.call(e):r?r.value:t.get(e)};var _ApiClient_accessToken,_ApiClient_client;import axios from"axios";import{SdkError,ApiError,ErrorType}from"./error";import config from"./config";const baseURL=(e,t)=>`https://${e.toLowerCase()}.${t?t:config.default.domain}/api`;const handleError=e=>{let t=new SdkError({message:e.message,type:ErrorType.GENERIC});if(axios.isAxiosError(e)){if(e.response){const i=new ApiError(t);i.type=ErrorType.RESPONSE;i.status=e.response.status;i.code=String(i.status);i.errors=e.response.data.errors;t=i}else if(e.request){t.type=ErrorType.REQUEST;t.request=e.request}else{t.type=ErrorType.CLIENT}}else if(axios.isCancel(e))t.type=ErrorType.CANCEL;else t.source=e;throw t};class ApiClient{constructor(e){_ApiClient_accessToken.set(this,void 0);_ApiClient_client.set(this,void 0);this.baseUrl=baseURL(e.organization,e.domain);__classPrivateFieldSet(this,_ApiClient_accessToken,e.accessToken,"f");const t={timeout:e.timeout||config.client.timeout};__classPrivateFieldSet(this,_ApiClient_client,axios.create(Object.assign({baseURL:this.baseUrl,timeout:config.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+__classPrivateFieldGet(this,_ApiClient_accessToken,"f")}},t)),"f");this.interceptors=__classPrivateFieldGet(this,_ApiClient_client,"f").interceptors}static create(e){if(!(e===null||e===void 0?void 0:e.organization))throw new Error("Undefined 'organization' parameter");if(!(e===null||e===void 0?void 0:e.accessToken))throw new Error("Undefined 'accessToken' parameter");return new ApiClient(e)}config(e){const t=__classPrivateFieldGet(this,_ApiClient_client,"f").defaults;if(e.timeout)t.timeout=e.timeout;if(e.organization)this.baseUrl=baseURL(e.organization,e.domain);if(e.accessToken)__classPrivateFieldSet(this,_ApiClient_accessToken,e.accessToken,"f")}async request(e,t,i,r){const s=i?{data:i}:undefined;const o=t;const a=(r===null||r===void 0?void 0:r.organization)?baseURL(r.organization,r.domain):undefined;const n=(r===null||r===void 0?void 0:r.accessToken)?{Authorization:"Bearer "+r.accessToken}:undefined;return __classPrivateFieldGet(this,_ApiClient_client,"f").request(Object.assign({method:e,baseURL:a,url:o,data:s,headers:n},r)).then((e=>e.data)).catch((e=>handleError(e)))}}_ApiClient_accessToken=new WeakMap,_ApiClient_client=new WeakMap;export default ApiClient;
1
+ var h=this&&this.__classPrivateFieldSet||function(t,e,o,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,o):i?i.value=o:e.set(t,o),o},c=this&&this.__classPrivateFieldGet||function(t,e,o,r){if(o==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?r:o==="a"?r.call(t):r?r.value:e.get(t)},a,s;import u from"axios";import{SdkError as g,ApiError as T,ErrorType as n}from"./error";import l from"./config";const p=(t,e)=>`https://${t.toLowerCase()}.${e||l.default.domain}/api`,y=t=>{let e=new g({message:t.message,type:n.GENERIC});if(u.isAxiosError(t))if(t.response){const o=new T(e);o.type=n.RESPONSE,o.status=t.response.status,o.code=String(o.status),o.errors=t.response.data.errors,e=o}else t.request?(e.type=n.REQUEST,e.request=t.request):e.type=n.CLIENT;else u.isCancel(t)?e.type=n.CANCEL:e.source=t;throw e};class f{constructor(e){a.set(this,void 0),s.set(this,void 0),this.baseUrl=p(e.organization,e.domain),h(this,a,e.accessToken,"f");const o={timeout:e.timeout||l.client.timeout};h(this,s,u.create(Object.assign({baseURL:this.baseUrl,timeout:l.client.timeout,headers:{Accept:"application/vnd.api+json","Content-Type":"application/vnd.api+json",Authorization:"Bearer "+c(this,a,"f")}},o)),"f"),this.interceptors=c(this,s,"f").interceptors}static create(e){if(!(e==null?void 0:e.organization))throw new Error("Undefined 'organization' parameter");if(!(e==null?void 0:e.accessToken))throw new Error("Undefined 'accessToken' parameter");return new f(e)}config(e){const o=c(this,s,"f").defaults;e.timeout&&(o.timeout=e.timeout),e.organization&&(this.baseUrl=p(e.organization,e.domain)),e.accessToken&&h(this,a,e.accessToken,"f")}async request(e,o,r,i){const m=r?{data:r}:void 0,w=o,v=(i==null?void 0:i.organization)?p(i.organization,i.domain):void 0,E=(i==null?void 0:i.accessToken)?{Authorization:"Bearer "+i.accessToken}:void 0;return c(this,s,"f").request(Object.assign({method:e,baseURL:v,url:w,data:m,headers:E},i)).then(d=>d.data).catch(d=>y(d))}}a=new WeakMap,s=new WeakMap;export default f;
@@ -1 +1 @@
1
- var __classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,a,i,r){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?r.call(e,a):r?r.value=a:t.set(e,a),a};var __classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,a,i){if(a==="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 a==="m"?i:a==="a"?i.call(e):i?i.value:t.get(e)};var _CommerceLayerClient_adapter,_CommerceLayerClient_organization;import*as api from"./api";import{CommerceLayerStatic}from"./static";import ResourceAdapter from"./resource";class CommerceLayerClient{constructor(e){_CommerceLayerClient_adapter.set(this,void 0);_CommerceLayerClient_organization.set(this,void 0);__classPrivateFieldSet(this,_CommerceLayerClient_adapter,new ResourceAdapter(e),"f");__classPrivateFieldSet(this,_CommerceLayerClient_organization,e.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(e){if(!e)return;if(e.organization)__classPrivateFieldSet(this,_CommerceLayerClient_organization,e.organization,"f");__classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").config(e)}resources(){return CommerceLayerStatic.resources()}isApiError(e){return CommerceLayerStatic.isApiError(e)}addRequestInterceptor(e,t){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.request.use(e,t)}addResponseInterceptor(e,t){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors.response.use(e,t)}removeInterceptor(e,t){return __classPrivateFieldGet(this,_CommerceLayerClient_adapter,"f").interceptors[e].eject(t)}addRawResponseReader(){const e={id:undefined,rawResponse:undefined};function t(t){e.rawResponse=t===null||t===void 0?void 0:t.data;return t}const a=this.addResponseInterceptor(t);e.id=a;return e}removeRawResponseReader(e){const t=typeof e==="number"?e:e.id;if(t)return this.removeInterceptor("response",t)}}_CommerceLayerClient_adapter=new WeakMap,_CommerceLayerClient_organization=new WeakMap;const CommerceLayer=e=>new CommerceLayerClient(e);export default CommerceLayer;
1
+ var c=this&&this.__classPrivateFieldSet||function(o,i,n,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?o!==i||!a:!i.has(o))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(o,n):a?a.value=n:i.set(o,n),n},s=this&&this.__classPrivateFieldGet||function(o,i,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?o!==i||!r:!i.has(o))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(o):r?r.value:i.get(o)},t,h;import*as e from"./api";import{CommerceLayerStatic as f}from"./static";import w from"./resource";class u{constructor(i){t.set(this,void 0),h.set(this,void 0),c(this,t,new w(i),"f"),c(this,h,i.organization,"f"),this.addresses=new e.Addresses(s(this,t,"f")),this.adjustments=new e.Adjustments(s(this,t,"f")),this.adyen_gateways=new e.AdyenGateways(s(this,t,"f")),this.adyen_payments=new e.AdyenPayments(s(this,t,"f")),this.application=new e.Applications(s(this,t,"f")),this.attachments=new e.Attachments(s(this,t,"f")),this.authorizations=new e.Authorizations(s(this,t,"f")),this.avalara_accounts=new e.AvalaraAccounts(s(this,t,"f")),this.billing_info_validation_rules=new e.BillingInfoValidationRules(s(this,t,"f")),this.bing_geocoders=new e.BingGeocoders(s(this,t,"f")),this.braintree_gateways=new e.BraintreeGateways(s(this,t,"f")),this.braintree_payments=new e.BraintreePayments(s(this,t,"f")),this.bundles=new e.Bundles(s(this,t,"f")),this.captures=new e.Captures(s(this,t,"f")),this.carrier_accounts=new e.CarrierAccounts(s(this,t,"f")),this.checkout_com_gateways=new e.CheckoutComGateways(s(this,t,"f")),this.checkout_com_payments=new e.CheckoutComPayments(s(this,t,"f")),this.coupon_codes_promotion_rules=new e.CouponCodesPromotionRules(s(this,t,"f")),this.coupon_recipients=new e.CouponRecipients(s(this,t,"f")),this.coupons=new e.Coupons(s(this,t,"f")),this.customer_addresses=new e.CustomerAddresses(s(this,t,"f")),this.customer_groups=new e.CustomerGroups(s(this,t,"f")),this.customer_password_resets=new e.CustomerPasswordResets(s(this,t,"f")),this.customer_payment_sources=new e.CustomerPaymentSources(s(this,t,"f")),this.customer_subscriptions=new e.CustomerSubscriptions(s(this,t,"f")),this.customers=new e.Customers(s(this,t,"f")),this.delivery_lead_times=new e.DeliveryLeadTimes(s(this,t,"f")),this.event_callbacks=new e.EventCallbacks(s(this,t,"f")),this.external_gateways=new e.ExternalGateways(s(this,t,"f")),this.external_payments=new e.ExternalPayments(s(this,t,"f")),this.external_promotions=new e.ExternalPromotions(s(this,t,"f")),this.external_tax_calculators=new e.ExternalTaxCalculators(s(this,t,"f")),this.fixed_amount_promotions=new e.FixedAmountPromotions(s(this,t,"f")),this.fixed_price_promotions=new e.FixedPricePromotions(s(this,t,"f")),this.free_gift_promotions=new e.FreeGiftPromotions(s(this,t,"f")),this.free_shipping_promotions=new e.FreeShippingPromotions(s(this,t,"f")),this.geocoders=new e.Geocoders(s(this,t,"f")),this.gift_card_recipients=new e.GiftCardRecipients(s(this,t,"f")),this.gift_cards=new e.GiftCards(s(this,t,"f")),this.google_geocoders=new e.GoogleGeocoders(s(this,t,"f")),this.imports=new e.Imports(s(this,t,"f")),this.in_stock_subscriptions=new e.InStockSubscriptions(s(this,t,"f")),this.inventory_models=new e.InventoryModels(s(this,t,"f")),this.inventory_return_locations=new e.InventoryReturnLocations(s(this,t,"f")),this.inventory_stock_locations=new e.InventoryStockLocations(s(this,t,"f")),this.line_item_options=new e.LineItemOptions(s(this,t,"f")),this.line_items=new e.LineItems(s(this,t,"f")),this.manual_gateways=new e.ManualGateways(s(this,t,"f")),this.manual_tax_calculators=new e.ManualTaxCalculators(s(this,t,"f")),this.markets=new e.Markets(s(this,t,"f")),this.merchants=new e.Merchants(s(this,t,"f")),this.order_amount_promotion_rules=new e.OrderAmountPromotionRules(s(this,t,"f")),this.order_copies=new e.OrderCopies(s(this,t,"f")),this.order_subscriptions=new e.OrderSubscriptions(s(this,t,"f")),this.order_validation_rules=new e.OrderValidationRules(s(this,t,"f")),this.orders=new e.Orders(s(this,t,"f")),this.organization=new e.Organizations(s(this,t,"f")),this.packages=new e.Packages(s(this,t,"f")),this.parcel_line_items=new e.ParcelLineItems(s(this,t,"f")),this.parcels=new e.Parcels(s(this,t,"f")),this.payment_gateways=new e.PaymentGateways(s(this,t,"f")),this.payment_methods=new e.PaymentMethods(s(this,t,"f")),this.paypal_gateways=new e.PaypalGateways(s(this,t,"f")),this.paypal_payments=new e.PaypalPayments(s(this,t,"f")),this.percentage_discount_promotions=new e.PercentageDiscountPromotions(s(this,t,"f")),this.price_lists=new e.PriceLists(s(this,t,"f")),this.prices=new e.Prices(s(this,t,"f")),this.promotion_rules=new e.PromotionRules(s(this,t,"f")),this.promotions=new e.Promotions(s(this,t,"f")),this.refunds=new e.Refunds(s(this,t,"f")),this.return_line_items=new e.ReturnLineItems(s(this,t,"f")),this.returns=new e.Returns(s(this,t,"f")),this.shipments=new e.Shipments(s(this,t,"f")),this.shipping_categories=new e.ShippingCategories(s(this,t,"f")),this.shipping_methods=new e.ShippingMethods(s(this,t,"f")),this.shipping_zones=new e.ShippingZones(s(this,t,"f")),this.sku_list_items=new e.SkuListItems(s(this,t,"f")),this.sku_list_promotion_rules=new e.SkuListPromotionRules(s(this,t,"f")),this.sku_lists=new e.SkuLists(s(this,t,"f")),this.sku_options=new e.SkuOptions(s(this,t,"f")),this.skus=new e.Skus(s(this,t,"f")),this.stock_items=new e.StockItems(s(this,t,"f")),this.stock_line_items=new e.StockLineItems(s(this,t,"f")),this.stock_locations=new e.StockLocations(s(this,t,"f")),this.stock_transfers=new e.StockTransfers(s(this,t,"f")),this.stripe_gateways=new e.StripeGateways(s(this,t,"f")),this.stripe_payments=new e.StripePayments(s(this,t,"f")),this.tax_calculators=new e.TaxCalculators(s(this,t,"f")),this.tax_categories=new e.TaxCategories(s(this,t,"f")),this.tax_rules=new e.TaxRules(s(this,t,"f")),this.taxjar_accounts=new e.TaxjarAccounts(s(this,t,"f")),this.transactions=new e.Transactions(s(this,t,"f")),this.voids=new e.Voids(s(this,t,"f")),this.webhooks=new e.Webhooks(s(this,t,"f")),this.wire_transfers=new e.WireTransfers(s(this,t,"f"))}get currentOrganization(){return s(this,h,"f")}config(i){!i||(i.organization&&c(this,h,i.organization,"f"),s(this,t,"f").config(i))}resources(){return f.resources()}isApiError(i){return f.isApiError(i)}addRequestInterceptor(i,n){return s(this,t,"f").interceptors.request.use(i,n)}addResponseInterceptor(i,n){return s(this,t,"f").interceptors.response.use(i,n)}removeInterceptor(i,n){return s(this,t,"f").interceptors[i].eject(n)}addRawResponseReader(){const i={id:void 0,rawResponse:void 0};function n(a){return i.rawResponse=a==null?void 0:a.data,a}const r=this.addResponseInterceptor(n);return i.id=r,i}removeRawResponseReader(i){const n=typeof i=="number"?i:i.id;if(n)return this.removeInterceptor("response",n)}}t=new WeakMap,h=new WeakMap;const p=o=>new u(o);export default p;
package/lib/esm/common.js CHANGED
@@ -1 +1 @@
1
- import{resourceList}from"./api";const isResourceId=e=>e&&e.type&&e.id&&resourceList.includes(e.type);const isResourceType=e=>e&&typeof e.type!=="undefined"&&e.type&&resourceList.includes(e.type);export{isResourceId,isResourceType};
1
+ import{resourceList as p}from"./api";const i=e=>e&&e.type&&e.id&&p.includes(e.type),t=e=>e&&typeof e.type!="undefined"&&e.type&&p.includes(e.type);export{i as isResourceId,t as isResourceType};
package/lib/esm/config.js CHANGED
@@ -1 +1 @@
1
- const config={default:{domain:"commercelayer.io",pageNumber:1,pageSize:10},client:{timeout:3e3}};export default config;
1
+ const e={default:{domain:"commercelayer.io",pageNumber:1,pageSize:10},client:{timeout:3e3}};export default e;
package/lib/esm/error.js CHANGED
@@ -1 +1 @@
1
- var ErrorType;(function(r){r["CLIENT"]="client";r["REQUEST"]="request";r["RESPONSE"]="response";r["GENERIC"]="generic";r["CANCEL"]="cancel"})(ErrorType||(ErrorType={}));class SdkError extends Error{constructor(r){super(r.message);this.name=this.constructor.name;this.type=r.type||ErrorType.GENERIC}static isSdkError(r){return r&&["SdkError","ApiError"].includes(r.name)&&Object.values(ErrorType).includes(r.type)}}class ApiError extends SdkError{constructor(r){super(Object.assign(Object.assign({},r),{type:ErrorType.RESPONSE}));this.errors=[];this.name=this.constructor.name}static isApiError(r){return SdkError.isSdkError(r)&&r.name==="ApiError"&&r.type===ErrorType.RESPONSE}first(){var r;return((r=this.errors)===null||r===void 0?void 0:r.length)>0?this.errors[0]:undefined}}export{SdkError,ApiError,ErrorType};
1
+ var s;(function(e){e.CLIENT="client",e.REQUEST="request",e.RESPONSE="response",e.GENERIC="generic",e.CANCEL="cancel"})(s||(s={}));class t extends Error{constructor(r){super(r.message);this.name=this.constructor.name,this.type=r.type||s.GENERIC}static isSdkError(r){return r&&["SdkError","ApiError"].includes(r.name)&&Object.values(s).includes(r.type)}}class i extends t{constructor(r){super(Object.assign(Object.assign({},r),{type:s.RESPONSE}));this.errors=[],this.name=this.constructor.name}static isApiError(r){return t.isSdkError(r)&&r.name==="ApiError"&&r.type===s.RESPONSE}first(){var r;return((r=this.errors)===null||r===void 0?void 0:r.length)>0?this.errors[0]:void 0}}export{t as SdkError,i as ApiError,s as ErrorType};
@@ -1 +1 @@
1
- import{isResourceId}from"./common";const denormalize=e=>{let i;if(e.links)delete e.links;const s=e.data;const n=e.included;if(Array.isArray(s))i=s.map((e=>denormalizeResource(e,n)));else i=denormalizeResource(s,n);return i};const findIncluded=(e,i=[])=>{const s=i.find((i=>e.id===i.id&&e.type===i.type));return s||e};const denormalizeResource=(e,i)=>{const s=Object.assign({id:e.id,type:e.type},e.attributes);if(e.relationships)Object.keys(e.relationships).forEach((n=>{const r=e.relationships[n].data;if(r){if(Array.isArray(r))s[n]=r.map((e=>denormalizeResource(findIncluded(e,i),i)));else s[n]=denormalizeResource(findIncluded(r,i),i)}else if(r===null)s[n]=null}));return s};const normalize=e=>{const i={};const s={};for(const n in e){if(["type","id"].includes(n))continue;const r=e[n];if(r&&(isResourceId(r)||Array.isArray(r)&&isResourceId(r[0]))){s[n]={data:r}}else i[n]=r}const n={type:e.type,attributes:i,relationships:s};if(isResourceId(e))n.id=e.id;return n};export{denormalize,normalize};
1
+ import{isResourceId as t}from"./common";const c=i=>{let e;i.links&&delete i.links;const s=i.data,a=i.included;return Array.isArray(s)?e=s.map(r=>o(r,a)):e=o(s,a),e},d=(i,e=[])=>e.find(s=>i.id===s.id&&i.type===s.type)||i,o=(i,e)=>{const s=Object.assign({id:i.id,type:i.type},i.attributes);return i.relationships&&Object.keys(i.relationships).forEach(a=>{const r=i.relationships[a].data;r?Array.isArray(r)?s[a]=r.map(n=>o(d(n,e),e)):s[a]=o(d(r,e),e):r===null&&(s[a]=null)}),s},l=i=>{const e={},s={};for(const r in i){if(["type","id"].includes(r))continue;const n=i[r];n&&(t(n)||Array.isArray(n)&&t(n[0]))?s[r]={data:n}:e[r]=n}const a={type:i.type,attributes:e,relationships:s};return t(i)&&(a.id=i.id),a};export{c as denormalize,l as normalize};
package/lib/esm/query.js CHANGED
@@ -1 +1 @@
1
- const isParamsList=e=>e.filters||e.pageNumber||e.pageSize||e.sort;const generateQueryStringParams=e=>{const r={};if(!e)return r;if(e.include)r["include"]=e.include.join(",");if(e.fields){Object.entries(e.fields).forEach((([e,i])=>{r[`fields[${e}]`]=i.join(",")}))}if(isParamsList(e)){if(e.sort){if(Array.isArray(e.sort))r["sort"]=e.sort.join(",");else r["sort"]=Object.entries(e.sort).map((([e,r])=>`${r==="desc"?"-":""}${e}`)).join(",")}if(e.pageNumber)r["page[number]"]=String(e.pageNumber);if(e.pageSize)r["page[size]"]=String(e.pageSize);if(e.filters){Object.entries(e.filters).forEach((([e,i])=>{r[`filter[q][${e}]`]=String(i)}))}}return r};export{generateQueryStringParams};
1
+ const s=r=>r.filters||r.pageNumber||r.pageSize||r.sort,n=r=>{const i={};return r&&(r.include&&(i.include=r.include.join(",")),r.fields&&Object.entries(r.fields).forEach(([t,e])=>{i[`fields[${t}]`]=e.join(",")}),s(r)&&(r.sort&&(Array.isArray(r.sort)?i.sort=r.sort.join(","):i.sort=Object.entries(r.sort).map(([t,e])=>`${e==="desc"?"-":""}${t}`).join(",")),r.pageNumber&&(i["page[number]"]=String(r.pageNumber)),r.pageSize&&(i["page[size]"]=String(r.pageSize)),r.filters&&Object.entries(r.filters).forEach(([t,e])=>{i[`filter[q][${t}]`]=String(e)}))),i};export{n as generateQueryStringParams};
@@ -1 +1 @@
1
- var __classPrivateFieldSet=this&&this.__classPrivateFieldSet||function(e,t,r,i,s){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t==="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r};var __classPrivateFieldGet=this&&this.__classPrivateFieldGet||function(e,t,r,i){if(r==="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 r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)};var _ResourceAdapter_client,_ResourceAdapter_config;import ApiClient from"./client";import{denormalize,normalize}from"./jsonapi";import{generateQueryStringParams}from"./query";import config from"./config";class ListResponse extends Array{constructor(e,t){super(...t||[]);this.meta=e}first(){return this.length?this[0]:undefined}last(){return this.length?this[this.length-1]:undefined}get(e){return this.length&&e>=0?this[e]:undefined}}class ResourceAdapter{constructor(e){_ResourceAdapter_client.set(this,void 0);_ResourceAdapter_config.set(this,{});__classPrivateFieldSet(this,_ResourceAdapter_client,ApiClient.create(e),"f");this.config(e)}get interceptors(){return __classPrivateFieldGet(this,_ResourceAdapter_client,"f").interceptors}config(e){if(!e)return;__classPrivateFieldGet(this,_ResourceAdapter_client,"f").config(e);return}async singleton(e,t,r){const i=generateQueryStringParams(t);if(r===null||r===void 0?void 0:r.params)Object.assign(i,r===null||r===void 0?void 0:r.params);const s=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("get",`${e.type}`,undefined,Object.assign(Object.assign({},r),{params:i}));const a=denormalize(s);return a}async retrieve(e,t,r){const i=generateQueryStringParams(t);if(r===null||r===void 0?void 0:r.params)Object.assign(i,r===null||r===void 0?void 0:r.params);const s=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("get",`${e.type}/${e.id}`,undefined,Object.assign(Object.assign({},r),{params:i}));const a=denormalize(s);return a}async list(e,t,r){var i,s;const a=generateQueryStringParams(t);if(r===null||r===void 0?void 0:r.params)Object.assign(a,r===null||r===void 0?void 0:r.params);const n=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("get",`${e.type}`,undefined,Object.assign(Object.assign({},r),{params:a}));const o=denormalize(n);const c={pageCount:Number((i=n.meta)===null||i===void 0?void 0:i.page_count),recordCount:Number((s=n.meta)===null||s===void 0?void 0:s.record_count),currentPage:(t===null||t===void 0?void 0:t.pageNumber)||config.default.pageNumber,recordsPerPage:(t===null||t===void 0?void 0:t.pageSize)||config.default.pageSize};return new ListResponse(c,o)}async create(e,t,r){const i=generateQueryStringParams(t);if(r===null||r===void 0?void 0:r.params)Object.assign(i,r===null||r===void 0?void 0:r.params);const s=normalize(e);const a=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("post",e.type,s,Object.assign(Object.assign({},r),{params:i}));const n=denormalize(a);return n}async update(e,t,r){const i=generateQueryStringParams(t);if(r===null||r===void 0?void 0:r.params)Object.assign(i,r===null||r===void 0?void 0:r.params);const s=normalize(e);const a=await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("patch",`${e.type}/${e.id}`,s,Object.assign(Object.assign({},r),{params:i}));const n=denormalize(a);return n}async delete(e,t){await __classPrivateFieldGet(this,_ResourceAdapter_client,"f").request("delete",`${e.type}/${e.id}`,undefined,t)}}_ResourceAdapter_client=new WeakMap,_ResourceAdapter_config=new WeakMap;class ApiResource{constructor(e){this.resources=e}}export default ResourceAdapter;export{ApiResource};
1
+ var f=this&&this.__classPrivateFieldSet||function(a,e,r,t,s){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?a!==e||!s:!e.has(a))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?s.call(a,r):s?s.value=r:e.set(a,r),r},o=this&&this.__classPrivateFieldGet||function(a,e,r,t){if(r==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?a!==e||!t:!e.has(a))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?t:r==="a"?t.call(a):t?t.value:e.get(a)},n,p;import w from"./client";import{denormalize as l,normalize as h}from"./jsonapi";import{generateQueryStringParams as u}from"./query";import g from"./config";class b extends Array{constructor(e,r){super(...r||[]);this.meta=e}first(){return this.length?this[0]:void 0}last(){return this.length?this[this.length-1]:void 0}get(e){return this.length&&e>=0?this[e]:void 0}}class y{constructor(e){n.set(this,void 0),p.set(this,{}),f(this,n,w.create(e),"f"),this.config(e)}get interceptors(){return o(this,n,"f").interceptors}config(e){!e||o(this,n,"f").config(e)}async singleton(e,r,t){const s=u(r);(t==null?void 0:t.params)&&Object.assign(s,t==null?void 0:t.params);const i=await o(this,n,"f").request("get",`${e.type}`,void 0,Object.assign(Object.assign({},t),{params:s}));return l(i)}async retrieve(e,r,t){const s=u(r);(t==null?void 0:t.params)&&Object.assign(s,t==null?void 0:t.params);const i=await o(this,n,"f").request("get",`${e.type}/${e.id}`,void 0,Object.assign(Object.assign({},t),{params:s}));return l(i)}async list(e,r,t){var s,i;const c=u(r);(t==null?void 0:t.params)&&Object.assign(c,t==null?void 0:t.params);const d=await o(this,n,"f").request("get",`${e.type}`,void 0,Object.assign(Object.assign({},t),{params:c})),m=l(d),v={pageCount:Number((s=d.meta)===null||s===void 0?void 0:s.page_count),recordCount:Number((i=d.meta)===null||i===void 0?void 0:i.record_count),currentPage:(r==null?void 0:r.pageNumber)||g.default.pageNumber,recordsPerPage:(r==null?void 0:r.pageSize)||g.default.pageSize};return new b(v,m)}async create(e,r,t){const s=u(r);(t==null?void 0:t.params)&&Object.assign(s,t==null?void 0:t.params);const i=h(e),c=await o(this,n,"f").request("post",e.type,i,Object.assign(Object.assign({},t),{params:s}));return l(c)}async update(e,r,t){const s=u(r);(t==null?void 0:t.params)&&Object.assign(s,t==null?void 0:t.params);const i=h(e),c=await o(this,n,"f").request("patch",`${e.type}/${e.id}`,i,Object.assign(Object.assign({},t),{params:s}));return l(c)}async delete(e,r){await o(this,n,"f").request("delete",`${e.type}/${e.id}`,void 0,r)}}n=new WeakMap,p=new WeakMap;class j{constructor(e){this.resources=e}}export default y;export{j as ApiResource};
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class Addresses extends ApiResource{async list(e,s){return this.resources.list({type:Addresses.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Addresses.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:Addresses.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Addresses.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:Addresses.TYPE,id:e},s)}isAddress(e){return e.type&&e.type===Addresses.TYPE}relationship(e){return typeof e==="string"?{id:e,type:Addresses.TYPE}:{id:e.id,type:Addresses.TYPE}}type(){return Addresses.TYPE}}Addresses.TYPE="addresses";export default Addresses;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isAddress(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="addresses";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class Adjustments extends ApiResource{async list(e,t){return this.resources.list({type:Adjustments.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:Adjustments.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:Adjustments.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:Adjustments.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:Adjustments.TYPE,id:e},t)}isAdjustment(e){return e.type&&e.type===Adjustments.TYPE}relationship(e){return typeof e==="string"?{id:e,type:Adjustments.TYPE}:{id:e.id,type:Adjustments.TYPE}}type(){return Adjustments.TYPE}}Adjustments.TYPE="adjustments";export default Adjustments;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isAdjustment(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="adjustments";export default t;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class AdyenGateways extends ApiResource{async list(e,t){return this.resources.list({type:AdyenGateways.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:AdyenGateways.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:AdyenGateways.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:AdyenGateways.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:AdyenGateways.TYPE,id:e},t)}isAdyenGateway(e){return e.type&&e.type===AdyenGateways.TYPE}relationship(e){return typeof e==="string"?{id:e,type:AdyenGateways.TYPE}:{id:e.id,type:AdyenGateways.TYPE}}type(){return AdyenGateways.TYPE}}AdyenGateways.TYPE="adyen_gateways";export default AdyenGateways;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isAdyenGateway(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="adyen_gateways";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class AdyenPayments extends ApiResource{async list(e,t){return this.resources.list({type:AdyenPayments.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:AdyenPayments.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:AdyenPayments.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:AdyenPayments.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:AdyenPayments.TYPE,id:e},t)}isAdyenPayment(e){return e.type&&e.type===AdyenPayments.TYPE}relationship(e){return typeof e==="string"?{id:e,type:AdyenPayments.TYPE}:{id:e.id,type:AdyenPayments.TYPE}}type(){return AdyenPayments.TYPE}}AdyenPayments.TYPE="adyen_payments";export default AdyenPayments;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isAdyenPayment(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="adyen_payments";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class Applications extends ApiResource{async retrieve(i,p){return this.resources.singleton({type:Applications.TYPE},i,p)}isApplication(i){return i.type&&i.type===Applications.TYPE}relationship(i){return typeof i==="string"?{id:i,type:Applications.TYPE}:{id:i.id,type:Applications.TYPE}}type(){return Applications.TYPE}}Applications.TYPE="application";export default Applications;
1
+ import{ApiResource as r}from"../resource";class t extends r{async retrieve(e,i){return this.resources.singleton({type:t.TYPE},e,i)}isApplication(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="application";export default t;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class Attachments extends ApiResource{async list(t,e){return this.resources.list({type:Attachments.TYPE},t,e)}async create(t,e,s){return this.resources.create(Object.assign(Object.assign({},t),{type:Attachments.TYPE}),e,s)}async retrieve(t,e,s){return this.resources.retrieve({type:Attachments.TYPE,id:t},e,s)}async update(t,e,s){return this.resources.update(Object.assign(Object.assign({},t),{type:Attachments.TYPE}),e,s)}async delete(t,e){await this.resources.delete({type:Attachments.TYPE,id:t},e)}isAttachment(t){return t.type&&t.type===Attachments.TYPE}relationship(t){return typeof t==="string"?{id:t,type:Attachments.TYPE}:{id:t.id,type:Attachments.TYPE}}type(){return Attachments.TYPE}}Attachments.TYPE="attachments";export default Attachments;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isAttachment(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="attachments";export default t;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class Authorizations extends ApiResource{async list(t,i){return this.resources.list({type:Authorizations.TYPE},t,i)}async retrieve(t,i,r){return this.resources.retrieve({type:Authorizations.TYPE,id:t},i,r)}async update(t,i,r){return this.resources.update(Object.assign(Object.assign({},t),{type:Authorizations.TYPE}),i,r)}isAuthorization(t){return t.type&&t.type===Authorizations.TYPE}relationship(t){return typeof t==="string"?{id:t,type:Authorizations.TYPE}:{id:t.id,type:Authorizations.TYPE}}type(){return Authorizations.TYPE}}Authorizations.TYPE="authorizations";export default Authorizations;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}isAuthorization(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="authorizations";export default t;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class AvalaraAccounts extends ApiResource{async list(a,e){return this.resources.list({type:AvalaraAccounts.TYPE},a,e)}async create(a,e,t){return this.resources.create(Object.assign(Object.assign({},a),{type:AvalaraAccounts.TYPE}),e,t)}async retrieve(a,e,t){return this.resources.retrieve({type:AvalaraAccounts.TYPE,id:a},e,t)}async update(a,e,t){return this.resources.update(Object.assign(Object.assign({},a),{type:AvalaraAccounts.TYPE}),e,t)}async delete(a,e){await this.resources.delete({type:AvalaraAccounts.TYPE,id:a},e)}isAvalaraAccount(a){return a.type&&a.type===AvalaraAccounts.TYPE}relationship(a){return typeof a==="string"?{id:a,type:AvalaraAccounts.TYPE}:{id:a.id,type:AvalaraAccounts.TYPE}}type(){return AvalaraAccounts.TYPE}}AvalaraAccounts.TYPE="avalara_accounts";export default AvalaraAccounts;
1
+ import{ApiResource as a}from"../resource";class r extends a{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isAvalaraAccount(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="avalara_accounts";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class BillingInfoValidationRules extends ApiResource{async list(i,e){return this.resources.list({type:BillingInfoValidationRules.TYPE},i,e)}async create(i,e,l){return this.resources.create(Object.assign(Object.assign({},i),{type:BillingInfoValidationRules.TYPE}),e,l)}async retrieve(i,e,l){return this.resources.retrieve({type:BillingInfoValidationRules.TYPE,id:i},e,l)}async update(i,e,l){return this.resources.update(Object.assign(Object.assign({},i),{type:BillingInfoValidationRules.TYPE}),e,l)}async delete(i,e){await this.resources.delete({type:BillingInfoValidationRules.TYPE,id:i},e)}isBillingInfoValidationRule(i){return i.type&&i.type===BillingInfoValidationRules.TYPE}relationship(i){return typeof i==="string"?{id:i,type:BillingInfoValidationRules.TYPE}:{id:i.id,type:BillingInfoValidationRules.TYPE}}type(){return BillingInfoValidationRules.TYPE}}BillingInfoValidationRules.TYPE="billing_info_validation_rules";export default BillingInfoValidationRules;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isBillingInfoValidationRule(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="billing_info_validation_rules";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class BingGeocoders extends ApiResource{async list(e,r){return this.resources.list({type:BingGeocoders.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:BingGeocoders.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:BingGeocoders.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:BingGeocoders.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:BingGeocoders.TYPE,id:e},r)}isBingGeocoder(e){return e.type&&e.type===BingGeocoders.TYPE}relationship(e){return typeof e==="string"?{id:e,type:BingGeocoders.TYPE}:{id:e.id,type:BingGeocoders.TYPE}}type(){return BingGeocoders.TYPE}}BingGeocoders.TYPE="bing_geocoders";export default BingGeocoders;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isBingGeocoder(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="bing_geocoders";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class BraintreeGateways extends ApiResource{async list(e,t){return this.resources.list({type:BraintreeGateways.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:BraintreeGateways.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:BraintreeGateways.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:BraintreeGateways.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:BraintreeGateways.TYPE,id:e},t)}isBraintreeGateway(e){return e.type&&e.type===BraintreeGateways.TYPE}relationship(e){return typeof e==="string"?{id:e,type:BraintreeGateways.TYPE}:{id:e.id,type:BraintreeGateways.TYPE}}type(){return BraintreeGateways.TYPE}}BraintreeGateways.TYPE="braintree_gateways";export default BraintreeGateways;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isBraintreeGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="braintree_gateways";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class BraintreePayments extends ApiResource{async list(e,t){return this.resources.list({type:BraintreePayments.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:BraintreePayments.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:BraintreePayments.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:BraintreePayments.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:BraintreePayments.TYPE,id:e},t)}isBraintreePayment(e){return e.type&&e.type===BraintreePayments.TYPE}relationship(e){return typeof e==="string"?{id:e,type:BraintreePayments.TYPE}:{id:e.id,type:BraintreePayments.TYPE}}type(){return BraintreePayments.TYPE}}BraintreePayments.TYPE="braintree_payments";export default BraintreePayments;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isBraintreePayment(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="braintree_payments";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class Bundles extends ApiResource{async list(e,s){return this.resources.list({type:Bundles.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:Bundles.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:Bundles.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Bundles.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:Bundles.TYPE,id:e},s)}isBundle(e){return e.type&&e.type===Bundles.TYPE}relationship(e){return typeof e==="string"?{id:e,type:Bundles.TYPE}:{id:e.id,type:Bundles.TYPE}}type(){return Bundles.TYPE}}Bundles.TYPE="bundles";export default Bundles;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isBundle(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="bundles";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class Captures extends ApiResource{async list(e,t){return this.resources.list({type:Captures.TYPE},e,t)}async retrieve(e,t,r){return this.resources.retrieve({type:Captures.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:Captures.TYPE}),t,r)}isCapture(e){return e.type&&e.type===Captures.TYPE}relationship(e){return typeof e==="string"?{id:e,type:Captures.TYPE}:{id:e.id,type:Captures.TYPE}}type(){return Captures.TYPE}}Captures.TYPE="captures";export default Captures;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}isCapture(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="captures";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class CarrierAccounts extends ApiResource{async list(r,e){return this.resources.list({type:CarrierAccounts.TYPE},r,e)}async retrieve(r,e,t){return this.resources.retrieve({type:CarrierAccounts.TYPE,id:r},e,t)}isCarrierAccount(r){return r.type&&r.type===CarrierAccounts.TYPE}relationship(r){return typeof r==="string"?{id:r,type:CarrierAccounts.TYPE}:{id:r.id,type:CarrierAccounts.TYPE}}type(){return CarrierAccounts.TYPE}}CarrierAccounts.TYPE="carrier_accounts";export default CarrierAccounts;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}isCarrierAccount(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="carrier_accounts";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class CheckoutComGateways extends ApiResource{async list(e,t){return this.resources.list({type:CheckoutComGateways.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:CheckoutComGateways.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:CheckoutComGateways.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:CheckoutComGateways.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:CheckoutComGateways.TYPE,id:e},t)}isCheckoutComGateway(e){return e.type&&e.type===CheckoutComGateways.TYPE}relationship(e){return typeof e==="string"?{id:e,type:CheckoutComGateways.TYPE}:{id:e.id,type:CheckoutComGateways.TYPE}}type(){return CheckoutComGateways.TYPE}}CheckoutComGateways.TYPE="checkout_com_gateways";export default CheckoutComGateways;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isCheckoutComGateway(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="checkout_com_gateways";export default t;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class CheckoutComPayments extends ApiResource{async list(e,t){return this.resources.list({type:CheckoutComPayments.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:CheckoutComPayments.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:CheckoutComPayments.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:CheckoutComPayments.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:CheckoutComPayments.TYPE,id:e},t)}isCheckoutComPayment(e){return e.type&&e.type===CheckoutComPayments.TYPE}relationship(e){return typeof e==="string"?{id:e,type:CheckoutComPayments.TYPE}:{id:e.id,type:CheckoutComPayments.TYPE}}type(){return CheckoutComPayments.TYPE}}CheckoutComPayments.TYPE="checkout_com_payments";export default CheckoutComPayments;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}isCheckoutComPayment(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="checkout_com_payments";export default t;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class CouponCodesPromotionRules extends ApiResource{async list(o,e){return this.resources.list({type:CouponCodesPromotionRules.TYPE},o,e)}async create(o,e,s){return this.resources.create(Object.assign(Object.assign({},o),{type:CouponCodesPromotionRules.TYPE}),e,s)}async retrieve(o,e,s){return this.resources.retrieve({type:CouponCodesPromotionRules.TYPE,id:o},e,s)}async update(o,e,s){return this.resources.update(Object.assign(Object.assign({},o),{type:CouponCodesPromotionRules.TYPE}),e,s)}async delete(o,e){await this.resources.delete({type:CouponCodesPromotionRules.TYPE,id:o},e)}isCouponCodesPromotionRule(o){return o.type&&o.type===CouponCodesPromotionRules.TYPE}relationship(o){return typeof o==="string"?{id:o,type:CouponCodesPromotionRules.TYPE}:{id:o.id,type:CouponCodesPromotionRules.TYPE}}type(){return CouponCodesPromotionRules.TYPE}}CouponCodesPromotionRules.TYPE="coupon_codes_promotion_rules";export default CouponCodesPromotionRules;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isCouponCodesPromotionRule(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="coupon_codes_promotion_rules";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class CouponRecipients extends ApiResource{async list(e,t){return this.resources.list({type:CouponRecipients.TYPE},e,t)}async create(e,t,i){return this.resources.create(Object.assign(Object.assign({},e),{type:CouponRecipients.TYPE}),t,i)}async retrieve(e,t,i){return this.resources.retrieve({type:CouponRecipients.TYPE,id:e},t,i)}async update(e,t,i){return this.resources.update(Object.assign(Object.assign({},e),{type:CouponRecipients.TYPE}),t,i)}async delete(e,t){await this.resources.delete({type:CouponRecipients.TYPE,id:e},t)}isCouponRecipient(e){return e.type&&e.type===CouponRecipients.TYPE}relationship(e){return typeof e==="string"?{id:e,type:CouponRecipients.TYPE}:{id:e.id,type:CouponRecipients.TYPE}}type(){return CouponRecipients.TYPE}}CouponRecipients.TYPE="coupon_recipients";export default CouponRecipients;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isCouponRecipient(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="coupon_recipients";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class Coupons extends ApiResource{async list(e,s){return this.resources.list({type:Coupons.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:Coupons.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:Coupons.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Coupons.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:Coupons.TYPE,id:e},s)}isCoupon(e){return e.type&&e.type===Coupons.TYPE}relationship(e){return typeof e==="string"?{id:e,type:Coupons.TYPE}:{id:e.id,type:Coupons.TYPE}}type(){return Coupons.TYPE}}Coupons.TYPE="coupons";export default Coupons;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isCoupon(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="coupons";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class CustomerAddresses extends ApiResource{async list(e,s){return this.resources.list({type:CustomerAddresses.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:CustomerAddresses.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:CustomerAddresses.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:CustomerAddresses.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:CustomerAddresses.TYPE,id:e},s)}isCustomerAddress(e){return e.type&&e.type===CustomerAddresses.TYPE}relationship(e){return typeof e==="string"?{id:e,type:CustomerAddresses.TYPE}:{id:e.id,type:CustomerAddresses.TYPE}}type(){return CustomerAddresses.TYPE}}CustomerAddresses.TYPE="customer_addresses";export default CustomerAddresses;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isCustomerAddress(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="customer_addresses";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class CustomerGroups extends ApiResource{async list(e,r){return this.resources.list({type:CustomerGroups.TYPE},e,r)}async create(e,r,s){return this.resources.create(Object.assign(Object.assign({},e),{type:CustomerGroups.TYPE}),r,s)}async retrieve(e,r,s){return this.resources.retrieve({type:CustomerGroups.TYPE,id:e},r,s)}async update(e,r,s){return this.resources.update(Object.assign(Object.assign({},e),{type:CustomerGroups.TYPE}),r,s)}async delete(e,r){await this.resources.delete({type:CustomerGroups.TYPE,id:e},r)}isCustomerGroup(e){return e.type&&e.type===CustomerGroups.TYPE}relationship(e){return typeof e==="string"?{id:e,type:CustomerGroups.TYPE}:{id:e.id,type:CustomerGroups.TYPE}}type(){return CustomerGroups.TYPE}}CustomerGroups.TYPE="customer_groups";export default CustomerGroups;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isCustomerGroup(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="customer_groups";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class CustomerPasswordResets extends ApiResource{async list(s,e){return this.resources.list({type:CustomerPasswordResets.TYPE},s,e)}async create(s,e,t){return this.resources.create(Object.assign(Object.assign({},s),{type:CustomerPasswordResets.TYPE}),e,t)}async retrieve(s,e,t){return this.resources.retrieve({type:CustomerPasswordResets.TYPE,id:s},e,t)}async update(s,e,t){return this.resources.update(Object.assign(Object.assign({},s),{type:CustomerPasswordResets.TYPE}),e,t)}async delete(s,e){await this.resources.delete({type:CustomerPasswordResets.TYPE,id:s},e)}isCustomerPasswordReset(s){return s.type&&s.type===CustomerPasswordResets.TYPE}relationship(s){return typeof s==="string"?{id:s,type:CustomerPasswordResets.TYPE}:{id:s.id,type:CustomerPasswordResets.TYPE}}type(){return CustomerPasswordResets.TYPE}}CustomerPasswordResets.TYPE="customer_password_resets";export default CustomerPasswordResets;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isCustomerPasswordReset(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="customer_password_resets";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class CustomerPaymentSources extends ApiResource{async list(e,t){return this.resources.list({type:CustomerPaymentSources.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:CustomerPaymentSources.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:CustomerPaymentSources.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:CustomerPaymentSources.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:CustomerPaymentSources.TYPE,id:e},t)}isCustomerPaymentSource(e){return e.type&&e.type===CustomerPaymentSources.TYPE}relationship(e){return typeof e==="string"?{id:e,type:CustomerPaymentSources.TYPE}:{id:e.id,type:CustomerPaymentSources.TYPE}}type(){return CustomerPaymentSources.TYPE}}CustomerPaymentSources.TYPE="customer_payment_sources";export default CustomerPaymentSources;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isCustomerPaymentSource(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="customer_payment_sources";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class CustomerSubscriptions extends ApiResource{async list(s,e){return this.resources.list({type:CustomerSubscriptions.TYPE},s,e)}async create(s,e,t){return this.resources.create(Object.assign(Object.assign({},s),{type:CustomerSubscriptions.TYPE}),e,t)}async retrieve(s,e,t){return this.resources.retrieve({type:CustomerSubscriptions.TYPE,id:s},e,t)}async update(s,e,t){return this.resources.update(Object.assign(Object.assign({},s),{type:CustomerSubscriptions.TYPE}),e,t)}async delete(s,e){await this.resources.delete({type:CustomerSubscriptions.TYPE,id:s},e)}isCustomerSubscription(s){return s.type&&s.type===CustomerSubscriptions.TYPE}relationship(s){return typeof s==="string"?{id:s,type:CustomerSubscriptions.TYPE}:{id:s.id,type:CustomerSubscriptions.TYPE}}type(){return CustomerSubscriptions.TYPE}}CustomerSubscriptions.TYPE="customer_subscriptions";export default CustomerSubscriptions;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isCustomerSubscription(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="customer_subscriptions";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class Customers extends ApiResource{async list(e,s){return this.resources.list({type:Customers.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:Customers.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:Customers.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:Customers.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:Customers.TYPE,id:e},s)}isCustomer(e){return e.type&&e.type===Customers.TYPE}relationship(e){return typeof e==="string"?{id:e,type:Customers.TYPE}:{id:e.id,type:Customers.TYPE}}type(){return Customers.TYPE}}Customers.TYPE="customers";export default Customers;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isCustomer(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="customers";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class DeliveryLeadTimes extends ApiResource{async list(e,i){return this.resources.list({type:DeliveryLeadTimes.TYPE},e,i)}async create(e,i,r){return this.resources.create(Object.assign(Object.assign({},e),{type:DeliveryLeadTimes.TYPE}),i,r)}async retrieve(e,i,r){return this.resources.retrieve({type:DeliveryLeadTimes.TYPE,id:e},i,r)}async update(e,i,r){return this.resources.update(Object.assign(Object.assign({},e),{type:DeliveryLeadTimes.TYPE}),i,r)}async delete(e,i){await this.resources.delete({type:DeliveryLeadTimes.TYPE,id:e},i)}isDeliveryLeadTime(e){return e.type&&e.type===DeliveryLeadTimes.TYPE}relationship(e){return typeof e==="string"?{id:e,type:DeliveryLeadTimes.TYPE}:{id:e.id,type:DeliveryLeadTimes.TYPE}}type(){return DeliveryLeadTimes.TYPE}}DeliveryLeadTimes.TYPE="delivery_lead_times";export default DeliveryLeadTimes;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isDeliveryLeadTime(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="delivery_lead_times";export default t;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class EventCallbacks extends ApiResource{async list(e,t){return this.resources.list({type:EventCallbacks.TYPE},e,t)}async retrieve(e,t,s){return this.resources.retrieve({type:EventCallbacks.TYPE,id:e},t,s)}isEventCallback(e){return e.type&&e.type===EventCallbacks.TYPE}relationship(e){return typeof e==="string"?{id:e,type:EventCallbacks.TYPE}:{id:e.id,type:EventCallbacks.TYPE}}type(){return EventCallbacks.TYPE}}EventCallbacks.TYPE="event_callbacks";export default EventCallbacks;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async retrieve(e,r,s){return this.resources.retrieve({type:t.TYPE,id:e},r,s)}isEventCallback(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="event_callbacks";export default t;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class ExternalGateways extends ApiResource{async list(e,t){return this.resources.list({type:ExternalGateways.TYPE},e,t)}async create(e,t,a){return this.resources.create(Object.assign(Object.assign({},e),{type:ExternalGateways.TYPE}),t,a)}async retrieve(e,t,a){return this.resources.retrieve({type:ExternalGateways.TYPE,id:e},t,a)}async update(e,t,a){return this.resources.update(Object.assign(Object.assign({},e),{type:ExternalGateways.TYPE}),t,a)}async delete(e,t){await this.resources.delete({type:ExternalGateways.TYPE,id:e},t)}isExternalGateway(e){return e.type&&e.type===ExternalGateways.TYPE}relationship(e){return typeof e==="string"?{id:e,type:ExternalGateways.TYPE}:{id:e.id,type:ExternalGateways.TYPE}}type(){return ExternalGateways.TYPE}}ExternalGateways.TYPE="external_gateways";export default ExternalGateways;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isExternalGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="external_gateways";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class ExternalPayments extends ApiResource{async list(e,t){return this.resources.list({type:ExternalPayments.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:ExternalPayments.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:ExternalPayments.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:ExternalPayments.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:ExternalPayments.TYPE,id:e},t)}isExternalPayment(e){return e.type&&e.type===ExternalPayments.TYPE}relationship(e){return typeof e==="string"?{id:e,type:ExternalPayments.TYPE}:{id:e.id,type:ExternalPayments.TYPE}}type(){return ExternalPayments.TYPE}}ExternalPayments.TYPE="external_payments";export default ExternalPayments;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isExternalPayment(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="external_payments";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class ExternalPromotions extends ApiResource{async list(e,t){return this.resources.list({type:ExternalPromotions.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:ExternalPromotions.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:ExternalPromotions.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:ExternalPromotions.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:ExternalPromotions.TYPE,id:e},t)}isExternalPromotion(e){return e.type&&e.type===ExternalPromotions.TYPE}relationship(e){return typeof e==="string"?{id:e,type:ExternalPromotions.TYPE}:{id:e.id,type:ExternalPromotions.TYPE}}type(){return ExternalPromotions.TYPE}}ExternalPromotions.TYPE="external_promotions";export default ExternalPromotions;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isExternalPromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="external_promotions";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class ExternalTaxCalculators extends ApiResource{async list(e,a){return this.resources.list({type:ExternalTaxCalculators.TYPE},e,a)}async create(e,a,t){return this.resources.create(Object.assign(Object.assign({},e),{type:ExternalTaxCalculators.TYPE}),a,t)}async retrieve(e,a,t){return this.resources.retrieve({type:ExternalTaxCalculators.TYPE,id:e},a,t)}async update(e,a,t){return this.resources.update(Object.assign(Object.assign({},e),{type:ExternalTaxCalculators.TYPE}),a,t)}async delete(e,a){await this.resources.delete({type:ExternalTaxCalculators.TYPE,id:e},a)}isExternalTaxCalculator(e){return e.type&&e.type===ExternalTaxCalculators.TYPE}relationship(e){return typeof e==="string"?{id:e,type:ExternalTaxCalculators.TYPE}:{id:e.id,type:ExternalTaxCalculators.TYPE}}type(){return ExternalTaxCalculators.TYPE}}ExternalTaxCalculators.TYPE="external_tax_calculators";export default ExternalTaxCalculators;
1
+ import{ApiResource as a}from"../resource";class r extends a{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async retrieve(e,t,s){return this.resources.retrieve({type:r.TYPE,id:e},t,s)}async update(e,t,s){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}isExternalTaxCalculator(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="external_tax_calculators";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class FixedAmountPromotions extends ApiResource{async list(e,t){return this.resources.list({type:FixedAmountPromotions.TYPE},e,t)}async create(e,t,o){return this.resources.create(Object.assign(Object.assign({},e),{type:FixedAmountPromotions.TYPE}),t,o)}async retrieve(e,t,o){return this.resources.retrieve({type:FixedAmountPromotions.TYPE,id:e},t,o)}async update(e,t,o){return this.resources.update(Object.assign(Object.assign({},e),{type:FixedAmountPromotions.TYPE}),t,o)}async delete(e,t){await this.resources.delete({type:FixedAmountPromotions.TYPE,id:e},t)}isFixedAmountPromotion(e){return e.type&&e.type===FixedAmountPromotions.TYPE}relationship(e){return typeof e==="string"?{id:e,type:FixedAmountPromotions.TYPE}:{id:e.id,type:FixedAmountPromotions.TYPE}}type(){return FixedAmountPromotions.TYPE}}FixedAmountPromotions.TYPE="fixed_amount_promotions";export default FixedAmountPromotions;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isFixedAmountPromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="fixed_amount_promotions";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class FixedPricePromotions extends ApiResource{async list(e,i){return this.resources.list({type:FixedPricePromotions.TYPE},e,i)}async create(e,i,r){return this.resources.create(Object.assign(Object.assign({},e),{type:FixedPricePromotions.TYPE}),i,r)}async retrieve(e,i,r){return this.resources.retrieve({type:FixedPricePromotions.TYPE,id:e},i,r)}async update(e,i,r){return this.resources.update(Object.assign(Object.assign({},e),{type:FixedPricePromotions.TYPE}),i,r)}async delete(e,i){await this.resources.delete({type:FixedPricePromotions.TYPE,id:e},i)}isFixedPricePromotion(e){return e.type&&e.type===FixedPricePromotions.TYPE}relationship(e){return typeof e==="string"?{id:e,type:FixedPricePromotions.TYPE}:{id:e.id,type:FixedPricePromotions.TYPE}}type(){return FixedPricePromotions.TYPE}}FixedPricePromotions.TYPE="fixed_price_promotions";export default FixedPricePromotions;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isFixedPricePromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="fixed_price_promotions";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class FreeGiftPromotions extends ApiResource{async list(e,t){return this.resources.list({type:FreeGiftPromotions.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:FreeGiftPromotions.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:FreeGiftPromotions.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:FreeGiftPromotions.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:FreeGiftPromotions.TYPE,id:e},t)}isFreeGiftPromotion(e){return e.type&&e.type===FreeGiftPromotions.TYPE}relationship(e){return typeof e==="string"?{id:e,type:FreeGiftPromotions.TYPE}:{id:e.id,type:FreeGiftPromotions.TYPE}}type(){return FreeGiftPromotions.TYPE}}FreeGiftPromotions.TYPE="free_gift_promotions";export default FreeGiftPromotions;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isFreeGiftPromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="free_gift_promotions";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class FreeShippingPromotions extends ApiResource{async list(e,i){return this.resources.list({type:FreeShippingPromotions.TYPE},e,i)}async create(e,i,r){return this.resources.create(Object.assign(Object.assign({},e),{type:FreeShippingPromotions.TYPE}),i,r)}async retrieve(e,i,r){return this.resources.retrieve({type:FreeShippingPromotions.TYPE,id:e},i,r)}async update(e,i,r){return this.resources.update(Object.assign(Object.assign({},e),{type:FreeShippingPromotions.TYPE}),i,r)}async delete(e,i){await this.resources.delete({type:FreeShippingPromotions.TYPE,id:e},i)}isFreeShippingPromotion(e){return e.type&&e.type===FreeShippingPromotions.TYPE}relationship(e){return typeof e==="string"?{id:e,type:FreeShippingPromotions.TYPE}:{id:e.id,type:FreeShippingPromotions.TYPE}}type(){return FreeShippingPromotions.TYPE}}FreeShippingPromotions.TYPE="free_shipping_promotions";export default FreeShippingPromotions;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isFreeShippingPromotion(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="free_shipping_promotions";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class Geocoders extends ApiResource{async list(e,o){return this.resources.list({type:Geocoders.TYPE},e,o)}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";export default Geocoders;
1
+ import{ApiResource as t}from"../resource";class r extends t{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}isGeocoder(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="geocoders";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class GiftCardRecipients extends ApiResource{async list(e,t){return this.resources.list({type:GiftCardRecipients.TYPE},e,t)}async create(e,t,i){return this.resources.create(Object.assign(Object.assign({},e),{type:GiftCardRecipients.TYPE}),t,i)}async retrieve(e,t,i){return this.resources.retrieve({type:GiftCardRecipients.TYPE,id:e},t,i)}async update(e,t,i){return this.resources.update(Object.assign(Object.assign({},e),{type:GiftCardRecipients.TYPE}),t,i)}async delete(e,t){await this.resources.delete({type:GiftCardRecipients.TYPE,id:e},t)}isGiftCardRecipient(e){return e.type&&e.type===GiftCardRecipients.TYPE}relationship(e){return typeof e==="string"?{id:e,type:GiftCardRecipients.TYPE}:{id:e.id,type:GiftCardRecipients.TYPE}}type(){return GiftCardRecipients.TYPE}}GiftCardRecipients.TYPE="gift_card_recipients";export default GiftCardRecipients;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isGiftCardRecipient(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="gift_card_recipients";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class GiftCards extends ApiResource{async list(e,t){return this.resources.list({type:GiftCards.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:GiftCards.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:GiftCards.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:GiftCards.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:GiftCards.TYPE,id:e},t)}isGiftCard(e){return e.type&&e.type===GiftCards.TYPE}relationship(e){return typeof e==="string"?{id:e,type:GiftCards.TYPE}:{id:e.id,type:GiftCards.TYPE}}type(){return GiftCards.TYPE}}GiftCards.TYPE="gift_cards";export default GiftCards;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isGiftCard(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="gift_cards";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class GoogleGeocoders extends ApiResource{async list(e,o){return this.resources.list({type:GoogleGeocoders.TYPE},e,o)}async create(e,o,r){return this.resources.create(Object.assign(Object.assign({},e),{type:GoogleGeocoders.TYPE}),o,r)}async retrieve(e,o,r){return this.resources.retrieve({type:GoogleGeocoders.TYPE,id:e},o,r)}async update(e,o,r){return this.resources.update(Object.assign(Object.assign({},e),{type:GoogleGeocoders.TYPE}),o,r)}async delete(e,o){await this.resources.delete({type:GoogleGeocoders.TYPE,id:e},o)}isGoogleGeocoder(e){return e.type&&e.type===GoogleGeocoders.TYPE}relationship(e){return typeof e==="string"?{id:e,type:GoogleGeocoders.TYPE}:{id:e.id,type:GoogleGeocoders.TYPE}}type(){return GoogleGeocoders.TYPE}}GoogleGeocoders.TYPE="google_geocoders";export default GoogleGeocoders;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isGoogleGeocoder(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="google_geocoders";export default t;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class Imports extends ApiResource{async list(e,t){return this.resources.list({type:Imports.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:Imports.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:Imports.TYPE,id:e},t,r)}async delete(e,t){await this.resources.delete({type:Imports.TYPE,id:e},t)}isImport(e){return e.type&&e.type===Imports.TYPE}relationship(e){return typeof e==="string"?{id:e,type:Imports.TYPE}:{id:e.id,type:Imports.TYPE}}type(){return Imports.TYPE}}Imports.TYPE="imports";export default Imports;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isImport(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="imports";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class InStockSubscriptions extends ApiResource{async list(t,s){return this.resources.list({type:InStockSubscriptions.TYPE},t,s)}async create(t,s,e){return this.resources.create(Object.assign(Object.assign({},t),{type:InStockSubscriptions.TYPE}),s,e)}async retrieve(t,s,e){return this.resources.retrieve({type:InStockSubscriptions.TYPE,id:t},s,e)}async update(t,s,e){return this.resources.update(Object.assign(Object.assign({},t),{type:InStockSubscriptions.TYPE}),s,e)}async delete(t,s){await this.resources.delete({type:InStockSubscriptions.TYPE,id:t},s)}isInStockSubscription(t){return t.type&&t.type===InStockSubscriptions.TYPE}relationship(t){return typeof t==="string"?{id:t,type:InStockSubscriptions.TYPE}:{id:t.id,type:InStockSubscriptions.TYPE}}type(){return InStockSubscriptions.TYPE}}InStockSubscriptions.TYPE="in_stock_subscriptions";export default InStockSubscriptions;
1
+ import{ApiResource as i}from"../resource";class s extends i{async list(e,r){return this.resources.list({type:s.TYPE},e,r)}async create(e,r,t){return this.resources.create(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async retrieve(e,r,t){return this.resources.retrieve({type:s.TYPE,id:e},r,t)}async update(e,r,t){return this.resources.update(Object.assign(Object.assign({},e),{type:s.TYPE}),r,t)}async delete(e,r){await this.resources.delete({type:s.TYPE,id:e},r)}isInStockSubscription(e){return e.type&&e.type===s.TYPE}relationship(e){return typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="in_stock_subscriptions";export default s;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class InventoryModels extends ApiResource{async list(e,t){return this.resources.list({type:InventoryModels.TYPE},e,t)}async create(e,t,r){return this.resources.create(Object.assign(Object.assign({},e),{type:InventoryModels.TYPE}),t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:InventoryModels.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update(Object.assign(Object.assign({},e),{type:InventoryModels.TYPE}),t,r)}async delete(e,t){await this.resources.delete({type:InventoryModels.TYPE,id:e},t)}isInventoryModel(e){return e.type&&e.type===InventoryModels.TYPE}relationship(e){return typeof e==="string"?{id:e,type:InventoryModels.TYPE}:{id:e.id,type:InventoryModels.TYPE}}type(){return InventoryModels.TYPE}}InventoryModels.TYPE="inventory_models";export default InventoryModels;
1
+ import{ApiResource as i}from"../resource";class r extends i{async list(e,s){return this.resources.list({type:r.TYPE},e,s)}async create(e,s,t){return this.resources.create(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async retrieve(e,s,t){return this.resources.retrieve({type:r.TYPE,id:e},s,t)}async update(e,s,t){return this.resources.update(Object.assign(Object.assign({},e),{type:r.TYPE}),s,t)}async delete(e,s){await this.resources.delete({type:r.TYPE,id:e},s)}isInventoryModel(e){return e.type&&e.type===r.TYPE}relationship(e){return typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="inventory_models";export default r;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class InventoryReturnLocations extends ApiResource{async list(e,t){return this.resources.list({type:InventoryReturnLocations.TYPE},e,t)}async create(e,t,n){return this.resources.create(Object.assign(Object.assign({},e),{type:InventoryReturnLocations.TYPE}),t,n)}async retrieve(e,t,n){return this.resources.retrieve({type:InventoryReturnLocations.TYPE,id:e},t,n)}async update(e,t,n){return this.resources.update(Object.assign(Object.assign({},e),{type:InventoryReturnLocations.TYPE}),t,n)}async delete(e,t){await this.resources.delete({type:InventoryReturnLocations.TYPE,id:e},t)}isInventoryReturnLocation(e){return e.type&&e.type===InventoryReturnLocations.TYPE}relationship(e){return typeof e==="string"?{id:e,type:InventoryReturnLocations.TYPE}:{id:e.id,type:InventoryReturnLocations.TYPE}}type(){return InventoryReturnLocations.TYPE}}InventoryReturnLocations.TYPE="inventory_return_locations";export default InventoryReturnLocations;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isInventoryReturnLocation(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="inventory_return_locations";export default t;
@@ -1 +1 @@
1
- import{ApiResource}from"../resource";class InventoryStockLocations extends ApiResource{async list(t,e){return this.resources.list({type:InventoryStockLocations.TYPE},t,e)}async create(t,e,o){return this.resources.create(Object.assign(Object.assign({},t),{type:InventoryStockLocations.TYPE}),e,o)}async retrieve(t,e,o){return this.resources.retrieve({type:InventoryStockLocations.TYPE,id:t},e,o)}async update(t,e,o){return this.resources.update(Object.assign(Object.assign({},t),{type:InventoryStockLocations.TYPE}),e,o)}async delete(t,e){await this.resources.delete({type:InventoryStockLocations.TYPE,id:t},e)}isInventoryStockLocation(t){return t.type&&t.type===InventoryStockLocations.TYPE}relationship(t){return typeof t==="string"?{id:t,type:InventoryStockLocations.TYPE}:{id:t.id,type:InventoryStockLocations.TYPE}}type(){return InventoryStockLocations.TYPE}}InventoryStockLocations.TYPE="inventory_stock_locations";export default InventoryStockLocations;
1
+ import{ApiResource as i}from"../resource";class t extends i{async list(e,s){return this.resources.list({type:t.TYPE},e,s)}async create(e,s,r){return this.resources.create(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async retrieve(e,s,r){return this.resources.retrieve({type:t.TYPE,id:e},s,r)}async update(e,s,r){return this.resources.update(Object.assign(Object.assign({},e),{type:t.TYPE}),s,r)}async delete(e,s){await this.resources.delete({type:t.TYPE,id:e},s)}isInventoryStockLocation(e){return e.type&&e.type===t.TYPE}relationship(e){return typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="inventory_stock_locations";export default t;