@commercelayer/sdk 4.7.4 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/README.md +37 -24
  2. package/lib/cjs/api.d.ts +1 -103
  3. package/lib/cjs/client.d.ts +1 -31
  4. package/lib/cjs/commercelayer.d.ts +1 -122
  5. package/lib/cjs/commercelayer.js +1 -1
  6. package/lib/cjs/common.d.ts +1 -4
  7. package/lib/cjs/config.d.ts +1 -11
  8. package/lib/cjs/debug.d.ts +1 -3
  9. package/lib/cjs/error.d.ts +1 -26
  10. package/lib/cjs/index.d.ts +1 -7
  11. package/lib/cjs/interceptor.d.ts +1 -19
  12. package/lib/cjs/jsonapi.d.ts +1 -5
  13. package/lib/cjs/jsonapi.js +1 -1
  14. package/lib/cjs/model.d.ts +1 -101
  15. package/lib/cjs/query.d.ts +1 -23
  16. package/lib/cjs/resource.d.ts +1 -76
  17. package/lib/cjs/resources/addresses.d.ts +1 -88
  18. package/lib/cjs/resources/adjustments.d.ts +1 -35
  19. package/lib/cjs/resources/adyen_gateways.d.ts +1 -47
  20. package/lib/cjs/resources/adyen_payments.d.ts +1 -44
  21. package/lib/cjs/resources/application.d.ts +1 -21
  22. package/lib/cjs/resources/attachments.d.ts +1 -156
  23. package/lib/cjs/resources/authorizations.d.ts +1 -57
  24. package/lib/cjs/resources/avalara_accounts.d.ts +1 -52
  25. package/lib/cjs/resources/billing_info_validation_rules.d.ts +1 -32
  26. package/lib/cjs/resources/bing_geocoders.d.ts +1 -35
  27. package/lib/cjs/resources/braintree_gateways.d.ts +1 -56
  28. package/lib/cjs/resources/braintree_payments.d.ts +1 -47
  29. package/lib/cjs/resources/bundles.d.ts +1 -74
  30. package/lib/cjs/resources/captures.d.ts +1 -48
  31. package/lib/cjs/resources/carrier_accounts.d.ts +1 -26
  32. package/lib/cjs/resources/checkout_com_gateways.d.ts +1 -45
  33. package/lib/cjs/resources/checkout_com_payments.d.ts +1 -51
  34. package/lib/cjs/resources/coupon_codes_promotion_rules.d.ts +1 -59
  35. package/lib/cjs/resources/coupon_recipients.d.ts +1 -44
  36. package/lib/cjs/resources/coupons.d.ts +1 -45
  37. package/lib/cjs/resources/customer_addresses.d.ts +1 -41
  38. package/lib/cjs/resources/customer_groups.d.ts +1 -36
  39. package/lib/cjs/resources/customer_password_resets.d.ts +1 -33
  40. package/lib/cjs/resources/customer_payment_sources.d.ts +1 -70
  41. package/lib/cjs/resources/customer_subscriptions.d.ts +1 -28
  42. package/lib/cjs/resources/customers.d.ts +1 -60
  43. package/lib/cjs/resources/delivery_lead_times.d.ts +1 -51
  44. package/lib/cjs/resources/event_callbacks.d.ts +1 -24
  45. package/lib/cjs/resources/external_gateways.d.ts +1 -49
  46. package/lib/cjs/resources/external_payments.d.ts +1 -43
  47. package/lib/cjs/resources/external_promotions.d.ts +1 -86
  48. package/lib/cjs/resources/external_tax_calculators.d.ts +1 -44
  49. package/lib/cjs/resources/fixed_amount_promotions.d.ts +1 -88
  50. package/lib/cjs/resources/fixed_price_promotions.d.ts +1 -99
  51. package/lib/cjs/resources/free_gift_promotions.d.ts +1 -97
  52. package/lib/cjs/resources/free_shipping_promotions.d.ts +1 -83
  53. package/lib/cjs/resources/geocoders.d.ts +1 -24
  54. package/lib/cjs/resources/gift_card_recipients.d.ts +1 -44
  55. package/lib/cjs/resources/gift_cards.d.ts +1 -82
  56. package/lib/cjs/resources/google_geocoders.d.ts +1 -35
  57. package/lib/cjs/resources/imports.d.ts +1 -40
  58. package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -59
  59. package/lib/cjs/resources/inventory_models.d.ts +1 -42
  60. package/lib/cjs/resources/inventory_return_locations.d.ts +1 -43
  61. package/lib/cjs/resources/inventory_stock_locations.d.ts +1 -46
  62. package/lib/cjs/resources/klarna_gateways.d.ts +1 -44
  63. package/lib/cjs/resources/klarna_payments.d.ts +1 -41
  64. package/lib/cjs/resources/line_item_options.d.ts +1 -57
  65. package/lib/cjs/resources/line_items.d.ts +1 -125
  66. package/lib/cjs/resources/manual_gateways.d.ts +1 -33
  67. package/lib/cjs/resources/manual_tax_calculators.d.ts +1 -49
  68. package/lib/cjs/resources/markets.d.ts +1 -81
  69. package/lib/cjs/resources/merchants.d.ts +1 -38
  70. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +1 -56
  71. package/lib/cjs/resources/order_copies.d.ts +1 -45
  72. package/lib/cjs/resources/order_subscriptions.d.ts +1 -67
  73. package/lib/cjs/resources/order_validation_rules.d.ts +1 -20
  74. package/lib/cjs/resources/orders.d.ts +1 -271
  75. package/lib/cjs/resources/organization.d.ts +1 -32
  76. package/lib/cjs/resources/packages.d.ts +1 -56
  77. package/lib/cjs/resources/parcel_line_items.d.ts +1 -49
  78. package/lib/cjs/resources/parcels.d.ts +1 -108
  79. package/lib/cjs/resources/payment_gateways.d.ts +1 -21
  80. package/lib/cjs/resources/payment_methods.d.ts +1 -59
  81. package/lib/cjs/resources/paypal_gateways.d.ts +1 -39
  82. package/lib/cjs/resources/paypal_payments.d.ts +1 -49
  83. package/lib/cjs/resources/percentage_discount_promotions.d.ts +1 -97
  84. package/lib/cjs/resources/price_lists.d.ts +1 -39
  85. package/lib/cjs/resources/prices.d.ts +1 -57
  86. package/lib/cjs/resources/promotion_rules.d.ts +1 -24
  87. package/lib/cjs/resources/promotions.d.ts +1 -41
  88. package/lib/cjs/resources/refunds.d.ts +1 -34
  89. package/lib/cjs/resources/return_line_items.d.ts +1 -49
  90. package/lib/cjs/resources/returns.d.ts +1 -72
  91. package/lib/cjs/resources/shipments.d.ts +1 -89
  92. package/lib/cjs/resources/shipping_categories.d.ts +1 -33
  93. package/lib/cjs/resources/shipping_methods.d.ts +1 -74
  94. package/lib/cjs/resources/shipping_zones.d.ts +1 -48
  95. package/lib/cjs/resources/sku_list_items.d.ts +1 -47
  96. package/lib/cjs/resources/sku_list_promotion_rules.d.ts +1 -68
  97. package/lib/cjs/resources/sku_lists.d.ts +1 -49
  98. package/lib/cjs/resources/sku_options.d.ts +1 -56
  99. package/lib/cjs/resources/skus.d.ts +1 -78
  100. package/lib/cjs/resources/stock_items.d.ts +1 -49
  101. package/lib/cjs/resources/stock_line_items.d.ts +1 -29
  102. package/lib/cjs/resources/stock_locations.d.ts +1 -57
  103. package/lib/cjs/resources/stock_transfers.d.ts +1 -71
  104. package/lib/cjs/resources/stripe_gateways.d.ts +1 -38
  105. package/lib/cjs/resources/stripe_payments.d.ts +1 -42
  106. package/lib/cjs/resources/tax_calculators.d.ts +1 -27
  107. package/lib/cjs/resources/tax_categories.d.ts +1 -59
  108. package/lib/cjs/resources/tax_rules.d.ts +1 -69
  109. package/lib/cjs/resources/taxjar_accounts.d.ts +1 -43
  110. package/lib/cjs/resources/transactions.d.ts +1 -31
  111. package/lib/cjs/resources/voids.d.ts +1 -34
  112. package/lib/cjs/resources/webhooks.d.ts +1 -42
  113. package/lib/cjs/resources/wire_transfers.d.ts +1 -32
  114. package/lib/cjs/static.d.ts +1 -6
  115. package/lib/cjs/util.d.ts +1 -2
  116. package/lib/esm/api.d.ts +1 -103
  117. package/lib/esm/client.d.ts +1 -31
  118. package/lib/esm/commercelayer.d.ts +1 -122
  119. package/lib/esm/commercelayer.js +1 -1
  120. package/lib/esm/common.d.ts +1 -4
  121. package/lib/esm/config.d.ts +1 -11
  122. package/lib/esm/debug.d.ts +1 -3
  123. package/lib/esm/error.d.ts +1 -26
  124. package/lib/esm/index.d.ts +1 -7
  125. package/lib/esm/interceptor.d.ts +1 -19
  126. package/lib/esm/jsonapi.d.ts +1 -5
  127. package/lib/esm/jsonapi.js +1 -1
  128. package/lib/esm/model.d.ts +1 -101
  129. package/lib/esm/query.d.ts +1 -23
  130. package/lib/esm/resource.d.ts +1 -76
  131. package/lib/esm/resources/addresses.d.ts +1 -88
  132. package/lib/esm/resources/adjustments.d.ts +1 -35
  133. package/lib/esm/resources/adyen_gateways.d.ts +1 -47
  134. package/lib/esm/resources/adyen_payments.d.ts +1 -44
  135. package/lib/esm/resources/application.d.ts +1 -21
  136. package/lib/esm/resources/attachments.d.ts +1 -156
  137. package/lib/esm/resources/authorizations.d.ts +1 -57
  138. package/lib/esm/resources/avalara_accounts.d.ts +1 -52
  139. package/lib/esm/resources/billing_info_validation_rules.d.ts +1 -32
  140. package/lib/esm/resources/bing_geocoders.d.ts +1 -35
  141. package/lib/esm/resources/braintree_gateways.d.ts +1 -56
  142. package/lib/esm/resources/braintree_payments.d.ts +1 -47
  143. package/lib/esm/resources/bundles.d.ts +1 -74
  144. package/lib/esm/resources/captures.d.ts +1 -48
  145. package/lib/esm/resources/carrier_accounts.d.ts +1 -26
  146. package/lib/esm/resources/checkout_com_gateways.d.ts +1 -45
  147. package/lib/esm/resources/checkout_com_payments.d.ts +1 -51
  148. package/lib/esm/resources/coupon_codes_promotion_rules.d.ts +1 -59
  149. package/lib/esm/resources/coupon_recipients.d.ts +1 -44
  150. package/lib/esm/resources/coupons.d.ts +1 -45
  151. package/lib/esm/resources/customer_addresses.d.ts +1 -41
  152. package/lib/esm/resources/customer_groups.d.ts +1 -36
  153. package/lib/esm/resources/customer_password_resets.d.ts +1 -33
  154. package/lib/esm/resources/customer_payment_sources.d.ts +1 -70
  155. package/lib/esm/resources/customer_subscriptions.d.ts +1 -28
  156. package/lib/esm/resources/customers.d.ts +1 -60
  157. package/lib/esm/resources/delivery_lead_times.d.ts +1 -51
  158. package/lib/esm/resources/event_callbacks.d.ts +1 -24
  159. package/lib/esm/resources/external_gateways.d.ts +1 -49
  160. package/lib/esm/resources/external_payments.d.ts +1 -43
  161. package/lib/esm/resources/external_promotions.d.ts +1 -86
  162. package/lib/esm/resources/external_tax_calculators.d.ts +1 -44
  163. package/lib/esm/resources/fixed_amount_promotions.d.ts +1 -88
  164. package/lib/esm/resources/fixed_price_promotions.d.ts +1 -99
  165. package/lib/esm/resources/free_gift_promotions.d.ts +1 -97
  166. package/lib/esm/resources/free_shipping_promotions.d.ts +1 -83
  167. package/lib/esm/resources/geocoders.d.ts +1 -24
  168. package/lib/esm/resources/gift_card_recipients.d.ts +1 -44
  169. package/lib/esm/resources/gift_cards.d.ts +1 -82
  170. package/lib/esm/resources/google_geocoders.d.ts +1 -35
  171. package/lib/esm/resources/imports.d.ts +1 -40
  172. package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -59
  173. package/lib/esm/resources/inventory_models.d.ts +1 -42
  174. package/lib/esm/resources/inventory_return_locations.d.ts +1 -43
  175. package/lib/esm/resources/inventory_stock_locations.d.ts +1 -46
  176. package/lib/esm/resources/klarna_gateways.d.ts +1 -44
  177. package/lib/esm/resources/klarna_payments.d.ts +1 -41
  178. package/lib/esm/resources/line_item_options.d.ts +1 -57
  179. package/lib/esm/resources/line_items.d.ts +1 -125
  180. package/lib/esm/resources/manual_gateways.d.ts +1 -33
  181. package/lib/esm/resources/manual_tax_calculators.d.ts +1 -49
  182. package/lib/esm/resources/markets.d.ts +1 -81
  183. package/lib/esm/resources/merchants.d.ts +1 -38
  184. package/lib/esm/resources/order_amount_promotion_rules.d.ts +1 -56
  185. package/lib/esm/resources/order_copies.d.ts +1 -45
  186. package/lib/esm/resources/order_subscriptions.d.ts +1 -67
  187. package/lib/esm/resources/order_validation_rules.d.ts +1 -20
  188. package/lib/esm/resources/orders.d.ts +1 -271
  189. package/lib/esm/resources/organization.d.ts +1 -32
  190. package/lib/esm/resources/packages.d.ts +1 -56
  191. package/lib/esm/resources/parcel_line_items.d.ts +1 -49
  192. package/lib/esm/resources/parcels.d.ts +1 -108
  193. package/lib/esm/resources/payment_gateways.d.ts +1 -21
  194. package/lib/esm/resources/payment_methods.d.ts +1 -59
  195. package/lib/esm/resources/paypal_gateways.d.ts +1 -39
  196. package/lib/esm/resources/paypal_payments.d.ts +1 -49
  197. package/lib/esm/resources/percentage_discount_promotions.d.ts +1 -97
  198. package/lib/esm/resources/price_lists.d.ts +1 -39
  199. package/lib/esm/resources/prices.d.ts +1 -57
  200. package/lib/esm/resources/promotion_rules.d.ts +1 -24
  201. package/lib/esm/resources/promotions.d.ts +1 -41
  202. package/lib/esm/resources/refunds.d.ts +1 -34
  203. package/lib/esm/resources/return_line_items.d.ts +1 -49
  204. package/lib/esm/resources/returns.d.ts +1 -72
  205. package/lib/esm/resources/shipments.d.ts +1 -89
  206. package/lib/esm/resources/shipping_categories.d.ts +1 -33
  207. package/lib/esm/resources/shipping_methods.d.ts +1 -74
  208. package/lib/esm/resources/shipping_zones.d.ts +1 -48
  209. package/lib/esm/resources/sku_list_items.d.ts +1 -47
  210. package/lib/esm/resources/sku_list_promotion_rules.d.ts +1 -68
  211. package/lib/esm/resources/sku_lists.d.ts +1 -49
  212. package/lib/esm/resources/sku_options.d.ts +1 -56
  213. package/lib/esm/resources/skus.d.ts +1 -78
  214. package/lib/esm/resources/stock_items.d.ts +1 -49
  215. package/lib/esm/resources/stock_line_items.d.ts +1 -29
  216. package/lib/esm/resources/stock_locations.d.ts +1 -57
  217. package/lib/esm/resources/stock_transfers.d.ts +1 -71
  218. package/lib/esm/resources/stripe_gateways.d.ts +1 -38
  219. package/lib/esm/resources/stripe_payments.d.ts +1 -42
  220. package/lib/esm/resources/tax_calculators.d.ts +1 -27
  221. package/lib/esm/resources/tax_categories.d.ts +1 -59
  222. package/lib/esm/resources/tax_rules.d.ts +1 -69
  223. package/lib/esm/resources/taxjar_accounts.d.ts +1 -43
  224. package/lib/esm/resources/transactions.d.ts +1 -31
  225. package/lib/esm/resources/voids.d.ts +1 -34
  226. package/lib/esm/resources/webhooks.d.ts +1 -42
  227. package/lib/esm/resources/wire_transfers.d.ts +1 -32
  228. package/lib/esm/static.d.ts +1 -6
  229. package/lib/esm/util.d.ts +1 -2
  230. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  231. package/lib/tsconfig.tsbuildinfo +1 -1
  232. package/package.json +4 -5
@@ -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 { Return } from './returns';
4
- import type { LineItem } from './line_items';
5
- declare type ReturnLineItemRel = ResourceRel & {
6
- type: typeof ReturnLineItems.TYPE;
7
- };
8
- declare type ReturnRel = ResourceRel & {
9
- type: 'returns';
10
- };
11
- declare type LineItemRel = ResourceRel & {
12
- type: 'line_items';
13
- };
14
- interface ReturnLineItem extends Resource {
15
- sku_code?: string;
16
- bundle_code?: string;
17
- name?: string;
18
- quantity?: number;
19
- return_reason?: object;
20
- restocked_at?: string;
21
- return?: Return;
22
- line_item?: LineItem;
23
- }
24
- interface ReturnLineItemCreate extends ResourceCreate {
25
- quantity: number;
26
- return_reason?: object;
27
- return: ReturnRel;
28
- line_item: LineItemRel;
29
- }
30
- interface ReturnLineItemUpdate extends ResourceUpdate {
31
- quantity?: number;
32
- _restock?: boolean;
33
- return_reason?: object;
34
- }
35
- declare class ReturnLineItems extends ApiResource {
36
- static readonly TYPE: 'return_line_items';
37
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>>;
38
- create(resource: ReturnLineItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReturnLineItem>;
39
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReturnLineItem>;
40
- update(resource: ReturnLineItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ReturnLineItem>;
41
- delete(id: string, options?: ResourcesConfig): Promise<void>;
42
- return(returnLineItemId: string | ReturnLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Return>;
43
- line_item(returnLineItemId: string | ReturnLineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
44
- isReturnLineItem(resource: any): resource is ReturnLineItem;
45
- relationship(id: string | ResourceId | null): ReturnLineItemRel;
46
- type(): string;
47
- }
48
- export default ReturnLineItems;
49
- export { ReturnLineItem, ReturnLineItemCreate, ReturnLineItemUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Return}from'./returns';import type{LineItem}from'./line_items';declare type ReturnLineItemRel=ResourceRel&{type:typeof ReturnLineItems.TYPE;};declare type ReturnRel=ResourceRel&{type:'returns';};declare type LineItemRel=ResourceRel&{type:'line_items';};interface ReturnLineItem extends Resource{sku_code?:string;bundle_code?:string;name?:string;quantity?:number;return_reason?:object;restocked_at?:string;return?:Return;line_item?:LineItem;}interface ReturnLineItemCreate extends ResourceCreate{quantity:number;return_reason?:object;return:ReturnRel;line_item:LineItemRel;}interface ReturnLineItemUpdate extends ResourceUpdate{quantity?:number;_restock?:boolean;return_reason?:object;}declare class ReturnLineItems extends ApiResource{static readonly TYPE:'return_line_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ReturnLineItem>>;create(resource:ReturnLineItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;update(resource:ReturnLineItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ReturnLineItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;return(returnLineItemId:string|ReturnLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;line_item(returnLineItemId:string|ReturnLineItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<LineItem>;isReturnLineItem(resource:any):resource is ReturnLineItem;relationship(id:string|ResourceId|null):ReturnLineItemRel;type():string;}export default ReturnLineItems;export{ReturnLineItem,ReturnLineItemCreate,ReturnLineItemUpdate};
@@ -1,72 +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 { Customer } from './customers';
5
- import type { StockLocation } from './stock_locations';
6
- import type { Address } from './addresses';
7
- import type { ReturnLineItem } from './return_line_items';
8
- import type { Attachment } from './attachments';
9
- declare type ReturnRel = ResourceRel & {
10
- type: typeof Returns.TYPE;
11
- };
12
- declare type OrderRel = ResourceRel & {
13
- type: 'orders';
14
- };
15
- declare type StockLocationRel = ResourceRel & {
16
- type: 'stock_locations';
17
- };
18
- interface Return extends Resource {
19
- number?: string;
20
- status?: string;
21
- customer_email?: string;
22
- skus_count?: number;
23
- approved_at?: string;
24
- cancelled_at?: string;
25
- shipped_at?: string;
26
- rejected_at?: string;
27
- received_at?: string;
28
- archived_at?: string;
29
- order?: Order;
30
- customer?: Customer;
31
- stock_location?: StockLocation;
32
- origin_address?: Address;
33
- destination_address?: Address;
34
- return_line_items?: ReturnLineItem[];
35
- attachments?: Attachment[];
36
- }
37
- interface ReturnCreate extends ResourceCreate {
38
- order: OrderRel;
39
- stock_location?: StockLocationRel;
40
- }
41
- interface ReturnUpdate extends ResourceUpdate {
42
- _request?: boolean;
43
- _approve?: boolean;
44
- _cancel?: boolean;
45
- _ship?: boolean;
46
- _reject?: boolean;
47
- _receive?: boolean;
48
- _restock?: boolean;
49
- _archive?: boolean;
50
- _unarchive?: boolean;
51
- stock_location?: StockLocationRel;
52
- }
53
- declare class Returns extends ApiResource {
54
- static readonly TYPE: 'returns';
55
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Return>>;
56
- create(resource: ReturnCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Return>;
57
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Return>;
58
- update(resource: ReturnUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Return>;
59
- delete(id: string, options?: ResourcesConfig): Promise<void>;
60
- order(returnId: string | Return, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
61
- customer(returnId: string | Return, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Customer>;
62
- stock_location(returnId: string | Return, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
63
- origin_address(returnId: string | Return, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
64
- destination_address(returnId: string | Return, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
65
- return_line_items(returnId: string | Return, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ReturnLineItem>>;
66
- attachments(returnId: string | Return, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
67
- isReturn(resource: any): resource is Return;
68
- relationship(id: string | ResourceId | null): ReturnRel;
69
- type(): string;
70
- }
71
- export default Returns;
72
- export { Return, ReturnCreate, ReturnUpdate };
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{Customer}from'./customers';import type{StockLocation}from'./stock_locations';import type{Address}from'./addresses';import type{ReturnLineItem}from'./return_line_items';import type{Attachment}from'./attachments';declare type ReturnRel=ResourceRel&{type:typeof Returns.TYPE;};declare type OrderRel=ResourceRel&{type:'orders';};declare type StockLocationRel=ResourceRel&{type:'stock_locations';};interface Return extends Resource{number?:string;status?:string;customer_email?:string;skus_count?:number;approved_at?:string;cancelled_at?:string;shipped_at?:string;rejected_at?:string;received_at?:string;archived_at?:string;order?:Order;customer?:Customer;stock_location?:StockLocation;origin_address?:Address;destination_address?:Address;return_line_items?:ReturnLineItem[];attachments?:Attachment[];}interface ReturnCreate extends ResourceCreate{order:OrderRel;stock_location?:StockLocationRel;}interface ReturnUpdate extends ResourceUpdate{_request?:boolean;_approve?:boolean;_cancel?:boolean;_ship?:boolean;_reject?:boolean;_receive?:boolean;_restock?:boolean;_archive?:boolean;_unarchive?:boolean;stock_location?:StockLocationRel;}declare class Returns extends ApiResource{static readonly TYPE:'returns';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Return>>;create(resource:ReturnCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;update(resource:ReturnUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Return>;delete(id:string,options?:ResourcesConfig):Promise<void>;order(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;customer(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Customer>;stock_location(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;origin_address(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;destination_address(returnId:string|Return,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;return_line_items(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ReturnLineItem>>;attachments(returnId:string|Return,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isReturn(resource:any):resource is Return;relationship(id:string|ResourceId|null):ReturnRel;type():string;}export default Returns;export{Return,ReturnCreate,ReturnUpdate};
@@ -1,89 +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 { ShippingCategory } from './shipping_categories';
5
- import type { StockLocation } from './stock_locations';
6
- import type { Address } from './addresses';
7
- import type { ShippingMethod } from './shipping_methods';
8
- import type { DeliveryLeadTime } from './delivery_lead_times';
9
- import type { StockLineItem } from './stock_line_items';
10
- import type { StockTransfer } from './stock_transfers';
11
- import type { CarrierAccount } from './carrier_accounts';
12
- import type { Parcel } from './parcels';
13
- import type { Attachment } from './attachments';
14
- declare type ShipmentRel = ResourceRel & {
15
- type: typeof Shipments.TYPE;
16
- };
17
- declare type ShippingMethodRel = ResourceRel & {
18
- type: 'shipping_methods';
19
- };
20
- interface Shipment extends Resource {
21
- number?: string;
22
- status?: string;
23
- currency_code?: string;
24
- cost_amount_cents?: number;
25
- cost_amount_float?: number;
26
- formatted_cost_amount?: string;
27
- skus_count?: number;
28
- selected_rate_id?: string;
29
- rates?: object[];
30
- purchase_error_code?: string;
31
- purchase_error_message?: string;
32
- get_rates_started_at?: string;
33
- get_rates_completed_at?: string;
34
- purchase_started_at?: string;
35
- purchase_completed_at?: string;
36
- purchase_failed_at?: string;
37
- order?: Order;
38
- shipping_category?: ShippingCategory;
39
- stock_location?: StockLocation;
40
- origin_address?: Address;
41
- shipping_address?: Address;
42
- shipping_method?: ShippingMethod;
43
- delivery_lead_time?: DeliveryLeadTime;
44
- /**
45
- * @deprecated This field should not be used as it may be removed in the future without notice
46
- */
47
- shipment_line_items?: object[];
48
- stock_line_items?: StockLineItem[];
49
- stock_transfers?: StockTransfer[];
50
- available_shipping_methods?: ShippingMethod[];
51
- carrier_accounts?: CarrierAccount[];
52
- parcels?: Parcel[];
53
- attachments?: Attachment[];
54
- }
55
- interface ShipmentUpdate extends ResourceUpdate {
56
- _on_hold?: boolean;
57
- _picking?: boolean;
58
- _packing?: boolean;
59
- _ready_to_ship?: boolean;
60
- _ship?: boolean;
61
- _get_rates?: boolean;
62
- selected_rate_id?: string;
63
- _purchase?: boolean;
64
- shipping_method?: ShippingMethodRel;
65
- }
66
- declare class Shipments extends ApiResource {
67
- static readonly TYPE: 'shipments';
68
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Shipment>>;
69
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
70
- update(resource: ShipmentUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Shipment>;
71
- order(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
72
- shipping_category(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
73
- stock_location(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockLocation>;
74
- origin_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
75
- shipping_address(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Address>;
76
- shipping_method(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
77
- delivery_lead_time(shipmentId: string | Shipment, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
78
- stock_line_items(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
79
- stock_transfers(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
80
- available_shipping_methods(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>>;
81
- carrier_accounts(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<CarrierAccount>>;
82
- parcels(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Parcel>>;
83
- attachments(shipmentId: string | Shipment, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
84
- isShipment(resource: any): resource is Shipment;
85
- relationship(id: string | ResourceId | null): ShipmentRel;
86
- type(): string;
87
- }
88
- export default Shipments;
89
- export { Shipment, ShipmentUpdate };
1
+ import{ApiResource,Resource,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Order}from'./orders';import type{ShippingCategory}from'./shipping_categories';import type{StockLocation}from'./stock_locations';import type{Address}from'./addresses';import type{ShippingMethod}from'./shipping_methods';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{StockLineItem}from'./stock_line_items';import type{StockTransfer}from'./stock_transfers';import type{CarrierAccount}from'./carrier_accounts';import type{Parcel}from'./parcels';import type{Attachment}from'./attachments';declare type ShipmentRel=ResourceRel&{type:typeof Shipments.TYPE;};declare type ShippingMethodRel=ResourceRel&{type:'shipping_methods';};interface Shipment extends Resource{number?:string;status?:string;currency_code?:string;cost_amount_cents?:number;cost_amount_float?:number;formatted_cost_amount?:string;skus_count?:number;selected_rate_id?:string;rates?:object[];purchase_error_code?:string;purchase_error_message?:string;get_rates_started_at?:string;get_rates_completed_at?:string;purchase_started_at?:string;purchase_completed_at?:string;purchase_failed_at?:string;order?:Order;shipping_category?:ShippingCategory;stock_location?:StockLocation;origin_address?:Address;shipping_address?:Address;shipping_method?:ShippingMethod;delivery_lead_time?:DeliveryLeadTime;shipment_line_items?:object[];stock_line_items?:StockLineItem[];stock_transfers?:StockTransfer[];available_shipping_methods?:ShippingMethod[];carrier_accounts?:CarrierAccount[];parcels?:Parcel[];attachments?:Attachment[];}interface ShipmentUpdate extends ResourceUpdate{_on_hold?:boolean;_picking?:boolean;_packing?:boolean;_ready_to_ship?:boolean;_ship?:boolean;_get_rates?:boolean;selected_rate_id?:string;_purchase?:boolean;shipping_method?:ShippingMethodRel;}declare class Shipments extends ApiResource{static readonly TYPE:'shipments';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Shipment>>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;update(resource:ShipmentUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Shipment>;order(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Order>;shipping_category(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;stock_location(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<StockLocation>;origin_address(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;shipping_address(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Address>;shipping_method(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;delivery_lead_time(shipmentId:string|Shipment,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<DeliveryLeadTime>;stock_line_items(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockLineItem>>;stock_transfers(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<StockTransfer>>;available_shipping_methods(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingMethod>>;carrier_accounts(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<CarrierAccount>>;parcels(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Parcel>>;attachments(shipmentId:string|Shipment,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isShipment(resource:any):resource is Shipment;relationship(id:string|ResourceId|null):ShipmentRel;type():string;}export default Shipments;export{Shipment,ShipmentUpdate};
@@ -1,33 +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 { Attachment } from './attachments';
5
- declare type ShippingCategoryRel = ResourceRel & {
6
- type: typeof ShippingCategories.TYPE;
7
- };
8
- interface ShippingCategory extends Resource {
9
- name?: string;
10
- skus?: Sku[];
11
- attachments?: Attachment[];
12
- }
13
- interface ShippingCategoryCreate extends ResourceCreate {
14
- name: string;
15
- }
16
- interface ShippingCategoryUpdate extends ResourceUpdate {
17
- name?: string;
18
- }
19
- declare class ShippingCategories extends ApiResource {
20
- static readonly TYPE: 'shipping_categories';
21
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingCategory>>;
22
- create(resource: ShippingCategoryCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
23
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
24
- update(resource: ShippingCategoryUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
25
- delete(id: string, options?: ResourcesConfig): Promise<void>;
26
- skus(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
27
- attachments(shippingCategoryId: string | ShippingCategory, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
28
- isShippingCategory(resource: any): resource is ShippingCategory;
29
- relationship(id: string | ResourceId | null): ShippingCategoryRel;
30
- type(): string;
31
- }
32
- export default ShippingCategories;
33
- export { ShippingCategory, ShippingCategoryCreate, ShippingCategoryUpdate };
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{Attachment}from'./attachments';declare type ShippingCategoryRel=ResourceRel&{type:typeof ShippingCategories.TYPE;};interface ShippingCategory extends Resource{name?:string;skus?:Sku[];attachments?:Attachment[];}interface ShippingCategoryCreate extends ResourceCreate{name:string;}interface ShippingCategoryUpdate extends ResourceUpdate{name?:string;}declare class ShippingCategories extends ApiResource{static readonly TYPE:'shipping_categories';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingCategory>>;create(resource:ShippingCategoryCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;update(resource:ShippingCategoryUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;delete(id:string,options?:ResourcesConfig):Promise<void>;skus(shippingCategoryId:string|ShippingCategory,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;attachments(shippingCategoryId:string|ShippingCategory,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isShippingCategory(resource:any):resource is ShippingCategory;relationship(id:string|ResourceId|null):ShippingCategoryRel;type():string;}export default ShippingCategories;export{ShippingCategory,ShippingCategoryCreate,ShippingCategoryUpdate};
@@ -1,74 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { Market } from './markets';
4
- import type { ShippingZone } from './shipping_zones';
5
- import type { ShippingCategory } from './shipping_categories';
6
- import type { DeliveryLeadTime } from './delivery_lead_times';
7
- import type { Attachment } from './attachments';
8
- declare type ShippingMethodRel = ResourceRel & {
9
- type: typeof ShippingMethods.TYPE;
10
- };
11
- declare type MarketRel = ResourceRel & {
12
- type: 'markets';
13
- };
14
- declare type ShippingZoneRel = ResourceRel & {
15
- type: 'shipping_zones';
16
- };
17
- declare type ShippingCategoryRel = ResourceRel & {
18
- type: 'shipping_categories';
19
- };
20
- interface ShippingMethod extends Resource {
21
- name?: string;
22
- currency_code?: string;
23
- disabled_at?: string;
24
- price_amount_cents?: number;
25
- price_amount_float?: number;
26
- formatted_price_amount?: string;
27
- free_over_amount_cents?: number;
28
- free_over_amount_float?: number;
29
- formatted_free_over_amount?: string;
30
- price_amount_for_shipment_cents?: number;
31
- price_amount_for_shipment_float?: number;
32
- formatted_price_amount_for_shipment?: string;
33
- market?: Market;
34
- shipping_zone?: ShippingZone;
35
- shipping_category?: ShippingCategory;
36
- delivery_lead_time_for_shipment?: DeliveryLeadTime;
37
- attachments?: Attachment[];
38
- }
39
- interface ShippingMethodCreate extends ResourceCreate {
40
- name: string;
41
- currency_code?: string;
42
- price_amount_cents: number;
43
- free_over_amount_cents?: number;
44
- market?: MarketRel;
45
- shipping_zone: ShippingZoneRel;
46
- shipping_category: ShippingCategoryRel;
47
- }
48
- interface ShippingMethodUpdate extends ResourceUpdate {
49
- name?: string;
50
- currency_code?: string;
51
- price_amount_cents?: number;
52
- free_over_amount_cents?: number;
53
- market?: MarketRel;
54
- shipping_zone?: ShippingZoneRel;
55
- shipping_category?: ShippingCategoryRel;
56
- }
57
- declare class ShippingMethods extends ApiResource {
58
- static readonly TYPE: 'shipping_methods';
59
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingMethod>>;
60
- create(resource: ShippingMethodCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
61
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
62
- update(resource: ShippingMethodUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingMethod>;
63
- delete(id: string, options?: ResourcesConfig): Promise<void>;
64
- market(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Market>;
65
- shipping_zone(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
66
- shipping_category(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingCategory>;
67
- delivery_lead_time_for_shipment(shippingMethodId: string | ShippingMethod, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<DeliveryLeadTime>;
68
- attachments(shippingMethodId: string | ShippingMethod, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
69
- isShippingMethod(resource: any): resource is ShippingMethod;
70
- relationship(id: string | ResourceId | null): ShippingMethodRel;
71
- type(): string;
72
- }
73
- export default ShippingMethods;
74
- export { ShippingMethod, ShippingMethodCreate, ShippingMethodUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Market}from'./markets';import type{ShippingZone}from'./shipping_zones';import type{ShippingCategory}from'./shipping_categories';import type{DeliveryLeadTime}from'./delivery_lead_times';import type{Attachment}from'./attachments';declare type ShippingMethodRel=ResourceRel&{type:typeof ShippingMethods.TYPE;};declare type MarketRel=ResourceRel&{type:'markets';};declare type ShippingZoneRel=ResourceRel&{type:'shipping_zones';};declare type ShippingCategoryRel=ResourceRel&{type:'shipping_categories';};interface ShippingMethod extends Resource{name?:string;currency_code?:string;disabled_at?:string;price_amount_cents?:number;price_amount_float?:number;formatted_price_amount?:string;free_over_amount_cents?:number;free_over_amount_float?:number;formatted_free_over_amount?:string;price_amount_for_shipment_cents?:number;price_amount_for_shipment_float?:number;formatted_price_amount_for_shipment?:string;market?:Market;shipping_zone?:ShippingZone;shipping_category?:ShippingCategory;delivery_lead_time_for_shipment?:DeliveryLeadTime;attachments?:Attachment[];}interface ShippingMethodCreate extends ResourceCreate{name:string;currency_code?:string;price_amount_cents:number;free_over_amount_cents?:number;market?:MarketRel;shipping_zone:ShippingZoneRel;shipping_category:ShippingCategoryRel;}interface ShippingMethodUpdate extends ResourceUpdate{name?:string;currency_code?:string;price_amount_cents?:number;free_over_amount_cents?:number;market?:MarketRel;shipping_zone?:ShippingZoneRel;shipping_category?:ShippingCategoryRel;}declare class ShippingMethods extends ApiResource{static readonly TYPE:'shipping_methods';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingMethod>>;create(resource:ShippingMethodCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;update(resource:ShippingMethodUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingMethod>;delete(id:string,options?:ResourcesConfig):Promise<void>;market(shippingMethodId:string|ShippingMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Market>;shipping_zone(shippingMethodId:string|ShippingMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingZone>;shipping_category(shippingMethodId:string|ShippingMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingCategory>;delivery_lead_time_for_shipment(shippingMethodId:string|ShippingMethod,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<DeliveryLeadTime>;attachments(shippingMethodId:string|ShippingMethod,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isShippingMethod(resource:any):resource is ShippingMethod;relationship(id:string|ResourceId|null):ShippingMethodRel;type():string;}export default ShippingMethods;export{ShippingMethod,ShippingMethodCreate,ShippingMethodUpdate};
@@ -1,48 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { Attachment } from './attachments';
4
- declare type ShippingZoneRel = ResourceRel & {
5
- type: typeof ShippingZones.TYPE;
6
- };
7
- interface ShippingZone extends Resource {
8
- name?: string;
9
- country_code_regex?: string;
10
- not_country_code_regex?: string;
11
- state_code_regex?: string;
12
- not_state_code_regex?: string;
13
- zip_code_regex?: string;
14
- not_zip_code_regex?: string;
15
- attachments?: Attachment[];
16
- }
17
- interface ShippingZoneCreate extends ResourceCreate {
18
- name: string;
19
- country_code_regex?: string;
20
- not_country_code_regex?: string;
21
- state_code_regex?: string;
22
- not_state_code_regex?: string;
23
- zip_code_regex?: string;
24
- not_zip_code_regex?: string;
25
- }
26
- interface ShippingZoneUpdate extends ResourceUpdate {
27
- name?: string;
28
- country_code_regex?: string;
29
- not_country_code_regex?: string;
30
- state_code_regex?: string;
31
- not_state_code_regex?: string;
32
- zip_code_regex?: string;
33
- not_zip_code_regex?: string;
34
- }
35
- declare class ShippingZones extends ApiResource {
36
- static readonly TYPE: 'shipping_zones';
37
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<ShippingZone>>;
38
- create(resource: ShippingZoneCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
39
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
40
- update(resource: ShippingZoneUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<ShippingZone>;
41
- delete(id: string, options?: ResourcesConfig): Promise<void>;
42
- attachments(shippingZoneId: string | ShippingZone, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
43
- isShippingZone(resource: any): resource is ShippingZone;
44
- relationship(id: string | ResourceId | null): ShippingZoneRel;
45
- type(): string;
46
- }
47
- export default ShippingZones;
48
- export { ShippingZone, ShippingZoneCreate, ShippingZoneUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{Attachment}from'./attachments';declare type ShippingZoneRel=ResourceRel&{type:typeof ShippingZones.TYPE;};interface ShippingZone extends Resource{name?:string;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;attachments?:Attachment[];}interface ShippingZoneCreate extends ResourceCreate{name:string;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;}interface ShippingZoneUpdate extends ResourceUpdate{name?:string;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;}declare class ShippingZones extends ApiResource{static readonly TYPE:'shipping_zones';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<ShippingZone>>;create(resource:ShippingZoneCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingZone>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingZone>;update(resource:ShippingZoneUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<ShippingZone>;delete(id:string,options?:ResourcesConfig):Promise<void>;attachments(shippingZoneId:string|ShippingZone,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Attachment>>;isShippingZone(resource:any):resource is ShippingZone;relationship(id:string|ResourceId|null):ShippingZoneRel;type():string;}export default ShippingZones;export{ShippingZone,ShippingZoneCreate,ShippingZoneUpdate};
@@ -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 { SkuList } from './sku_lists';
4
- import type { Sku } from './skus';
5
- declare type SkuListItemRel = ResourceRel & {
6
- type: typeof SkuListItems.TYPE;
7
- };
8
- declare type SkuListRel = ResourceRel & {
9
- type: 'sku_lists';
10
- };
11
- declare type SkuRel = ResourceRel & {
12
- type: 'skus';
13
- };
14
- interface SkuListItem extends Resource {
15
- position?: number;
16
- sku_code?: string;
17
- quantity?: number;
18
- sku_list?: SkuList;
19
- sku?: Sku;
20
- }
21
- interface SkuListItemCreate extends ResourceCreate {
22
- position?: number;
23
- sku_code?: string;
24
- quantity?: number;
25
- sku_list: SkuListRel;
26
- sku: SkuRel;
27
- }
28
- interface SkuListItemUpdate extends ResourceUpdate {
29
- position?: number;
30
- sku_code?: string;
31
- quantity?: number;
32
- }
33
- declare class SkuListItems extends ApiResource {
34
- static readonly TYPE: 'sku_list_items';
35
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuListItem>>;
36
- create(resource: SkuListItemCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListItem>;
37
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListItem>;
38
- update(resource: SkuListItemUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListItem>;
39
- delete(id: string, options?: ResourcesConfig): Promise<void>;
40
- sku_list(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
41
- sku(skuListItemId: string | SkuListItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
42
- isSkuListItem(resource: any): resource is SkuListItem;
43
- relationship(id: string | ResourceId | null): SkuListItemRel;
44
- type(): string;
45
- }
46
- export default SkuListItems;
47
- export { SkuListItem, SkuListItemCreate, SkuListItemUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{SkuList}from'./sku_lists';import type{Sku}from'./skus';declare type SkuListItemRel=ResourceRel&{type:typeof SkuListItems.TYPE;};declare type SkuListRel=ResourceRel&{type:'sku_lists';};declare type SkuRel=ResourceRel&{type:'skus';};interface SkuListItem extends Resource{position?:number;sku_code?:string;quantity?:number;sku_list?:SkuList;sku?:Sku;}interface SkuListItemCreate extends ResourceCreate{position?:number;sku_code?:string;quantity?:number;sku_list:SkuListRel;sku:SkuRel;}interface SkuListItemUpdate extends ResourceUpdate{position?:number;sku_code?:string;quantity?:number;}declare class SkuListItems extends ApiResource{static readonly TYPE:'sku_list_items';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuListItem>>;create(resource:SkuListItemCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListItem>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListItem>;update(resource:SkuListItemUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListItem>;delete(id:string,options?:ResourcesConfig):Promise<void>;sku_list(skuListItemId:string|SkuListItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;sku(skuListItemId:string|SkuListItem,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<Sku>;isSkuListItem(resource:any):resource is SkuListItem;relationship(id:string|ResourceId|null):SkuListItemRel;type():string;}export default SkuListItems;export{SkuListItem,SkuListItemCreate,SkuListItemUpdate};
@@ -1,68 +1 @@
1
- import { ApiResource, Resource, ResourceCreate, ResourceUpdate, ResourcesConfig, ResourceId, ResourceRel, ListResponse } from '../resource';
2
- import type { QueryParamsList, QueryParamsRetrieve } from '../query';
3
- import type { PercentageDiscountPromotion } from './percentage_discount_promotions';
4
- import type { FreeShippingPromotion } from './free_shipping_promotions';
5
- import type { FixedAmountPromotion } from './fixed_amount_promotions';
6
- import type { FreeGiftPromotion } from './free_gift_promotions';
7
- import type { FixedPricePromotion } from './fixed_price_promotions';
8
- import type { ExternalPromotion } from './external_promotions';
9
- import type { SkuList } from './sku_lists';
10
- import type { Sku } from './skus';
11
- declare type SkuListPromotionRuleRel = ResourceRel & {
12
- type: typeof SkuListPromotionRules.TYPE;
13
- };
14
- declare type PercentageDiscountPromotionRel = ResourceRel & {
15
- type: 'percentage_discount_promotions';
16
- };
17
- declare type FreeShippingPromotionRel = ResourceRel & {
18
- type: 'free_shipping_promotions';
19
- };
20
- declare type FixedAmountPromotionRel = ResourceRel & {
21
- type: 'fixed_amount_promotions';
22
- };
23
- declare type FreeGiftPromotionRel = ResourceRel & {
24
- type: 'free_gift_promotions';
25
- };
26
- declare type FixedPricePromotionRel = ResourceRel & {
27
- type: 'fixed_price_promotions';
28
- };
29
- declare type ExternalPromotionRel = ResourceRel & {
30
- type: 'external_promotions';
31
- };
32
- declare type SkuListRel = ResourceRel & {
33
- type: 'sku_lists';
34
- };
35
- interface SkuListPromotionRule extends Resource {
36
- all_skus?: boolean;
37
- min_quantity?: number;
38
- promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FixedAmountPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion;
39
- sku_list?: SkuList;
40
- skus?: Sku[];
41
- }
42
- interface SkuListPromotionRuleCreate extends ResourceCreate {
43
- all_skus?: boolean;
44
- min_quantity?: number;
45
- promotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel;
46
- sku_list?: SkuListRel;
47
- }
48
- interface SkuListPromotionRuleUpdate extends ResourceUpdate {
49
- all_skus?: boolean;
50
- min_quantity?: number;
51
- promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FixedAmountPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel;
52
- sku_list?: SkuListRel;
53
- }
54
- declare class SkuListPromotionRules extends ApiResource {
55
- static readonly TYPE: 'sku_list_promotion_rules';
56
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuListPromotionRule>>;
57
- create(resource: SkuListPromotionRuleCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
58
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
59
- update(resource: SkuListPromotionRuleUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
60
- delete(id: string, options?: ResourcesConfig): Promise<void>;
61
- sku_list(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
62
- skus(skuListPromotionRuleId: string | SkuListPromotionRule, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
63
- isSkuListPromotionRule(resource: any): resource is SkuListPromotionRule;
64
- relationship(id: string | ResourceId | null): SkuListPromotionRuleRel;
65
- type(): string;
66
- }
67
- export default SkuListPromotionRules;
68
- export { SkuListPromotionRule, SkuListPromotionRuleCreate, SkuListPromotionRuleUpdate };
1
+ import{ApiResource,Resource,ResourceCreate,ResourceUpdate,ResourcesConfig,ResourceId,ResourceRel,ListResponse}from'../resource';import type{QueryParamsList,QueryParamsRetrieve}from'../query';import type{PercentageDiscountPromotion}from'./percentage_discount_promotions';import type{FreeShippingPromotion}from'./free_shipping_promotions';import type{FixedAmountPromotion}from'./fixed_amount_promotions';import type{FreeGiftPromotion}from'./free_gift_promotions';import type{FixedPricePromotion}from'./fixed_price_promotions';import type{ExternalPromotion}from'./external_promotions';import type{SkuList}from'./sku_lists';import type{Sku}from'./skus';declare type SkuListPromotionRuleRel=ResourceRel&{type:typeof SkuListPromotionRules.TYPE;};declare type PercentageDiscountPromotionRel=ResourceRel&{type:'percentage_discount_promotions';};declare type FreeShippingPromotionRel=ResourceRel&{type:'free_shipping_promotions';};declare type FixedAmountPromotionRel=ResourceRel&{type:'fixed_amount_promotions';};declare type FreeGiftPromotionRel=ResourceRel&{type:'free_gift_promotions';};declare type FixedPricePromotionRel=ResourceRel&{type:'fixed_price_promotions';};declare type ExternalPromotionRel=ResourceRel&{type:'external_promotions';};declare type SkuListRel=ResourceRel&{type:'sku_lists';};interface SkuListPromotionRule extends Resource{all_skus?:boolean;min_quantity?:number;promotion?:PercentageDiscountPromotion|FreeShippingPromotion|FixedAmountPromotion|FreeGiftPromotion|FixedPricePromotion|ExternalPromotion;sku_list?:SkuList;skus?:Sku[];}interface SkuListPromotionRuleCreate extends ResourceCreate{all_skus?:boolean;min_quantity?:number;promotion:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;sku_list?:SkuListRel;}interface SkuListPromotionRuleUpdate extends ResourceUpdate{all_skus?:boolean;min_quantity?:number;promotion?:PercentageDiscountPromotionRel|FreeShippingPromotionRel|FixedAmountPromotionRel|FreeGiftPromotionRel|FixedPricePromotionRel|ExternalPromotionRel;sku_list?:SkuListRel;}declare class SkuListPromotionRules extends ApiResource{static readonly TYPE:'sku_list_promotion_rules';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuListPromotionRule>>;create(resource:SkuListPromotionRuleCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;update(resource:SkuListPromotionRuleUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuListPromotionRule>;delete(id:string,options?:ResourcesConfig):Promise<void>;sku_list(skuListPromotionRuleId:string|SkuListPromotionRule,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;skus(skuListPromotionRuleId:string|SkuListPromotionRule,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;isSkuListPromotionRule(resource:any):resource is SkuListPromotionRule;relationship(id:string|ResourceId|null):SkuListPromotionRuleRel;type():string;}export default SkuListPromotionRules;export{SkuListPromotionRule,SkuListPromotionRuleCreate,SkuListPromotionRuleUpdate};
@@ -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 { Sku } from './skus';
4
- import type { SkuListItem } from './sku_list_items';
5
- import type { Bundle } from './bundles';
6
- declare type SkuListRel = ResourceRel & {
7
- type: typeof SkuLists.TYPE;
8
- };
9
- interface SkuList extends Resource {
10
- name?: string;
11
- slug?: string;
12
- description?: string;
13
- image_url?: string;
14
- manual?: boolean;
15
- sku_code_regex?: string;
16
- skus?: Sku[];
17
- sku_list_items?: SkuListItem[];
18
- bundles?: Bundle[];
19
- }
20
- interface SkuListCreate extends ResourceCreate {
21
- name: string;
22
- description?: string;
23
- image_url?: string;
24
- manual?: boolean;
25
- sku_code_regex?: string;
26
- }
27
- interface SkuListUpdate extends ResourceUpdate {
28
- name?: string;
29
- description?: string;
30
- image_url?: string;
31
- manual?: boolean;
32
- sku_code_regex?: string;
33
- }
34
- declare class SkuLists extends ApiResource {
35
- static readonly TYPE: 'sku_lists';
36
- list(params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuList>>;
37
- create(resource: SkuListCreate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
38
- retrieve(id: string, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
39
- update(resource: SkuListUpdate, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
40
- delete(id: string, options?: ResourcesConfig): Promise<void>;
41
- skus(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
42
- sku_list_items(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<SkuListItem>>;
43
- bundles(skuListId: string | SkuList, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Bundle>>;
44
- isSkuList(resource: any): resource is SkuList;
45
- relationship(id: string | ResourceId | null): SkuListRel;
46
- type(): string;
47
- }
48
- export default SkuLists;
49
- export { SkuList, SkuListCreate, SkuListUpdate };
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{SkuListItem}from'./sku_list_items';import type{Bundle}from'./bundles';declare type SkuListRel=ResourceRel&{type:typeof SkuLists.TYPE;};interface SkuList extends Resource{name?:string;slug?:string;description?:string;image_url?:string;manual?:boolean;sku_code_regex?:string;skus?:Sku[];sku_list_items?:SkuListItem[];bundles?:Bundle[];}interface SkuListCreate extends ResourceCreate{name:string;description?:string;image_url?:string;manual?:boolean;sku_code_regex?:string;}interface SkuListUpdate extends ResourceUpdate{name?:string;description?:string;image_url?:string;manual?:boolean;sku_code_regex?:string;}declare class SkuLists extends ApiResource{static readonly TYPE:'sku_lists';list(params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuList>>;create(resource:SkuListCreate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;retrieve(id:string,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;update(resource:SkuListUpdate,params?:QueryParamsRetrieve,options?:ResourcesConfig):Promise<SkuList>;delete(id:string,options?:ResourcesConfig):Promise<void>;skus(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Sku>>;sku_list_items(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<SkuListItem>>;bundles(skuListId:string|SkuList,params?:QueryParamsList,options?:ResourcesConfig):Promise<ListResponse<Bundle>>;isSkuList(resource:any):resource is SkuList;relationship(id:string|ResourceId|null):SkuListRel;type():string;}export default SkuLists;export{SkuList,SkuListCreate,SkuListUpdate};