@commercelayer/sdk 4.7.5 → 4.8.1

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 (231) 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/commercelayer.js +1 -1
  5. package/lib/cjs/common.d.ts +1 -4
  6. package/lib/cjs/config.d.ts +1 -11
  7. package/lib/cjs/debug.d.ts +1 -3
  8. package/lib/cjs/error.d.ts +1 -26
  9. package/lib/cjs/index.d.ts +1 -7
  10. package/lib/cjs/interceptor.d.ts +1 -19
  11. package/lib/cjs/jsonapi.d.ts +1 -5
  12. package/lib/cjs/model.d.ts +1 -101
  13. package/lib/cjs/query.d.ts +1 -23
  14. package/lib/cjs/resource.d.ts +1 -76
  15. package/lib/cjs/resources/addresses.d.ts +1 -88
  16. package/lib/cjs/resources/adjustments.d.ts +1 -35
  17. package/lib/cjs/resources/adyen_gateways.d.ts +1 -47
  18. package/lib/cjs/resources/adyen_payments.d.ts +1 -44
  19. package/lib/cjs/resources/application.d.ts +1 -21
  20. package/lib/cjs/resources/attachments.d.ts +1 -156
  21. package/lib/cjs/resources/authorizations.d.ts +1 -57
  22. package/lib/cjs/resources/avalara_accounts.d.ts +1 -52
  23. package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -32
  24. package/lib/cjs/resources/bing_geocoders.d.ts +1 -35
  25. package/lib/cjs/resources/braintree_gateways.d.ts +1 -56
  26. package/lib/cjs/resources/braintree_payments.d.ts +1 -47
  27. package/lib/cjs/resources/bundles.d.ts +1 -74
  28. package/lib/cjs/resources/captures.d.ts +1 -48
  29. package/lib/cjs/resources/carrier_accounts.d.ts +1 -26
  30. package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -45
  31. package/lib/cjs/resources/checkout_com_payments.d.ts +1 -51
  32. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -59
  33. package/lib/cjs/resources/coupon_recipients.d.ts +1 -44
  34. package/lib/cjs/resources/coupons.d.ts +1 -45
  35. package/lib/cjs/resources/customer_addresses.d.ts +1 -41
  36. package/lib/cjs/resources/customer_groups.d.ts +1 -36
  37. package/lib/cjs/resources/customer_password_resets.d.ts +1 -33
  38. package/lib/cjs/resources/customer_payment_sources.d.ts +1 -70
  39. package/lib/cjs/resources/customer_subscriptions.d.ts +1 -28
  40. package/lib/cjs/resources/customers.d.ts +1 -60
  41. package/lib/cjs/resources/delivery_lead_times.d.ts +1 -51
  42. package/lib/cjs/resources/event_callbacks.d.ts +1 -24
  43. package/lib/cjs/resources/external_gateways.d.ts +1 -49
  44. package/lib/cjs/resources/external_payments.d.ts +1 -43
  45. package/lib/cjs/resources/external_promotions.d.ts +1 -86
  46. package/lib/cjs/resources/external_tax_calculators.d.ts +1 -44
  47. package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -88
  48. package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -99
  49. package/lib/cjs/resources/free_gift_promotions.d.ts +1 -97
  50. package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -83
  51. package/lib/cjs/resources/geocoders.d.ts +1 -24
  52. package/lib/cjs/resources/gift_card_recipients.d.ts +1 -44
  53. package/lib/cjs/resources/gift_cards.d.ts +1 -82
  54. package/lib/cjs/resources/google_geocoders.d.ts +1 -35
  55. package/lib/cjs/resources/imports.d.ts +1 -40
  56. package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -59
  57. package/lib/cjs/resources/inventory_models.d.ts +1 -42
  58. package/lib/cjs/resources/inventory_return_locations.d.ts +1 -43
  59. package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -46
  60. package/lib/cjs/resources/klarna_gateways.d.ts +1 -44
  61. package/lib/cjs/resources/klarna_payments.d.ts +1 -41
  62. package/lib/cjs/resources/line_item_options.d.ts +1 -57
  63. package/lib/cjs/resources/line_items.d.ts +1 -125
  64. package/lib/cjs/resources/manual_gateways.d.ts +1 -33
  65. package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -49
  66. package/lib/cjs/resources/markets.d.ts +1 -81
  67. package/lib/cjs/resources/merchants.d.ts +1 -38
  68. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -56
  69. package/lib/cjs/resources/order_copies.d.ts +1 -45
  70. package/lib/cjs/resources/order_subscriptions.d.ts +1 -67
  71. package/lib/cjs/resources/order_validation_rules.d.ts +1 -20
  72. package/lib/cjs/resources/orders.d.ts +1 -271
  73. package/lib/cjs/resources/organization.d.ts +1 -32
  74. package/lib/cjs/resources/packages.d.ts +1 -56
  75. package/lib/cjs/resources/parcel_line_items.d.ts +1 -49
  76. package/lib/cjs/resources/parcels.d.ts +1 -108
  77. package/lib/cjs/resources/payment_gateways.d.ts +1 -21
  78. package/lib/cjs/resources/payment_methods.d.ts +1 -59
  79. package/lib/cjs/resources/paypal_gateways.d.ts +1 -39
  80. package/lib/cjs/resources/paypal_payments.d.ts +1 -49
  81. package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -97
  82. package/lib/cjs/resources/price_lists.d.ts +1 -39
  83. package/lib/cjs/resources/prices.d.ts +1 -57
  84. package/lib/cjs/resources/promotion_rules.d.ts +1 -24
  85. package/lib/cjs/resources/promotions.d.ts +1 -41
  86. package/lib/cjs/resources/refunds.d.ts +1 -34
  87. package/lib/cjs/resources/return_line_items.d.ts +1 -49
  88. package/lib/cjs/resources/returns.d.ts +1 -72
  89. package/lib/cjs/resources/shipments.d.ts +1 -89
  90. package/lib/cjs/resources/shipping_categories.d.ts +1 -33
  91. package/lib/cjs/resources/shipping_methods.d.ts +1 -74
  92. package/lib/cjs/resources/shipping_zones.d.ts +1 -48
  93. package/lib/cjs/resources/sku_list_items.d.ts +1 -47
  94. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -68
  95. package/lib/cjs/resources/sku_lists.d.ts +1 -49
  96. package/lib/cjs/resources/sku_options.d.ts +1 -56
  97. package/lib/cjs/resources/skus.d.ts +1 -78
  98. package/lib/cjs/resources/stock_items.d.ts +1 -49
  99. package/lib/cjs/resources/stock_line_items.d.ts +1 -29
  100. package/lib/cjs/resources/stock_locations.d.ts +1 -57
  101. package/lib/cjs/resources/stock_transfers.d.ts +1 -71
  102. package/lib/cjs/resources/stripe_gateways.d.ts +1 -38
  103. package/lib/cjs/resources/stripe_payments.d.ts +1 -42
  104. package/lib/cjs/resources/tax_calculators.d.ts +1 -27
  105. package/lib/cjs/resources/tax_categories.d.ts +1 -59
  106. package/lib/cjs/resources/tax_rules.d.ts +1 -69
  107. package/lib/cjs/resources/taxjar_accounts.d.ts +1 -43
  108. package/lib/cjs/resources/transactions.d.ts +1 -31
  109. package/lib/cjs/resources/voids.d.ts +1 -34
  110. package/lib/cjs/resources/webhooks.d.ts +1 -42
  111. package/lib/cjs/resources/wire_transfers.d.ts +1 -32
  112. package/lib/cjs/static.d.ts +1 -6
  113. package/lib/cjs/static.js +1 -1
  114. package/lib/cjs/util.d.ts +1 -2
  115. package/lib/esm/api.d.ts +1 -103
  116. package/lib/esm/client.d.ts +1 -31
  117. package/lib/esm/commercelayer.d.ts +1 -122
  118. package/lib/esm/commercelayer.js +1 -1
  119. package/lib/esm/common.d.ts +1 -4
  120. package/lib/esm/config.d.ts +1 -11
  121. package/lib/esm/debug.d.ts +1 -3
  122. package/lib/esm/error.d.ts +1 -26
  123. package/lib/esm/index.d.ts +1 -7
  124. package/lib/esm/interceptor.d.ts +1 -19
  125. package/lib/esm/jsonapi.d.ts +1 -5
  126. package/lib/esm/model.d.ts +1 -101
  127. package/lib/esm/query.d.ts +1 -23
  128. package/lib/esm/resource.d.ts +1 -76
  129. package/lib/esm/resources/addresses.d.ts +1 -88
  130. package/lib/esm/resources/adjustments.d.ts +1 -35
  131. package/lib/esm/resources/adyen_gateways.d.ts +1 -47
  132. package/lib/esm/resources/adyen_payments.d.ts +1 -44
  133. package/lib/esm/resources/application.d.ts +1 -21
  134. package/lib/esm/resources/attachments.d.ts +1 -156
  135. package/lib/esm/resources/authorizations.d.ts +1 -57
  136. package/lib/esm/resources/avalara_accounts.d.ts +1 -52
  137. package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -32
  138. package/lib/esm/resources/bing_geocoders.d.ts +1 -35
  139. package/lib/esm/resources/braintree_gateways.d.ts +1 -56
  140. package/lib/esm/resources/braintree_payments.d.ts +1 -47
  141. package/lib/esm/resources/bundles.d.ts +1 -74
  142. package/lib/esm/resources/captures.d.ts +1 -48
  143. package/lib/esm/resources/carrier_accounts.d.ts +1 -26
  144. package/lib/esm/resources/checkout_com_gateways.d.ts +1 -45
  145. package/lib/esm/resources/checkout_com_payments.d.ts +1 -51
  146. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -59
  147. package/lib/esm/resources/coupon_recipients.d.ts +1 -44
  148. package/lib/esm/resources/coupons.d.ts +1 -45
  149. package/lib/esm/resources/customer_addresses.d.ts +1 -41
  150. package/lib/esm/resources/customer_groups.d.ts +1 -36
  151. package/lib/esm/resources/customer_password_resets.d.ts +1 -33
  152. package/lib/esm/resources/customer_payment_sources.d.ts +1 -70
  153. package/lib/esm/resources/customer_subscriptions.d.ts +1 -28
  154. package/lib/esm/resources/customers.d.ts +1 -60
  155. package/lib/esm/resources/delivery_lead_times.d.ts +1 -51
  156. package/lib/esm/resources/event_callbacks.d.ts +1 -24
  157. package/lib/esm/resources/external_gateways.d.ts +1 -49
  158. package/lib/esm/resources/external_payments.d.ts +1 -43
  159. package/lib/esm/resources/external_promotions.d.ts +1 -86
  160. package/lib/esm/resources/external_tax_calculators.d.ts +1 -44
  161. package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -88
  162. package/lib/esm/resources/fixed_price_promotions.d.ts +1 -99
  163. package/lib/esm/resources/free_gift_promotions.d.ts +1 -97
  164. package/lib/esm/resources/free_shipping_promotions.d.ts +1 -83
  165. package/lib/esm/resources/geocoders.d.ts +1 -24
  166. package/lib/esm/resources/gift_card_recipients.d.ts +1 -44
  167. package/lib/esm/resources/gift_cards.d.ts +1 -82
  168. package/lib/esm/resources/google_geocoders.d.ts +1 -35
  169. package/lib/esm/resources/imports.d.ts +1 -40
  170. package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -59
  171. package/lib/esm/resources/inventory_models.d.ts +1 -42
  172. package/lib/esm/resources/inventory_return_locations.d.ts +1 -43
  173. package/lib/esm/resources/inventory_stock_locations.d.ts +1 -46
  174. package/lib/esm/resources/klarna_gateways.d.ts +1 -44
  175. package/lib/esm/resources/klarna_payments.d.ts +1 -41
  176. package/lib/esm/resources/line_item_options.d.ts +1 -57
  177. package/lib/esm/resources/line_items.d.ts +1 -125
  178. package/lib/esm/resources/manual_gateways.d.ts +1 -33
  179. package/lib/esm/resources/manual_tax_calculators.d.ts +1 -49
  180. package/lib/esm/resources/markets.d.ts +1 -81
  181. package/lib/esm/resources/merchants.d.ts +1 -38
  182. package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -56
  183. package/lib/esm/resources/order_copies.d.ts +1 -45
  184. package/lib/esm/resources/order_subscriptions.d.ts +1 -67
  185. package/lib/esm/resources/order_validation_rules.d.ts +1 -20
  186. package/lib/esm/resources/orders.d.ts +1 -271
  187. package/lib/esm/resources/organization.d.ts +1 -32
  188. package/lib/esm/resources/packages.d.ts +1 -56
  189. package/lib/esm/resources/parcel_line_items.d.ts +1 -49
  190. package/lib/esm/resources/parcels.d.ts +1 -108
  191. package/lib/esm/resources/payment_gateways.d.ts +1 -21
  192. package/lib/esm/resources/payment_methods.d.ts +1 -59
  193. package/lib/esm/resources/paypal_gateways.d.ts +1 -39
  194. package/lib/esm/resources/paypal_payments.d.ts +1 -49
  195. package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -97
  196. package/lib/esm/resources/price_lists.d.ts +1 -39
  197. package/lib/esm/resources/prices.d.ts +1 -57
  198. package/lib/esm/resources/promotion_rules.d.ts +1 -24
  199. package/lib/esm/resources/promotions.d.ts +1 -41
  200. package/lib/esm/resources/refunds.d.ts +1 -34
  201. package/lib/esm/resources/return_line_items.d.ts +1 -49
  202. package/lib/esm/resources/returns.d.ts +1 -72
  203. package/lib/esm/resources/shipments.d.ts +1 -89
  204. package/lib/esm/resources/shipping_categories.d.ts +1 -33
  205. package/lib/esm/resources/shipping_methods.d.ts +1 -74
  206. package/lib/esm/resources/shipping_zones.d.ts +1 -48
  207. package/lib/esm/resources/sku_list_items.d.ts +1 -47
  208. package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -68
  209. package/lib/esm/resources/sku_lists.d.ts +1 -49
  210. package/lib/esm/resources/sku_options.d.ts +1 -56
  211. package/lib/esm/resources/skus.d.ts +1 -78
  212. package/lib/esm/resources/stock_items.d.ts +1 -49
  213. package/lib/esm/resources/stock_line_items.d.ts +1 -29
  214. package/lib/esm/resources/stock_locations.d.ts +1 -57
  215. package/lib/esm/resources/stock_transfers.d.ts +1 -71
  216. package/lib/esm/resources/stripe_gateways.d.ts +1 -38
  217. package/lib/esm/resources/stripe_payments.d.ts +1 -42
  218. package/lib/esm/resources/tax_calculators.d.ts +1 -27
  219. package/lib/esm/resources/tax_categories.d.ts +1 -59
  220. package/lib/esm/resources/tax_rules.d.ts +1 -69
  221. package/lib/esm/resources/taxjar_accounts.d.ts +1 -43
  222. package/lib/esm/resources/transactions.d.ts +1 -31
  223. package/lib/esm/resources/voids.d.ts +1 -34
  224. package/lib/esm/resources/webhooks.d.ts +1 -42
  225. package/lib/esm/resources/wire_transfers.d.ts +1 -32
  226. package/lib/esm/static.d.ts +1 -6
  227. package/lib/esm/static.js +1 -1
  228. package/lib/esm/util.d.ts +1 -2
  229. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  230. package/lib/tsconfig.tsbuildinfo +1 -1
  231. package/package.json +3 -3
@@ -1,23 +1 @@
1
- import { ResourceType } from "./resource";
2
- interface QueryParamsRetrieve {
3
- include?: string[];
4
- fields?: string[] | {
5
- [key: string]: string[];
6
- };
7
- }
8
- interface QueryParamsList extends QueryParamsRetrieve {
9
- sort?: string[] | {
10
- [key: string]: 'asc' | 'desc';
11
- };
12
- filters?: {
13
- [key: string]: string | number | boolean;
14
- };
15
- pageNumber?: number;
16
- pageSize?: number;
17
- }
18
- declare type QueryParams = QueryParamsRetrieve | QueryParamsList;
19
- export { QueryParamsRetrieve, QueryParamsList, QueryParams };
20
- declare const generateQueryStringParams: (params: QueryParamsRetrieve | QueryParamsList | undefined, res: string | ResourceType) => {
21
- [key: string]: string;
22
- };
23
- export { generateQueryStringParams };
1
+ import{ResourceType}from"./resource";interface QueryParamsRetrieve{include?:string[];fields?:string[]|{[key:string]:string[];};}interface QueryParamsList extends QueryParamsRetrieve{sort?:string[]|{[key:string]:'asc'|'desc';};filters?:{[key:string]:string|number|boolean;};pageNumber?:number;pageSize?:number;}declare type QueryParams=QueryParamsRetrieve|QueryParamsList;export{QueryParamsRetrieve,QueryParamsList,QueryParams};declare const generateQueryStringParams:(params:QueryParamsRetrieve|QueryParamsList|undefined,res:string|ResourceType)=>{[key:string]:string;};export{generateQueryStringParams};
@@ -1,76 +1 @@
1
- import { ApiClientInitConfig } from './client';
2
- import { QueryParamsRetrieve, QueryParamsList } from './query';
3
- import { ResourceTypeLock } from './api';
4
- import { InterceptorManager } from './interceptor';
5
- import { QueryParams } from '.';
6
- declare type ResourceNull = {
7
- id: null;
8
- } & ResourceType;
9
- declare type ResourceRel = ResourceId | ResourceNull;
10
- declare type Metadata = {
11
- [key: string]: any;
12
- };
13
- interface ResourceType {
14
- readonly type: ResourceTypeLock;
15
- }
16
- interface ResourceId extends ResourceType {
17
- readonly id: string;
18
- }
19
- interface Resource extends ResourceId {
20
- reference?: string;
21
- reference_origin?: string;
22
- metadata?: Metadata;
23
- readonly created_at: string;
24
- readonly updated_at: string;
25
- }
26
- interface ResourceCreate {
27
- reference?: string;
28
- reference_origin?: string;
29
- metadata?: Metadata;
30
- }
31
- interface ResourceUpdate {
32
- readonly id: string;
33
- reference?: string;
34
- reference_origin?: string;
35
- metadata?: Metadata;
36
- }
37
- declare type ListMeta = {
38
- readonly pageCount: number;
39
- readonly recordCount: number;
40
- readonly currentPage: number;
41
- readonly recordsPerPage: number;
42
- };
43
- declare class ListResponse<R> extends Array<R> {
44
- readonly meta: ListMeta;
45
- constructor(meta: ListMeta, data: Array<R>);
46
- first(): R | undefined;
47
- last(): R | undefined;
48
- get(index: number): R | undefined;
49
- }
50
- export type { Metadata, ResourceType, ResourceId, Resource, ResourceCreate, ResourceUpdate, ListResponse, ResourceRel };
51
- declare type ResourceAdapterConfig = {};
52
- declare type ResourcesInitConfig = ResourceAdapterConfig & ApiClientInitConfig;
53
- declare type ResourcesConfig = Partial<ResourcesInitConfig>;
54
- declare class ResourceAdapter {
55
- #private;
56
- constructor(config: ResourcesInitConfig);
57
- get interceptors(): InterceptorManager;
58
- private localConfig;
59
- config(config: ResourcesConfig): void;
60
- singleton<R extends Resource>(resource: ResourceType, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
61
- retrieve<R extends Resource>(resource: ResourceId, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
62
- list<R extends Resource>(resource: ResourceType, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<R>>;
63
- create<C extends ResourceCreate, R extends Resource>(resource: C & ResourceType, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
64
- update<U extends ResourceUpdate, R extends Resource>(resource: U & ResourceId, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<R>;
65
- delete(resource: ResourceId, options?: ResourcesConfig): Promise<void>;
66
- fetch<R extends Resource>(resource: string | ResourceType, path: string, params?: QueryParams, options?: ResourcesConfig): Promise<R | ListResponse<R>>;
67
- }
68
- declare abstract class ApiResource {
69
- static readonly TYPE: ResourceTypeLock;
70
- protected resources: ResourceAdapter;
71
- constructor(adapter: ResourceAdapter);
72
- abstract relationship(id: string | ResourceId | null): ResourceRel;
73
- abstract type(): string;
74
- }
75
- export default ResourceAdapter;
76
- export { ApiResource, ResourcesConfig, ResourcesInitConfig };
1
+ import{ApiClientInitConfig}from'./client';import{QueryParamsRetrieve,QueryParamsList}from'./query';import{ResourceTypeLock}from'./api';import{InterceptorManager}from'./interceptor';import{QueryParams}from'.';declare type ResourceNull={id:null;}&ResourceType;declare type ResourceRel=ResourceId|ResourceNull;declare type Metadata={[key:string]:any;};interface ResourceType{readonly type:ResourceTypeLock;}interface ResourceId extends ResourceType{readonly id:string;}interface Resource extends ResourceId{reference?:string;reference_origin?:string;metadata?:Metadata;readonly created_at:string;readonly updated_at:string;}interface ResourceCreate{reference?:string;reference_origin?:string;metadata?:Metadata;}interface ResourceUpdate{readonly id:string;reference?:string;reference_origin?:string;metadata?:Metadata;}declare type ListMeta={readonly pageCount:number;readonly recordCount:number;readonly currentPage:number;readonly recordsPerPage:number;};declare class ListResponse<R>extends Array<R>{readonly meta:ListMeta;constructor(meta:ListMeta,data:Array<R>);first():R|undefined;last():R|undefined;get(index:number):R|undefined;}export type{Metadata,ResourceType,ResourceId,Resource,ResourceCreate,ResourceUpdate,ListResponse,ResourceRel};declare type ResourceAdapterConfig={};declare type ResourcesInitConfig=ResourceAdapterConfig&ApiClientInitConfig;declare type ResourcesConfig=Partial<ResourcesInitConfig>;declare class ResourceAdapter{#private;constructor(config:ResourcesInitConfig);get interceptors():InterceptorManager;private localConfig;config(config:ResourcesConfig):void;singleton<R extends Resource>(resource:ResourceType,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;retrieve<R extends Resource>(resource:ResourceId,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;list<R extends Resource>(resource:ResourceType,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<R>>;create<C extends ResourceCreate,R extends Resource>(resource:C&ResourceType,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;update<U extends ResourceUpdate,R extends Resource>(resource:U&ResourceId,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<R>;delete(resource:ResourceId,options?:ResourcesConfig):Promise<void>;fetch<R extends Resource>(resource:string|ResourceType,path:string,params?:QueryParams,options?:ResourcesConfig):Promise<R|ListResponse<R>>;}declare abstract class ApiResource{static readonly TYPE:ResourceTypeLock;protected resources:ResourceAdapter;constructor(adapter:ResourceAdapter);abstract relationship(id:string|ResourceId|null):ResourceRel;abstract type():string;}export default ResourceAdapter;export{ApiResource,ResourcesConfig,ResourcesInitConfig};
@@ -1,88 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { Geocoder } from './geocoders';
4
- declare type AddressRel = ResourceRel & {
5
- type: typeof Addresses.TYPE;
6
- };
7
- declare type GeocoderRel = ResourceRel & {
8
- type: 'geocoders';
9
- };
10
- interface Address extends Resource {
11
- business?: boolean;
12
- first_name?: string;
13
- last_name?: string;
14
- company?: string;
15
- full_name?: string;
16
- line_1?: string;
17
- line_2?: string;
18
- city?: string;
19
- zip_code?: string;
20
- state_code?: string;
21
- country_code?: string;
22
- phone?: string;
23
- full_address?: string;
24
- name?: string;
25
- email?: string;
26
- notes?: string;
27
- lat?: number;
28
- lng?: number;
29
- is_localized?: boolean;
30
- is_geocoded?: boolean;
31
- provider_name?: string;
32
- map_url?: string;
33
- static_map_url?: string;
34
- billing_info?: string;
35
- geocoder?: Geocoder;
36
- }
37
- interface AddressCreate extends ResourceCreate {
38
- business?: boolean;
39
- first_name?: string;
40
- last_name?: string;
41
- company?: string;
42
- line_1: string;
43
- line_2?: string;
44
- city: string;
45
- zip_code?: string;
46
- state_code: string;
47
- country_code: string;
48
- phone: string;
49
- email?: string;
50
- notes?: string;
51
- lat?: number;
52
- lng?: number;
53
- billing_info?: string;
54
- geocoder?: GeocoderRel;
55
- }
56
- interface AddressUpdate extends ResourceUpdate {
57
- business?: boolean;
58
- first_name?: string;
59
- last_name?: string;
60
- company?: string;
61
- line_1?: string;
62
- line_2?: string;
63
- city?: string;
64
- zip_code?: string;
65
- state_code?: string;
66
- country_code?: string;
67
- phone?: string;
68
- email?: string;
69
- notes?: string;
70
- lat?: number;
71
- lng?: number;
72
- billing_info?: string;
73
- geocoder?: GeocoderRel;
74
- }
75
- declare class Addresses extends ApiResource {
76
- static readonly TYPE: 'addresses';
77
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Address>>;
78
- create(resource: AddressCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
79
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
80
- update(resource: AddressUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
81
- delete(id: string, options?: ResourcesConfig): Promise<void>;
82
- geocoder(addressId: string | Address, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Geocoder>;
83
- isAddress(resource: any): resource is Address;
84
- relationship(id: string | ResourceId | null): AddressRel;
85
- type(): string;
86
- }
87
- export default Addresses;
88
- export { Address, AddressCreate, AddressUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Geocoder}from'./geocoders';declare type AddressRel=ResourceRel&{type:typeof Addresses.TYPE;};declare type GeocoderRel=ResourceRel&{type:'geocoders';};interface Address extends Resource{business?:boolean;first_name?:string;last_name?:string;company?:string;full_name?:string;line_1?:string;line_2?:string;city?:string;zip_code?:string;state_code?:string;country_code?:string;phone?:string;full_address?:string;name?:string;email?:string;notes?:string;lat?:number;lng?:number;is_localized?:boolean;is_geocoded?:boolean;provider_name?:string;map_url?:string;static_map_url?:string;billing_info?:string;geocoder?:Geocoder;}interface AddressCreate extends ResourceCreate{business?:boolean;first_name?:string;last_name?:string;company?:string;line_1:string;line_2?:string;city:string;zip_code?:string;state_code:string;country_code:string;phone:string;email?:string;notes?:string;lat?:number;lng?:number;billing_info?:string;geocoder?:GeocoderRel;}interface AddressUpdate extends ResourceUpdate{business?:boolean;first_name?:string;last_name?:string;company?:string;line_1?:string;line_2?:string;city?:string;zip_code?:string;state_code?:string;country_code?:string;phone?:string;email?:string;notes?:string;lat?:number;lng?:number;billing_info?:string;geocoder?:GeocoderRel;}declare class Addresses extends ApiResource{static readonly TYPE:'addresses';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Address>>;create(resource:AddressCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;update(resource:AddressUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;delete(id:string,options?:ResourcesConfig):Promise<void>;geocoder(addressId:string|Address,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Geocoder>;isAddress(resource:any):resource is Address;relationship(id:string|ResourceId|null):AddressRel;type():string;}export default Addresses;export{Address,AddressCreate,AddressUpdate};
@@ -1,35 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- declare type AdjustmentRel = ResourceRel & {
4
- type: typeof Adjustments.TYPE;
5
- };
6
- interface Adjustment extends Resource {
7
- name?: string;
8
- currency_code?: string;
9
- amount_cents?: number;
10
- amount_float?: number;
11
- formatted_amount?: string;
12
- }
13
- interface AdjustmentCreate extends ResourceCreate {
14
- name: string;
15
- currency_code: string;
16
- amount_cents: number;
17
- }
18
- interface AdjustmentUpdate extends ResourceUpdate {
19
- name?: string;
20
- currency_code?: string;
21
- amount_cents?: number;
22
- }
23
- declare class Adjustments extends ApiResource {
24
- static readonly TYPE: 'adjustments';
25
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Adjustment>>;
26
- create(resource: AdjustmentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Adjustment>;
27
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Adjustment>;
28
- update(resource: AdjustmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Adjustment>;
29
- delete(id: string, options?: ResourcesConfig): Promise<void>;
30
- isAdjustment(resource: any): resource is Adjustment;
31
- relationship(id: string | ResourceId | null): AdjustmentRel;
32
- type(): string;
33
- }
34
- export default Adjustments;
35
- export { Adjustment, AdjustmentCreate, AdjustmentUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';declare type AdjustmentRel=ResourceRel&{type:typeof Adjustments.TYPE;};interface Adjustment extends Resource{name?:string;currency_code?:string;amount_cents?:number;amount_float?:number;formatted_amount?:string;}interface AdjustmentCreate extends ResourceCreate{name:string;currency_code:string;amount_cents:number;}interface AdjustmentUpdate extends ResourceUpdate{name?:string;currency_code?:string;amount_cents?:number;}declare class Adjustments extends ApiResource{static readonly TYPE:'adjustments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Adjustment>>;create(resource:AdjustmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;update(resource:AdjustmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Adjustment>;delete(id:string,options?:ResourcesConfig):Promise<void>;isAdjustment(resource:any):resource is Adjustment;relationship(id:string|ResourceId|null):AdjustmentRel;type():string;}export default Adjustments;export{Adjustment,AdjustmentCreate,AdjustmentUpdate};
@@ -1,47 +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 { AdyenPayment } from './adyen_payments';
5
- declare type AdyenGatewayRel = ResourceRel & {
6
- type: typeof AdyenGateways.TYPE;
7
- };
8
- declare type AdyenPaymentRel = ResourceRel & {
9
- type: 'adyen_payments';
10
- };
11
- interface AdyenGateway extends Resource {
12
- name?: string;
13
- live_url_prefix?: string;
14
- payment_methods?: PaymentMethod[];
15
- adyen_payments?: AdyenPayment[];
16
- }
17
- interface AdyenGatewayCreate extends ResourceCreate {
18
- name: string;
19
- merchant_account: string;
20
- api_key: string;
21
- public_key?: string;
22
- live_url_prefix: string;
23
- adyen_payments?: AdyenPaymentRel[];
24
- }
25
- interface AdyenGatewayUpdate extends ResourceUpdate {
26
- name?: string;
27
- merchant_account?: string;
28
- api_key?: string;
29
- public_key?: string;
30
- live_url_prefix?: string;
31
- adyen_payments?: AdyenPaymentRel[];
32
- }
33
- declare class AdyenGateways extends ApiResource {
34
- static readonly TYPE: 'adyen_gateways';
35
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenGateway>>;
36
- create(resource: AdyenGatewayCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
37
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
38
- update(resource: AdyenGatewayUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenGateway>;
39
- delete(id: string, options?: ResourcesConfig): Promise<void>;
40
- payment_methods(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<PaymentMethod>>;
41
- adyen_payments(adyenGatewayId: string | AdyenGateway, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>>;
42
- isAdyenGateway(resource: any): resource is AdyenGateway;
43
- relationship(id: string | ResourceId | null): AdyenGatewayRel;
44
- type(): string;
45
- }
46
- export default AdyenGateways;
47
- export { AdyenGateway, AdyenGatewayCreate, AdyenGatewayUpdate };
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{AdyenPayment}from'./adyen_payments';declare type AdyenGatewayRel=ResourceRel&{type:typeof AdyenGateways.TYPE;};declare type AdyenPaymentRel=ResourceRel&{type:'adyen_payments';};interface AdyenGateway extends Resource{name?:string;live_url_prefix?:string;payment_methods?:PaymentMethod[];adyen_payments?:AdyenPayment[];}interface AdyenGatewayCreate extends ResourceCreate{name:string;merchant_account:string;api_key:string;public_key?:string;live_url_prefix:string;adyen_payments?:AdyenPaymentRel[];}interface AdyenGatewayUpdate extends ResourceUpdate{name?:string;merchant_account?:string;api_key?:string;public_key?:string;live_url_prefix?:string;adyen_payments?:AdyenPaymentRel[];}declare class AdyenGateways extends ApiResource{static readonly TYPE:'adyen_gateways';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenGateway>>;create(resource:AdyenGatewayCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;update(resource:AdyenGatewayUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenGateway>;delete(id:string,options?:ResourcesConfig):Promise<void>;payment_methods(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<PaymentMethod>>;adyen_payments(adyenGatewayId:string|AdyenGateway,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;isAdyenGateway(resource:any):resource is AdyenGateway;relationship(id:string|ResourceId|null):AdyenGatewayRel;type():string;}export default AdyenGateways;export{AdyenGateway,AdyenGatewayCreate,AdyenGatewayUpdate};
@@ -1,44 +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 AdyenPaymentRel = ResourceRel & {
6
- type: typeof AdyenPayments.TYPE;
7
- };
8
- declare type OrderRel = ResourceRel & {
9
- type: 'orders';
10
- };
11
- interface AdyenPayment extends Resource {
12
- public_key?: string;
13
- payment_methods?: object;
14
- payment_request_data?: object;
15
- payment_request_details?: object;
16
- payment_response?: object;
17
- order?: Order;
18
- payment_gateway?: PaymentGateway;
19
- }
20
- interface AdyenPaymentCreate extends ResourceCreate {
21
- order: OrderRel;
22
- }
23
- interface AdyenPaymentUpdate extends ResourceUpdate {
24
- payment_request_data?: object;
25
- payment_request_details?: object;
26
- payment_response?: object;
27
- _details?: boolean;
28
- order?: OrderRel;
29
- }
30
- declare class AdyenPayments extends ApiResource {
31
- static readonly TYPE: 'adyen_payments';
32
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<AdyenPayment>>;
33
- create(resource: AdyenPaymentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
34
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
35
- update(resource: AdyenPaymentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<AdyenPayment>;
36
- delete(id: string, options?: ResourcesConfig): Promise<void>;
37
- order(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
38
- payment_gateway(adyenPaymentId: string | AdyenPayment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<PaymentGateway>;
39
- isAdyenPayment(resource: any): resource is AdyenPayment;
40
- relationship(id: string | ResourceId | null): AdyenPaymentRel;
41
- type(): string;
42
- }
43
- export default AdyenPayments;
44
- export { AdyenPayment, AdyenPaymentCreate, AdyenPaymentUpdate };
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 AdyenPaymentRel=ResourceRel&{type:typeof AdyenPayments.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};interface AdyenPayment extends Resource{public_key?:string;payment_methods?:object;payment_request_data?:object;payment_request_details?:object;payment_response?:object;mismatched_amounts?:boolean;order?:Order;payment_gateway?:PaymentGateway;}interface AdyenPaymentCreate extends ResourceCreate{order:OrderRel;}interface AdyenPaymentUpdate extends ResourceUpdate{payment_request_data?:object;payment_request_details?:object;payment_response?:object;_details?:boolean;order?:OrderRel;}declare class AdyenPayments extends ApiResource{static readonly TYPE:'adyen_payments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<AdyenPayment>>;create(resource:AdyenPaymentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;update(resource:AdyenPaymentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<AdyenPayment>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;payment_gateway(adyenPaymentId:string|AdyenPayment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<PaymentGateway>;isAdyenPayment(resource:any):resource is AdyenPayment;relationship(id:string|ResourceId|null):AdyenPaymentRel;type():string;}export default AdyenPayments;export{AdyenPayment,AdyenPaymentCreate,AdyenPaymentUpdate};
@@ -1,21 +1 @@
1
- import { ApiResource, Resource, ResourcesConfig, ResourceId, ResourceRel } from '../resource';
2
- import type { QueryParamsRetrieve } from '../query';
3
- declare type ApplicationRel = ResourceRel & {
4
- type: typeof Applications.TYPE;
5
- };
6
- interface Application extends Resource {
7
- name?: string;
8
- kind?: string;
9
- public_access?: string;
10
- redirect_uri?: string;
11
- scopes?: string;
12
- }
13
- declare class Applications extends ApiResource {
14
- static readonly TYPE: 'application';
15
- retrieve(params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Application>;
16
- isApplication(resource: any): resource is Application;
17
- relationship(id: string | ResourceId | null): ApplicationRel;
18
- type(): string;
19
- }
20
- export default Applications;
21
- export { Application };
1
+ import{ApiResource,Resource,ResourcesConfig,ResourceId,ResourceRel}from'../resource';import type{QueryParamsRetrieve}from'../query';declare type ApplicationRel=ResourceRel&{type:typeof Applications.TYPE;};interface Application extends Resource{name?:string;kind?:string;public_access?:string;redirect_uri?:string;scopes?:string;}declare class Applications extends ApiResource{static readonly TYPE:'application';retrieve(params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Application>;isApplication(resource:any):resource is Application;relationship(id:string|ResourceId|null):ApplicationRel;type():string;}export default Applications;export{Application};
@@ -1,156 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { Bundle } from './bundles';
4
- import type { CarrierAccount } from './carrier_accounts';
5
- import type { CustomerGroup } from './customer_groups';
6
- import type { Customer } from './customers';
7
- import type { DeliveryLeadTime } from './delivery_lead_times';
8
- import type { Geocoder } from './geocoders';
9
- import type { GiftCardRecipient } from './gift_card_recipients';
10
- import type { GiftCard } from './gift_cards';
11
- import type { InventoryModel } from './inventory_models';
12
- import type { Market } from './markets';
13
- import type { Merchant } from './merchants';
14
- import type { BillingInfoValidationRule } from './billing_info_validation_rules';
15
- import type { Order } from './orders';
16
- import type { Package } from './packages';
17
- import type { Parcel } from './parcels';
18
- import type { PaymentMethod } from './payment_methods';
19
- import type { PriceList } from './price_lists';
20
- import type { Price } from './prices';
21
- import type { Promotion } from './promotions';
22
- import type { Return } from './returns';
23
- import type { Shipment } from './shipments';
24
- import type { ShippingCategory } from './shipping_categories';
25
- import type { ShippingMethod } from './shipping_methods';
26
- import type { ShippingZone } from './shipping_zones';
27
- import type { SkuOption } from './sku_options';
28
- import type { Sku } from './skus';
29
- import type { StockItem } from './stock_items';
30
- import type { StockLocation } from './stock_locations';
31
- import type { TaxCalculator } from './tax_calculators';
32
- import type { TaxCategory } from './tax_categories';
33
- declare type AttachmentRel = ResourceRel & {
34
- type: typeof Attachments.TYPE;
35
- };
36
- declare type BundleRel = ResourceRel & {
37
- type: 'bundles';
38
- };
39
- declare type CarrierAccountRel = ResourceRel & {
40
- type: 'carrier_accounts';
41
- };
42
- declare type CustomerGroupRel = ResourceRel & {
43
- type: 'customer_groups';
44
- };
45
- declare type CustomerRel = ResourceRel & {
46
- type: 'customers';
47
- };
48
- declare type DeliveryLeadTimeRel = ResourceRel & {
49
- type: 'delivery_lead_times';
50
- };
51
- declare type GeocoderRel = ResourceRel & {
52
- type: 'geocoders';
53
- };
54
- declare type GiftCardRecipientRel = ResourceRel & {
55
- type: 'gift_card_recipients';
56
- };
57
- declare type GiftCardRel = ResourceRel & {
58
- type: 'gift_cards';
59
- };
60
- declare type InventoryModelRel = ResourceRel & {
61
- type: 'inventory_models';
62
- };
63
- declare type MarketRel = ResourceRel & {
64
- type: 'markets';
65
- };
66
- declare type MerchantRel = ResourceRel & {
67
- type: 'merchants';
68
- };
69
- declare type BillingInfoValidationRuleRel = ResourceRel & {
70
- type: 'billing_info_validation_rules';
71
- };
72
- declare type OrderRel = ResourceRel & {
73
- type: 'orders';
74
- };
75
- declare type PackageRel = ResourceRel & {
76
- type: 'packages';
77
- };
78
- declare type ParcelRel = ResourceRel & {
79
- type: 'parcels';
80
- };
81
- declare type PaymentMethodRel = ResourceRel & {
82
- type: 'payment_methods';
83
- };
84
- declare type PriceListRel = ResourceRel & {
85
- type: 'price_lists';
86
- };
87
- declare type PriceRel = ResourceRel & {
88
- type: 'prices';
89
- };
90
- declare type PromotionRel = ResourceRel & {
91
- type: 'promotions';
92
- };
93
- declare type ReturnRel = ResourceRel & {
94
- type: 'returns';
95
- };
96
- declare type ShipmentRel = ResourceRel & {
97
- type: 'shipments';
98
- };
99
- declare type ShippingCategoryRel = ResourceRel & {
100
- type: 'shipping_categories';
101
- };
102
- declare type ShippingMethodRel = ResourceRel & {
103
- type: 'shipping_methods';
104
- };
105
- declare type ShippingZoneRel = ResourceRel & {
106
- type: 'shipping_zones';
107
- };
108
- declare type SkuOptionRel = ResourceRel & {
109
- type: 'sku_options';
110
- };
111
- declare type SkuRel = ResourceRel & {
112
- type: 'skus';
113
- };
114
- declare type StockItemRel = ResourceRel & {
115
- type: 'stock_items';
116
- };
117
- declare type StockLocationRel = ResourceRel & {
118
- type: 'stock_locations';
119
- };
120
- declare type TaxCalculatorRel = ResourceRel & {
121
- type: 'tax_calculators';
122
- };
123
- declare type TaxCategoryRel = ResourceRel & {
124
- type: 'tax_categories';
125
- };
126
- interface Attachment extends Resource {
127
- name?: string;
128
- description?: string;
129
- url?: string;
130
- attachable?: Bundle | CarrierAccount | CustomerGroup | Customer | DeliveryLeadTime | Geocoder | GiftCardRecipient | GiftCard | InventoryModel | Market | Merchant | BillingInfoValidationRule | Order | Package | Parcel | PaymentMethod | PriceList | Price | Promotion | Return | Shipment | ShippingCategory | ShippingMethod | ShippingZone | SkuOption | Sku | StockItem | StockLocation | TaxCalculator | TaxCategory;
131
- }
132
- interface AttachmentCreate extends ResourceCreate {
133
- name: string;
134
- description?: string;
135
- url?: string;
136
- attachable: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel;
137
- }
138
- interface AttachmentUpdate extends ResourceUpdate {
139
- name?: string;
140
- description?: string;
141
- url?: string;
142
- attachable?: BundleRel | CarrierAccountRel | CustomerGroupRel | CustomerRel | DeliveryLeadTimeRel | GeocoderRel | GiftCardRecipientRel | GiftCardRel | InventoryModelRel | MarketRel | MerchantRel | BillingInfoValidationRuleRel | OrderRel | PackageRel | ParcelRel | PaymentMethodRel | PriceListRel | PriceRel | PromotionRel | ReturnRel | ShipmentRel | ShippingCategoryRel | ShippingMethodRel | ShippingZoneRel | SkuOptionRel | SkuRel | StockItemRel | StockLocationRel | TaxCalculatorRel | TaxCategoryRel;
143
- }
144
- declare class Attachments extends ApiResource {
145
- static readonly TYPE: 'attachments';
146
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
147
- create(resource: AttachmentCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
148
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
149
- update(resource: AttachmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Attachment>;
150
- delete(id: string, options?: ResourcesConfig): Promise<void>;
151
- isAttachment(resource: any): resource is Attachment;
152
- relationship(id: string | ResourceId | null): AttachmentRel;
153
- type(): string;
154
- }
155
- export default Attachments;
156
- export { Attachment, AttachmentCreate, AttachmentUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Bundle}from'./bundles';import type{CarrierAccount}from'./carrier_accounts';import type{CustomerGroup}from'./customer_groups';import type{Customer}from'./customers';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{Geocoder}from'./geocoders';import type{GiftCardRecipient}from'./gift_card_recipients';import type{GiftCard}from'./gift_cards';import type{InventoryModel}from'./inventory_models';import type{Market}from'./markets';import type{Merchant}from'./merchants';import type{BillingInfoValidationRule}from'./billing_info_validation_rules';import type{Order}from'./orders';import type{Package}from'./packages';import type{Parcel}from'./parcels';import type{PaymentMethod}from'./payment_methods';import type{PriceList}from'./price_lists';import type{Price}from'./prices';import type{Promotion}from'./promotions';import type{Return}from'./returns';import type{Shipment}from'./shipments';import type{ShippingCategory}from'./shipping_categories';import type{ShippingMethod}from'./shipping_methods';import type{ShippingZone}from'./shipping_zones';import type{SkuOption}from'./sku_options';import type{Sku}from'./skus';import type{StockItem}from'./stock_items';import type{StockLocation}from'./stock_locations';import type{TaxCalculator}from'./tax_calculators';import type{TaxCategory}from'./tax_categories';declare type AttachmentRel=ResourceRel&{type:typeof Attachments.TYPE;};declare type BundleRel=ResourceRel&{type:'bundles';};declare type CarrierAccountRel=ResourceRel&{type:'carrier_accounts';};declare type CustomerGroupRel=ResourceRel&{type:'customer_groups';};declare type CustomerRel=ResourceRel&{type:'customers';};declare type DeliveryLeadTimeRel=ResourceRel&{type:'delivery_lead_times';};declare type GeocoderRel=ResourceRel&{type:'geocoders';};declare type GiftCardRecipientRel=ResourceRel&{type:'gift_card_recipients';};declare type GiftCardRel=ResourceRel&{type:'gift_cards';};declare type InventoryModelRel=ResourceRel&{type:'inventory_models';};declare type MarketRel=ResourceRel&{type:'markets';};declare type MerchantRel=ResourceRel&{type:'merchants';};declare type BillingInfoValidationRuleRel=ResourceRel&{type:'billing_info_validation_rules';};declare type OrderRel=ResourceRel&{type:'orders';};declare type PackageRel=ResourceRel&{type:'packages';};declare type ParcelRel=ResourceRel&{type:'parcels';};declare type PaymentMethodRel=ResourceRel&{type:'payment_methods';};declare type PriceListRel=ResourceRel&{type:'price_lists';};declare type PriceRel=ResourceRel&{type:'prices';};declare type PromotionRel=ResourceRel&{type:'promotions';};declare type ReturnRel=ResourceRel&{type:'returns';};declare type ShipmentRel=ResourceRel&{type:'shipments';};declare type ShippingCategoryRel=ResourceRel&{type:'shipping_categories';};declare type ShippingMethodRel=ResourceRel&{type:'shipping_methods';};declare type ShippingZoneRel=ResourceRel&{type:'shipping_zones';};declare type SkuOptionRel=ResourceRel&{type:'sku_options';};declare type SkuRel=ResourceRel&{type:'skus';};declare type StockItemRel=ResourceRel&{type:'stock_items';};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};declare type TaxCalculatorRel=ResourceRel&{type:'tax_calculators';};declare type TaxCategoryRel=ResourceRel&{type:'tax_categories';};interface Attachment extends Resource{name?:string;description?:string;url?:string;attachable?:Bundle|CarrierAccount|CustomerGroup|Customer|DeliveryLeadTime|Geocoder|GiftCardRecipient|GiftCard|InventoryModel|Market|Merchant|BillingInfoValidationRule|Order|Package|Parcel|PaymentMethod|PriceList|Price|Promotion|Return|Shipment|ShippingCategory|ShippingMethod|ShippingZone|SkuOption|Sku|StockItem|StockLocation|TaxCalculator|TaxCategory;}interface AttachmentCreate extends ResourceCreate{name:string;description?:string;url?:string;attachable:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}interface AttachmentUpdate extends ResourceUpdate{name?:string;description?:string;url?:string;attachable?:BundleRel|CarrierAccountRel|CustomerGroupRel|CustomerRel|DeliveryLeadTimeRel|GeocoderRel|GiftCardRecipientRel|GiftCardRel|InventoryModelRel|MarketRel|MerchantRel|BillingInfoValidationRuleRel|OrderRel|PackageRel|ParcelRel|PaymentMethodRel|PriceListRel|PriceRel|PromotionRel|ReturnRel|ShipmentRel|ShippingCategoryRel|ShippingMethodRel|ShippingZoneRel|SkuOptionRel|SkuRel|StockItemRel|StockLocationRel|TaxCalculatorRel|TaxCategoryRel;}declare class Attachments extends ApiResource{static readonly TYPE:'attachments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;create(resource:AttachmentCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;update(resource:AttachmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Attachment>;delete(id:string,options?:ResourcesConfig):Promise<void>;isAttachment(resource:any):resource is Attachment;relationship(id:string|ResourceId|null):AttachmentRel;type():string;}export default Attachments;export{Attachment,AttachmentCreate,AttachmentUpdate};
@@ -1,57 +1 @@
1
- import { ApiResource, Resource, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { Order } from './orders';
4
- import type { Capture } from './captures';
5
- import type { Void } from './voids';
6
- declare type AuthorizationRel = ResourceRel & {
7
- type: typeof Authorizations.TYPE;
8
- };
9
- interface Authorization extends Resource {
10
- number?: string;
11
- currency_code?: string;
12
- amount_cents?: number;
13
- amount_float?: number;
14
- formatted_amount?: string;
15
- succeeded?: boolean;
16
- message?: string;
17
- error_code?: string;
18
- error_detail?: string;
19
- token?: string;
20
- gateway_transaction_id?: string;
21
- cvv_code?: string;
22
- cvv_message?: string;
23
- avs_code?: string;
24
- avs_message?: string;
25
- fraud_review?: string;
26
- capture_amount_cents?: number;
27
- capture_amount_float?: number;
28
- formatted_capture_amount?: string;
29
- capture_balance_cents?: number;
30
- capture_balance_float?: number;
31
- formatted_capture_balance?: string;
32
- void_balance_cents?: number;
33
- void_balance_float?: number;
34
- formatted_void_balance?: string;
35
- order?: Order;
36
- captures?: Capture[];
37
- voids?: Void[];
38
- }
39
- interface AuthorizationUpdate extends ResourceUpdate {
40
- _capture?: boolean;
41
- _capture_amount_cents?: number;
42
- _void?: boolean;
43
- }
44
- declare class Authorizations extends ApiResource {
45
- static readonly TYPE: 'authorizations';
46
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Authorization>>;
47
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
48
- update(resource: AuthorizationUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Authorization>;
49
- order(authorizationId: string | Authorization, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
50
- captures(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Capture>>;
51
- voids(authorizationId: string | Authorization, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Void>>;
52
- isAuthorization(resource: any): resource is Authorization;
53
- relationship(id: string | ResourceId | null): AuthorizationRel;
54
- type(): string;
55
- }
56
- export default Authorizations;
57
- export { Authorization, AuthorizationUpdate };
1
+ import{ApiResource,Resource,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{Capture}from'./captures';import type{Void}from'./voids';declare type AuthorizationRel=ResourceRel&{type:typeof Authorizations.TYPE;};interface Authorization 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;cvv_code?:string;cvv_message?:string;avs_code?:string;avs_message?:string;fraud_review?:string;capture_amount_cents?:number;capture_amount_float?:number;formatted_capture_amount?:string;capture_balance_cents?:number;capture_balance_float?:number;formatted_capture_balance?:string;void_balance_cents?:number;void_balance_float?:number;formatted_void_balance?:string;order?:Order;captures?:Capture[];voids?:Void[];}interface AuthorizationUpdate extends ResourceUpdate{_capture?:boolean;_capture_amount_cents?:number;_void?:boolean;}declare class Authorizations extends ApiResource{static readonly TYPE:'authorizations';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Authorization>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;update(resource:AuthorizationUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Authorization>;order(authorizationId:string|Authorization,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;captures(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Capture>>;voids(authorizationId:string|Authorization,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Void>>;isAuthorization(resource:any):resource is Authorization;relationship(id:string|ResourceId|null):AuthorizationRel;type():string;}export default Authorizations;export{Authorization,AuthorizationUpdate};