@voucherify/sdk 2.9.2 → 2.9.4

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 (75) hide show
  1. package/dist/ApiLimitsHandler.d.ts +13 -10
  2. package/dist/AsyncActions.d.ts +17 -15
  3. package/dist/Balance.d.ts +15 -12
  4. package/dist/Campaigns.d.ts +66 -58
  5. package/dist/Categories.d.ts +29 -26
  6. package/dist/ClientSide.d.ts +77 -53
  7. package/dist/Consents.d.ts +13 -10
  8. package/dist/Customers.d.ts +75 -72
  9. package/dist/Distributions.d.ts +29 -22
  10. package/dist/Events.d.ts +15 -10
  11. package/dist/Exports.d.ts +25 -22
  12. package/dist/Loyalties.d.ts +171 -159
  13. package/dist/MetadataSchemas.d.ts +17 -14
  14. package/dist/Orders.d.ts +32 -27
  15. package/dist/ProductCollections.d.ts +30 -26
  16. package/dist/Products.d.ts +66 -63
  17. package/dist/PromotionTiers.d.ts +43 -34
  18. package/dist/Promotions.d.ts +30 -18
  19. package/dist/PromotionsStacks.d.ts +34 -30
  20. package/dist/Qualifications.d.ts +24 -10
  21. package/dist/Redemptions.d.ts +53 -35
  22. package/dist/RequestController.d.ts +31 -29
  23. package/dist/Rewards.d.ts +46 -43
  24. package/dist/Segments.d.ts +25 -22
  25. package/dist/ValidationRules.d.ts +47 -43
  26. package/dist/Validations.d.ts +39 -17
  27. package/dist/VoucherifyClientSide.d.ts +112 -86
  28. package/dist/VoucherifyError.d.ts +23 -20
  29. package/dist/VoucherifyServerSide.d.ts +170 -131
  30. package/dist/Vouchers.d.ts +84 -78
  31. package/dist/helpers.d.ts +20 -18
  32. package/dist/index.d.ts +63 -25
  33. package/dist/types/ApplicableTo.d.ts +32 -30
  34. package/dist/types/AsyncActions.d.ts +23 -21
  35. package/dist/types/Balance.d.ts +18 -16
  36. package/dist/types/Campaigns.d.ts +124 -120
  37. package/dist/types/Categories.d.ts +40 -38
  38. package/dist/types/ClientSide.d.ts +145 -134
  39. package/dist/types/Consents.d.ts +34 -33
  40. package/dist/types/Customers.d.ts +363 -361
  41. package/dist/types/DiscountVoucher.d.ts +94 -93
  42. package/dist/types/Distributions.d.ts +148 -144
  43. package/dist/types/Events.d.ts +21 -17
  44. package/dist/types/Exports.d.ts +151 -149
  45. package/dist/types/Gift.d.ts +5 -3
  46. package/dist/types/Loyalties.d.ts +1061 -1057
  47. package/dist/types/MetadataSchemas.d.ts +34 -33
  48. package/dist/types/Orders.d.ts +199 -195
  49. package/dist/types/ProductCollections.d.ts +99 -96
  50. package/dist/types/Products.d.ts +108 -106
  51. package/dist/types/PromotionTiers.d.ts +131 -127
  52. package/dist/types/Promotions.d.ts +113 -108
  53. package/dist/types/PromotionsStacks.d.ts +74 -71
  54. package/dist/types/Qualifications.d.ts +92 -86
  55. package/dist/types/Redemptions.d.ts +215 -205
  56. package/dist/types/Rewards.d.ts +220 -219
  57. package/dist/types/Segments.d.ts +34 -32
  58. package/dist/types/Stackable.d.ts +106 -101
  59. package/dist/types/UtilityTypes.d.ts +5 -3
  60. package/dist/types/ValidateSession.d.ts +19 -17
  61. package/dist/types/ValidationError.d.ts +9 -7
  62. package/dist/types/ValidationRules.d.ts +96 -93
  63. package/dist/types/Validations.d.ts +109 -98
  64. package/dist/types/Vouchers.d.ts +452 -364
  65. package/dist/types/index.d.ts +27 -25
  66. package/dist/voucherifysdk.cjs +2023 -0
  67. package/dist/voucherifysdk.cjs.map +1 -0
  68. package/dist/voucherifysdk.esm.js +981 -1256
  69. package/dist/voucherifysdk.esm.js.map +1 -1
  70. package/package.json +13 -9
  71. package/CHANGELOG.md +0 -663
  72. package/dist/voucherifysdk.umd.development.js +0 -2270
  73. package/dist/voucherifysdk.umd.development.js.map +0 -1
  74. package/dist/voucherifysdk.umd.production.min.js +0 -2
  75. package/dist/voucherifysdk.umd.production.min.js.map +0 -1
@@ -1,127 +1,131 @@
1
- import { DiscountAmount, DiscountPercent, DiscountUnit, DiscountFixed } from './DiscountVoucher';
2
- import { OrdersCreateResponse, OrdersItem } from './Orders';
3
- import { SimpleCustomer } from './Customers';
4
- import { ValidationRulesListAssignmentsResponse } from './ValidationRules';
5
- import { ValidationSessionReleaseParams } from './ValidateSession';
6
- export interface SimplePromotionTier {
7
- tracking_id: string;
8
- metadata?: Record<string, any>;
9
- valid: boolean;
10
- id: string;
11
- name: string;
12
- banner?: string;
13
- discount: DiscountUnit | DiscountPercent | DiscountAmount | DiscountFixed;
14
- hierarchy: number;
15
- object: 'promotion_tier';
16
- }
17
- export interface PromotionTier {
18
- id: string;
19
- object: 'promotion_tier';
20
- name: string;
21
- banner?: string;
22
- campaign: {
23
- id: string;
24
- object: 'campaign';
25
- start_date?: string;
26
- expiration_date?: string;
27
- active: boolean;
28
- };
29
- validation_rule_assignments: ValidationRulesListAssignmentsResponse;
30
- action: {
31
- discount: DiscountUnit | DiscountPercent | DiscountAmount | DiscountFixed;
32
- };
33
- hierarchy: number;
34
- metadata?: Record<string, any>;
35
- active?: boolean;
36
- }
37
- export interface PromotionTiersListAllParams {
38
- is_available?: boolean;
39
- limit?: number;
40
- page?: number;
41
- }
42
- export interface PromotionTiersListAllResponse {
43
- object: 'list';
44
- data_ref: 'tiers';
45
- tiers: PromotionTier[];
46
- has_more: boolean;
47
- }
48
- export declare type PromotionTiersListResponse = PromotionTiersListAllResponse;
49
- export declare type PromotionTierGetResponse = PromotionTier;
50
- export interface PromotionTiersCreateParams {
51
- name?: string;
52
- banner?: string;
53
- action?: {
54
- discount?: DiscountUnit | DiscountPercent | DiscountAmount | DiscountFixed;
55
- };
56
- metadata?: Record<string, any>;
57
- }
58
- export declare type PromotionTiersCreateResponse = PromotionTier;
59
- export interface PromotionTiersRedeemParams {
60
- customer?: Omit<SimpleCustomer, 'object'> & {
61
- description?: string;
62
- };
63
- order?: {
64
- id?: string;
65
- source_id?: string;
66
- amount?: number;
67
- items?: OrdersItem[];
68
- status?: 'CREATED' | 'PAID' | 'CANCELED' | 'FULFILLED';
69
- metadata?: Record<string, any>;
70
- };
71
- metadata?: Record<string, any>;
72
- session?: ValidationSessionReleaseParams;
73
- }
74
- export interface PromotionTiersRedeemResponse {
75
- id: string;
76
- object: 'redemption';
77
- date: string;
78
- customer_id?: string;
79
- tracking_id?: string;
80
- order: Omit<OrdersCreateResponse, 'object' | 'customer'> & {
81
- customer: {
82
- id: string;
83
- object: 'customer';
84
- referrals: {
85
- campaigns: any[];
86
- total: number;
87
- };
88
- };
89
- total_discount_amount?: number;
90
- total_amount?: number;
91
- };
92
- result?: string;
93
- promotion_tier: PromotionTier & {
94
- summary: {
95
- redemptions: {
96
- total_redeemed: number;
97
- };
98
- orders: {
99
- total_amount: number;
100
- total_discount_amount: number;
101
- };
102
- };
103
- };
104
- }
105
- export interface PromotionTierRedeemDetailsSimple {
106
- id: string;
107
- name: string;
108
- banner?: string;
109
- campaign: {
110
- id: string;
111
- };
112
- }
113
- export declare type PromotionTierRedeemDetails = PromotionTier & {
114
- summary: {
115
- redemptions: {
116
- total_redeemed: number;
117
- };
118
- orders: {
119
- total_amount: number;
120
- total_discount_amount: number;
121
- };
122
- };
123
- };
124
- export declare type PromotionTiersUpdateParams = PromotionTiersCreateParams & {
125
- id: string;
126
- };
127
- export declare type PromotionTiersUpdateResponse = PromotionTier;
1
+ import { DiscountUnit, DiscountPercent, DiscountAmount, DiscountFixed } from './DiscountVoucher.js';
2
+ import { OrdersItem, OrdersCreateResponse } from './Orders.js';
3
+ import { SimpleCustomer } from './Customers.js';
4
+ import { ValidationRulesListAssignmentsResponse } from './ValidationRules.js';
5
+ import { ValidationSessionReleaseParams } from './ValidateSession.js';
6
+ import './ApplicableTo.js';
7
+
8
+ interface SimplePromotionTier {
9
+ tracking_id: string;
10
+ metadata?: Record<string, any>;
11
+ valid: boolean;
12
+ id: string;
13
+ name: string;
14
+ banner?: string;
15
+ discount: DiscountUnit | DiscountPercent | DiscountAmount | DiscountFixed;
16
+ hierarchy: number;
17
+ object: 'promotion_tier';
18
+ }
19
+ interface PromotionTier {
20
+ id: string;
21
+ object: 'promotion_tier';
22
+ name: string;
23
+ banner?: string;
24
+ campaign: {
25
+ id: string;
26
+ object: 'campaign';
27
+ start_date?: string;
28
+ expiration_date?: string;
29
+ active: boolean;
30
+ };
31
+ validation_rule_assignments: ValidationRulesListAssignmentsResponse;
32
+ action: {
33
+ discount: DiscountUnit | DiscountPercent | DiscountAmount | DiscountFixed;
34
+ };
35
+ hierarchy: number;
36
+ metadata?: Record<string, any>;
37
+ active?: boolean;
38
+ }
39
+ interface PromotionTiersListAllParams {
40
+ is_available?: boolean;
41
+ limit?: number;
42
+ page?: number;
43
+ }
44
+ interface PromotionTiersListAllResponse {
45
+ object: 'list';
46
+ data_ref: 'tiers';
47
+ tiers: PromotionTier[];
48
+ has_more: boolean;
49
+ }
50
+ type PromotionTiersListResponse = PromotionTiersListAllResponse;
51
+ type PromotionTierGetResponse = PromotionTier;
52
+ interface PromotionTiersCreateParams {
53
+ name?: string;
54
+ banner?: string;
55
+ action?: {
56
+ discount?: DiscountUnit | DiscountPercent | DiscountAmount | DiscountFixed;
57
+ };
58
+ metadata?: Record<string, any>;
59
+ }
60
+ type PromotionTiersCreateResponse = PromotionTier;
61
+ interface PromotionTiersRedeemParams {
62
+ customer?: Omit<SimpleCustomer, 'object'> & {
63
+ description?: string;
64
+ };
65
+ order?: {
66
+ id?: string;
67
+ source_id?: string;
68
+ amount?: number;
69
+ items?: OrdersItem[];
70
+ status?: 'CREATED' | 'PAID' | 'CANCELED' | 'FULFILLED';
71
+ metadata?: Record<string, any>;
72
+ };
73
+ metadata?: Record<string, any>;
74
+ session?: ValidationSessionReleaseParams;
75
+ }
76
+ interface PromotionTiersRedeemResponse {
77
+ id: string;
78
+ object: 'redemption';
79
+ date: string;
80
+ customer_id?: string;
81
+ tracking_id?: string;
82
+ order: Omit<OrdersCreateResponse, 'object' | 'customer'> & {
83
+ customer: {
84
+ id: string;
85
+ object: 'customer';
86
+ referrals: {
87
+ campaigns: any[];
88
+ total: number;
89
+ };
90
+ };
91
+ total_discount_amount?: number;
92
+ total_amount?: number;
93
+ };
94
+ result?: string;
95
+ promotion_tier: PromotionTier & {
96
+ summary: {
97
+ redemptions: {
98
+ total_redeemed: number;
99
+ };
100
+ orders: {
101
+ total_amount: number;
102
+ total_discount_amount: number;
103
+ };
104
+ };
105
+ };
106
+ }
107
+ interface PromotionTierRedeemDetailsSimple {
108
+ id: string;
109
+ name: string;
110
+ banner?: string;
111
+ campaign: {
112
+ id: string;
113
+ };
114
+ }
115
+ type PromotionTierRedeemDetails = PromotionTier & {
116
+ summary: {
117
+ redemptions: {
118
+ total_redeemed: number;
119
+ };
120
+ orders: {
121
+ total_amount: number;
122
+ total_discount_amount: number;
123
+ };
124
+ };
125
+ };
126
+ type PromotionTiersUpdateParams = PromotionTiersCreateParams & {
127
+ id: string;
128
+ };
129
+ type PromotionTiersUpdateResponse = PromotionTier;
130
+
131
+ export type { PromotionTier, PromotionTierGetResponse, PromotionTierRedeemDetails, PromotionTierRedeemDetailsSimple, PromotionTiersCreateParams, PromotionTiersCreateResponse, PromotionTiersListAllParams, PromotionTiersListAllResponse, PromotionTiersListResponse, PromotionTiersRedeemParams, PromotionTiersRedeemResponse, PromotionTiersUpdateParams, PromotionTiersUpdateResponse, SimplePromotionTier };
@@ -1,108 +1,113 @@
1
- import { DiscountAmount, DiscountPercent, DiscountUnit, DiscountFixed } from './DiscountVoucher';
2
- import { OrdersItem } from './Orders';
3
- import { PromotionTier } from './PromotionTiers';
4
- import { SimpleCustomer } from './Customers';
5
- import { ValidationRulesCreateAssignmentResponse } from './ValidationRules';
6
- export interface PromotionsCreateResponse {
7
- id: string;
8
- name: string;
9
- campaign_type?: 'PROMOTION';
10
- type: 'STATIC';
11
- description?: string;
12
- start_date?: string;
13
- expiration_date?: string;
14
- promotion: {
15
- object: 'list';
16
- data_ref: 'tiers';
17
- tiers?: PromotionTier[];
18
- has_more: boolean;
19
- };
20
- category?: string;
21
- auto_join: boolean;
22
- join_once: boolean;
23
- validation_rules_assignments: {
24
- data?: ValidationRulesCreateAssignmentResponse[];
25
- object: 'list';
26
- total: number;
27
- data_ref: 'data';
28
- };
29
- activity_duration_after_publishing?: string;
30
- validity_timeframe?: {
31
- interval?: string;
32
- duration?: string;
33
- };
34
- validity_day_of_week?: number[];
35
- metadata?: Record<string, string>;
36
- created_at: string;
37
- vouchers_generation_status: 'DONE';
38
- active: boolean;
39
- use_voucher_metadata_schema: boolean;
40
- protected: boolean;
41
- object: 'campaign';
42
- }
43
- export interface PromotionsCreate {
44
- name: string;
45
- campaign_type: 'PROMOTION';
46
- start_date?: string;
47
- expiration_date?: string;
48
- promotion?: {
49
- tiers: {
50
- name: string;
51
- banner: string;
52
- action: {
53
- discount: DiscountUnit | DiscountAmount | DiscountPercent | DiscountFixed;
54
- };
55
- metadata?: Record<string, any>;
56
- }[];
57
- };
58
- }
59
- export interface PromotionsValidateParams {
60
- customer?: Omit<SimpleCustomer, 'id' | 'object'> & {
61
- description?: string;
62
- id?: string;
63
- };
64
- order?: {
65
- id?: string;
66
- source_id?: string;
67
- items?: OrdersItem[];
68
- amount?: number;
69
- metadata?: Record<string, any>;
70
- };
71
- metadata?: Record<string, any>;
72
- }
73
- export interface PromotionsValidateQueryParams {
74
- audienceRulesOnly?: boolean;
75
- filters?: Record<string, any>;
76
- }
77
- export interface PromotionsValidateResponse {
78
- valid: boolean;
79
- promotions?: {
80
- id: string;
81
- object: 'promotion_tier';
82
- banner?: string;
83
- name: string;
84
- start_date?: string;
85
- expiration_date?: string;
86
- discount?: DiscountUnit | DiscountAmount | DiscountPercent | DiscountFixed;
87
- discount_amount?: number;
88
- applied_discount_amount?: number;
89
- metadata?: Record<string, any>;
90
- order?: {
91
- id?: string;
92
- source_id?: string;
93
- amount: number;
94
- initial_amount?: number;
95
- items_discount_amount?: number;
96
- items_applied_discount_amount?: number;
97
- items?: OrdersItem[];
98
- metadata?: Record<string, any>;
99
- discount_amount?: number;
100
- total_discount_amount?: number;
101
- total_amount?: number;
102
- applied_discount_amount?: number;
103
- total_applied_discount_amount?: number;
104
- };
105
- hierarchy?: number;
106
- }[];
107
- tracking_id?: string;
108
- }
1
+ import { DiscountUnit, DiscountAmount, DiscountPercent, DiscountFixed } from './DiscountVoucher.js';
2
+ import { OrdersItem } from './Orders.js';
3
+ import { PromotionTier } from './PromotionTiers.js';
4
+ import { SimpleCustomer } from './Customers.js';
5
+ import { ValidationRulesCreateAssignmentResponse } from './ValidationRules.js';
6
+ import './ValidateSession.js';
7
+ import './ApplicableTo.js';
8
+
9
+ interface PromotionsCreateResponse {
10
+ id: string;
11
+ name: string;
12
+ campaign_type?: 'PROMOTION';
13
+ type: 'STATIC';
14
+ description?: string;
15
+ start_date?: string;
16
+ expiration_date?: string;
17
+ promotion: {
18
+ object: 'list';
19
+ data_ref: 'tiers';
20
+ tiers?: PromotionTier[];
21
+ has_more: boolean;
22
+ };
23
+ category?: string;
24
+ auto_join: boolean;
25
+ join_once: boolean;
26
+ validation_rules_assignments: {
27
+ data?: ValidationRulesCreateAssignmentResponse[];
28
+ object: 'list';
29
+ total: number;
30
+ data_ref: 'data';
31
+ };
32
+ activity_duration_after_publishing?: string;
33
+ validity_timeframe?: {
34
+ interval?: string;
35
+ duration?: string;
36
+ };
37
+ validity_day_of_week?: number[];
38
+ metadata?: Record<string, string>;
39
+ created_at: string;
40
+ vouchers_generation_status: 'DONE';
41
+ active: boolean;
42
+ use_voucher_metadata_schema: boolean;
43
+ protected: boolean;
44
+ object: 'campaign';
45
+ }
46
+ interface PromotionsCreate {
47
+ name: string;
48
+ campaign_type: 'PROMOTION';
49
+ start_date?: string;
50
+ expiration_date?: string;
51
+ promotion?: {
52
+ tiers: {
53
+ name: string;
54
+ banner: string;
55
+ action: {
56
+ discount: DiscountUnit | DiscountAmount | DiscountPercent | DiscountFixed;
57
+ };
58
+ metadata?: Record<string, any>;
59
+ }[];
60
+ };
61
+ }
62
+ interface PromotionsValidateParams {
63
+ customer?: Omit<SimpleCustomer, 'id' | 'object'> & {
64
+ description?: string;
65
+ id?: string;
66
+ };
67
+ order?: {
68
+ id?: string;
69
+ source_id?: string;
70
+ items?: OrdersItem[];
71
+ amount?: number;
72
+ metadata?: Record<string, any>;
73
+ };
74
+ metadata?: Record<string, any>;
75
+ }
76
+ interface PromotionsValidateQueryParams {
77
+ audienceRulesOnly?: boolean;
78
+ filters?: Record<string, any>;
79
+ }
80
+ interface PromotionsValidateResponse {
81
+ valid: boolean;
82
+ promotions?: {
83
+ id: string;
84
+ object: 'promotion_tier';
85
+ banner?: string;
86
+ name: string;
87
+ start_date?: string;
88
+ expiration_date?: string;
89
+ discount?: DiscountUnit | DiscountAmount | DiscountPercent | DiscountFixed;
90
+ discount_amount?: number;
91
+ applied_discount_amount?: number;
92
+ metadata?: Record<string, any>;
93
+ order?: {
94
+ id?: string;
95
+ source_id?: string;
96
+ amount: number;
97
+ initial_amount?: number;
98
+ items_discount_amount?: number;
99
+ items_applied_discount_amount?: number;
100
+ items?: OrdersItem[];
101
+ metadata?: Record<string, any>;
102
+ discount_amount?: number;
103
+ total_discount_amount?: number;
104
+ total_amount?: number;
105
+ applied_discount_amount?: number;
106
+ total_applied_discount_amount?: number;
107
+ };
108
+ hierarchy?: number;
109
+ }[];
110
+ tracking_id?: string;
111
+ }
112
+
113
+ export type { PromotionsCreate, PromotionsCreateResponse, PromotionsValidateParams, PromotionsValidateQueryParams, PromotionsValidateResponse };
@@ -1,71 +1,74 @@
1
- import { Category } from './Categories';
2
- export interface PromotionsStacksListInCampaignResponseBody {
3
- object: 'list';
4
- data_ref: 'data';
5
- data: PromotionStack[];
6
- total: number;
7
- }
8
- export interface PromotionsStacksListResponseBody {
9
- object: 'list';
10
- data_ref: 'data';
11
- data: PromotionStack[];
12
- total: number;
13
- }
14
- export interface PromotionsStacksListRequestQuery {
15
- limit?: number;
16
- page?: number;
17
- order?: 'created_at' | '-created_at' | 'updated_at' | '-updated_at' | 'name' | '-name';
18
- created_at?: {
19
- before?: string;
20
- after?: string;
21
- };
22
- updated_at?: {
23
- before?: string;
24
- after?: string;
25
- };
26
- }
27
- export declare type PromotionsStacksGetResponseBody = PromotionStack;
28
- export declare type PromotionsStacksUpdateRequestBody = {
29
- name: string;
30
- tiers?: {
31
- ids?: string[];
32
- hierarchy_mode?: 'MANUAL';
33
- };
34
- category_id?: string;
35
- };
36
- export declare type PromotionsStacksUpdateResponseBody = PromotionStackBase & {
37
- id: string;
38
- created_at: string;
39
- updated_at: string;
40
- campaign_id: string;
41
- object: 'promotion_stack';
42
- category_id: string | null;
43
- categories: Category[];
44
- };
45
- export declare type PromotionsStacksCreateInCampaignRequestBody = PromotionStackBase & {
46
- category_id?: string;
47
- };
48
- export declare type PromotionsStacksCreateInCampaignResponseBody = PromotionStackBase & {
49
- id: string;
50
- created_at: string;
51
- campaign_id: string;
52
- object: 'promotion_stack';
53
- category_id: string | null;
54
- categories: Category[];
55
- };
56
- export interface PromotionStackBase {
57
- name: string;
58
- tiers: {
59
- ids: string[];
60
- hierarchy_mode?: 'MANUAL';
61
- };
62
- }
63
- export declare type PromotionStack = PromotionStackBase & {
64
- id: string;
65
- created_at: string;
66
- updated_at?: string;
67
- campaign_id: string;
68
- object: 'promotion_stack';
69
- category_id: string | null;
70
- categories: Category[];
71
- };
1
+ import { Category } from './Categories.js';
2
+
3
+ interface PromotionsStacksListInCampaignResponseBody {
4
+ object: 'list';
5
+ data_ref: 'data';
6
+ data: PromotionStack[];
7
+ total: number;
8
+ }
9
+ interface PromotionsStacksListResponseBody {
10
+ object: 'list';
11
+ data_ref: 'data';
12
+ data: PromotionStack[];
13
+ total: number;
14
+ }
15
+ interface PromotionsStacksListRequestQuery {
16
+ limit?: number;
17
+ page?: number;
18
+ order?: 'created_at' | '-created_at' | 'updated_at' | '-updated_at' | 'name' | '-name';
19
+ created_at?: {
20
+ before?: string;
21
+ after?: string;
22
+ };
23
+ updated_at?: {
24
+ before?: string;
25
+ after?: string;
26
+ };
27
+ }
28
+ type PromotionsStacksGetResponseBody = PromotionStack;
29
+ type PromotionsStacksUpdateRequestBody = {
30
+ name: string;
31
+ tiers?: {
32
+ ids?: string[];
33
+ hierarchy_mode?: 'MANUAL';
34
+ };
35
+ category_id?: string;
36
+ };
37
+ type PromotionsStacksUpdateResponseBody = PromotionStackBase & {
38
+ id: string;
39
+ created_at: string;
40
+ updated_at: string;
41
+ campaign_id: string;
42
+ object: 'promotion_stack';
43
+ category_id: string | null;
44
+ categories: Category[];
45
+ };
46
+ type PromotionsStacksCreateInCampaignRequestBody = PromotionStackBase & {
47
+ category_id?: string;
48
+ };
49
+ type PromotionsStacksCreateInCampaignResponseBody = PromotionStackBase & {
50
+ id: string;
51
+ created_at: string;
52
+ campaign_id: string;
53
+ object: 'promotion_stack';
54
+ category_id: string | null;
55
+ categories: Category[];
56
+ };
57
+ interface PromotionStackBase {
58
+ name: string;
59
+ tiers: {
60
+ ids: string[];
61
+ hierarchy_mode?: 'MANUAL';
62
+ };
63
+ }
64
+ type PromotionStack = PromotionStackBase & {
65
+ id: string;
66
+ created_at: string;
67
+ updated_at?: string;
68
+ campaign_id: string;
69
+ object: 'promotion_stack';
70
+ category_id: string | null;
71
+ categories: Category[];
72
+ };
73
+
74
+ export type { PromotionStack, PromotionStackBase, PromotionsStacksCreateInCampaignRequestBody, PromotionsStacksCreateInCampaignResponseBody, PromotionsStacksGetResponseBody, PromotionsStacksListInCampaignResponseBody, PromotionsStacksListRequestQuery, PromotionsStacksListResponseBody, PromotionsStacksUpdateRequestBody, PromotionsStacksUpdateResponseBody };