@commercelayer/sdk 4.7.5 → 4.7.6

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