@commercelayer/sdk 3.6.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/lib/cjs/api.d.ts +1 -1
  2. package/lib/cjs/client.js +1 -1
  3. package/lib/cjs/commercelayer.js +1 -1
  4. package/lib/cjs/config.d.ts +1 -1
  5. package/lib/cjs/config.js +1 -1
  6. package/lib/cjs/error.d.ts +26 -1
  7. package/lib/cjs/error.js +1 -1
  8. package/lib/cjs/interceptor.d.ts +19 -1
  9. package/lib/cjs/model.d.ts +1 -1
  10. package/lib/cjs/resource.js +1 -1
  11. package/lib/cjs/resources/avalara_accounts.d.ts +3 -0
  12. package/lib/cjs/resources/bundles.d.ts +6 -0
  13. package/lib/cjs/resources/klarna_payments.d.ts +4 -0
  14. package/lib/cjs/resources/orders.d.ts +7 -0
  15. package/lib/cjs/util.d.ts +6 -1
  16. package/lib/esm/api.d.ts +1 -1
  17. package/lib/esm/client.js +1 -1
  18. package/lib/esm/commercelayer.js +1 -1
  19. package/lib/esm/config.d.ts +1 -1
  20. package/lib/esm/config.js +1 -1
  21. package/lib/esm/debug.js +1 -1
  22. package/lib/esm/error.d.ts +26 -1
  23. package/lib/esm/error.js +1 -1
  24. package/lib/esm/interceptor.d.ts +19 -1
  25. package/lib/esm/model.d.ts +1 -1
  26. package/lib/esm/resource.js +1 -1
  27. package/lib/esm/resources/avalara_accounts.d.ts +3 -0
  28. package/lib/esm/resources/bundles.d.ts +6 -0
  29. package/lib/esm/resources/klarna_payments.d.ts +4 -0
  30. package/lib/esm/resources/orders.d.ts +7 -0
  31. package/lib/esm/util.d.ts +6 -1
  32. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  33. package/lib/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +1 -1
  35. package/lib/api.d.ts +0 -1
  36. package/lib/api.js +0 -1
  37. package/lib/client.d.ts +0 -2
  38. package/lib/client.js +0 -1
  39. package/lib/commercelayer.d.ts +0 -1
  40. package/lib/commercelayer.js +0 -1
  41. package/lib/common.d.ts +0 -1
  42. package/lib/common.js +0 -1
  43. package/lib/config.d.ts +0 -1
  44. package/lib/config.js +0 -1
  45. package/lib/debug.d.ts +0 -1
  46. package/lib/debug.js +0 -1
  47. package/lib/error.d.ts +0 -1
  48. package/lib/error.js +0 -1
  49. package/lib/index.d.ts +0 -1
  50. package/lib/index.js +0 -1
  51. package/lib/interceptor.d.ts +0 -1
  52. package/lib/interceptor.js +0 -1
  53. package/lib/jsonapi.d.ts +0 -1
  54. package/lib/jsonapi.js +0 -1
  55. package/lib/model.d.ts +0 -1
  56. package/lib/model.js +0 -1
  57. package/lib/query.d.ts +0 -1
  58. package/lib/query.js +0 -1
  59. package/lib/resource.d.ts +0 -1
  60. package/lib/resource.js +0 -1
  61. package/lib/resources/addresses.d.ts +0 -1
  62. package/lib/resources/addresses.js +0 -1
  63. package/lib/resources/adjustments.d.ts +0 -1
  64. package/lib/resources/adjustments.js +0 -1
  65. package/lib/resources/adyen_gateways.d.ts +0 -1
  66. package/lib/resources/adyen_gateways.js +0 -1
  67. package/lib/resources/adyen_payments.d.ts +0 -1
  68. package/lib/resources/adyen_payments.js +0 -1
  69. package/lib/resources/application.d.ts +0 -1
  70. package/lib/resources/application.js +0 -1
  71. package/lib/resources/attachments.d.ts +0 -1
  72. package/lib/resources/attachments.js +0 -1
  73. package/lib/resources/authorizations.d.ts +0 -1
  74. package/lib/resources/authorizations.js +0 -1
  75. package/lib/resources/avalara_accounts.d.ts +0 -1
  76. package/lib/resources/avalara_accounts.js +0 -1
  77. package/lib/resources/billing_info_validation_rules.d.ts +0 -1
  78. package/lib/resources/billing_info_validation_rules.js +0 -1
  79. package/lib/resources/bing_geocoders.d.ts +0 -1
  80. package/lib/resources/bing_geocoders.js +0 -1
  81. package/lib/resources/braintree_gateways.d.ts +0 -1
  82. package/lib/resources/braintree_gateways.js +0 -1
  83. package/lib/resources/braintree_payments.d.ts +0 -1
  84. package/lib/resources/braintree_payments.js +0 -1
  85. package/lib/resources/bundles.d.ts +0 -1
  86. package/lib/resources/bundles.js +0 -1
  87. package/lib/resources/captures.d.ts +0 -1
  88. package/lib/resources/captures.js +0 -1
  89. package/lib/resources/carrier_accounts.d.ts +0 -1
  90. package/lib/resources/carrier_accounts.js +0 -1
  91. package/lib/resources/checkout_com_gateways.d.ts +0 -1
  92. package/lib/resources/checkout_com_gateways.js +0 -1
  93. package/lib/resources/checkout_com_payments.d.ts +0 -1
  94. package/lib/resources/checkout_com_payments.js +0 -1
  95. package/lib/resources/coupon_codes_promotion_rules.d.ts +0 -1
  96. package/lib/resources/coupon_codes_promotion_rules.js +0 -1
  97. package/lib/resources/coupon_recipients.d.ts +0 -1
  98. package/lib/resources/coupon_recipients.js +0 -1
  99. package/lib/resources/coupons.d.ts +0 -1
  100. package/lib/resources/coupons.js +0 -1
  101. package/lib/resources/customer_addresses.d.ts +0 -1
  102. package/lib/resources/customer_addresses.js +0 -1
  103. package/lib/resources/customer_groups.d.ts +0 -1
  104. package/lib/resources/customer_groups.js +0 -1
  105. package/lib/resources/customer_password_resets.d.ts +0 -1
  106. package/lib/resources/customer_password_resets.js +0 -1
  107. package/lib/resources/customer_payment_sources.d.ts +0 -1
  108. package/lib/resources/customer_payment_sources.js +0 -1
  109. package/lib/resources/customer_subscriptions.d.ts +0 -1
  110. package/lib/resources/customer_subscriptions.js +0 -1
  111. package/lib/resources/customers.d.ts +0 -1
  112. package/lib/resources/customers.js +0 -1
  113. package/lib/resources/delivery_lead_times.d.ts +0 -1
  114. package/lib/resources/delivery_lead_times.js +0 -1
  115. package/lib/resources/event_callbacks.d.ts +0 -1
  116. package/lib/resources/event_callbacks.js +0 -1
  117. package/lib/resources/external_gateways.d.ts +0 -1
  118. package/lib/resources/external_gateways.js +0 -1
  119. package/lib/resources/external_payments.d.ts +0 -1
  120. package/lib/resources/external_payments.js +0 -1
  121. package/lib/resources/external_promotions.d.ts +0 -1
  122. package/lib/resources/external_promotions.js +0 -1
  123. package/lib/resources/external_tax_calculators.d.ts +0 -1
  124. package/lib/resources/external_tax_calculators.js +0 -1
  125. package/lib/resources/fixed_amount_promotions.d.ts +0 -1
  126. package/lib/resources/fixed_amount_promotions.js +0 -1
  127. package/lib/resources/fixed_price_promotions.d.ts +0 -1
  128. package/lib/resources/fixed_price_promotions.js +0 -1
  129. package/lib/resources/free_gift_promotions.d.ts +0 -1
  130. package/lib/resources/free_gift_promotions.js +0 -1
  131. package/lib/resources/free_shipping_promotions.d.ts +0 -1
  132. package/lib/resources/free_shipping_promotions.js +0 -1
  133. package/lib/resources/geocoders.d.ts +0 -1
  134. package/lib/resources/geocoders.js +0 -1
  135. package/lib/resources/gift_card_recipients.d.ts +0 -1
  136. package/lib/resources/gift_card_recipients.js +0 -1
  137. package/lib/resources/gift_cards.d.ts +0 -1
  138. package/lib/resources/gift_cards.js +0 -1
  139. package/lib/resources/google_geocoders.d.ts +0 -1
  140. package/lib/resources/google_geocoders.js +0 -1
  141. package/lib/resources/imports.d.ts +0 -1
  142. package/lib/resources/imports.js +0 -1
  143. package/lib/resources/in_stock_subscriptions.d.ts +0 -1
  144. package/lib/resources/in_stock_subscriptions.js +0 -1
  145. package/lib/resources/inventory_models.d.ts +0 -1
  146. package/lib/resources/inventory_models.js +0 -1
  147. package/lib/resources/inventory_return_locations.d.ts +0 -1
  148. package/lib/resources/inventory_return_locations.js +0 -1
  149. package/lib/resources/inventory_stock_locations.d.ts +0 -1
  150. package/lib/resources/inventory_stock_locations.js +0 -1
  151. package/lib/resources/klarna_gateways.d.ts +0 -1
  152. package/lib/resources/klarna_gateways.js +0 -1
  153. package/lib/resources/klarna_payments.d.ts +0 -1
  154. package/lib/resources/klarna_payments.js +0 -1
  155. package/lib/resources/line_item_options.d.ts +0 -1
  156. package/lib/resources/line_item_options.js +0 -1
  157. package/lib/resources/line_items.d.ts +0 -1
  158. package/lib/resources/line_items.js +0 -1
  159. package/lib/resources/manual_gateways.d.ts +0 -1
  160. package/lib/resources/manual_gateways.js +0 -1
  161. package/lib/resources/manual_tax_calculators.d.ts +0 -1
  162. package/lib/resources/manual_tax_calculators.js +0 -1
  163. package/lib/resources/markets.d.ts +0 -1
  164. package/lib/resources/markets.js +0 -1
  165. package/lib/resources/merchants.d.ts +0 -1
  166. package/lib/resources/merchants.js +0 -1
  167. package/lib/resources/order_amount_promotion_rules.d.ts +0 -1
  168. package/lib/resources/order_amount_promotion_rules.js +0 -1
  169. package/lib/resources/order_copies.d.ts +0 -1
  170. package/lib/resources/order_copies.js +0 -1
  171. package/lib/resources/order_subscriptions.d.ts +0 -1
  172. package/lib/resources/order_subscriptions.js +0 -1
  173. package/lib/resources/order_validation_rules.d.ts +0 -1
  174. package/lib/resources/order_validation_rules.js +0 -1
  175. package/lib/resources/orders.d.ts +0 -1
  176. package/lib/resources/orders.js +0 -1
  177. package/lib/resources/organization.d.ts +0 -1
  178. package/lib/resources/organization.js +0 -1
  179. package/lib/resources/packages.d.ts +0 -1
  180. package/lib/resources/packages.js +0 -1
  181. package/lib/resources/parcel_line_items.d.ts +0 -1
  182. package/lib/resources/parcel_line_items.js +0 -1
  183. package/lib/resources/parcels.d.ts +0 -1
  184. package/lib/resources/parcels.js +0 -1
  185. package/lib/resources/payment_gateways.d.ts +0 -1
  186. package/lib/resources/payment_gateways.js +0 -1
  187. package/lib/resources/payment_methods.d.ts +0 -1
  188. package/lib/resources/payment_methods.js +0 -1
  189. package/lib/resources/paypal_gateways.d.ts +0 -1
  190. package/lib/resources/paypal_gateways.js +0 -1
  191. package/lib/resources/paypal_payments.d.ts +0 -1
  192. package/lib/resources/paypal_payments.js +0 -1
  193. package/lib/resources/percentage_discount_promotions.d.ts +0 -1
  194. package/lib/resources/percentage_discount_promotions.js +0 -1
  195. package/lib/resources/price_lists.d.ts +0 -1
  196. package/lib/resources/price_lists.js +0 -1
  197. package/lib/resources/prices.d.ts +0 -1
  198. package/lib/resources/prices.js +0 -1
  199. package/lib/resources/promotion_rules.d.ts +0 -1
  200. package/lib/resources/promotion_rules.js +0 -1
  201. package/lib/resources/promotions.d.ts +0 -1
  202. package/lib/resources/promotions.js +0 -1
  203. package/lib/resources/refunds.d.ts +0 -1
  204. package/lib/resources/refunds.js +0 -1
  205. package/lib/resources/return_line_items.d.ts +0 -1
  206. package/lib/resources/return_line_items.js +0 -1
  207. package/lib/resources/returns.d.ts +0 -1
  208. package/lib/resources/returns.js +0 -1
  209. package/lib/resources/shipments.d.ts +0 -1
  210. package/lib/resources/shipments.js +0 -1
  211. package/lib/resources/shipping_categories.d.ts +0 -1
  212. package/lib/resources/shipping_categories.js +0 -1
  213. package/lib/resources/shipping_methods.d.ts +0 -1
  214. package/lib/resources/shipping_methods.js +0 -1
  215. package/lib/resources/shipping_zones.d.ts +0 -1
  216. package/lib/resources/shipping_zones.js +0 -1
  217. package/lib/resources/sku_list_items.d.ts +0 -1
  218. package/lib/resources/sku_list_items.js +0 -1
  219. package/lib/resources/sku_list_promotion_rules.d.ts +0 -1
  220. package/lib/resources/sku_list_promotion_rules.js +0 -1
  221. package/lib/resources/sku_lists.d.ts +0 -1
  222. package/lib/resources/sku_lists.js +0 -1
  223. package/lib/resources/sku_options.d.ts +0 -1
  224. package/lib/resources/sku_options.js +0 -1
  225. package/lib/resources/skus.d.ts +0 -1
  226. package/lib/resources/skus.js +0 -1
  227. package/lib/resources/stock_items.d.ts +0 -1
  228. package/lib/resources/stock_items.js +0 -1
  229. package/lib/resources/stock_line_items.d.ts +0 -1
  230. package/lib/resources/stock_line_items.js +0 -1
  231. package/lib/resources/stock_locations.d.ts +0 -1
  232. package/lib/resources/stock_locations.js +0 -1
  233. package/lib/resources/stock_transfers.d.ts +0 -1
  234. package/lib/resources/stock_transfers.js +0 -1
  235. package/lib/resources/stripe_gateways.d.ts +0 -1
  236. package/lib/resources/stripe_gateways.js +0 -1
  237. package/lib/resources/stripe_payments.d.ts +0 -1
  238. package/lib/resources/stripe_payments.js +0 -1
  239. package/lib/resources/tax_calculators.d.ts +0 -1
  240. package/lib/resources/tax_calculators.js +0 -1
  241. package/lib/resources/tax_categories.d.ts +0 -1
  242. package/lib/resources/tax_categories.js +0 -1
  243. package/lib/resources/tax_rules.d.ts +0 -1
  244. package/lib/resources/tax_rules.js +0 -1
  245. package/lib/resources/taxjar_accounts.d.ts +0 -1
  246. package/lib/resources/taxjar_accounts.js +0 -1
  247. package/lib/resources/transactions.d.ts +0 -1
  248. package/lib/resources/transactions.js +0 -1
  249. package/lib/resources/voids.d.ts +0 -1
  250. package/lib/resources/voids.js +0 -1
  251. package/lib/resources/webhooks.d.ts +0 -1
  252. package/lib/resources/webhooks.js +0 -1
  253. package/lib/resources/wire_transfers.d.ts +0 -1
  254. package/lib/resources/wire_transfers.js +0 -1
  255. package/lib/static.d.ts +0 -1
  256. package/lib/static.js +0 -1
  257. package/lib/util.d.ts +0 -2
  258. package/lib/util.js +0 -1
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{StockLocation}from'./stock_locations';import{Sku}from'./skus';import{Attachment}from'./attachments';declare type StockItemRel=ResourceRel&{type:typeof StockItems.TYPE;};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};declare type SkuRel=ResourceRel&{type:'skus';};interface StockItem extends Resource{sku_code?:string;quantity?:number;stock_location?:StockLocation;sku?:Sku;attachments?:Attachment[];}interface StockItemCreate extends ResourceCreate{sku_code?:string;quantity:number;stock_location:StockLocationRel;sku?:SkuRel;}interface StockItemUpdate extends ResourceUpdate{sku_code?:string;quantity?:number;stock_location?:StockLocationRel;sku?:SkuRel;}declare class StockItems extends ApiResource{static readonly TYPE:'stock_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockItem>>;create(resource:StockItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockItem>;update(resource:StockItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;stock_location(stockItemId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;sku(stockItemId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;attachments(stockItemId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isStockItem(resource:any):resource is StockItem;relationship(id:string|ResourceId|null):StockItemRel;type():string;}export default StockItems;export{StockItem,StockItemCreate,StockItemUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as c}from"../resource";class s extends c{async list(t,e){return this.resources.list({type:s.TYPE},t,e)}async create(t,e,r){return this.resources.create({...t,type:s.TYPE},e,r)}async retrieve(t,e,r){return this.resources.retrieve({type:s.TYPE,id:t},e,r)}async update(t,e,r){return this.resources.update({...t,type:s.TYPE},e,r)}async delete(t,e){await this.resources.delete({type:s.TYPE,id:t},e)}async stock_location(t,e,r){return this.resources.fetch({type:"stock_locations"},`stock_items/${t}/stock_location`,e,r)}async sku(t,e,r){return this.resources.fetch({type:"skus"},`stock_items/${t}/sku`,e,r)}async attachments(t,e,r){return this.resources.fetch({type:"attachments"},`stock_items/${t}/attachments`,e,r)}isStockItem(t){return t.type&&t.type===s.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:s.TYPE}:{id:t.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="stock_items";export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Shipment}from'./shipments';import{LineItem}from'./line_items';import{StockItem}from'./stock_items';declare type StockLineItemRel=ResourceRel&{type:typeof StockLineItems.TYPE;};interface StockLineItem extends Resource{sku_code?:string;bundle_code?:string;quantity?:number;shipment?:Shipment;line_item?:LineItem;stock_item?:StockItem;}declare class StockLineItems extends ApiResource{static readonly TYPE:'stock_line_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLineItem>;shipment(stockLineItemId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;line_item(stockLineItemId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;stock_item(stockLineItemId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockItem>;isStockLineItem(resource:any):resource is StockLineItem;relationship(id:string|ResourceId|null):StockLineItemRel;type():string;}export default StockLineItems;export{StockLineItem};
@@ -1 +0,0 @@
1
- import{ApiResource as r}from"../resource";class s extends r{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async retrieve(e,t,i){return this.resources.retrieve({type:s.TYPE,id:e},t,i)}async shipment(e,t,i){return this.resources.fetch({type:"shipments"},`stock_line_items/${e}/shipment`,t,i)}async line_item(e,t,i){return this.resources.fetch({type:"line_items"},`stock_line_items/${e}/line_item`,t,i)}async stock_item(e,t,i){return this.resources.fetch({type:"stock_items"},`stock_line_items/${e}/stock_item`,t,i)}isStockLineItem(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="stock_line_items";export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Address}from'./addresses';import{InventoryStockLocation}from'./inventory_stock_locations';import{InventoryReturnLocation}from'./inventory_return_locations';import{StockItem}from'./stock_items';import{StockTransfer}from'./stock_transfers';import{Attachment}from'./attachments';declare type StockLocationRel=ResourceRel&{type:typeof StockLocations.TYPE;};declare type AddressRel=ResourceRel&{type:'addresses';};interface StockLocation extends Resource{number?:number;name?:string;label_format?:string;suppress_etd?:boolean;address?:Address;inventory_stock_locations?:InventoryStockLocation[];inventory_return_locations?:InventoryReturnLocation[];stock_items?:StockItem[];stock_transfers?:StockTransfer[];attachments?:Attachment[];}interface StockLocationCreate extends ResourceCreate{name:string;label_format?:string;suppress_etd?:boolean;address:AddressRel;}interface StockLocationUpdate extends ResourceUpdate{name?:string;label_format?:string;suppress_etd?:boolean;address?:AddressRel;}declare class StockLocations extends ApiResource{static readonly TYPE:'stock_locations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLocation>>;create(resource:StockLocationCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;update(resource:StockLocationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;delete(id:string,options?:ResourcesConfig):Promise<void>;address(stockLocationId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;inventory_stock_locations(stockLocationId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InventoryStockLocation>>;inventory_return_locations(stockLocationId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<InventoryReturnLocation>>;stock_items(stockLocationId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockItem>>;stock_transfers(stockLocationId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;attachments(stockLocationId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isStockLocation(resource:any):resource is StockLocation;relationship(id:string|ResourceId|null):StockLocationRel;type():string;}export default StockLocations;export{StockLocation,StockLocationCreate,StockLocationUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as o}from"../resource";class r extends o{async list(t,e){return this.resources.list({type:r.TYPE},t,e)}async create(t,e,s){return this.resources.create({...t,type:r.TYPE},e,s)}async retrieve(t,e,s){return this.resources.retrieve({type:r.TYPE,id:t},e,s)}async update(t,e,s){return this.resources.update({...t,type:r.TYPE},e,s)}async delete(t,e){await this.resources.delete({type:r.TYPE,id:t},e)}async address(t,e,s){return this.resources.fetch({type:"addresses"},`stock_locations/${t}/address`,e,s)}async inventory_stock_locations(t,e,s){return this.resources.fetch({type:"inventory_stock_locations"},`stock_locations/${t}/inventory_stock_locations`,e,s)}async inventory_return_locations(t,e,s){return this.resources.fetch({type:"inventory_return_locations"},`stock_locations/${t}/inventory_return_locations`,e,s)}async stock_items(t,e,s){return this.resources.fetch({type:"stock_items"},`stock_locations/${t}/stock_items`,e,s)}async stock_transfers(t,e,s){return this.resources.fetch({type:"stock_transfers"},`stock_locations/${t}/stock_transfers`,e,s)}async attachments(t,e,s){return this.resources.fetch({type:"attachments"},`stock_locations/${t}/attachments`,e,s)}isStockLocation(t){return t.type&&t.type===r.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:r.TYPE}:{id:t.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="stock_locations";export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Sku}from'./skus';import{StockLocation}from'./stock_locations';import{Shipment}from'./shipments';import{LineItem}from'./line_items';declare type StockTransferRel=ResourceRel&{type:typeof StockTransfers.TYPE;};declare type SkuRel=ResourceRel&{type:'skus';};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};declare type ShipmentRel=ResourceRel&{type:'shipments';};declare type LineItemRel=ResourceRel&{type:'line_items';};interface StockTransfer extends Resource{sku_code?:string;status?:string;quantity?:number;completed_at?:string;cancelled_at?:string;sku?:Sku;origin_stock_location?:StockLocation;destination_stock_location?:StockLocation;shipment?:Shipment;line_item?:LineItem;}interface StockTransferCreate extends ResourceCreate{sku_code?:string;quantity:number;sku:SkuRel;origin_stock_location:StockLocationRel;destination_stock_location:StockLocationRel;shipment?:ShipmentRel;line_item?:LineItemRel;}interface StockTransferUpdate extends ResourceUpdate{sku_code?:string;_upcoming?:boolean;_picking?:boolean;_in_transit?:boolean;_complete?:boolean;_cancel?:boolean;sku?:SkuRel;origin_stock_location?:StockLocationRel;destination_stock_location?:StockLocationRel;}declare class StockTransfers extends ApiResource{static readonly TYPE:'stock_transfers';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;create(resource:StockTransferCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;update(resource:StockTransferUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockTransfer>;delete(id:string,options?:ResourcesConfig):Promise<void>;sku(stockTransferId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;origin_stock_location(stockTransferId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;destination_stock_location(stockTransferId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;shipment(stockTransferId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;line_item(stockTransferId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;isStockTransfer(resource:any):resource is StockTransfer;relationship(id:string|ResourceId|null):StockTransferRel;type():string;}export default StockTransfers;export{StockTransfer,StockTransferCreate,StockTransferUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as n}from"../resource";class r extends n{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...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({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async sku(e,t,s){return this.resources.fetch({type:"skus"},`stock_transfers/${e}/sku`,t,s)}async origin_stock_location(e,t,s){return this.resources.fetch({type:"stock_locations"},`stock_transfers/${e}/origin_stock_location`,t,s)}async destination_stock_location(e,t,s){return this.resources.fetch({type:"stock_locations"},`stock_transfers/${e}/destination_stock_location`,t,s)}async shipment(e,t,s){return this.resources.fetch({type:"shipments"},`stock_transfers/${e}/shipment`,t,s)}async line_item(e,t,s){return this.resources.fetch({type:"line_items"},`stock_transfers/${e}/line_item`,t,s)}isStockTransfer(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="stock_transfers";export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{PaymentMethod}from'./payment_methods';import{StripePayment}from'./stripe_payments';declare type StripeGatewayRel=ResourceRel&{type:typeof StripeGateways.TYPE;};interface StripeGateway extends Resource{name?:string;webhook_endpoint_id?:string;webhook_endpoint_secret?:string;webhook_endpoint_url?:string;payment_methods?:PaymentMethod[];stripe_payments?:StripePayment[];}interface StripeGatewayCreate extends ResourceCreate{name:string;login:string;publishable_key?:string;}interface StripeGatewayUpdate extends ResourceUpdate{name?:string;}declare class StripeGateways extends ApiResource{static readonly TYPE:'stripe_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StripeGateway>>;create(resource:StripeGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripeGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripeGateway>;update(resource:StripeGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripeGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(stripeGatewayId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;stripe_payments(stripeGatewayId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StripePayment>>;isStripeGateway(resource:any):resource is StripeGateway;relationship(id:string|ResourceId|null):StripeGatewayRel;type():string;}export default StripeGateways;export{StripeGateway,StripeGatewayCreate,StripeGatewayUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as p}from"../resource";class r extends p{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...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({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async payment_methods(e,t,s){return this.resources.fetch({type:"payment_methods"},`stripe_gateways/${e}/payment_methods`,t,s)}async stripe_payments(e,t,s){return this.resources.fetch({type:"stripe_payments"},`stripe_gateways/${e}/stripe_payments`,t,s)}isStripeGateway(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="stripe_gateways";export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Order}from'./orders';import{PaymentGateway}from'./payment_gateways';declare type StripePaymentRel=ResourceRel&{type:typeof StripePayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface StripePayment extends Resource{client_secret?:string;publishable_key?:string;options?:object;payment_method?:object;order?:Order;payment_gateway?:PaymentGateway;}interface StripePaymentCreate extends ResourceCreate{options?:object;order:OrderRel;}interface StripePaymentUpdate extends ResourceUpdate{options?:object;_refresh?:boolean;order?:OrderRel;}declare class StripePayments extends ApiResource{static readonly TYPE:'stripe_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StripePayment>>;create(resource:StripePaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;update(resource:StripePaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StripePayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(stripePaymentId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(stripePaymentId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isStripePayment(resource:any):resource is StripePayment;relationship(id:string|ResourceId|null):StripePaymentRel;type():string;}export default StripePayments;export{StripePayment,StripePaymentCreate,StripePaymentUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as y}from"../resource";class r extends y{async list(e,t){return this.resources.list({type:r.TYPE},e,t)}async create(e,t,s){return this.resources.create({...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({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){return this.resources.fetch({type:"orders"},`stripe_payments/${e}/order`,t,s)}async payment_gateway(e,t,s){return this.resources.fetch({type:"payment_gateways"},`stripe_payments/${e}/payment_gateway`,t,s)}isStripePayment(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="stripe_payments";export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{TaxCategory}from'./tax_categories';import{Market}from'./markets';import{Attachment}from'./attachments';declare type TaxCalculatorRel=ResourceRel&{type:typeof TaxCalculators.TYPE;};interface TaxCalculator extends Resource{name?:string;tax_categories?:TaxCategory[];markets?:Market[];attachments?:Attachment[];}declare class TaxCalculators extends ApiResource{static readonly TYPE:'tax_calculators';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCalculator>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCalculator>;tax_categories(taxCalculatorId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;markets(taxCalculatorId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(taxCalculatorId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isTaxCalculator(resource:any):resource is TaxCalculator;relationship(id:string|ResourceId|null):TaxCalculatorRel;type():string;}export default TaxCalculators;export{TaxCalculator};
@@ -1 +0,0 @@
1
- import{ApiResource as a}from"../resource";class s extends a{async list(t,e){return this.resources.list({type:s.TYPE},t,e)}async retrieve(t,e,r){return this.resources.retrieve({type:s.TYPE,id:t},e,r)}async tax_categories(t,e,r){return this.resources.fetch({type:"tax_categories"},`tax_calculators/${t}/tax_categories`,e,r)}async markets(t,e,r){return this.resources.fetch({type:"markets"},`tax_calculators/${t}/markets`,e,r)}async attachments(t,e,r){return this.resources.fetch({type:"attachments"},`tax_calculators/${t}/attachments`,e,r)}isTaxCalculator(t){return t.type&&t.type===s.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:s.TYPE}:{id:t.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="tax_calculators";export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Sku}from'./skus';import{AvalaraAccount}from'./avalara_accounts';import{TaxjarAccount}from'./taxjar_accounts';import{ManualTaxCalculator}from'./manual_tax_calculators';import{ExternalTaxCalculator}from'./external_tax_calculators';import{Attachment}from'./attachments';declare type TaxCategoryRel=ResourceRel&{type:typeof TaxCategories.TYPE;};declare type SkuRel=ResourceRel&{type:'skus';};declare type AvalaraAccountRel=ResourceRel&{type:'avalara_accounts';};declare type TaxjarAccountRel=ResourceRel&{type:'taxjar_accounts';};declare type ManualTaxCalculatorRel=ResourceRel&{type:'manual_tax_calculators';};declare type ExternalTaxCalculatorRel=ResourceRel&{type:'external_tax_calculators';};interface TaxCategory extends Resource{code?:string;sku_code?:string;sku?:Sku;tax_calculator?:AvalaraAccount|TaxjarAccount|ManualTaxCalculator|ExternalTaxCalculator;attachments?:Attachment[];}interface TaxCategoryCreate extends ResourceCreate{code:string;sku_code?:string;sku:SkuRel;tax_calculator:AvalaraAccountRel|TaxjarAccountRel|ManualTaxCalculatorRel|ExternalTaxCalculatorRel;}interface TaxCategoryUpdate extends ResourceUpdate{code?:string;sku_code?:string;sku?:SkuRel;}declare class TaxCategories extends ApiResource{static readonly TYPE:'tax_categories';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;create(resource:TaxCategoryCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCategory>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCategory>;update(resource:TaxCategoryUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxCategory>;delete(id:string,options?:ResourcesConfig):Promise<void>;sku(taxCategoryId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;attachments(taxCategoryId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isTaxCategory(resource:any):resource is TaxCategory;relationship(id:string|ResourceId|null):TaxCategoryRel;type():string;}export default TaxCategories;export{TaxCategory,TaxCategoryCreate,TaxCategoryUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async sku(e,t,r){return this.resources.fetch({type:"skus"},`tax_categories/${e}/sku`,t,r)}async attachments(e,t,r){return this.resources.fetch({type:"attachments"},`tax_categories/${e}/attachments`,t,r)}isTaxCategory(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="tax_categories";export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{ManualTaxCalculator}from'./manual_tax_calculators';declare type TaxRuleRel=ResourceRel&{type:typeof TaxRules.TYPE;};declare type ManualTaxCalculatorRel=ResourceRel&{type:'manual_tax_calculators';};interface TaxRule extends Resource{name?:string;tax_rate?:number;country_code_regex?:string;not_country_code_regex?:string;state_code_regex?:string;not_state_code_regex?:string;zip_code_regex?:string;not_zip_code_regex?:string;freight_taxable?:boolean;payment_method_taxable?:boolean;gift_card_taxable?:boolean;adjustment_taxable?:boolean;breakdown?:object;manual_tax_calculator?:ManualTaxCalculator;}interface TaxRuleCreate extends ResourceCreate{name:string;tax_rate?:number;country_code_regex?:string;not_country_code_regex?:string;state_code_regex?:string;not_state_code_regex?:string;zip_code_regex?:string;not_zip_code_regex?:string;freight_taxable?:boolean;payment_method_taxable?:boolean;gift_card_taxable?:boolean;adjustment_taxable?:boolean;manual_tax_calculator:ManualTaxCalculatorRel;}interface TaxRuleUpdate extends ResourceUpdate{name?:string;tax_rate?:number;country_code_regex?:string;not_country_code_regex?:string;state_code_regex?:string;not_state_code_regex?:string;zip_code_regex?:string;not_zip_code_regex?:string;freight_taxable?:boolean;payment_method_taxable?:boolean;gift_card_taxable?:boolean;adjustment_taxable?:boolean;manual_tax_calculator?:ManualTaxCalculatorRel;}declare class TaxRules extends ApiResource{static readonly TYPE:'tax_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxRule>>;create(resource:TaxRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxRule>;update(resource:TaxRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;manual_tax_calculator(taxRuleId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ManualTaxCalculator>;isTaxRule(resource:any):resource is TaxRule;relationship(id:string|ResourceId|null):TaxRuleRel;type():string;}export default TaxRules;export{TaxRule,TaxRuleCreate,TaxRuleUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as a}from"../resource";class t extends a{async list(e,r){return this.resources.list({type:t.TYPE},e,r)}async create(e,r,s){return this.resources.create({...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({...e,type:t.TYPE},r,s)}async delete(e,r){await this.resources.delete({type:t.TYPE,id:e},r)}async manual_tax_calculator(e,r,s){return this.resources.fetch({type:"manual_tax_calculators"},`tax_rules/${e}/manual_tax_calculator`,r,s)}isTaxRule(e){return e.type&&e.type===t.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:t.TYPE}:{id:e.id,type:t.TYPE}}type(){return t.TYPE}}t.TYPE="tax_rules";export default t;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{TaxCategory}from'./tax_categories';import{Market}from'./markets';import{Attachment}from'./attachments';declare type TaxjarAccountRel=ResourceRel&{type:typeof TaxjarAccounts.TYPE;};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface TaxjarAccount extends Resource{name?:string;tax_categories?:TaxCategory[];markets?:Market[];attachments?:Attachment[];}interface TaxjarAccountCreate extends ResourceCreate{name:string;api_key:string;tax_categories?:TaxCategoryRel[];}interface TaxjarAccountUpdate extends ResourceUpdate{name?:string;api_key?:string;tax_categories?:TaxCategoryRel[];}declare class TaxjarAccounts extends ApiResource{static readonly TYPE:'taxjar_accounts';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxjarAccount>>;create(resource:TaxjarAccountCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxjarAccount>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxjarAccount>;update(resource:TaxjarAccountUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<TaxjarAccount>;delete(id:string,options?:ResourcesConfig):Promise<void>;tax_categories(taxjarAccountId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<TaxCategory>>;markets(taxjarAccountId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Market>>;attachments(taxjarAccountId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isTaxjarAccount(resource:any):resource is TaxjarAccount;relationship(id:string|ResourceId|null):TaxjarAccountRel;type():string;}export default TaxjarAccounts;export{TaxjarAccount,TaxjarAccountCreate,TaxjarAccountUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as a}from"../resource";class s extends a{async list(t,e){return this.resources.list({type:s.TYPE},t,e)}async create(t,e,r){return this.resources.create({...t,type:s.TYPE},e,r)}async retrieve(t,e,r){return this.resources.retrieve({type:s.TYPE,id:t},e,r)}async update(t,e,r){return this.resources.update({...t,type:s.TYPE},e,r)}async delete(t,e){await this.resources.delete({type:s.TYPE,id:t},e)}async tax_categories(t,e,r){return this.resources.fetch({type:"tax_categories"},`taxjar_accounts/${t}/tax_categories`,e,r)}async markets(t,e,r){return this.resources.fetch({type:"markets"},`taxjar_accounts/${t}/markets`,e,r)}async attachments(t,e,r){return this.resources.fetch({type:"attachments"},`taxjar_accounts/${t}/attachments`,e,r)}isTaxjarAccount(t){return t.type&&t.type===s.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:s.TYPE}:{id:t.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="taxjar_accounts";export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Order}from'./orders';declare type TransactionRel=ResourceRel&{type:typeof Transactions.TYPE;};interface Transaction extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;order?:Order;}declare class Transactions extends ApiResource{static readonly TYPE:'transactions';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Transaction>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Transaction>;order(transactionId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;isTransaction(resource:any):resource is Transaction;relationship(id:string|ResourceId|null):TransactionRel;type():string;}export default Transactions;export{Transaction};
@@ -1 +0,0 @@
1
- import{ApiResource as i}from"../resource";class e extends i{async list(t,r){return this.resources.list({type:e.TYPE},t,r)}async retrieve(t,r,s){return this.resources.retrieve({type:e.TYPE,id:t},r,s)}async order(t,r,s){return this.resources.fetch({type:"orders"},`transactions/${t}/order`,r,s)}isTransaction(t){return t.type&&t.type===e.TYPE}relationship(t){return t===null||typeof t=="string"?{id:t,type:e.TYPE}:{id:t.id,type:e.TYPE}}type(){return e.TYPE}}e.TYPE="transactions";export default e;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Order}from'./orders';import{Authorization}from'./authorizations';declare type VoidRel=ResourceRel&{type:typeof Voids.TYPE;};interface Void extends Resource{number?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;succeeded?:boolean;message?:string;error_code?:string;error_detail?:string;token?:string;gateway_transaction_id?:string;order?:Order;reference_authorization?:Authorization;}declare class Voids extends ApiResource{static readonly TYPE:'voids';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Void>;order(voidId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;reference_authorization(voidId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;isVoid(resource:any):resource is Void;relationship(id:string|ResourceId|null):VoidRel;type():string;}export default Voids;export{Void};
@@ -1 +0,0 @@
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)}async order(e,t,s){return this.resources.fetch({type:"orders"},`voids/${e}/order`,t,s)}async reference_authorization(e,t,s){return this.resources.fetch({type:"authorizations"},`voids/${e}/reference_authorization`,t,s)}isVoid(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="voids";export default r;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{EventCallback}from'./event_callbacks';declare type WebhookRel=ResourceRel&{type:typeof Webhooks.TYPE;};interface Webhook extends Resource{name?:string;topic?:string;callback_url?:string;include_resources?:string[];circuit_state?:string;circuit_failure_count?:number;last_event_callbacks?:EventCallback[];}interface WebhookCreate extends ResourceCreate{name?:string;topic:string;callback_url:string;include_resources?:string[];}interface WebhookUpdate extends ResourceUpdate{name?:string;topic?:string;callback_url?:string;include_resources?:string[];_reset_circuit?:boolean;}declare class Webhooks extends ApiResource{static readonly TYPE:'webhooks';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Webhook>>;create(resource:WebhookCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Webhook>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Webhook>;update(resource:WebhookUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Webhook>;delete(id:string,options?:ResourcesConfig):Promise<void>;last_event_callbacks(webhookId:string,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<EventCallback>>;isWebhook(resource:any):resource is Webhook;relationship(id:string|ResourceId|null):WebhookRel;type():string;}export default Webhooks;export{Webhook,WebhookCreate,WebhookUpdate};
@@ -1 +0,0 @@
1
- import{ApiResource as a}from"../resource";class s extends a{async list(e,t){return this.resources.list({type:s.TYPE},e,t)}async create(e,t,r){return this.resources.create({...e,type:s.TYPE},t,r)}async retrieve(e,t,r){return this.resources.retrieve({type:s.TYPE,id:e},t,r)}async update(e,t,r){return this.resources.update({...e,type:s.TYPE},t,r)}async delete(e,t){await this.resources.delete({type:s.TYPE,id:e},t)}async last_event_callbacks(e,t,r){return this.resources.fetch({type:"event_callbacks"},`webhooks/${e}/last_event_callbacks`,t,r)}isWebhook(e){return e.type&&e.type===s.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:s.TYPE}:{id:e.id,type:s.TYPE}}type(){return s.TYPE}}s.TYPE="webhooks";export default s;
@@ -1 +0,0 @@
1
- import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import{QueryParamsList,QueryParamsRetrieve}from'../query';import{Order}from'./orders';declare type WireTransferRel=ResourceRel&{type:typeof WireTransfers.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface WireTransfer extends Resource{order?:Order;}interface WireTransferCreate extends ResourceCreate{order:OrderRel;}interface WireTransferUpdate extends ResourceUpdate{order?:OrderRel;}declare class WireTransfers extends ApiResource{static readonly TYPE:'wire_transfers';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<WireTransfer>>;create(resource:WireTransferCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<WireTransfer>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<WireTransfer>;update(resource:WireTransferUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<WireTransfer>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(wireTransferId:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;isWireTransfer(resource:any):resource is WireTransfer;relationship(id:string|ResourceId|null):WireTransferRel;type():string;}export default WireTransfers;export{WireTransfer,WireTransferCreate,WireTransferUpdate};
@@ -1 +0,0 @@
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 create(e,t,s){return this.resources.create({...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({...e,type:r.TYPE},t,s)}async delete(e,t){await this.resources.delete({type:r.TYPE,id:e},t)}async order(e,t,s){return this.resources.fetch({type:"orders"},`wire_transfers/${e}/order`,t,s)}isWireTransfer(e){return e.type&&e.type===r.TYPE}relationship(e){return e===null||typeof e=="string"?{id:e,type:r.TYPE}:{id:e.id,type:r.TYPE}}type(){return r.TYPE}}r.TYPE="wire_transfers";export default r;
package/lib/static.d.ts DELETED
@@ -1 +0,0 @@
1
- import{SdkError,ApiError}from'./error';export declare const CommerceLayerStatic:{resources:()=>readonly string[];isSdkError:(error:unknown)=>error is SdkError;isApiError:(error:unknown)=>error is ApiError;};
package/lib/static.js DELETED
@@ -1 +0,0 @@
1
- import*as o from"./api";import{SdkError as s,ApiError as i}from"./error";export const CommerceLayerStatic={resources:()=>o.resourceList,isSdkError:r=>s.isSdkError(r),isApiError:r=>i.isApiError(r)};
package/lib/util.d.ts DELETED
@@ -1,2 +0,0 @@
1
- /// <reference types="node" />
2
- declare const sleep:(ms:number)=>Promise<NodeJS.Timeout>;export{sleep};
package/lib/util.js DELETED
@@ -1 +0,0 @@
1
- const t=async e=>new Promise(s=>setTimeout(s,e));export{t as sleep};