@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.
- package/dist/ApiLimitsHandler.d.ts +13 -10
- package/dist/AsyncActions.d.ts +17 -15
- package/dist/Balance.d.ts +15 -12
- package/dist/Campaigns.d.ts +66 -58
- package/dist/Categories.d.ts +29 -26
- package/dist/ClientSide.d.ts +77 -53
- package/dist/Consents.d.ts +13 -10
- package/dist/Customers.d.ts +75 -72
- package/dist/Distributions.d.ts +29 -22
- package/dist/Events.d.ts +15 -10
- package/dist/Exports.d.ts +25 -22
- package/dist/Loyalties.d.ts +171 -159
- package/dist/MetadataSchemas.d.ts +17 -14
- package/dist/Orders.d.ts +32 -27
- package/dist/ProductCollections.d.ts +30 -26
- package/dist/Products.d.ts +66 -63
- package/dist/PromotionTiers.d.ts +43 -34
- package/dist/Promotions.d.ts +30 -18
- package/dist/PromotionsStacks.d.ts +34 -30
- package/dist/Qualifications.d.ts +24 -10
- package/dist/Redemptions.d.ts +53 -35
- package/dist/RequestController.d.ts +31 -29
- package/dist/Rewards.d.ts +46 -43
- package/dist/Segments.d.ts +25 -22
- package/dist/ValidationRules.d.ts +47 -43
- package/dist/Validations.d.ts +39 -17
- package/dist/VoucherifyClientSide.d.ts +112 -86
- package/dist/VoucherifyError.d.ts +23 -20
- package/dist/VoucherifyServerSide.d.ts +170 -131
- package/dist/Vouchers.d.ts +84 -78
- package/dist/helpers.d.ts +20 -18
- package/dist/index.d.ts +63 -25
- package/dist/types/ApplicableTo.d.ts +32 -30
- package/dist/types/AsyncActions.d.ts +23 -21
- package/dist/types/Balance.d.ts +18 -16
- package/dist/types/Campaigns.d.ts +124 -120
- package/dist/types/Categories.d.ts +40 -38
- package/dist/types/ClientSide.d.ts +145 -134
- package/dist/types/Consents.d.ts +34 -33
- package/dist/types/Customers.d.ts +363 -361
- package/dist/types/DiscountVoucher.d.ts +94 -93
- package/dist/types/Distributions.d.ts +148 -144
- package/dist/types/Events.d.ts +21 -17
- package/dist/types/Exports.d.ts +151 -149
- package/dist/types/Gift.d.ts +5 -3
- package/dist/types/Loyalties.d.ts +1061 -1057
- package/dist/types/MetadataSchemas.d.ts +34 -33
- package/dist/types/Orders.d.ts +199 -195
- package/dist/types/ProductCollections.d.ts +99 -96
- package/dist/types/Products.d.ts +108 -106
- package/dist/types/PromotionTiers.d.ts +131 -127
- package/dist/types/Promotions.d.ts +113 -108
- package/dist/types/PromotionsStacks.d.ts +74 -71
- package/dist/types/Qualifications.d.ts +92 -86
- package/dist/types/Redemptions.d.ts +215 -205
- package/dist/types/Rewards.d.ts +220 -219
- package/dist/types/Segments.d.ts +34 -32
- package/dist/types/Stackable.d.ts +106 -101
- package/dist/types/UtilityTypes.d.ts +5 -3
- package/dist/types/ValidateSession.d.ts +19 -17
- package/dist/types/ValidationError.d.ts +9 -7
- package/dist/types/ValidationRules.d.ts +96 -93
- package/dist/types/Validations.d.ts +109 -98
- package/dist/types/Vouchers.d.ts +452 -364
- package/dist/types/index.d.ts +27 -25
- package/dist/voucherifysdk.cjs +2023 -0
- package/dist/voucherifysdk.cjs.map +1 -0
- package/dist/voucherifysdk.esm.js +981 -1256
- package/dist/voucherifysdk.esm.js.map +1 -1
- package/package.json +13 -9
- package/CHANGELOG.md +0 -663
- package/dist/voucherifysdk.umd.development.js +0 -2270
- package/dist/voucherifysdk.umd.development.js.map +0 -1
- package/dist/voucherifysdk.umd.production.min.js +0 -2
- package/dist/voucherifysdk.umd.production.min.js.map +0 -1
|
@@ -1,93 +1,94 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
AMOUNT = "AMOUNT",
|
|
4
|
-
PERCENT = "PERCENT",
|
|
5
|
-
UNIT = "UNIT",
|
|
6
|
-
FIXED = "FIXED"
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
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
|
-
|
|
33
|
-
type?: DiscountVouchersTypesEnum.AMOUNT;
|
|
34
|
-
amount_off?: number;
|
|
35
|
-
amount_off_formula?: string;
|
|
36
|
-
effect?: DiscountAmountVouchersEffectTypes;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
type?: DiscountVouchersTypesEnum.PERCENT;
|
|
40
|
-
percent_off?: number;
|
|
41
|
-
percent_off_formula?: string;
|
|
42
|
-
amount_limit?: number;
|
|
43
|
-
effect?: DiscountPercentVouchersEffectTypes;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
type?: DiscountVouchersTypesEnum.FIXED;
|
|
47
|
-
fixed_amount?: number;
|
|
48
|
-
fixed_amount_formula?: string;
|
|
49
|
-
effect?: DiscountFixedVouchersEffectTypes;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
61
|
-
type: 'UNIT';
|
|
62
|
-
} & DiscountUnitBase_;
|
|
63
|
-
|
|
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
|
-
|
|
73
|
-
type: 'UNIT';
|
|
74
|
-
effect: 'ADD_MANY_ITEMS';
|
|
75
|
-
units: DiscountUnitBase_[];
|
|
76
|
-
};
|
|
77
|
-
|
|
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
|
-
|
|
87
|
-
type: 'FIXED';
|
|
88
|
-
fixed_amount?: number;
|
|
89
|
-
fixed_amount_formula?: string;
|
|
90
|
-
effect?: DiscountFixedVouchersEffectTypes;
|
|
91
|
-
is_dynamic?: boolean;
|
|
92
|
-
};
|
|
93
|
-
|
|
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 {
|
|
2
|
-
import { VoucherType } from './Vouchers';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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 };
|
package/dist/types/Events.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { CustomerRequest } from './Customers';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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 };
|