@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,93 +1,94 @@
1
- export declare type DiscountVouchersTypes = 'AMOUNT' | 'PERCENT' | 'UNIT' | 'FIXED';
2
- export declare enum DiscountVouchersTypesEnum {
3
- AMOUNT = "AMOUNT",
4
- PERCENT = "PERCENT",
5
- UNIT = "UNIT",
6
- FIXED = "FIXED"
7
- }
8
- export declare type DiscountVouchersEffectTypes = 'ADD_MISSING_ITEMS' | 'ADD_NEW_ITEMS' | 'ADD_MANY_ITEMS' | 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' | 'APPLY_TO_ITEMS_PROPORTIONALLY' | 'APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY' | 'APPLY_TO_ITEMS_BY_QUANTITY';
9
- export declare type DiscountUnitVouchersEffectTypes = 'ADD_MISSING_ITEMS' | 'ADD_NEW_ITEMS' | 'ADD_MANY_ITEMS';
10
- export declare type DiscountAmountVouchersEffectTypes = 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' | 'APPLY_TO_ITEMS_PROPORTIONALLY' | 'APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY' | 'APPLY_TO_ITEMS_BY_QUANTITY';
11
- export declare type DiscountPercentVouchersEffectTypes = 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS';
12
- export declare type DiscountFixedVouchersEffectTypes = 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS';
13
- interface SimpleSkuDiscountUnit {
14
- id: string;
15
- source_id?: string;
16
- sku: string;
17
- }
18
- interface SimpleProductDiscountUnit {
19
- id: string;
20
- source_id?: string;
21
- name: string;
22
- }
23
- export interface DiscountUnit {
24
- type?: DiscountVouchersTypesEnum.UNIT;
25
- unit_off?: number;
26
- unit_off_formula?: string;
27
- effect?: DiscountUnitVouchersEffectTypes;
28
- unit_type?: string;
29
- product?: SimpleProductDiscountUnit;
30
- sku?: SimpleSkuDiscountUnit;
31
- }
32
- export interface DiscountAmount {
33
- type?: DiscountVouchersTypesEnum.AMOUNT;
34
- amount_off?: number;
35
- amount_off_formula?: string;
36
- effect?: DiscountAmountVouchersEffectTypes;
37
- }
38
- export interface DiscountPercent {
39
- type?: DiscountVouchersTypesEnum.PERCENT;
40
- percent_off?: number;
41
- percent_off_formula?: string;
42
- amount_limit?: number;
43
- effect?: DiscountPercentVouchersEffectTypes;
44
- }
45
- export interface DiscountFixed {
46
- type?: DiscountVouchersTypesEnum.FIXED;
47
- fixed_amount?: number;
48
- fixed_amount_formula?: string;
49
- effect?: DiscountFixedVouchersEffectTypes;
50
- }
51
- export declare type Discount = DiscountAmount_ | DiscountUnit_ | DiscountUnitMultiple_ | DiscountPercent_ | DiscountFixed_;
52
- export declare type DiscountAmount_ = {
53
- type: 'AMOUNT';
54
- amount_off?: number;
55
- amount_off_formula?: string;
56
- aggregated_amount_limit?: number;
57
- effect?: DiscountAmountVouchersEffectTypes;
58
- is_dynamic?: boolean;
59
- };
60
- export declare type DiscountUnit_ = {
61
- type: 'UNIT';
62
- } & DiscountUnitBase_;
63
- export declare type DiscountUnitBase_ = {
64
- unit_off?: number;
65
- unit_off_formula?: string;
66
- unit_type: string;
67
- product?: SimpleProductDiscountUnit;
68
- sku?: SimpleSkuDiscountUnit;
69
- effect?: 'ADD_MISSING_ITEMS' | 'ADD_NEW_ITEMS';
70
- is_dynamic?: boolean;
71
- };
72
- export declare type DiscountUnitMultiple_ = {
73
- type: 'UNIT';
74
- effect: 'ADD_MANY_ITEMS';
75
- units: DiscountUnitBase_[];
76
- };
77
- export declare type DiscountPercent_ = {
78
- type: 'PERCENT';
79
- percent_off?: number;
80
- percent_off_formula?: string;
81
- amount_limit?: number;
82
- aggregated_amount_limit?: number;
83
- effect?: DiscountPercentVouchersEffectTypes;
84
- is_dynamic?: boolean;
85
- };
86
- export declare type DiscountFixed_ = {
87
- type: 'FIXED';
88
- fixed_amount?: number;
89
- fixed_amount_formula?: string;
90
- effect?: DiscountFixedVouchersEffectTypes;
91
- is_dynamic?: boolean;
92
- };
93
- export {};
1
+ type DiscountVouchersTypes = 'AMOUNT' | 'PERCENT' | 'UNIT' | 'FIXED';
2
+ declare enum DiscountVouchersTypesEnum {
3
+ AMOUNT = "AMOUNT",
4
+ PERCENT = "PERCENT",
5
+ UNIT = "UNIT",
6
+ FIXED = "FIXED"
7
+ }
8
+ type DiscountVouchersEffectTypes = 'ADD_MISSING_ITEMS' | 'ADD_NEW_ITEMS' | 'ADD_MANY_ITEMS' | 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' | 'APPLY_TO_ITEMS_PROPORTIONALLY' | 'APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY' | 'APPLY_TO_ITEMS_BY_QUANTITY';
9
+ type DiscountUnitVouchersEffectTypes = 'ADD_MISSING_ITEMS' | 'ADD_NEW_ITEMS' | 'ADD_MANY_ITEMS';
10
+ type DiscountAmountVouchersEffectTypes = 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS' | 'APPLY_TO_ITEMS_PROPORTIONALLY' | 'APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY' | 'APPLY_TO_ITEMS_BY_QUANTITY';
11
+ type DiscountPercentVouchersEffectTypes = 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS';
12
+ type DiscountFixedVouchersEffectTypes = 'APPLY_TO_ORDER' | 'APPLY_TO_ITEMS';
13
+ interface SimpleSkuDiscountUnit {
14
+ id: string;
15
+ source_id?: string;
16
+ sku: string;
17
+ }
18
+ interface SimpleProductDiscountUnit {
19
+ id: string;
20
+ source_id?: string;
21
+ name: string;
22
+ }
23
+ interface DiscountUnit {
24
+ type?: DiscountVouchersTypesEnum.UNIT;
25
+ unit_off?: number;
26
+ unit_off_formula?: string;
27
+ effect?: DiscountUnitVouchersEffectTypes;
28
+ unit_type?: string;
29
+ product?: SimpleProductDiscountUnit;
30
+ sku?: SimpleSkuDiscountUnit;
31
+ }
32
+ interface DiscountAmount {
33
+ type?: DiscountVouchersTypesEnum.AMOUNT;
34
+ amount_off?: number;
35
+ amount_off_formula?: string;
36
+ effect?: DiscountAmountVouchersEffectTypes;
37
+ }
38
+ interface DiscountPercent {
39
+ type?: DiscountVouchersTypesEnum.PERCENT;
40
+ percent_off?: number;
41
+ percent_off_formula?: string;
42
+ amount_limit?: number;
43
+ effect?: DiscountPercentVouchersEffectTypes;
44
+ }
45
+ interface DiscountFixed {
46
+ type?: DiscountVouchersTypesEnum.FIXED;
47
+ fixed_amount?: number;
48
+ fixed_amount_formula?: string;
49
+ effect?: DiscountFixedVouchersEffectTypes;
50
+ }
51
+ type Discount = DiscountAmount_ | DiscountUnit_ | DiscountUnitMultiple_ | DiscountPercent_ | DiscountFixed_;
52
+ type DiscountAmount_ = {
53
+ type: 'AMOUNT';
54
+ amount_off?: number;
55
+ amount_off_formula?: string;
56
+ aggregated_amount_limit?: number;
57
+ effect?: DiscountAmountVouchersEffectTypes;
58
+ is_dynamic?: boolean;
59
+ };
60
+ type DiscountUnit_ = {
61
+ type: 'UNIT';
62
+ } & DiscountUnitBase_;
63
+ type DiscountUnitBase_ = {
64
+ unit_off?: number;
65
+ unit_off_formula?: string;
66
+ unit_type: string;
67
+ product?: SimpleProductDiscountUnit;
68
+ sku?: SimpleSkuDiscountUnit;
69
+ effect?: 'ADD_MISSING_ITEMS' | 'ADD_NEW_ITEMS';
70
+ is_dynamic?: boolean;
71
+ };
72
+ type DiscountUnitMultiple_ = {
73
+ type: 'UNIT';
74
+ effect: 'ADD_MANY_ITEMS';
75
+ units: DiscountUnitBase_[];
76
+ };
77
+ type DiscountPercent_ = {
78
+ type: 'PERCENT';
79
+ percent_off?: number;
80
+ percent_off_formula?: string;
81
+ amount_limit?: number;
82
+ aggregated_amount_limit?: number;
83
+ effect?: DiscountPercentVouchersEffectTypes;
84
+ is_dynamic?: boolean;
85
+ };
86
+ type DiscountFixed_ = {
87
+ type: 'FIXED';
88
+ fixed_amount?: number;
89
+ fixed_amount_formula?: string;
90
+ effect?: DiscountFixedVouchersEffectTypes;
91
+ is_dynamic?: boolean;
92
+ };
93
+
94
+ export { type Discount, type DiscountAmount, type DiscountAmountVouchersEffectTypes, type DiscountAmount_, type DiscountFixed, type DiscountFixedVouchersEffectTypes, type DiscountFixed_, type DiscountPercent, type DiscountPercentVouchersEffectTypes, type DiscountPercent_, type DiscountUnit, type DiscountUnitBase_, type DiscountUnitMultiple_, type DiscountUnitVouchersEffectTypes, type DiscountUnit_, type DiscountVouchersEffectTypes, type DiscountVouchersTypes, DiscountVouchersTypesEnum };
@@ -1,144 +1,148 @@
1
- import { CustomerRequest, SimpleCustomer } from './Customers';
2
- import { VoucherType } from './Vouchers';
3
- declare type OrderType = 'id' | '-id' | 'voucher_code' | '-voucher_code' | 'tracking_id' | '-tracking_id' | 'customer_id' | '-customer_id' | 'created_at' | '-created_at' | 'channel' | '-channel';
4
- export interface VoucherDiscount {
5
- type: 'UNIT' | 'AMOUNT' | 'DISCOUNT';
6
- unit_off?: number;
7
- unit_off_formula?: string;
8
- effect?: string;
9
- amount_off?: number;
10
- amount_off_formula?: string;
11
- percent_off?: number;
12
- percent_off_formula?: string;
13
- amount_limit?: number;
14
- }
15
- interface DistributionsPublicationsVoucher {
16
- code?: string;
17
- object?: 'voucher';
18
- campaign?: string;
19
- gift?: {
20
- amount: number;
21
- balance: number;
22
- };
23
- loyalty_card?: {
24
- amount: number;
25
- balance: number;
26
- };
27
- is_referral_code?: boolean;
28
- discount?: VoucherDiscount;
29
- }
30
- interface DistributionsPublicationsCreateResponseVoucher {
31
- id: string;
32
- code: string;
33
- campaign?: string;
34
- campaign_id?: string;
35
- category?: string;
36
- type?: VoucherType;
37
- discount?: VoucherDiscount;
38
- gift?: {
39
- amount: number;
40
- balance: number;
41
- };
42
- loyalty_card?: {
43
- amount: number;
44
- balance: number;
45
- };
46
- start_date?: string;
47
- expiration_date?: string;
48
- validity_timeframe?: string;
49
- validity_day_of_week?: string;
50
- active?: boolean;
51
- additional_info?: string;
52
- metadata?: Record<string, any>;
53
- assets: {
54
- qr: {
55
- id: string;
56
- url: string;
57
- };
58
- barcode: {
59
- id: string;
60
- url: string;
61
- };
62
- };
63
- is_referral_code?: boolean;
64
- created_at: string;
65
- updated_at?: string;
66
- holder_id?: string;
67
- object: 'voucher';
68
- publish: {
69
- object: string;
70
- count: number;
71
- url: string;
72
- };
73
- redemption: {
74
- object: string;
75
- quantity: number;
76
- redeemed_quantity: number;
77
- url: string;
78
- };
79
- }
80
- export interface DistributionsPublicationsListParams {
81
- limit?: number;
82
- page?: number;
83
- order?: OrderType;
84
- campaign?: string;
85
- customer?: string;
86
- voucher?: string;
87
- result?: 'SUCCESS' | 'FAILURE';
88
- voucher_type?: 'GIFT' | 'DISCOUNT' | 'LOYALTY_CARD' | 'LUCKY_DRAW';
89
- is_referral_code?: boolean;
90
- filters?: {
91
- junction?: 'OR' | 'AND';
92
- [filter_condition: string]: any;
93
- };
94
- }
95
- interface PublicationResponse {
96
- id: string;
97
- source_id?: string;
98
- object: 'publication';
99
- created_at: string;
100
- customer_id?: string;
101
- tracking_id?: string;
102
- metadata?: Record<string, any>;
103
- channel?: string;
104
- result: 'SUCCESS' | 'FAILURE';
105
- customer?: {
106
- object?: string;
107
- id: string;
108
- };
109
- voucher?: DistributionsPublicationsVoucher;
110
- vouchers?: string[];
111
- failure_code?: string;
112
- failure_message?: string;
113
- }
114
- export interface DistributionsPublicationsListResponse {
115
- object: 'list';
116
- total: number;
117
- data_ref: 'publications';
118
- publications?: PublicationResponse[];
119
- }
120
- export interface DistributionsPublicationsCreateParams {
121
- join_once?: boolean;
122
- source_id?: string;
123
- campaign?: {
124
- name: string;
125
- count?: number;
126
- };
127
- voucher?: string;
128
- channel?: string;
129
- customer: CustomerRequest;
130
- }
131
- export interface DistributionsPublicationsCreateResponse {
132
- id: string;
133
- object: 'publication';
134
- created_at: string;
135
- customer_id: string;
136
- tracking_id?: string;
137
- metadata?: Record<string, any>;
138
- channel?: string;
139
- source_id?: string;
140
- result: 'SUCCESS' | 'FAILURE';
141
- customer?: SimpleCustomer;
142
- voucher: DistributionsPublicationsCreateResponseVoucher;
143
- }
144
- export {};
1
+ import { SimpleCustomer, CustomerRequest } from './Customers.js';
2
+ import { VoucherType } from './Vouchers.js';
3
+ import './DiscountVoucher.js';
4
+ import './Orders.js';
5
+
6
+ type OrderType = 'id' | '-id' | 'voucher_code' | '-voucher_code' | 'tracking_id' | '-tracking_id' | 'customer_id' | '-customer_id' | 'created_at' | '-created_at' | 'channel' | '-channel';
7
+ interface VoucherDiscount {
8
+ type: 'UNIT' | 'AMOUNT' | 'DISCOUNT';
9
+ unit_off?: number;
10
+ unit_off_formula?: string;
11
+ effect?: string;
12
+ amount_off?: number;
13
+ amount_off_formula?: string;
14
+ percent_off?: number;
15
+ percent_off_formula?: string;
16
+ amount_limit?: number;
17
+ }
18
+ interface DistributionsPublicationsVoucher {
19
+ code?: string;
20
+ object?: 'voucher';
21
+ campaign?: string;
22
+ gift?: {
23
+ amount: number;
24
+ balance: number;
25
+ };
26
+ loyalty_card?: {
27
+ amount: number;
28
+ balance: number;
29
+ };
30
+ is_referral_code?: boolean;
31
+ discount?: VoucherDiscount;
32
+ }
33
+ interface DistributionsPublicationsCreateResponseVoucher {
34
+ id: string;
35
+ code: string;
36
+ campaign?: string;
37
+ campaign_id?: string;
38
+ category?: string;
39
+ type?: VoucherType;
40
+ discount?: VoucherDiscount;
41
+ gift?: {
42
+ amount: number;
43
+ balance: number;
44
+ };
45
+ loyalty_card?: {
46
+ amount: number;
47
+ balance: number;
48
+ };
49
+ start_date?: string;
50
+ expiration_date?: string;
51
+ validity_timeframe?: string;
52
+ validity_day_of_week?: string;
53
+ active?: boolean;
54
+ additional_info?: string;
55
+ metadata?: Record<string, any>;
56
+ assets: {
57
+ qr: {
58
+ id: string;
59
+ url: string;
60
+ };
61
+ barcode: {
62
+ id: string;
63
+ url: string;
64
+ };
65
+ };
66
+ is_referral_code?: boolean;
67
+ created_at: string;
68
+ updated_at?: string;
69
+ holder_id?: string;
70
+ object: 'voucher';
71
+ publish: {
72
+ object: string;
73
+ count: number;
74
+ url: string;
75
+ };
76
+ redemption: {
77
+ object: string;
78
+ quantity: number;
79
+ redeemed_quantity: number;
80
+ url: string;
81
+ };
82
+ }
83
+ interface DistributionsPublicationsListParams {
84
+ limit?: number;
85
+ page?: number;
86
+ order?: OrderType;
87
+ campaign?: string;
88
+ customer?: string;
89
+ voucher?: string;
90
+ result?: 'SUCCESS' | 'FAILURE';
91
+ voucher_type?: 'GIFT' | 'DISCOUNT' | 'LOYALTY_CARD' | 'LUCKY_DRAW';
92
+ is_referral_code?: boolean;
93
+ filters?: {
94
+ junction?: 'OR' | 'AND';
95
+ [filter_condition: string]: any;
96
+ };
97
+ }
98
+ interface PublicationResponse {
99
+ id: string;
100
+ source_id?: string;
101
+ object: 'publication';
102
+ created_at: string;
103
+ customer_id?: string;
104
+ tracking_id?: string;
105
+ metadata?: Record<string, any>;
106
+ channel?: string;
107
+ result: 'SUCCESS' | 'FAILURE';
108
+ customer?: {
109
+ object?: string;
110
+ id: string;
111
+ };
112
+ voucher?: DistributionsPublicationsVoucher;
113
+ vouchers?: string[];
114
+ failure_code?: string;
115
+ failure_message?: string;
116
+ }
117
+ interface DistributionsPublicationsListResponse {
118
+ object: 'list';
119
+ total: number;
120
+ data_ref: 'publications';
121
+ publications?: PublicationResponse[];
122
+ }
123
+ interface DistributionsPublicationsCreateParams {
124
+ join_once?: boolean;
125
+ source_id?: string;
126
+ campaign?: {
127
+ name: string;
128
+ count?: number;
129
+ };
130
+ voucher?: string;
131
+ channel?: string;
132
+ customer: CustomerRequest;
133
+ }
134
+ interface DistributionsPublicationsCreateResponse {
135
+ id: string;
136
+ object: 'publication';
137
+ created_at: string;
138
+ customer_id: string;
139
+ tracking_id?: string;
140
+ metadata?: Record<string, any>;
141
+ channel?: string;
142
+ source_id?: string;
143
+ result: 'SUCCESS' | 'FAILURE';
144
+ customer?: SimpleCustomer;
145
+ voucher: DistributionsPublicationsCreateResponseVoucher;
146
+ }
147
+
148
+ export type { DistributionsPublicationsCreateParams, DistributionsPublicationsCreateResponse, DistributionsPublicationsListParams, DistributionsPublicationsListResponse, VoucherDiscount };
@@ -1,17 +1,21 @@
1
- import { CustomerRequest } from './Customers';
2
- export interface EventsParams {
3
- event: string;
4
- customer: CustomerRequest;
5
- metadata?: Record<string, any>;
6
- referral?: {
7
- code: string;
8
- referrer_id?: string;
9
- };
10
- loyalty?: {
11
- code: string;
12
- };
13
- }
14
- export interface EventsResponse {
15
- object: 'event';
16
- type: string;
17
- }
1
+ import { CustomerRequest } from './Customers.js';
2
+ import './DiscountVoucher.js';
3
+
4
+ interface EventsParams {
5
+ event: string;
6
+ customer: CustomerRequest;
7
+ metadata?: Record<string, any>;
8
+ referral?: {
9
+ code: string;
10
+ referrer_id?: string;
11
+ };
12
+ loyalty?: {
13
+ code: string;
14
+ };
15
+ }
16
+ interface EventsResponse {
17
+ object: 'event';
18
+ type: string;
19
+ }
20
+
21
+ export type { EventsParams, EventsResponse };