@commercelayer/sdk 4.30.0 → 4.32.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 (126) hide show
  1. package/lib/cjs/api.d.ts +4 -2
  2. package/lib/cjs/api.js +8 -2
  3. package/lib/cjs/client.d.ts +5 -1
  4. package/lib/cjs/client.js +22 -3
  5. package/lib/cjs/commercelayer.d.ts +4 -2
  6. package/lib/cjs/commercelayer.js +3 -1
  7. package/lib/cjs/error.d.ts +1 -0
  8. package/lib/cjs/error.js +1 -2
  9. package/lib/cjs/interceptor.d.ts +1 -1
  10. package/lib/cjs/jsonapi.js +4 -1
  11. package/lib/cjs/model.d.ts +2 -0
  12. package/lib/cjs/resources/authorizations.d.ts +3 -0
  13. package/lib/cjs/resources/authorizations.js +4 -0
  14. package/lib/cjs/resources/captures.d.ts +3 -0
  15. package/lib/cjs/resources/captures.js +4 -0
  16. package/lib/cjs/resources/coupons.d.ts +8 -0
  17. package/lib/cjs/resources/coupons.js +4 -0
  18. package/lib/cjs/resources/customer_addresses.d.ts +2 -0
  19. package/lib/cjs/resources/customers.d.ts +1 -0
  20. package/lib/cjs/resources/external_promotions.d.ts +3 -0
  21. package/lib/cjs/resources/external_promotions.js +4 -0
  22. package/lib/cjs/resources/fixed_amount_promotions.d.ts +3 -0
  23. package/lib/cjs/resources/fixed_amount_promotions.js +4 -0
  24. package/lib/cjs/resources/fixed_price_promotions.d.ts +8 -8
  25. package/lib/cjs/resources/fixed_price_promotions.js +4 -4
  26. package/lib/cjs/resources/free_gift_promotions.d.ts +8 -8
  27. package/lib/cjs/resources/free_gift_promotions.js +4 -4
  28. package/lib/cjs/resources/free_shipping_promotions.d.ts +3 -0
  29. package/lib/cjs/resources/free_shipping_promotions.js +4 -0
  30. package/lib/cjs/resources/imports.d.ts +0 -3
  31. package/lib/cjs/resources/inventory_models.d.ts +3 -0
  32. package/lib/cjs/resources/line_items.d.ts +5 -0
  33. package/lib/cjs/resources/line_items.js +4 -0
  34. package/lib/cjs/resources/order_amount_promotion_rules.d.ts +3 -0
  35. package/lib/cjs/resources/orders.d.ts +4 -4
  36. package/lib/cjs/resources/parcel_line_items.d.ts +1 -1
  37. package/lib/cjs/resources/parcels.d.ts +3 -3
  38. package/lib/cjs/resources/percentage_discount_promotions.d.ts +8 -8
  39. package/lib/cjs/resources/percentage_discount_promotions.js +4 -4
  40. package/lib/cjs/resources/promotions.d.ts +3 -0
  41. package/lib/cjs/resources/promotions.js +4 -0
  42. package/lib/cjs/resources/refunds.d.ts +3 -0
  43. package/lib/cjs/resources/refunds.js +4 -0
  44. package/lib/cjs/resources/reserved_stocks.d.ts +28 -0
  45. package/lib/cjs/resources/reserved_stocks.js +28 -0
  46. package/lib/cjs/resources/return_line_items.d.ts +2 -1
  47. package/lib/cjs/resources/satispay_payments.d.ts +7 -0
  48. package/lib/cjs/resources/shipping_methods.d.ts +6 -0
  49. package/lib/cjs/resources/skus.d.ts +3 -0
  50. package/lib/cjs/resources/skus.js +4 -0
  51. package/lib/cjs/resources/stock_items.d.ts +6 -0
  52. package/lib/cjs/resources/stock_items.js +8 -0
  53. package/lib/cjs/resources/stock_line_items.d.ts +3 -0
  54. package/lib/cjs/resources/stock_line_items.js +4 -0
  55. package/lib/cjs/resources/stock_reservations.d.ts +36 -0
  56. package/lib/cjs/resources/stock_reservations.js +36 -0
  57. package/lib/cjs/resources/stripe_payments.d.ts +1 -0
  58. package/lib/cjs/resources/transactions.d.ts +5 -2
  59. package/lib/cjs/resources/transactions.js +4 -0
  60. package/lib/cjs/resources/voids.d.ts +3 -0
  61. package/lib/cjs/resources/voids.js +4 -0
  62. package/lib/cjs/util.d.ts +0 -4
  63. package/lib/esm/api.d.ts +4 -2
  64. package/lib/esm/api.js +4 -0
  65. package/lib/esm/client.d.ts +5 -1
  66. package/lib/esm/client.js +22 -3
  67. package/lib/esm/commercelayer.d.ts +4 -2
  68. package/lib/esm/commercelayer.js +3 -1
  69. package/lib/esm/error.d.ts +1 -0
  70. package/lib/esm/interceptor.d.ts +1 -1
  71. package/lib/esm/jsonapi.js +4 -1
  72. package/lib/esm/model.d.ts +2 -0
  73. package/lib/esm/resources/authorizations.d.ts +3 -0
  74. package/lib/esm/resources/authorizations.js +4 -0
  75. package/lib/esm/resources/captures.d.ts +3 -0
  76. package/lib/esm/resources/captures.js +4 -0
  77. package/lib/esm/resources/coupons.d.ts +8 -0
  78. package/lib/esm/resources/coupons.js +4 -0
  79. package/lib/esm/resources/customer_addresses.d.ts +2 -0
  80. package/lib/esm/resources/customers.d.ts +1 -0
  81. package/lib/esm/resources/external_promotions.d.ts +3 -0
  82. package/lib/esm/resources/external_promotions.js +4 -0
  83. package/lib/esm/resources/fixed_amount_promotions.d.ts +3 -0
  84. package/lib/esm/resources/fixed_amount_promotions.js +4 -0
  85. package/lib/esm/resources/fixed_price_promotions.d.ts +8 -8
  86. package/lib/esm/resources/fixed_price_promotions.js +4 -4
  87. package/lib/esm/resources/free_gift_promotions.d.ts +8 -8
  88. package/lib/esm/resources/free_gift_promotions.js +4 -4
  89. package/lib/esm/resources/free_shipping_promotions.d.ts +3 -0
  90. package/lib/esm/resources/free_shipping_promotions.js +4 -0
  91. package/lib/esm/resources/imports.d.ts +0 -3
  92. package/lib/esm/resources/inventory_models.d.ts +3 -0
  93. package/lib/esm/resources/line_items.d.ts +5 -0
  94. package/lib/esm/resources/line_items.js +4 -0
  95. package/lib/esm/resources/order_amount_promotion_rules.d.ts +3 -0
  96. package/lib/esm/resources/orders.d.ts +4 -4
  97. package/lib/esm/resources/parcel_line_items.d.ts +1 -1
  98. package/lib/esm/resources/parcels.d.ts +3 -3
  99. package/lib/esm/resources/percentage_discount_promotions.d.ts +8 -8
  100. package/lib/esm/resources/percentage_discount_promotions.js +4 -4
  101. package/lib/esm/resources/promotions.d.ts +3 -0
  102. package/lib/esm/resources/promotions.js +4 -0
  103. package/lib/esm/resources/refunds.d.ts +3 -0
  104. package/lib/esm/resources/refunds.js +4 -0
  105. package/lib/esm/resources/reserved_stocks.d.ts +28 -0
  106. package/lib/esm/resources/reserved_stocks.js +26 -0
  107. package/lib/esm/resources/return_line_items.d.ts +2 -1
  108. package/lib/esm/resources/satispay_payments.d.ts +7 -0
  109. package/lib/esm/resources/shipping_methods.d.ts +6 -0
  110. package/lib/esm/resources/skus.d.ts +3 -0
  111. package/lib/esm/resources/skus.js +4 -0
  112. package/lib/esm/resources/stock_items.d.ts +6 -0
  113. package/lib/esm/resources/stock_items.js +8 -0
  114. package/lib/esm/resources/stock_line_items.d.ts +3 -0
  115. package/lib/esm/resources/stock_line_items.js +4 -0
  116. package/lib/esm/resources/stock_reservations.d.ts +36 -0
  117. package/lib/esm/resources/stock_reservations.js +34 -0
  118. package/lib/esm/resources/stripe_payments.d.ts +1 -0
  119. package/lib/esm/resources/transactions.d.ts +5 -2
  120. package/lib/esm/resources/transactions.js +4 -0
  121. package/lib/esm/resources/voids.d.ts +3 -0
  122. package/lib/esm/resources/voids.js +4 -0
  123. package/lib/esm/util.d.ts +0 -4
  124. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  125. package/lib/tsconfig.tsbuildinfo +1 -1
  126. package/package.json +8 -8
@@ -6,10 +6,10 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { SkuList, SkuListType } from './sku_lists';
9
10
  import type { Attachment } from './attachments';
10
11
  import type { Event } from './events';
11
12
  import type { Tag, TagType } from './tags';
12
- import type { SkuList, SkuListType } from './sku_lists';
13
13
  import type { Sku } from './skus';
14
14
  type FixedPricePromotionType = 'fixed_price_promotions';
15
15
  type FixedPricePromotionRel = ResourceRel & {
@@ -30,12 +30,12 @@ type SkuListPromotionRuleRel = ResourceRel & {
30
30
  type CouponCodesPromotionRuleRel = ResourceRel & {
31
31
  type: CouponCodesPromotionRuleType;
32
32
  };
33
- type TagRel = ResourceRel & {
34
- type: TagType;
35
- };
36
33
  type SkuListRel = ResourceRel & {
37
34
  type: SkuListType;
38
35
  };
36
+ type TagRel = ResourceRel & {
37
+ type: TagType;
38
+ };
39
39
  interface FixedPricePromotion extends Resource {
40
40
  readonly type: FixedPricePromotionType;
41
41
  name: string;
@@ -53,10 +53,10 @@ interface FixedPricePromotion extends Resource {
53
53
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
54
54
  sku_list_promotion_rule?: SkuListPromotionRule | null;
55
55
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
56
+ sku_list?: SkuList | null;
56
57
  attachments?: Attachment[] | null;
57
58
  events?: Event[] | null;
58
59
  tags?: Tag[] | null;
59
- sku_list?: SkuList | null;
60
60
  skus?: Sku[] | null;
61
61
  }
62
62
  interface FixedPricePromotionCreate extends ResourceCreate {
@@ -71,8 +71,8 @@ interface FixedPricePromotionCreate extends ResourceCreate {
71
71
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
72
72
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
73
73
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
74
- tags?: TagRel[] | null;
75
74
  sku_list: SkuListRel;
75
+ tags?: TagRel[] | null;
76
76
  }
77
77
  interface FixedPricePromotionUpdate extends ResourceUpdate {
78
78
  name?: string | null;
@@ -86,8 +86,8 @@ interface FixedPricePromotionUpdate extends ResourceUpdate {
86
86
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
87
87
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
88
88
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
89
- tags?: TagRel[] | null;
90
89
  sku_list?: SkuListRel | null;
90
+ tags?: TagRel[] | null;
91
91
  }
92
92
  declare class FixedPricePromotions extends ApiResource<FixedPricePromotion> {
93
93
  static readonly TYPE: FixedPricePromotionType;
@@ -98,10 +98,10 @@ declare class FixedPricePromotions extends ApiResource<FixedPricePromotion> {
98
98
  order_amount_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
99
99
  sku_list_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
100
100
  coupon_codes_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
101
+ sku_list(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
101
102
  attachments(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
102
103
  events(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
103
104
  tags(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
104
- sku_list(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
105
105
  skus(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
106
106
  isFixedPricePromotion(resource: any): resource is FixedPricePromotion;
107
107
  relationship(id: string | ResourceId | null): FixedPricePromotionRel;
@@ -27,6 +27,10 @@ class FixedPricePromotions extends resource_1.ApiResource {
27
27
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `fixed_price_promotions/${_fixedPricePromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async sku_list(fixedPricePromotionId, params, options) {
31
+ const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
32
+ return this.resources.fetch({ type: 'sku_lists' }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list`, params, options);
33
+ }
30
34
  async attachments(fixedPricePromotionId, params, options) {
31
35
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
32
36
  return this.resources.fetch({ type: 'attachments' }, `fixed_price_promotions/${_fixedPricePromotionId}/attachments`, params, options);
@@ -39,10 +43,6 @@ class FixedPricePromotions extends resource_1.ApiResource {
39
43
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
40
44
  return this.resources.fetch({ type: 'tags' }, `fixed_price_promotions/${_fixedPricePromotionId}/tags`, params, options);
41
45
  }
42
- async sku_list(fixedPricePromotionId, params, options) {
43
- const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
44
- return this.resources.fetch({ type: 'sku_lists' }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list`, params, options);
45
- }
46
46
  async skus(fixedPricePromotionId, params, options) {
47
47
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
48
48
  return this.resources.fetch({ type: 'skus' }, `fixed_price_promotions/${_fixedPricePromotionId}/skus`, params, options);
@@ -6,10 +6,10 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { SkuList, SkuListType } from './sku_lists';
9
10
  import type { Attachment } from './attachments';
10
11
  import type { Event } from './events';
11
12
  import type { Tag, TagType } from './tags';
12
- import type { SkuList, SkuListType } from './sku_lists';
13
13
  import type { Sku } from './skus';
14
14
  type FreeGiftPromotionType = 'free_gift_promotions';
15
15
  type FreeGiftPromotionRel = ResourceRel & {
@@ -30,12 +30,12 @@ type SkuListPromotionRuleRel = ResourceRel & {
30
30
  type CouponCodesPromotionRuleRel = ResourceRel & {
31
31
  type: CouponCodesPromotionRuleType;
32
32
  };
33
- type TagRel = ResourceRel & {
34
- type: TagType;
35
- };
36
33
  type SkuListRel = ResourceRel & {
37
34
  type: SkuListType;
38
35
  };
36
+ type TagRel = ResourceRel & {
37
+ type: TagType;
38
+ };
39
39
  interface FreeGiftPromotion extends Resource {
40
40
  readonly type: FreeGiftPromotionType;
41
41
  name: string;
@@ -51,10 +51,10 @@ interface FreeGiftPromotion extends Resource {
51
51
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
52
52
  sku_list_promotion_rule?: SkuListPromotionRule | null;
53
53
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
54
+ sku_list?: SkuList | null;
54
55
  attachments?: Attachment[] | null;
55
56
  events?: Event[] | null;
56
57
  tags?: Tag[] | null;
57
- sku_list?: SkuList | null;
58
58
  skus?: Sku[] | null;
59
59
  }
60
60
  interface FreeGiftPromotionCreate extends ResourceCreate {
@@ -69,8 +69,8 @@ interface FreeGiftPromotionCreate extends ResourceCreate {
69
69
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
70
70
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
71
71
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
72
- tags?: TagRel[] | null;
73
72
  sku_list: SkuListRel;
73
+ tags?: TagRel[] | null;
74
74
  }
75
75
  interface FreeGiftPromotionUpdate extends ResourceUpdate {
76
76
  name?: string | null;
@@ -84,8 +84,8 @@ interface FreeGiftPromotionUpdate extends ResourceUpdate {
84
84
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
85
85
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
86
86
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
87
- tags?: TagRel[] | null;
88
87
  sku_list?: SkuListRel | null;
88
+ tags?: TagRel[] | null;
89
89
  }
90
90
  declare class FreeGiftPromotions extends ApiResource<FreeGiftPromotion> {
91
91
  static readonly TYPE: FreeGiftPromotionType;
@@ -96,10 +96,10 @@ declare class FreeGiftPromotions extends ApiResource<FreeGiftPromotion> {
96
96
  order_amount_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
97
97
  sku_list_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
98
98
  coupon_codes_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
99
+ sku_list(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
99
100
  attachments(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
100
101
  events(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
101
102
  tags(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
102
- sku_list(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
103
103
  skus(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
104
104
  isFreeGiftPromotion(resource: any): resource is FreeGiftPromotion;
105
105
  relationship(id: string | ResourceId | null): FreeGiftPromotionRel;
@@ -27,6 +27,10 @@ class FreeGiftPromotions extends resource_1.ApiResource {
27
27
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `free_gift_promotions/${_freeGiftPromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async sku_list(freeGiftPromotionId, params, options) {
31
+ const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
32
+ return this.resources.fetch({ type: 'sku_lists' }, `free_gift_promotions/${_freeGiftPromotionId}/sku_list`, params, options);
33
+ }
30
34
  async attachments(freeGiftPromotionId, params, options) {
31
35
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
32
36
  return this.resources.fetch({ type: 'attachments' }, `free_gift_promotions/${_freeGiftPromotionId}/attachments`, params, options);
@@ -39,10 +43,6 @@ class FreeGiftPromotions extends resource_1.ApiResource {
39
43
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
40
44
  return this.resources.fetch({ type: 'tags' }, `free_gift_promotions/${_freeGiftPromotionId}/tags`, params, options);
41
45
  }
42
- async sku_list(freeGiftPromotionId, params, options) {
43
- const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
44
- return this.resources.fetch({ type: 'sku_lists' }, `free_gift_promotions/${_freeGiftPromotionId}/sku_list`, params, options);
45
- }
46
46
  async skus(freeGiftPromotionId, params, options) {
47
47
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
48
48
  return this.resources.fetch({ type: 'skus' }, `free_gift_promotions/${_freeGiftPromotionId}/skus`, params, options);
@@ -6,6 +6,7 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { SkuList } from './sku_lists';
9
10
  import type { Attachment } from './attachments';
10
11
  import type { Event } from './events';
11
12
  import type { Tag, TagType } from './tags';
@@ -45,6 +46,7 @@ interface FreeShippingPromotion extends Resource {
45
46
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
46
47
  sku_list_promotion_rule?: SkuListPromotionRule | null;
47
48
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
49
+ sku_list?: SkuList | null;
48
50
  attachments?: Attachment[] | null;
49
51
  events?: Event[] | null;
50
52
  tags?: Tag[] | null;
@@ -84,6 +86,7 @@ declare class FreeShippingPromotions extends ApiResource<FreeShippingPromotion>
84
86
  order_amount_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
85
87
  sku_list_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
86
88
  coupon_codes_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
89
+ sku_list(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
87
90
  attachments(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
88
91
  events(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
89
92
  tags(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -27,6 +27,10 @@ class FreeShippingPromotions extends resource_1.ApiResource {
27
27
  const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `free_shipping_promotions/${_freeShippingPromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async sku_list(freeShippingPromotionId, params, options) {
31
+ const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
32
+ return this.resources.fetch({ type: 'sku_lists' }, `free_shipping_promotions/${_freeShippingPromotionId}/sku_list`, params, options);
33
+ }
30
34
  async attachments(freeShippingPromotionId, params, options) {
31
35
  const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
32
36
  return this.resources.fetch({ type: 'attachments' }, `free_shipping_promotions/${_freeShippingPromotionId}/attachments`, params, options);
@@ -18,11 +18,9 @@ interface Import extends Resource {
18
18
  inputs_size?: number | null;
19
19
  errors_count?: number | null;
20
20
  warnings_count?: number | null;
21
- destroyed_count?: number | null;
22
21
  processed_count?: number | null;
23
22
  errors_log?: Record<string, any> | null;
24
23
  warnings_log?: Record<string, any> | null;
25
- cleanup_records?: boolean | null;
26
24
  attachment_url?: string | null;
27
25
  events?: Event[] | null;
28
26
  }
@@ -31,7 +29,6 @@ interface ImportCreate extends ResourceCreate {
31
29
  format?: string | null;
32
30
  parent_resource_id?: string | null;
33
31
  inputs: Array<Record<string, any>>;
34
- cleanup_records?: boolean | null;
35
32
  }
36
33
  declare class Imports extends ApiResource<Import> {
37
34
  static readonly TYPE: ImportType;
@@ -13,6 +13,7 @@ interface InventoryModel extends Resource {
13
13
  name: string;
14
14
  strategy?: string | null;
15
15
  stock_locations_cutoff?: number | null;
16
+ stock_reservation_cutoff?: number | null;
16
17
  inventory_stock_locations?: InventoryStockLocation[] | null;
17
18
  inventory_return_locations?: InventoryReturnLocation[] | null;
18
19
  attachments?: Attachment[] | null;
@@ -21,11 +22,13 @@ interface InventoryModelCreate extends ResourceCreate {
21
22
  name: string;
22
23
  strategy?: string | null;
23
24
  stock_locations_cutoff?: number | null;
25
+ stock_reservation_cutoff?: number | null;
24
26
  }
25
27
  interface InventoryModelUpdate extends ResourceUpdate {
26
28
  name?: string | null;
27
29
  strategy?: string | null;
28
30
  stock_locations_cutoff?: number | null;
31
+ stock_reservation_cutoff?: number | null;
29
32
  }
30
33
  declare class InventoryModels extends ApiResource<InventoryModel> {
31
34
  static readonly TYPE: InventoryModelType;
@@ -13,6 +13,7 @@ import type { PercentageDiscountPromotion, PercentageDiscountPromotionType } fro
13
13
  import type { Shipment, ShipmentType } from './shipments';
14
14
  import type { Sku, SkuType } from './skus';
15
15
  import type { LineItemOption } from './line_item_options';
16
+ import type { StockReservation } from './stock_reservations';
16
17
  import type { StockLineItem } from './stock_line_items';
17
18
  import type { StockTransfer } from './stock_transfers';
18
19
  import type { Event } from './events';
@@ -92,6 +93,7 @@ interface LineItem extends Resource {
92
93
  * @deprecated This field should not be used as it may be removed in the future without notice
93
94
  */
94
95
  shipment_line_items?: object[];
96
+ stock_reservations?: StockReservation[] | null;
95
97
  stock_line_items?: StockLineItem[] | null;
96
98
  stock_transfers?: StockTransfer[] | null;
97
99
  events?: Event[] | null;
@@ -103,6 +105,7 @@ interface LineItemCreate extends ResourceCreate {
103
105
  quantity: number;
104
106
  _external_price?: boolean | null;
105
107
  _update_quantity?: boolean | null;
108
+ _reserve_stock?: boolean | null;
106
109
  unit_amount_cents?: number | null;
107
110
  name?: string | null;
108
111
  image_url?: string | null;
@@ -117,6 +120,7 @@ interface LineItemUpdate extends ResourceUpdate {
117
120
  bundle_code?: string | null;
118
121
  quantity?: number | null;
119
122
  _external_price?: boolean | null;
123
+ _reserve_stock?: boolean | null;
120
124
  name?: string | null;
121
125
  image_url?: string | null;
122
126
  frequency?: string | null;
@@ -129,6 +133,7 @@ declare class LineItems extends ApiResource<LineItem> {
129
133
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
130
134
  order(lineItemId: string | LineItem, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
131
135
  line_item_options(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>>;
136
+ stock_reservations(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
132
137
  stock_line_items(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
133
138
  stock_transfers(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
134
139
  events(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
@@ -19,6 +19,10 @@ class LineItems extends resource_1.ApiResource {
19
19
  const _lineItemId = lineItemId.id || lineItemId;
20
20
  return this.resources.fetch({ type: 'line_item_options' }, `line_items/${_lineItemId}/line_item_options`, params, options);
21
21
  }
22
+ async stock_reservations(lineItemId, params, options) {
23
+ const _lineItemId = lineItemId.id || lineItemId;
24
+ return this.resources.fetch({ type: 'stock_reservations' }, `line_items/${_lineItemId}/stock_reservations`, params, options);
25
+ }
22
26
  async stock_line_items(lineItemId, params, options) {
23
27
  const _lineItemId = lineItemId.id || lineItemId;
24
28
  return this.resources.fetch({ type: 'stock_line_items' }, `line_items/${_lineItemId}/stock_line_items`, params, options);
@@ -34,14 +34,17 @@ interface OrderAmountPromotionRule extends Resource {
34
34
  order_amount_cents?: number | null;
35
35
  order_amount_float?: number | null;
36
36
  formatted_order_amount?: string | null;
37
+ use_subtotal?: boolean | null;
37
38
  promotion?: PercentageDiscountPromotion | FreeShippingPromotion | FreeGiftPromotion | FixedPricePromotion | ExternalPromotion | FixedAmountPromotion | null;
38
39
  }
39
40
  interface OrderAmountPromotionRuleCreate extends ResourceCreate {
40
41
  order_amount_cents?: number | null;
42
+ use_subtotal?: boolean | null;
41
43
  promotion: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel;
42
44
  }
43
45
  interface OrderAmountPromotionRuleUpdate extends ResourceUpdate {
44
46
  order_amount_cents?: number | null;
47
+ use_subtotal?: boolean | null;
45
48
  promotion?: PercentageDiscountPromotionRel | FreeShippingPromotionRel | FreeGiftPromotionRel | FixedPricePromotionRel | ExternalPromotionRel | FixedAmountPromotionRel | null;
46
49
  }
47
50
  declare class OrderAmountPromotionRules extends ApiResource<OrderAmountPromotionRule> {
@@ -85,7 +85,7 @@ interface Order extends Resource {
85
85
  readonly type: OrderType;
86
86
  number?: number | null;
87
87
  autorefresh?: boolean | null;
88
- status: 'draft' | 'pending' | 'placed' | 'approved' | 'cancelled';
88
+ status: 'draft' | 'pending' | 'placed' | 'editing' | 'approved' | 'cancelled';
89
89
  payment_status: 'unpaid' | 'authorized' | 'partially_authorized' | 'paid' | 'partially_paid' | 'voided' | 'partially_voided' | 'refunded' | 'partially_refunded' | 'free';
90
90
  fulfillment_status: 'unfulfilled' | 'in_progress' | 'fulfilled' | 'not_required';
91
91
  guest?: boolean | null;
@@ -101,7 +101,6 @@ interface Order extends Resource {
101
101
  shipping_country_code_lock?: string | null;
102
102
  coupon_code?: string | null;
103
103
  gift_card_code?: string | null;
104
- gift_card_or_coupon_code?: string | null;
105
104
  subtotal_amount_cents?: number | null;
106
105
  subtotal_amount_float?: number | null;
107
106
  formatted_subtotal_amount?: string | null;
@@ -166,6 +165,7 @@ interface Order extends Resource {
166
165
  line_item_options_count?: number | null;
167
166
  shipments_count?: number | null;
168
167
  tax_calculations_count?: number | null;
168
+ validations_count?: number | null;
169
169
  payment_source_details?: Record<string, any> | null;
170
170
  token?: string | null;
171
171
  cart_url?: string | null;
@@ -217,7 +217,6 @@ interface OrderCreate extends ResourceCreate {
217
217
  shipping_country_code_lock?: string | null;
218
218
  coupon_code?: string | null;
219
219
  gift_card_code?: string | null;
220
- gift_card_or_coupon_code?: string | null;
221
220
  cart_url?: string | null;
222
221
  return_url?: string | null;
223
222
  terms_url?: string | null;
@@ -239,7 +238,6 @@ interface OrderUpdate extends ResourceUpdate {
239
238
  shipping_country_code_lock?: string | null;
240
239
  coupon_code?: string | null;
241
240
  gift_card_code?: string | null;
242
- gift_card_or_coupon_code?: string | null;
243
241
  cart_url?: string | null;
244
242
  return_url?: string | null;
245
243
  terms_url?: string | null;
@@ -269,6 +267,8 @@ interface OrderUpdate extends ResourceUpdate {
269
267
  _refresh?: boolean | null;
270
268
  _validate?: boolean | null;
271
269
  _create_subscriptions?: boolean | null;
270
+ _start_editing?: boolean | null;
271
+ _stop_editing?: boolean | null;
272
272
  market?: MarketRel | null;
273
273
  customer?: CustomerRel | null;
274
274
  shipping_address?: AddressRel | null;
@@ -16,6 +16,7 @@ type StockLineItemRel = ResourceRel & {
16
16
  interface ParcelLineItem extends Resource {
17
17
  readonly type: ParcelLineItemType;
18
18
  sku_code?: string | null;
19
+ bundle_code?: string | null;
19
20
  quantity: number;
20
21
  name: string;
21
22
  image_url?: string | null;
@@ -27,7 +28,6 @@ interface ParcelLineItem extends Resource {
27
28
  shipment_line_item?: object;
28
29
  }
29
30
  interface ParcelLineItemCreate extends ResourceCreate {
30
- sku_code?: string | null;
31
31
  quantity: number;
32
32
  parcel: ParcelRel;
33
33
  stock_line_item: StockLineItemRel;
@@ -38,7 +38,7 @@ interface Parcel extends Resource {
38
38
  tracking_status?: string | null;
39
39
  tracking_status_detail?: string | null;
40
40
  tracking_status_updated_at?: string | null;
41
- tracking_details?: string | null;
41
+ tracking_details?: Record<string, any> | null;
42
42
  carrier_weight_oz?: string | null;
43
43
  signed_by?: string | null;
44
44
  incoterm?: string | null;
@@ -69,7 +69,7 @@ interface ParcelCreate extends ResourceCreate {
69
69
  tracking_status?: string | null;
70
70
  tracking_status_detail?: string | null;
71
71
  tracking_status_updated_at?: string | null;
72
- tracking_details?: string | null;
72
+ tracking_details?: Record<string, any> | null;
73
73
  carrier_weight_oz?: string | null;
74
74
  signed_by?: string | null;
75
75
  incoterm?: string | null;
@@ -97,7 +97,7 @@ interface ParcelUpdate extends ResourceUpdate {
97
97
  tracking_status?: string | null;
98
98
  tracking_status_detail?: string | null;
99
99
  tracking_status_updated_at?: string | null;
100
- tracking_details?: string | null;
100
+ tracking_details?: Record<string, any> | null;
101
101
  carrier_weight_oz?: string | null;
102
102
  signed_by?: string | null;
103
103
  incoterm?: string | null;
@@ -6,10 +6,10 @@ import type { PromotionRule, PromotionRuleType } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule, OrderAmountPromotionRuleType } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
+ import type { SkuList, SkuListType } from './sku_lists';
9
10
  import type { Attachment } from './attachments';
10
11
  import type { Event } from './events';
11
12
  import type { Tag, TagType } from './tags';
12
- import type { SkuList, SkuListType } from './sku_lists';
13
13
  import type { Sku } from './skus';
14
14
  type PercentageDiscountPromotionType = 'percentage_discount_promotions';
15
15
  type PercentageDiscountPromotionRel = ResourceRel & {
@@ -30,12 +30,12 @@ type SkuListPromotionRuleRel = ResourceRel & {
30
30
  type CouponCodesPromotionRuleRel = ResourceRel & {
31
31
  type: CouponCodesPromotionRuleType;
32
32
  };
33
- type TagRel = ResourceRel & {
34
- type: TagType;
35
- };
36
33
  type SkuListRel = ResourceRel & {
37
34
  type: SkuListType;
38
35
  };
36
+ type TagRel = ResourceRel & {
37
+ type: TagType;
38
+ };
39
39
  interface PercentageDiscountPromotion extends Resource {
40
40
  readonly type: PercentageDiscountPromotionType;
41
41
  name: string;
@@ -51,10 +51,10 @@ interface PercentageDiscountPromotion extends Resource {
51
51
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
52
52
  sku_list_promotion_rule?: SkuListPromotionRule | null;
53
53
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
54
+ sku_list?: SkuList | null;
54
55
  attachments?: Attachment[] | null;
55
56
  events?: Event[] | null;
56
57
  tags?: Tag[] | null;
57
- sku_list?: SkuList | null;
58
58
  skus?: Sku[] | null;
59
59
  }
60
60
  interface PercentageDiscountPromotionCreate extends ResourceCreate {
@@ -69,8 +69,8 @@ interface PercentageDiscountPromotionCreate extends ResourceCreate {
69
69
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
70
70
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
71
71
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
72
- tags?: TagRel[] | null;
73
72
  sku_list?: SkuListRel | null;
73
+ tags?: TagRel[] | null;
74
74
  }
75
75
  interface PercentageDiscountPromotionUpdate extends ResourceUpdate {
76
76
  name?: string | null;
@@ -84,8 +84,8 @@ interface PercentageDiscountPromotionUpdate extends ResourceUpdate {
84
84
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
85
85
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
86
86
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
87
- tags?: TagRel[] | null;
88
87
  sku_list?: SkuListRel | null;
88
+ tags?: TagRel[] | null;
89
89
  }
90
90
  declare class PercentageDiscountPromotions extends ApiResource<PercentageDiscountPromotion> {
91
91
  static readonly TYPE: PercentageDiscountPromotionType;
@@ -96,10 +96,10 @@ declare class PercentageDiscountPromotions extends ApiResource<PercentageDiscoun
96
96
  order_amount_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
97
97
  sku_list_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
98
98
  coupon_codes_promotion_rule(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
99
+ sku_list(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
99
100
  attachments(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
100
101
  events(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
101
102
  tags(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
102
- sku_list(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
103
103
  skus(percentageDiscountPromotionId: string | PercentageDiscountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
104
104
  isPercentageDiscountPromotion(resource: any): resource is PercentageDiscountPromotion;
105
105
  relationship(id: string | ResourceId | null): PercentageDiscountPromotionRel;
@@ -27,6 +27,10 @@ class PercentageDiscountPromotions extends resource_1.ApiResource {
27
27
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
28
28
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/coupon_codes_promotion_rule`, params, options);
29
29
  }
30
+ async sku_list(percentageDiscountPromotionId, params, options) {
31
+ const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
32
+ return this.resources.fetch({ type: 'sku_lists' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list`, params, options);
33
+ }
30
34
  async attachments(percentageDiscountPromotionId, params, options) {
31
35
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
32
36
  return this.resources.fetch({ type: 'attachments' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/attachments`, params, options);
@@ -39,10 +43,6 @@ class PercentageDiscountPromotions extends resource_1.ApiResource {
39
43
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
40
44
  return this.resources.fetch({ type: 'tags' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/tags`, params, options);
41
45
  }
42
- async sku_list(percentageDiscountPromotionId, params, options) {
43
- const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
44
- return this.resources.fetch({ type: 'sku_lists' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/sku_list`, params, options);
45
- }
46
46
  async skus(percentageDiscountPromotionId, params, options) {
47
47
  const _percentageDiscountPromotionId = percentageDiscountPromotionId.id || percentageDiscountPromotionId;
48
48
  return this.resources.fetch({ type: 'skus' }, `percentage_discount_promotions/${_percentageDiscountPromotionId}/skus`, params, options);
@@ -6,6 +6,7 @@ import type { PromotionRule } from './promotion_rules';
6
6
  import type { OrderAmountPromotionRule } from './order_amount_promotion_rules';
7
7
  import type { SkuListPromotionRule } from './sku_list_promotion_rules';
8
8
  import type { CouponCodesPromotionRule } from './coupon_codes_promotion_rules';
9
+ import type { SkuList } from './sku_lists';
9
10
  import type { Attachment } from './attachments';
10
11
  import type { Event } from './events';
11
12
  import type { Tag } from './tags';
@@ -27,6 +28,7 @@ interface Promotion extends Resource {
27
28
  order_amount_promotion_rule?: OrderAmountPromotionRule | null;
28
29
  sku_list_promotion_rule?: SkuListPromotionRule | null;
29
30
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
31
+ sku_list?: SkuList | null;
30
32
  attachments?: Attachment[] | null;
31
33
  events?: Event[] | null;
32
34
  tags?: Tag[] | null;
@@ -37,6 +39,7 @@ declare class Promotions extends ApiResource<Promotion> {
37
39
  order_amount_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<OrderAmountPromotionRule>;
38
40
  sku_list_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuListPromotionRule>;
39
41
  coupon_codes_promotion_rule(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
42
+ sku_list(promotionId: string | Promotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
40
43
  attachments(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
41
44
  events(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
42
45
  tags(promotionId: string | Promotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
@@ -18,6 +18,10 @@ class Promotions extends resource_1.ApiResource {
18
18
  const _promotionId = promotionId.id || promotionId;
19
19
  return this.resources.fetch({ type: 'coupon_codes_promotion_rules' }, `promotions/${_promotionId}/coupon_codes_promotion_rule`, params, options);
20
20
  }
21
+ async sku_list(promotionId, params, options) {
22
+ const _promotionId = promotionId.id || promotionId;
23
+ return this.resources.fetch({ type: 'sku_lists' }, `promotions/${_promotionId}/sku_list`, params, options);
24
+ }
21
25
  async attachments(promotionId, params, options) {
22
26
  const _promotionId = promotionId.id || promotionId;
23
27
  return this.resources.fetch({ type: 'attachments' }, `promotions/${_promotionId}/attachments`, params, options);
@@ -2,6 +2,7 @@ import { ApiResource } from '../resource';
2
2
  import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
3
  import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { Order } from './orders';
5
+ import type { Attachment } from './attachments';
5
6
  import type { Capture } from './captures';
6
7
  import type { Event } from './events';
7
8
  type RefundType = 'refunds';
@@ -22,12 +23,14 @@ interface Refund extends Resource {
22
23
  token?: string | null;
23
24
  gateway_transaction_id?: string | null;
24
25
  order?: Order | null;
26
+ attachments?: Attachment[] | null;
25
27
  reference_capture?: Capture | null;
26
28
  events?: Event[] | null;
27
29
  }
28
30
  declare class Refunds extends ApiResource<Refund> {
29
31
  static readonly TYPE: RefundType;
30
32
  order(refundId: string | Refund, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Order>;
33
+ attachments(refundId: string | Refund, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
31
34
  reference_capture(refundId: string | Refund, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Capture>;
32
35
  events(refundId: string | Refund, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
33
36
  isRefund(resource: any): resource is Refund;
@@ -6,6 +6,10 @@ class Refunds extends resource_1.ApiResource {
6
6
  const _refundId = refundId.id || refundId;
7
7
  return this.resources.fetch({ type: 'orders' }, `refunds/${_refundId}/order`, params, options);
8
8
  }
9
+ async attachments(refundId, params, options) {
10
+ const _refundId = refundId.id || refundId;
11
+ return this.resources.fetch({ type: 'attachments' }, `refunds/${_refundId}/attachments`, params, options);
12
+ }
9
13
  async reference_capture(refundId, params, options) {
10
14
  const _refundId = refundId.id || refundId;
11
15
  return this.resources.fetch({ type: 'captures' }, `refunds/${_refundId}/reference_capture`, params, options);
@@ -0,0 +1,28 @@
1
+ import { ApiResource } from '../resource';
2
+ import type { Resource, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
+ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
+ import type { StockItem } from './stock_items';
5
+ import type { Sku } from './skus';
6
+ import type { StockReservation } from './stock_reservations';
7
+ type ReservedStockType = 'reserved_stocks';
8
+ type ReservedStockRel = ResourceRel & {
9
+ type: ReservedStockType;
10
+ };
11
+ interface ReservedStock extends Resource {
12
+ readonly type: ReservedStockType;
13
+ quantity: number;
14
+ stock_item?: StockItem | null;
15
+ sku?: Sku | null;
16
+ stock_reservations?: StockReservation[] | null;
17
+ }
18
+ declare class ReservedStocks extends ApiResource<ReservedStock> {
19
+ static readonly TYPE: ReservedStockType;
20
+ stock_item(reservedStockId: string | ReservedStock, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<StockItem>;
21
+ sku(reservedStockId: string | ReservedStock, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<Sku>;
22
+ stock_reservations(reservedStockId: string | ReservedStock, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockReservation>>;
23
+ isReservedStock(resource: any): resource is ReservedStock;
24
+ relationship(id: string | ResourceId | null): ReservedStockRel;
25
+ type(): ReservedStockType;
26
+ }
27
+ export default ReservedStocks;
28
+ export type { ReservedStock, ReservedStockType };