@commercelayer/sdk 5.0.0 → 5.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/lib/cjs/api.d.ts +6 -5
  2. package/lib/cjs/api.js +4 -1
  3. package/lib/cjs/commercelayer.d.ts +3 -2
  4. package/lib/cjs/commercelayer.js +2 -1
  5. package/lib/cjs/interceptor.d.ts +1 -1
  6. package/lib/cjs/model.d.ts +1 -0
  7. package/lib/cjs/resource.d.ts +1 -1
  8. package/lib/cjs/resources/addresses.d.ts +13 -2
  9. package/lib/cjs/resources/addresses.js +8 -0
  10. package/lib/cjs/resources/adyen_payments.d.ts +8 -8
  11. package/lib/cjs/resources/axerve_payments.d.ts +3 -3
  12. package/lib/cjs/resources/braintree_payments.d.ts +4 -4
  13. package/lib/cjs/resources/bundles.d.ts +11 -0
  14. package/lib/cjs/resources/bundles.js +8 -0
  15. package/lib/cjs/resources/checkout_com_payments.d.ts +2 -2
  16. package/lib/cjs/resources/cleanups.d.ts +3 -3
  17. package/lib/cjs/resources/coupons.d.ts +15 -4
  18. package/lib/cjs/resources/coupons.js +8 -0
  19. package/lib/cjs/resources/customers.d.ts +8 -0
  20. package/lib/cjs/resources/customers.js +4 -0
  21. package/lib/cjs/resources/event_callbacks.d.ts +1 -1
  22. package/lib/cjs/resources/exports.d.ts +2 -2
  23. package/lib/cjs/resources/external_payments.d.ts +4 -4
  24. package/lib/cjs/resources/external_promotions.d.ts +8 -0
  25. package/lib/cjs/resources/external_promotions.js +4 -0
  26. package/lib/cjs/resources/fixed_amount_promotions.d.ts +8 -0
  27. package/lib/cjs/resources/fixed_amount_promotions.js +4 -0
  28. package/lib/cjs/resources/fixed_price_promotions.d.ts +8 -0
  29. package/lib/cjs/resources/fixed_price_promotions.js +4 -0
  30. package/lib/cjs/resources/free_gift_promotions.d.ts +8 -0
  31. package/lib/cjs/resources/free_gift_promotions.js +4 -0
  32. package/lib/cjs/resources/free_shipping_promotions.d.ts +8 -0
  33. package/lib/cjs/resources/free_shipping_promotions.js +4 -0
  34. package/lib/cjs/resources/gift_cards.d.ts +9 -1
  35. package/lib/cjs/resources/gift_cards.js +4 -0
  36. package/lib/cjs/resources/imports.d.ts +4 -4
  37. package/lib/cjs/resources/klarna_payments.d.ts +2 -2
  38. package/lib/cjs/resources/line_item_options.d.ts +16 -5
  39. package/lib/cjs/resources/line_item_options.js +8 -0
  40. package/lib/cjs/resources/line_items.d.ts +13 -2
  41. package/lib/cjs/resources/line_items.js +8 -0
  42. package/lib/cjs/resources/order_copies.d.ts +1 -1
  43. package/lib/cjs/resources/order_factories.d.ts +1 -1
  44. package/lib/cjs/resources/order_subscriptions.d.ts +2 -2
  45. package/lib/cjs/resources/orders.d.ts +9 -1
  46. package/lib/cjs/resources/orders.js +4 -0
  47. package/lib/cjs/resources/parcels.d.ts +3 -0
  48. package/lib/cjs/resources/paypal_payments.d.ts +1 -1
  49. package/lib/cjs/resources/percentage_discount_promotions.d.ts +8 -0
  50. package/lib/cjs/resources/percentage_discount_promotions.js +4 -0
  51. package/lib/cjs/resources/promotions.d.ts +3 -0
  52. package/lib/cjs/resources/promotions.js +4 -0
  53. package/lib/cjs/resources/recurring_order_copies.d.ts +1 -1
  54. package/lib/cjs/resources/return_line_items.d.ts +3 -3
  55. package/lib/cjs/resources/returns.d.ts +8 -0
  56. package/lib/cjs/resources/returns.js +4 -0
  57. package/lib/cjs/resources/satispay_gateways.d.ts +3 -0
  58. package/lib/cjs/resources/satispay_payments.d.ts +0 -3
  59. package/lib/cjs/resources/shipments.d.ts +2 -2
  60. package/lib/cjs/resources/sku_options.d.ts +11 -0
  61. package/lib/cjs/resources/sku_options.js +8 -0
  62. package/lib/cjs/resources/skus.d.ts +12 -1
  63. package/lib/cjs/resources/skus.js +8 -0
  64. package/lib/cjs/resources/stripe_payments.d.ts +5 -5
  65. package/lib/cjs/resources/tags.d.ts +28 -0
  66. package/lib/cjs/resources/tags.js +25 -0
  67. package/lib/cjs/resources/tax_rules.d.ts +1 -1
  68. package/lib/cjs/resources/wire_transfers.d.ts +1 -1
  69. package/lib/esm/api.d.ts +6 -5
  70. package/lib/esm/api.js +2 -0
  71. package/lib/esm/commercelayer.d.ts +3 -2
  72. package/lib/esm/commercelayer.js +2 -1
  73. package/lib/esm/interceptor.d.ts +1 -1
  74. package/lib/esm/model.d.ts +1 -0
  75. package/lib/esm/resource.d.ts +1 -1
  76. package/lib/esm/resources/addresses.d.ts +13 -2
  77. package/lib/esm/resources/addresses.js +8 -0
  78. package/lib/esm/resources/adyen_payments.d.ts +8 -8
  79. package/lib/esm/resources/axerve_payments.d.ts +3 -3
  80. package/lib/esm/resources/braintree_payments.d.ts +4 -4
  81. package/lib/esm/resources/bundles.d.ts +11 -0
  82. package/lib/esm/resources/bundles.js +8 -0
  83. package/lib/esm/resources/checkout_com_payments.d.ts +2 -2
  84. package/lib/esm/resources/cleanups.d.ts +3 -3
  85. package/lib/esm/resources/coupons.d.ts +15 -4
  86. package/lib/esm/resources/coupons.js +8 -0
  87. package/lib/esm/resources/customers.d.ts +8 -0
  88. package/lib/esm/resources/customers.js +4 -0
  89. package/lib/esm/resources/event_callbacks.d.ts +1 -1
  90. package/lib/esm/resources/exports.d.ts +2 -2
  91. package/lib/esm/resources/external_payments.d.ts +4 -4
  92. package/lib/esm/resources/external_promotions.d.ts +8 -0
  93. package/lib/esm/resources/external_promotions.js +4 -0
  94. package/lib/esm/resources/fixed_amount_promotions.d.ts +8 -0
  95. package/lib/esm/resources/fixed_amount_promotions.js +4 -0
  96. package/lib/esm/resources/fixed_price_promotions.d.ts +8 -0
  97. package/lib/esm/resources/fixed_price_promotions.js +4 -0
  98. package/lib/esm/resources/free_gift_promotions.d.ts +8 -0
  99. package/lib/esm/resources/free_gift_promotions.js +4 -0
  100. package/lib/esm/resources/free_shipping_promotions.d.ts +8 -0
  101. package/lib/esm/resources/free_shipping_promotions.js +4 -0
  102. package/lib/esm/resources/gift_cards.d.ts +9 -1
  103. package/lib/esm/resources/gift_cards.js +4 -0
  104. package/lib/esm/resources/imports.d.ts +4 -4
  105. package/lib/esm/resources/klarna_payments.d.ts +2 -2
  106. package/lib/esm/resources/line_item_options.d.ts +16 -5
  107. package/lib/esm/resources/line_item_options.js +8 -0
  108. package/lib/esm/resources/line_items.d.ts +13 -2
  109. package/lib/esm/resources/line_items.js +8 -0
  110. package/lib/esm/resources/order_copies.d.ts +1 -1
  111. package/lib/esm/resources/order_factories.d.ts +1 -1
  112. package/lib/esm/resources/order_subscriptions.d.ts +2 -2
  113. package/lib/esm/resources/orders.d.ts +9 -1
  114. package/lib/esm/resources/orders.js +4 -0
  115. package/lib/esm/resources/parcels.d.ts +3 -0
  116. package/lib/esm/resources/paypal_payments.d.ts +1 -1
  117. package/lib/esm/resources/percentage_discount_promotions.d.ts +8 -0
  118. package/lib/esm/resources/percentage_discount_promotions.js +4 -0
  119. package/lib/esm/resources/promotions.d.ts +3 -0
  120. package/lib/esm/resources/promotions.js +4 -0
  121. package/lib/esm/resources/recurring_order_copies.d.ts +1 -1
  122. package/lib/esm/resources/return_line_items.d.ts +3 -3
  123. package/lib/esm/resources/returns.d.ts +8 -0
  124. package/lib/esm/resources/returns.js +4 -0
  125. package/lib/esm/resources/satispay_gateways.d.ts +3 -0
  126. package/lib/esm/resources/satispay_payments.d.ts +0 -3
  127. package/lib/esm/resources/shipments.d.ts +2 -2
  128. package/lib/esm/resources/sku_options.d.ts +11 -0
  129. package/lib/esm/resources/sku_options.js +8 -0
  130. package/lib/esm/resources/skus.d.ts +12 -1
  131. package/lib/esm/resources/skus.js +8 -0
  132. package/lib/esm/resources/stripe_payments.d.ts +5 -5
  133. package/lib/esm/resources/tags.d.ts +28 -0
  134. package/lib/esm/resources/tags.js +23 -0
  135. package/lib/esm/resources/tax_rules.d.ts +1 -1
  136. package/lib/esm/resources/wire_transfers.d.ts +1 -1
  137. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  138. package/lib/tsconfig.tsbuildinfo +1 -1
  139. package/package.json +10 -10
@@ -14,19 +14,19 @@ type OrderRel = ResourceRel & {
14
14
  interface ExternalPayment extends Resource {
15
15
  readonly type: ExternalPaymentType;
16
16
  payment_source_token: string;
17
- options?: object | null;
18
- payment_instrument?: object | null;
17
+ options?: Record<string, any> | null;
18
+ payment_instrument?: Record<string, any> | null;
19
19
  order?: Order | null;
20
20
  payment_gateway?: PaymentGateway | null;
21
21
  wallet?: CustomerPaymentSource | null;
22
22
  }
23
23
  interface ExternalPaymentCreate extends ResourceCreate {
24
24
  payment_source_token: string;
25
- options?: object | null;
25
+ options?: Record<string, any> | null;
26
26
  order: OrderRel;
27
27
  }
28
28
  interface ExternalPaymentUpdate extends ResourceUpdate {
29
- options?: object | null;
29
+ options?: Record<string, any> | null;
30
30
  order?: OrderRel | null;
31
31
  }
32
32
  declare class ExternalPayments extends ApiResource<ExternalPayment> {
@@ -8,6 +8,7 @@ import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
9
  import type { Attachment } from './attachments';
10
10
  import type { Event } from './events';
11
+ import type { Tag, TagType } from './tags';
11
12
  type ExternalPromotionType = 'external_promotions';
12
13
  type ExternalPromotionRel = ResourceRel & {
13
14
  type: ExternalPromotionType;
@@ -27,6 +28,9 @@ type SkuListPromotionRuleRel = ResourceRel & {
27
28
  type CouponCodesPromotionRuleRel = ResourceRel & {
28
29
  type: CouponCodesPromotionRuleType;
29
30
  };
31
+ type TagRel = ResourceRel & {
32
+ type: TagType;
33
+ };
30
34
  interface ExternalPromotion extends Resource {
31
35
  readonly type: ExternalPromotionType;
32
36
  name: string;
@@ -45,6 +49,7 @@ interface ExternalPromotion extends Resource {
45
49
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
46
50
  attachments?: Attachment[] | null;
47
51
  events?: Event[] | null;
52
+ tags?: Tag[] | null;
48
53
  }
49
54
  interface ExternalPromotionCreate extends ResourceCreate {
50
55
  name: string;
@@ -58,6 +63,7 @@ interface ExternalPromotionCreate extends ResourceCreate {
58
63
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
59
64
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
60
65
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
66
+ tags?: TagRel[] | null;
61
67
  }
62
68
  interface ExternalPromotionUpdate extends ResourceUpdate {
63
69
  name?: string | null;
@@ -71,6 +77,7 @@ interface ExternalPromotionUpdate extends ResourceUpdate {
71
77
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
72
78
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
73
79
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
80
+ tags?: TagRel[] | null;
74
81
  }
75
82
  declare class ExternalPromotions extends ApiResource<ExternalPromotion> {
76
83
  static readonly TYPE: ExternalPromotionType;
@@ -83,6 +90,7 @@ declare class ExternalPromotions extends ApiResource<ExternalPromotion> {
83
90
  coupon_codes_promotion_rule(externalPromotionId: string | ExternalPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
84
91
  attachments(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
85
92
  events(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
93
+ tags(externalPromotionId: string | ExternalPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
86
94
  isExternalPromotion(resource: any): resource is ExternalPromotion;
87
95
  relationship(id: string | ResourceId | null): ExternalPromotionRel;
88
96
  type(): ExternalPromotionType;
@@ -35,6 +35,10 @@ class ExternalPromotions extends resource_1.ApiResource {
35
35
  const _externalPromotionId = externalPromotionId.id || externalPromotionId;
36
36
  return this.resources.fetch({ type: 'events' }, `external_promotions/${_externalPromotionId}/events`, params, options);
37
37
  }
38
+ async tags(externalPromotionId, params, options) {
39
+ const _externalPromotionId = externalPromotionId.id || externalPromotionId;
40
+ return this.resources.fetch({ type: 'tags' }, `external_promotions/${_externalPromotionId}/tags`, params, options);
41
+ }
38
42
  isExternalPromotion(resource) {
39
43
  return resource.type && (resource.type === ExternalPromotions.TYPE);
40
44
  }
@@ -8,6 +8,7 @@ import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
9
  import type { Attachment } from './attachments';
10
10
  import type { Event } from './events';
11
+ import type { Tag, TagType } from './tags';
11
12
  type FixedAmountPromotionType = 'fixed_amount_promotions';
12
13
  type FixedAmountPromotionRel = ResourceRel & {
13
14
  type: FixedAmountPromotionType;
@@ -27,6 +28,9 @@ type SkuListPromotionRuleRel = ResourceRel & {
27
28
  type CouponCodesPromotionRuleRel = ResourceRel & {
28
29
  type: CouponCodesPromotionRuleType;
29
30
  };
31
+ type TagRel = ResourceRel & {
32
+ type: TagType;
33
+ };
30
34
  interface FixedAmountPromotion extends Resource {
31
35
  readonly type: FixedAmountPromotionType;
32
36
  name: string;
@@ -46,6 +50,7 @@ interface FixedAmountPromotion extends Resource {
46
50
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
47
51
  attachments?: Attachment[] | null;
48
52
  events?: Event[] | null;
53
+ tags?: Tag[] | null;
49
54
  }
50
55
  interface FixedAmountPromotionCreate extends ResourceCreate {
51
56
  name: string;
@@ -59,6 +64,7 @@ interface FixedAmountPromotionCreate extends ResourceCreate {
59
64
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
60
65
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
61
66
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
67
+ tags?: TagRel[] | null;
62
68
  }
63
69
  interface FixedAmountPromotionUpdate extends ResourceUpdate {
64
70
  name?: string | null;
@@ -72,6 +78,7 @@ interface FixedAmountPromotionUpdate extends ResourceUpdate {
72
78
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
73
79
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
74
80
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
81
+ tags?: TagRel[] | null;
75
82
  }
76
83
  declare class FixedAmountPromotions extends ApiResource<FixedAmountPromotion> {
77
84
  static readonly TYPE: FixedAmountPromotionType;
@@ -84,6 +91,7 @@ declare class FixedAmountPromotions extends ApiResource<FixedAmountPromotion> {
84
91
  coupon_codes_promotion_rule(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
85
92
  attachments(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
86
93
  events(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
94
+ tags(fixedAmountPromotionId: string | FixedAmountPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
87
95
  isFixedAmountPromotion(resource: any): resource is FixedAmountPromotion;
88
96
  relationship(id: string | ResourceId | null): FixedAmountPromotionRel;
89
97
  type(): FixedAmountPromotionType;
@@ -35,6 +35,10 @@ class FixedAmountPromotions extends resource_1.ApiResource {
35
35
  const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
36
36
  return this.resources.fetch({ type: 'events' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/events`, params, options);
37
37
  }
38
+ async tags(fixedAmountPromotionId, params, options) {
39
+ const _fixedAmountPromotionId = fixedAmountPromotionId.id || fixedAmountPromotionId;
40
+ return this.resources.fetch({ type: 'tags' }, `fixed_amount_promotions/${_fixedAmountPromotionId}/tags`, params, options);
41
+ }
38
42
  isFixedAmountPromotion(resource) {
39
43
  return resource.type && (resource.type === FixedAmountPromotions.TYPE);
40
44
  }
@@ -8,6 +8,7 @@ import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
9
  import type { Attachment } from './attachments';
10
10
  import type { Event } from './events';
11
+ import type { Tag, TagType } from './tags';
11
12
  import type { SkuList, SkuListType } from './sku_lists';
12
13
  import type { Sku } from './skus';
13
14
  type FixedPricePromotionType = 'fixed_price_promotions';
@@ -29,6 +30,9 @@ type SkuListPromotionRuleRel = ResourceRel & {
29
30
  type CouponCodesPromotionRuleRel = ResourceRel & {
30
31
  type: CouponCodesPromotionRuleType;
31
32
  };
33
+ type TagRel = ResourceRel & {
34
+ type: TagType;
35
+ };
32
36
  type SkuListRel = ResourceRel & {
33
37
  type: SkuListType;
34
38
  };
@@ -51,6 +55,7 @@ interface FixedPricePromotion extends Resource {
51
55
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
52
56
  attachments?: Attachment[] | null;
53
57
  events?: Event[] | null;
58
+ tags?: Tag[] | null;
54
59
  sku_list?: SkuList | null;
55
60
  skus?: Sku[] | null;
56
61
  }
@@ -66,6 +71,7 @@ interface FixedPricePromotionCreate extends ResourceCreate {
66
71
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
67
72
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
68
73
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
74
+ tags?: TagRel[] | null;
69
75
  sku_list: SkuListRel;
70
76
  }
71
77
  interface FixedPricePromotionUpdate extends ResourceUpdate {
@@ -80,6 +86,7 @@ interface FixedPricePromotionUpdate extends ResourceUpdate {
80
86
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
81
87
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
82
88
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
89
+ tags?: TagRel[] | null;
83
90
  sku_list?: SkuListRel | null;
84
91
  }
85
92
  declare class FixedPricePromotions extends ApiResource<FixedPricePromotion> {
@@ -93,6 +100,7 @@ declare class FixedPricePromotions extends ApiResource<FixedPricePromotion> {
93
100
  coupon_codes_promotion_rule(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
94
101
  attachments(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
95
102
  events(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
103
+ tags(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
96
104
  sku_list(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
97
105
  skus(fixedPricePromotionId: string | FixedPricePromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
98
106
  isFixedPricePromotion(resource: any): resource is FixedPricePromotion;
@@ -35,6 +35,10 @@ class FixedPricePromotions extends resource_1.ApiResource {
35
35
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
36
36
  return this.resources.fetch({ type: 'events' }, `fixed_price_promotions/${_fixedPricePromotionId}/events`, params, options);
37
37
  }
38
+ async tags(fixedPricePromotionId, params, options) {
39
+ const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
40
+ return this.resources.fetch({ type: 'tags' }, `fixed_price_promotions/${_fixedPricePromotionId}/tags`, params, options);
41
+ }
38
42
  async sku_list(fixedPricePromotionId, params, options) {
39
43
  const _fixedPricePromotionId = fixedPricePromotionId.id || fixedPricePromotionId;
40
44
  return this.resources.fetch({ type: 'sku_lists' }, `fixed_price_promotions/${_fixedPricePromotionId}/sku_list`, params, options);
@@ -8,6 +8,7 @@ import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
9
  import type { Attachment } from './attachments';
10
10
  import type { Event } from './events';
11
+ import type { Tag, TagType } from './tags';
11
12
  import type { SkuList, SkuListType } from './sku_lists';
12
13
  import type { Sku } from './skus';
13
14
  type FreeGiftPromotionType = 'free_gift_promotions';
@@ -29,6 +30,9 @@ type SkuListPromotionRuleRel = ResourceRel & {
29
30
  type CouponCodesPromotionRuleRel = ResourceRel & {
30
31
  type: CouponCodesPromotionRuleType;
31
32
  };
33
+ type TagRel = ResourceRel & {
34
+ type: TagType;
35
+ };
32
36
  type SkuListRel = ResourceRel & {
33
37
  type: SkuListType;
34
38
  };
@@ -49,6 +53,7 @@ interface FreeGiftPromotion extends Resource {
49
53
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
50
54
  attachments?: Attachment[] | null;
51
55
  events?: Event[] | null;
56
+ tags?: Tag[] | null;
52
57
  sku_list?: SkuList | null;
53
58
  skus?: Sku[] | null;
54
59
  }
@@ -64,6 +69,7 @@ interface FreeGiftPromotionCreate extends ResourceCreate {
64
69
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
65
70
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
66
71
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
72
+ tags?: TagRel[] | null;
67
73
  sku_list: SkuListRel;
68
74
  }
69
75
  interface FreeGiftPromotionUpdate extends ResourceUpdate {
@@ -78,6 +84,7 @@ interface FreeGiftPromotionUpdate extends ResourceUpdate {
78
84
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
79
85
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
80
86
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
87
+ tags?: TagRel[] | null;
81
88
  sku_list?: SkuListRel | null;
82
89
  }
83
90
  declare class FreeGiftPromotions extends ApiResource<FreeGiftPromotion> {
@@ -91,6 +98,7 @@ declare class FreeGiftPromotions extends ApiResource<FreeGiftPromotion> {
91
98
  coupon_codes_promotion_rule(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
92
99
  attachments(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
93
100
  events(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
101
+ tags(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
94
102
  sku_list(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuList>;
95
103
  skus(freeGiftPromotionId: string | FreeGiftPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Sku>>;
96
104
  isFreeGiftPromotion(resource: any): resource is FreeGiftPromotion;
@@ -35,6 +35,10 @@ class FreeGiftPromotions extends resource_1.ApiResource {
35
35
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
36
36
  return this.resources.fetch({ type: 'events' }, `free_gift_promotions/${_freeGiftPromotionId}/events`, params, options);
37
37
  }
38
+ async tags(freeGiftPromotionId, params, options) {
39
+ const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
40
+ return this.resources.fetch({ type: 'tags' }, `free_gift_promotions/${_freeGiftPromotionId}/tags`, params, options);
41
+ }
38
42
  async sku_list(freeGiftPromotionId, params, options) {
39
43
  const _freeGiftPromotionId = freeGiftPromotionId.id || freeGiftPromotionId;
40
44
  return this.resources.fetch({ type: 'sku_lists' }, `free_gift_promotions/${_freeGiftPromotionId}/sku_list`, params, options);
@@ -8,6 +8,7 @@ import type { SkuListPromotionRule, SkuListPromotionRuleType } from './sku_list_
8
8
  import type { CouponCodesPromotionRule, CouponCodesPromotionRuleType } from './coupon_codes_promotion_rules';
9
9
  import type { Attachment } from './attachments';
10
10
  import type { Event } from './events';
11
+ import type { Tag, TagType } from './tags';
11
12
  type FreeShippingPromotionType = 'free_shipping_promotions';
12
13
  type FreeShippingPromotionRel = ResourceRel & {
13
14
  type: FreeShippingPromotionType;
@@ -27,6 +28,9 @@ type SkuListPromotionRuleRel = ResourceRel & {
27
28
  type CouponCodesPromotionRuleRel = ResourceRel & {
28
29
  type: CouponCodesPromotionRuleType;
29
30
  };
31
+ type TagRel = ResourceRel & {
32
+ type: TagType;
33
+ };
30
34
  interface FreeShippingPromotion extends Resource {
31
35
  readonly type: FreeShippingPromotionType;
32
36
  name: string;
@@ -43,6 +47,7 @@ interface FreeShippingPromotion extends Resource {
43
47
  coupon_codes_promotion_rule?: CouponCodesPromotionRule | null;
44
48
  attachments?: Attachment[] | null;
45
49
  events?: Event[] | null;
50
+ tags?: Tag[] | null;
46
51
  }
47
52
  interface FreeShippingPromotionCreate extends ResourceCreate {
48
53
  name: string;
@@ -55,6 +60,7 @@ interface FreeShippingPromotionCreate extends ResourceCreate {
55
60
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
56
61
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
57
62
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
63
+ tags?: TagRel[] | null;
58
64
  }
59
65
  interface FreeShippingPromotionUpdate extends ResourceUpdate {
60
66
  name?: string | null;
@@ -67,6 +73,7 @@ interface FreeShippingPromotionUpdate extends ResourceUpdate {
67
73
  order_amount_promotion_rule?: OrderAmountPromotionRuleRel | null;
68
74
  sku_list_promotion_rule?: SkuListPromotionRuleRel | null;
69
75
  coupon_codes_promotion_rule?: CouponCodesPromotionRuleRel | null;
76
+ tags?: TagRel[] | null;
70
77
  }
71
78
  declare class FreeShippingPromotions extends ApiResource<FreeShippingPromotion> {
72
79
  static readonly TYPE: FreeShippingPromotionType;
@@ -79,6 +86,7 @@ declare class FreeShippingPromotions extends ApiResource<FreeShippingPromotion>
79
86
  coupon_codes_promotion_rule(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<CouponCodesPromotionRule>;
80
87
  attachments(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
81
88
  events(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
89
+ tags(freeShippingPromotionId: string | FreeShippingPromotion, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
82
90
  isFreeShippingPromotion(resource: any): resource is FreeShippingPromotion;
83
91
  relationship(id: string | ResourceId | null): FreeShippingPromotionRel;
84
92
  type(): FreeShippingPromotionType;
@@ -35,6 +35,10 @@ class FreeShippingPromotions extends resource_1.ApiResource {
35
35
  const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
36
36
  return this.resources.fetch({ type: 'events' }, `free_shipping_promotions/${_freeShippingPromotionId}/events`, params, options);
37
37
  }
38
+ async tags(freeShippingPromotionId, params, options) {
39
+ const _freeShippingPromotionId = freeShippingPromotionId.id || freeShippingPromotionId;
40
+ return this.resources.fetch({ type: 'tags' }, `free_shipping_promotions/${_freeShippingPromotionId}/tags`, params, options);
41
+ }
38
42
  isFreeShippingPromotion(resource) {
39
43
  return resource.type && (resource.type === FreeShippingPromotions.TYPE);
40
44
  }
@@ -5,6 +5,7 @@ import type { Market, MarketType } from './markets';
5
5
  import type { GiftCardRecipient, GiftCardRecipientType } from './gift_card_recipients';
6
6
  import type { Attachment } from './attachments';
7
7
  import type { Event } from './events';
8
+ import type { Tag, TagType } from './tags';
8
9
  type GiftCardType = 'gift_cards';
9
10
  type GiftCardRel = ResourceRel & {
10
11
  type: GiftCardType;
@@ -15,6 +16,9 @@ type MarketRel = ResourceRel & {
15
16
  type GiftCardRecipientRel = ResourceRel & {
16
17
  type: GiftCardRecipientType;
17
18
  };
19
+ type TagRel = ResourceRel & {
20
+ type: TagType;
21
+ };
18
22
  interface GiftCard extends Resource {
19
23
  readonly type: GiftCardType;
20
24
  status: 'draft' | 'inactive' | 'active' | 'redeemed';
@@ -29,7 +33,7 @@ interface GiftCard extends Resource {
29
33
  balance_max_cents?: string | null;
30
34
  balance_max_float?: number | null;
31
35
  formatted_balance_max?: string | null;
32
- balance_log: object[];
36
+ balance_log: Array<Record<string, any>>;
33
37
  single_use?: boolean | null;
34
38
  rechargeable?: boolean | null;
35
39
  image_url?: string | null;
@@ -39,6 +43,7 @@ interface GiftCard extends Resource {
39
43
  gift_card_recipient?: GiftCardRecipient | null;
40
44
  attachments?: Attachment[] | null;
41
45
  events?: Event[] | null;
46
+ tags?: Tag[] | null;
42
47
  }
43
48
  interface GiftCardCreate extends ResourceCreate {
44
49
  code?: string | null;
@@ -52,6 +57,7 @@ interface GiftCardCreate extends ResourceCreate {
52
57
  recipient_email?: string | null;
53
58
  market?: MarketRel | null;
54
59
  gift_card_recipient?: GiftCardRecipientRel | null;
60
+ tags?: TagRel[] | null;
55
61
  }
56
62
  interface GiftCardUpdate extends ResourceUpdate {
57
63
  currency_code?: string | null;
@@ -68,6 +74,7 @@ interface GiftCardUpdate extends ResourceUpdate {
68
74
  _balance_change_cents?: number | null;
69
75
  market?: MarketRel | null;
70
76
  gift_card_recipient?: GiftCardRecipientRel | null;
77
+ tags?: TagRel[] | null;
71
78
  }
72
79
  declare class GiftCards extends ApiResource<GiftCard> {
73
80
  static readonly TYPE: GiftCardType;
@@ -78,6 +85,7 @@ declare class GiftCards extends ApiResource<GiftCard> {
78
85
  gift_card_recipient(giftCardId: string | GiftCard, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<GiftCardRecipient>;
79
86
  attachments(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Attachment>>;
80
87
  events(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
88
+ tags(giftCardId: string | GiftCard, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
81
89
  isGiftCard(resource: any): resource is GiftCard;
82
90
  relationship(id: string | ResourceId | null): GiftCardRel;
83
91
  type(): GiftCardType;
@@ -27,6 +27,10 @@ class GiftCards extends resource_1.ApiResource {
27
27
  const _giftCardId = giftCardId.id || giftCardId;
28
28
  return this.resources.fetch({ type: 'events' }, `gift_cards/${_giftCardId}/events`, params, options);
29
29
  }
30
+ async tags(giftCardId, params, options) {
31
+ const _giftCardId = giftCardId.id || giftCardId;
32
+ return this.resources.fetch({ type: 'tags' }, `gift_cards/${_giftCardId}/tags`, params, options);
33
+ }
30
34
  isGiftCard(resource) {
31
35
  return resource.type && (resource.type === GiftCards.TYPE);
32
36
  }
@@ -14,14 +14,14 @@ interface Import extends Resource {
14
14
  started_at?: string | null;
15
15
  completed_at?: string | null;
16
16
  interrupted_at?: string | null;
17
- inputs: object[];
17
+ inputs: Array<Record<string, any>>;
18
18
  inputs_size?: number | null;
19
19
  errors_count?: number | null;
20
20
  warnings_count?: number | null;
21
21
  destroyed_count?: number | null;
22
22
  processed_count?: number | null;
23
- errors_log?: object | null;
24
- warnings_log?: object | null;
23
+ errors_log?: Record<string, any> | null;
24
+ warnings_log?: Record<string, any> | null;
25
25
  cleanup_records?: boolean | null;
26
26
  attachment_url?: string | null;
27
27
  events?: Event[] | null;
@@ -30,7 +30,7 @@ interface ImportCreate extends ResourceCreate {
30
30
  resource_type: string;
31
31
  format?: string | null;
32
32
  parent_resource_id?: string | null;
33
- inputs: object[];
33
+ inputs: Array<Record<string, any>>;
34
34
  cleanup_records?: boolean | null;
35
35
  }
36
36
  declare class Imports extends ApiResource<Import> {
@@ -14,13 +14,13 @@ interface KlarnaPayment extends Resource {
14
14
  readonly type: KlarnaPaymentType;
15
15
  session_id?: string | null;
16
16
  client_token?: string | null;
17
- payment_methods: object[];
17
+ payment_methods: Array<Record<string, any>>;
18
18
  auth_token?: string | null;
19
19
  mismatched_amounts?: boolean | null;
20
20
  intent_amount_cents: number;
21
21
  intent_amount_float?: number | null;
22
22
  formatted_intent_amount?: string | null;
23
- payment_instrument?: object | null;
23
+ payment_instrument?: Record<string, any> | null;
24
24
  order?: Order | null;
25
25
  payment_gateway?: PaymentGateway | null;
26
26
  }
@@ -1,8 +1,10 @@
1
1
  import { ApiResource } from '../resource';
2
- import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel } from '../resource';
3
- import type { QueryParamsRetrieve } from '../query';
2
+ import type { Resource, ResourceCreate, ResourceUpdate, ResourceId, ResourcesConfig, ResourceRel, ListResponse } from '../resource';
3
+ import type { QueryParamsRetrieve, QueryParamsList } from '../query';
4
4
  import type { LineItem, LineItemType } from './line_items';
5
5
  import type { SkuOption, SkuOptionType } from './sku_options';
6
+ import type { Event } from './events';
7
+ import type { Tag, TagType } from './tags';
6
8
  type LineItemOptionType = 'line_item_options';
7
9
  type LineItemOptionRel = ResourceRel & {
8
10
  type: LineItemOptionType;
@@ -13,6 +15,9 @@ type LineItemRel = ResourceRel & {
13
15
  type SkuOptionRel = ResourceRel & {
14
16
  type: SkuOptionType;
15
17
  };
18
+ type TagRel = ResourceRel & {
19
+ type: TagType;
20
+ };
16
21
  interface LineItemOption extends Resource {
17
22
  readonly type: LineItemOptionType;
18
23
  name?: string | null;
@@ -26,22 +31,26 @@ interface LineItemOption extends Resource {
26
31
  formatted_total_amount?: string | null;
27
32
  delay_hours?: number | null;
28
33
  delay_days?: number | null;
29
- options: object;
34
+ options: Record<string, any>;
30
35
  line_item?: LineItem | null;
31
36
  sku_option?: SkuOption | null;
37
+ events?: Event[] | null;
38
+ tags?: Tag[] | null;
32
39
  }
33
40
  interface LineItemOptionCreate extends ResourceCreate {
34
41
  name?: string | null;
35
42
  quantity: number;
36
- options: object;
43
+ options: Record<string, any>;
37
44
  line_item: LineItemRel;
38
45
  sku_option: SkuOptionRel;
46
+ tags?: TagRel[] | null;
39
47
  }
40
48
  interface LineItemOptionUpdate extends ResourceUpdate {
41
49
  name?: string | null;
42
50
  quantity?: number | null;
43
- options?: object | null;
51
+ options?: Record<string, any> | null;
44
52
  sku_option?: SkuOptionRel | null;
53
+ tags?: TagRel[] | null;
45
54
  }
46
55
  declare class LineItemOptions extends ApiResource<LineItemOption> {
47
56
  static readonly TYPE: LineItemOptionType;
@@ -50,6 +59,8 @@ declare class LineItemOptions extends ApiResource<LineItemOption> {
50
59
  delete(id: string | ResourceId, options?: ResourcesConfig): Promise<void>;
51
60
  line_item(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<LineItem>;
52
61
  sku_option(lineItemOptionId: string | LineItemOption, params?: QueryParamsRetrieve, options?: ResourcesConfig): Promise<SkuOption>;
62
+ events(lineItemOptionId: string | LineItemOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
63
+ tags(lineItemOptionId: string | LineItemOption, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
53
64
  isLineItemOption(resource: any): resource is LineItemOption;
54
65
  relationship(id: string | ResourceId | null): LineItemOptionRel;
55
66
  type(): LineItemOptionType;
@@ -19,6 +19,14 @@ class LineItemOptions extends resource_1.ApiResource {
19
19
  const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
20
20
  return this.resources.fetch({ type: 'sku_options' }, `line_item_options/${_lineItemOptionId}/sku_option`, params, options);
21
21
  }
22
+ async events(lineItemOptionId, params, options) {
23
+ const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
24
+ return this.resources.fetch({ type: 'events' }, `line_item_options/${_lineItemOptionId}/events`, params, options);
25
+ }
26
+ async tags(lineItemOptionId, params, options) {
27
+ const _lineItemOptionId = lineItemOptionId.id || lineItemOptionId;
28
+ return this.resources.fetch({ type: 'tags' }, `line_item_options/${_lineItemOptionId}/tags`, params, options);
29
+ }
22
30
  isLineItemOption(resource) {
23
31
  return resource.type && (resource.type === LineItemOptions.TYPE);
24
32
  }
@@ -15,6 +15,8 @@ import type { Sku, SkuType } from './skus';
15
15
  import type { LineItemOption } from './line_item_options';
16
16
  import type { StockLineItem } from './stock_line_items';
17
17
  import type { StockTransfer } from './stock_transfers';
18
+ import type { Event } from './events';
19
+ import type { Tag, TagType } from './tags';
18
20
  type LineItemType = 'line_items';
19
21
  type LineItemRel = ResourceRel & {
20
22
  type: LineItemType;
@@ -52,6 +54,9 @@ type ShipmentRel = ResourceRel & {
52
54
  type SkuRel = ResourceRel & {
53
55
  type: SkuType;
54
56
  };
57
+ type TagRel = ResourceRel & {
58
+ type: TagType;
59
+ };
55
60
  interface LineItem extends Resource {
56
61
  readonly type: LineItemType;
57
62
  sku_code?: string | null;
@@ -75,9 +80,9 @@ interface LineItem extends Resource {
75
80
  formatted_tax_amount?: string | null;
76
81
  name?: string | null;
77
82
  image_url?: string | null;
78
- discount_breakdown?: object | null;
83
+ discount_breakdown?: Record<string, any> | null;
79
84
  tax_rate?: number | null;
80
- tax_breakdown?: object | null;
85
+ tax_breakdown?: Record<string, any> | null;
81
86
  item_type?: 'skus' | 'bundles' | 'shipments' | 'payment_methods' | 'adjustments' | 'gift_cards' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | null;
82
87
  frequency?: string | null;
83
88
  order?: Order | null;
@@ -89,6 +94,8 @@ interface LineItem extends Resource {
89
94
  shipment_line_items?: object[];
90
95
  stock_line_items?: StockLineItem[] | null;
91
96
  stock_transfers?: StockTransfer[] | null;
97
+ events?: Event[] | null;
98
+ tags?: Tag[] | null;
92
99
  }
93
100
  interface LineItemCreate extends ResourceCreate {
94
101
  sku_code?: string | null;
@@ -103,6 +110,7 @@ interface LineItemCreate extends ResourceCreate {
103
110
  frequency?: string | null;
104
111
  order: OrderRel;
105
112
  item?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel | null;
113
+ tags?: TagRel[] | null;
106
114
  }
107
115
  interface LineItemUpdate extends ResourceUpdate {
108
116
  sku_code?: string | null;
@@ -112,6 +120,7 @@ interface LineItemUpdate extends ResourceUpdate {
112
120
  name?: string | null;
113
121
  image_url?: string | null;
114
122
  frequency?: string | null;
123
+ tags?: TagRel[] | null;
115
124
  }
116
125
  declare class LineItems extends ApiResource<LineItem> {
117
126
  static readonly TYPE: LineItemType;
@@ -122,6 +131,8 @@ declare class LineItems extends ApiResource<LineItem> {
122
131
  line_item_options(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<LineItemOption>>;
123
132
  stock_line_items(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockLineItem>>;
124
133
  stock_transfers(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<StockTransfer>>;
134
+ events(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Event>>;
135
+ tags(lineItemId: string | LineItem, params?: QueryParamsList, options?: ResourcesConfig): Promise<ListResponse<Tag>>;
125
136
  isLineItem(resource: any): resource is LineItem;
126
137
  relationship(id: string | ResourceId | null): LineItemRel;
127
138
  type(): LineItemType;
@@ -27,6 +27,14 @@ class LineItems extends resource_1.ApiResource {
27
27
  const _lineItemId = lineItemId.id || lineItemId;
28
28
  return this.resources.fetch({ type: 'stock_transfers' }, `line_items/${_lineItemId}/stock_transfers`, params, options);
29
29
  }
30
+ async events(lineItemId, params, options) {
31
+ const _lineItemId = lineItemId.id || lineItemId;
32
+ return this.resources.fetch({ type: 'events' }, `line_items/${_lineItemId}/events`, params, options);
33
+ }
34
+ async tags(lineItemId, params, options) {
35
+ const _lineItemId = lineItemId.id || lineItemId;
36
+ return this.resources.fetch({ type: 'tags' }, `line_items/${_lineItemId}/tags`, params, options);
37
+ }
30
38
  isLineItem(resource) {
31
39
  return resource.type && (resource.type === LineItems.TYPE);
32
40
  }
@@ -17,7 +17,7 @@ interface OrderCopy extends Resource {
17
17
  started_at?: string | null;
18
18
  completed_at?: string | null;
19
19
  failed_at?: string | null;
20
- errors_log?: object | null;
20
+ errors_log?: Record<string, any> | null;
21
21
  errors_count?: number | null;
22
22
  place_target_order?: boolean | null;
23
23
  reuse_wallet?: boolean | null;
@@ -13,7 +13,7 @@ interface OrderFactory extends Resource {
13
13
  started_at?: string | null;
14
14
  completed_at?: string | null;
15
15
  failed_at?: string | null;
16
- errors_log?: object | null;
16
+ errors_log?: Record<string, any> | null;
17
17
  errors_count?: number | null;
18
18
  place_target_order?: boolean | null;
19
19
  reuse_wallet?: boolean | null;
@@ -36,7 +36,7 @@ interface OrderSubscription extends Resource {
36
36
  occurrencies?: number | null;
37
37
  errors_count?: number | null;
38
38
  succeeded_on_last_run?: boolean | null;
39
- options?: object | null;
39
+ options?: Record<string, any> | null;
40
40
  market?: Market | null;
41
41
  subscription_model?: SubscriptionModel | null;
42
42
  source_order?: Order | null;
@@ -57,7 +57,7 @@ interface OrderSubscriptionCreate extends ResourceCreate {
57
57
  activate_by_source_order?: boolean | null;
58
58
  starts_at?: string | null;
59
59
  expires_at?: string | null;
60
- options?: object | null;
60
+ options?: Record<string, any> | null;
61
61
  market?: MarketRel | null;
62
62
  source_order: OrderRel;
63
63
  }