@compassdigital/sdk.typescript 4.598.0 → 4.600.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +318 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +385 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/loyalty.d.ts +853 -0
- package/lib/interface/loyalty.d.ts.map +1 -0
- package/lib/interface/loyalty.js +5 -0
- package/lib/interface/loyalty.js.map +1 -0
- package/manifest.json +7 -0
- package/package.json +1 -1
- package/src/index.ts +945 -0
- package/src/interface/loyalty.ts +1198 -0
- package/test/client.test.ts +23 -0
|
@@ -0,0 +1,853 @@
|
|
|
1
|
+
export interface BundleResponseDto {
|
|
2
|
+
id: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
updatedAt: string;
|
|
5
|
+
deletedAt?: string | null;
|
|
6
|
+
createdBy: string;
|
|
7
|
+
realm: 'boost' | 'thrive';
|
|
8
|
+
siteId?: string | null;
|
|
9
|
+
name: string;
|
|
10
|
+
description?: string | null;
|
|
11
|
+
}
|
|
12
|
+
export interface BundlePaginationDto {
|
|
13
|
+
cursor?: string | null;
|
|
14
|
+
hasMore: boolean;
|
|
15
|
+
limit: number;
|
|
16
|
+
}
|
|
17
|
+
export interface BundleListResponseDto {
|
|
18
|
+
data: BundleResponseDto[];
|
|
19
|
+
pagination: BundlePaginationDto;
|
|
20
|
+
}
|
|
21
|
+
export interface ErrorDisplayMessage {
|
|
22
|
+
title: string;
|
|
23
|
+
description: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ErrorData {
|
|
26
|
+
statusCode: number;
|
|
27
|
+
statusText: string;
|
|
28
|
+
timestamp: string;
|
|
29
|
+
displayMessage: ErrorDisplayMessage;
|
|
30
|
+
}
|
|
31
|
+
export interface Error {
|
|
32
|
+
code: number;
|
|
33
|
+
message: string;
|
|
34
|
+
data: ErrorData;
|
|
35
|
+
}
|
|
36
|
+
export interface BundleGroupDto {
|
|
37
|
+
groupName: string;
|
|
38
|
+
minimumQuantity: number;
|
|
39
|
+
itemIds: string[];
|
|
40
|
+
}
|
|
41
|
+
export interface BundleDetailResponseDto {
|
|
42
|
+
id: string;
|
|
43
|
+
createdAt: string;
|
|
44
|
+
updatedAt: string;
|
|
45
|
+
deletedAt?: string | null;
|
|
46
|
+
createdBy: string;
|
|
47
|
+
realm: 'boost' | 'thrive';
|
|
48
|
+
siteId?: string | null;
|
|
49
|
+
name: string;
|
|
50
|
+
description?: string | null;
|
|
51
|
+
groups: BundleGroupDto[];
|
|
52
|
+
}
|
|
53
|
+
export interface CreateBundleDto {
|
|
54
|
+
realm: 'boost' | 'thrive';
|
|
55
|
+
siteId?: string;
|
|
56
|
+
name: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
groups: BundleGroupDto[];
|
|
59
|
+
}
|
|
60
|
+
export interface UpdateBundleDto {
|
|
61
|
+
realm?: 'boost' | 'thrive';
|
|
62
|
+
siteId?: string;
|
|
63
|
+
name?: string;
|
|
64
|
+
description?: string;
|
|
65
|
+
groups?: BundleGroupDto[];
|
|
66
|
+
}
|
|
67
|
+
export interface CampaignResponseDto {
|
|
68
|
+
id: string;
|
|
69
|
+
createdAt: string;
|
|
70
|
+
updatedAt: string;
|
|
71
|
+
deletedAt?: string | null;
|
|
72
|
+
createdBy: string;
|
|
73
|
+
updatedBy: string;
|
|
74
|
+
realm: 'boost' | 'thrive';
|
|
75
|
+
name: string;
|
|
76
|
+
description?: string | null;
|
|
77
|
+
type: 'promo_code' | 'auto_apply';
|
|
78
|
+
status: 'draft' | 'active' | 'paused' | 'expired' | 'archived';
|
|
79
|
+
discountType: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
80
|
+
discountScope: 'order' | 'items';
|
|
81
|
+
discountValueCents?: number | null;
|
|
82
|
+
discountPercent?: number | null;
|
|
83
|
+
appliesToCheapest: boolean;
|
|
84
|
+
maxDiscountCents?: number | null;
|
|
85
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
86
|
+
startDate?: string | null;
|
|
87
|
+
endDate?: string | null;
|
|
88
|
+
maxRedemptions?: number | null;
|
|
89
|
+
maxRedemptionsPerCustomer?: number | null;
|
|
90
|
+
maxRedemptionsDaily?: number | null;
|
|
91
|
+
maxRedemptionsPerCustomerDaily?: number | null;
|
|
92
|
+
minOrderValueCents?: number | null;
|
|
93
|
+
maxOrderValueCents?: number | null;
|
|
94
|
+
bundleId?: string | null;
|
|
95
|
+
}
|
|
96
|
+
export interface CampaignPaginationDto {
|
|
97
|
+
cursor?: string | null;
|
|
98
|
+
hasMore: boolean;
|
|
99
|
+
limit: number;
|
|
100
|
+
}
|
|
101
|
+
export interface CampaignListResponseDto {
|
|
102
|
+
data: CampaignResponseDto[];
|
|
103
|
+
pagination: CampaignPaginationDto;
|
|
104
|
+
}
|
|
105
|
+
export interface CampaignDailyScheduleResponseDto {
|
|
106
|
+
id: string;
|
|
107
|
+
campaignId: string;
|
|
108
|
+
dayOfWeek: 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
|
|
109
|
+
active: boolean;
|
|
110
|
+
startTime: string;
|
|
111
|
+
endTime: string;
|
|
112
|
+
}
|
|
113
|
+
export interface CampaignEligibilityResponseDto {
|
|
114
|
+
id: string;
|
|
115
|
+
campaignId: string;
|
|
116
|
+
eligibilityType: 'everyone' | 'meal_plan' | 'badge_pay' | 'sso_group' | 'segment';
|
|
117
|
+
segmentId?: string | null;
|
|
118
|
+
maxRedemptionsPerCustomer?: number | null;
|
|
119
|
+
maxRedemptionsPerCustomerDaily?: number | null;
|
|
120
|
+
}
|
|
121
|
+
export interface CampaignSiteScopeResponseDto {
|
|
122
|
+
campaignId: string;
|
|
123
|
+
siteId: string;
|
|
124
|
+
excluded: boolean;
|
|
125
|
+
}
|
|
126
|
+
export interface CampaignStationScopeResponseDto {
|
|
127
|
+
campaignId: string;
|
|
128
|
+
siteId: string;
|
|
129
|
+
stationId: string;
|
|
130
|
+
excluded: boolean;
|
|
131
|
+
}
|
|
132
|
+
export interface CampaignItemTargetResponseDto {
|
|
133
|
+
id: string;
|
|
134
|
+
campaignId: string;
|
|
135
|
+
siteId?: string | null;
|
|
136
|
+
stationId?: string | null;
|
|
137
|
+
menuId?: string | null;
|
|
138
|
+
categoryId?: string | null;
|
|
139
|
+
itemId?: string | null;
|
|
140
|
+
maxDiscountCents?: number | null;
|
|
141
|
+
}
|
|
142
|
+
export interface CampaignDetailResponseDto {
|
|
143
|
+
id: string;
|
|
144
|
+
createdAt: string;
|
|
145
|
+
updatedAt: string;
|
|
146
|
+
deletedAt?: string | null;
|
|
147
|
+
createdBy: string;
|
|
148
|
+
updatedBy: string;
|
|
149
|
+
realm: 'boost' | 'thrive';
|
|
150
|
+
name: string;
|
|
151
|
+
description?: string | null;
|
|
152
|
+
type: 'promo_code' | 'auto_apply';
|
|
153
|
+
status: 'draft' | 'active' | 'paused' | 'expired' | 'archived';
|
|
154
|
+
discountType: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
155
|
+
discountScope: 'order' | 'items';
|
|
156
|
+
discountValueCents?: number | null;
|
|
157
|
+
discountPercent?: number | null;
|
|
158
|
+
appliesToCheapest: boolean;
|
|
159
|
+
maxDiscountCents?: number | null;
|
|
160
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
161
|
+
startDate?: string | null;
|
|
162
|
+
endDate?: string | null;
|
|
163
|
+
maxRedemptions?: number | null;
|
|
164
|
+
maxRedemptionsPerCustomer?: number | null;
|
|
165
|
+
maxRedemptionsDaily?: number | null;
|
|
166
|
+
maxRedemptionsPerCustomerDaily?: number | null;
|
|
167
|
+
minOrderValueCents?: number | null;
|
|
168
|
+
maxOrderValueCents?: number | null;
|
|
169
|
+
bundleId?: string | null;
|
|
170
|
+
dailySchedule: CampaignDailyScheduleResponseDto[];
|
|
171
|
+
eligibility: CampaignEligibilityResponseDto[];
|
|
172
|
+
siteScopes: CampaignSiteScopeResponseDto[];
|
|
173
|
+
stationScopes: CampaignStationScopeResponseDto[];
|
|
174
|
+
itemTargets: CampaignItemTargetResponseDto[];
|
|
175
|
+
salesChannels: ('mobile' | 'web' | 'kiosk' | 'pos')[];
|
|
176
|
+
originSystems: ('native' | 'volante' | 'nextstep' | 'agilysys')[];
|
|
177
|
+
paymentRestrictions: ('meal_plan' | 'badge_pay' | 'credit_card' | 'digital_wallet_pay')[];
|
|
178
|
+
}
|
|
179
|
+
export interface DailyScheduleDto {
|
|
180
|
+
dayOfWeek: 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
|
|
181
|
+
active: boolean;
|
|
182
|
+
startTime: string;
|
|
183
|
+
endTime: string;
|
|
184
|
+
}
|
|
185
|
+
export interface EligibilityDto {
|
|
186
|
+
eligibilityType: 'everyone' | 'meal_plan' | 'badge_pay' | 'sso_group' | 'segment';
|
|
187
|
+
segmentId?: string;
|
|
188
|
+
maxRedemptionsPerCustomer?: number;
|
|
189
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
190
|
+
}
|
|
191
|
+
export interface SiteScopeDto {
|
|
192
|
+
siteId: string;
|
|
193
|
+
excluded?: boolean;
|
|
194
|
+
}
|
|
195
|
+
export interface StationScopeDto {
|
|
196
|
+
siteId: string;
|
|
197
|
+
stationId: string;
|
|
198
|
+
excluded?: boolean;
|
|
199
|
+
}
|
|
200
|
+
export interface ItemTargetDto {
|
|
201
|
+
siteId?: string;
|
|
202
|
+
stationId?: string;
|
|
203
|
+
menuId?: string;
|
|
204
|
+
categoryId?: string;
|
|
205
|
+
itemId?: string;
|
|
206
|
+
maxDiscountCents?: number;
|
|
207
|
+
}
|
|
208
|
+
export interface CreateCampaignDto {
|
|
209
|
+
realm: 'boost' | 'thrive';
|
|
210
|
+
name: string;
|
|
211
|
+
description?: string;
|
|
212
|
+
type: 'promo_code' | 'auto_apply';
|
|
213
|
+
discountType: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
214
|
+
discountScope: 'order' | 'items';
|
|
215
|
+
discountValueCents?: number;
|
|
216
|
+
discountPercent?: number;
|
|
217
|
+
appliesToCheapest?: boolean;
|
|
218
|
+
maxDiscountCents?: number;
|
|
219
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
220
|
+
startDate?: string;
|
|
221
|
+
endDate?: string;
|
|
222
|
+
maxRedemptions?: number;
|
|
223
|
+
maxRedemptionsPerCustomer?: number;
|
|
224
|
+
maxRedemptionsDaily?: number;
|
|
225
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
226
|
+
minOrderValueCents?: number;
|
|
227
|
+
maxOrderValueCents?: number;
|
|
228
|
+
dailySchedule?: DailyScheduleDto[];
|
|
229
|
+
eligibility?: EligibilityDto[];
|
|
230
|
+
siteScopes?: SiteScopeDto[];
|
|
231
|
+
stationScopes?: StationScopeDto[];
|
|
232
|
+
itemTargets?: ItemTargetDto[];
|
|
233
|
+
bundleId?: string;
|
|
234
|
+
salesChannels?: ('mobile' | 'web' | 'kiosk' | 'pos')[];
|
|
235
|
+
originSystems?: ('native' | 'volante' | 'nextstep' | 'agilysys')[];
|
|
236
|
+
paymentRestrictions?: ('meal_plan' | 'badge_pay' | 'credit_card' | 'digital_wallet_pay')[];
|
|
237
|
+
}
|
|
238
|
+
export interface UpdateCampaignDto {
|
|
239
|
+
realm?: 'boost' | 'thrive';
|
|
240
|
+
name?: string;
|
|
241
|
+
description?: string;
|
|
242
|
+
type?: 'promo_code' | 'auto_apply';
|
|
243
|
+
discountType?: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
244
|
+
discountScope?: 'order' | 'items';
|
|
245
|
+
discountValueCents?: number;
|
|
246
|
+
discountPercent?: number;
|
|
247
|
+
appliesToCheapest?: boolean;
|
|
248
|
+
maxDiscountCents?: number;
|
|
249
|
+
codeType?: 'open' | 'personal' | 'auto_applied';
|
|
250
|
+
startDate?: string;
|
|
251
|
+
endDate?: string;
|
|
252
|
+
maxRedemptions?: number;
|
|
253
|
+
maxRedemptionsPerCustomer?: number;
|
|
254
|
+
maxRedemptionsDaily?: number;
|
|
255
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
256
|
+
minOrderValueCents?: number;
|
|
257
|
+
maxOrderValueCents?: number;
|
|
258
|
+
dailySchedule?: DailyScheduleDto[];
|
|
259
|
+
eligibility?: EligibilityDto[];
|
|
260
|
+
siteScopes?: SiteScopeDto[];
|
|
261
|
+
stationScopes?: StationScopeDto[];
|
|
262
|
+
itemTargets?: ItemTargetDto[];
|
|
263
|
+
bundleId?: string;
|
|
264
|
+
salesChannels?: ('mobile' | 'web' | 'kiosk' | 'pos')[];
|
|
265
|
+
originSystems?: ('native' | 'volante' | 'nextstep' | 'agilysys')[];
|
|
266
|
+
paymentRestrictions?: ('meal_plan' | 'badge_pay' | 'credit_card' | 'digital_wallet_pay')[];
|
|
267
|
+
}
|
|
268
|
+
export interface UpdateCampaignStatusDto {
|
|
269
|
+
status: 'draft' | 'active' | 'paused' | 'expired' | 'archived';
|
|
270
|
+
reason?: string;
|
|
271
|
+
}
|
|
272
|
+
export interface VoucherResponseDto {
|
|
273
|
+
id: string;
|
|
274
|
+
createdAt: string;
|
|
275
|
+
updatedAt: string;
|
|
276
|
+
deletedAt?: string | null;
|
|
277
|
+
campaignId: string;
|
|
278
|
+
realm: 'boost' | 'thrive';
|
|
279
|
+
code: string;
|
|
280
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
281
|
+
customerId?: string | null;
|
|
282
|
+
status: string;
|
|
283
|
+
expiresAt?: string | null;
|
|
284
|
+
issuedBy?: string | null;
|
|
285
|
+
issueReason?: string | null;
|
|
286
|
+
revokedAt?: string | null;
|
|
287
|
+
revokedBy?: string | null;
|
|
288
|
+
revokeReason?: string | null;
|
|
289
|
+
source?: string;
|
|
290
|
+
campaignName?: string;
|
|
291
|
+
campaignType?: string;
|
|
292
|
+
redemptionCount?: number;
|
|
293
|
+
}
|
|
294
|
+
export interface VoucherPaginationDto {
|
|
295
|
+
cursor?: string | null;
|
|
296
|
+
hasMore: boolean;
|
|
297
|
+
limit: number;
|
|
298
|
+
}
|
|
299
|
+
export interface VoucherListResponseDto {
|
|
300
|
+
data: VoucherResponseDto[];
|
|
301
|
+
pagination: VoucherPaginationDto;
|
|
302
|
+
}
|
|
303
|
+
export interface CreateVoucherDto {
|
|
304
|
+
campaignId: string;
|
|
305
|
+
code: string;
|
|
306
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
307
|
+
customerId?: string;
|
|
308
|
+
expiresAt?: string;
|
|
309
|
+
issueReason?: string;
|
|
310
|
+
}
|
|
311
|
+
export interface UpdateVoucherDto {
|
|
312
|
+
expiresAt?: string;
|
|
313
|
+
customerId?: string;
|
|
314
|
+
}
|
|
315
|
+
export interface RevokeVoucherDto {
|
|
316
|
+
reason: string;
|
|
317
|
+
}
|
|
318
|
+
export interface BatchVoucherDto {
|
|
319
|
+
campaignId: string;
|
|
320
|
+
count: number;
|
|
321
|
+
codeType: 'open' | 'personal';
|
|
322
|
+
prefix?: string;
|
|
323
|
+
expiresAt?: string;
|
|
324
|
+
customerIds?: string[];
|
|
325
|
+
}
|
|
326
|
+
export interface BatchVoucherResponseDto {
|
|
327
|
+
codePoolId: string;
|
|
328
|
+
count: number;
|
|
329
|
+
}
|
|
330
|
+
export interface RedemptionItemResponseDto {
|
|
331
|
+
id: string;
|
|
332
|
+
itemId: string;
|
|
333
|
+
itemName?: string | null;
|
|
334
|
+
originalPriceCents: number;
|
|
335
|
+
discountAmountCents: number;
|
|
336
|
+
}
|
|
337
|
+
export interface VoucherDiscountResponseDto {
|
|
338
|
+
type: string;
|
|
339
|
+
amount_off: number;
|
|
340
|
+
percent_off: number;
|
|
341
|
+
}
|
|
342
|
+
export interface VoucherRedemptionVoucherDto {
|
|
343
|
+
id: string;
|
|
344
|
+
code: string;
|
|
345
|
+
discount: VoucherDiscountResponseDto;
|
|
346
|
+
}
|
|
347
|
+
export interface RedemptionResponseDto {
|
|
348
|
+
id: string;
|
|
349
|
+
createdAt: string;
|
|
350
|
+
voucherId?: string | null;
|
|
351
|
+
customerId?: string | null;
|
|
352
|
+
orderId?: string | null;
|
|
353
|
+
siteId?: string | null;
|
|
354
|
+
stationId?: string | null;
|
|
355
|
+
realm?: string;
|
|
356
|
+
discountAmountCents?: number;
|
|
357
|
+
orderTotalCents?: number;
|
|
358
|
+
status?: string;
|
|
359
|
+
rolledBackAt?: string | null;
|
|
360
|
+
rollbackReason?: string | null;
|
|
361
|
+
externalRedemptionId?: string | null;
|
|
362
|
+
items?: RedemptionItemResponseDto[];
|
|
363
|
+
date?: string;
|
|
364
|
+
result?: string;
|
|
365
|
+
object?: string;
|
|
366
|
+
app?: string;
|
|
367
|
+
voucher?: VoucherRedemptionVoucherDto;
|
|
368
|
+
}
|
|
369
|
+
export interface RedemptionListResponseDto {
|
|
370
|
+
data: RedemptionResponseDto[];
|
|
371
|
+
pagination: VoucherPaginationDto;
|
|
372
|
+
}
|
|
373
|
+
export interface VoucherCustomerDto {
|
|
374
|
+
source_id?: string;
|
|
375
|
+
email?: string;
|
|
376
|
+
}
|
|
377
|
+
export interface VoucherOrderItemProductMetadataDto {
|
|
378
|
+
item_name?: string;
|
|
379
|
+
}
|
|
380
|
+
export interface VoucherOrderItemProductDto {
|
|
381
|
+
metadata?: VoucherOrderItemProductMetadataDto;
|
|
382
|
+
}
|
|
383
|
+
export interface VoucherOrderItemDto {
|
|
384
|
+
source_id?: string;
|
|
385
|
+
product_id?: string;
|
|
386
|
+
quantity?: number;
|
|
387
|
+
price?: number;
|
|
388
|
+
product?: VoucherOrderItemProductDto;
|
|
389
|
+
}
|
|
390
|
+
export interface VoucherOrderMetadataDto {
|
|
391
|
+
order_id?: string;
|
|
392
|
+
brand_id?: string;
|
|
393
|
+
site_id?: string;
|
|
394
|
+
location_group_id?: string;
|
|
395
|
+
tz?: string;
|
|
396
|
+
}
|
|
397
|
+
export interface VoucherOrderDto {
|
|
398
|
+
source_id?: string;
|
|
399
|
+
items?: VoucherOrderItemDto[];
|
|
400
|
+
metadata?: VoucherOrderMetadataDto;
|
|
401
|
+
}
|
|
402
|
+
export interface VoucherOperationDto {
|
|
403
|
+
codes: string[];
|
|
404
|
+
customer?: VoucherCustomerDto;
|
|
405
|
+
order?: VoucherOrderDto;
|
|
406
|
+
}
|
|
407
|
+
export interface VoucherErrorResponseDto {
|
|
408
|
+
message: string;
|
|
409
|
+
}
|
|
410
|
+
export interface VoucherOperationOrderResponseDto {
|
|
411
|
+
total_discount_amount: number;
|
|
412
|
+
total_applied_discount_amount: number;
|
|
413
|
+
}
|
|
414
|
+
export interface VoucherOperationResultResponseDto {
|
|
415
|
+
discount?: VoucherDiscountResponseDto;
|
|
416
|
+
error?: VoucherErrorResponseDto;
|
|
417
|
+
}
|
|
418
|
+
export interface VoucherRedeemableResponseDto {
|
|
419
|
+
status: string;
|
|
420
|
+
id: string;
|
|
421
|
+
object: string;
|
|
422
|
+
order: VoucherOperationOrderResponseDto;
|
|
423
|
+
result: VoucherOperationResultResponseDto;
|
|
424
|
+
}
|
|
425
|
+
export interface VoucherOperationResponseDto {
|
|
426
|
+
code?: string;
|
|
427
|
+
valid?: boolean;
|
|
428
|
+
success?: boolean;
|
|
429
|
+
app?: string;
|
|
430
|
+
discount?: VoucherDiscountResponseDto;
|
|
431
|
+
provider_data?: Record<string, any>;
|
|
432
|
+
error?: VoucherErrorResponseDto;
|
|
433
|
+
redeemables?: VoucherRedeemableResponseDto[];
|
|
434
|
+
redemptions?: RedemptionResponseDto[];
|
|
435
|
+
id?: string;
|
|
436
|
+
date?: string;
|
|
437
|
+
result?: string;
|
|
438
|
+
object?: string;
|
|
439
|
+
voucher?: VoucherRedemptionVoucherDto;
|
|
440
|
+
}
|
|
441
|
+
export interface SegmentRuleDto {
|
|
442
|
+
attribute: string;
|
|
443
|
+
operator: string;
|
|
444
|
+
value: string;
|
|
445
|
+
}
|
|
446
|
+
export interface SegmentResponseDto {
|
|
447
|
+
id: string;
|
|
448
|
+
createdAt: string;
|
|
449
|
+
updatedAt: string;
|
|
450
|
+
deletedAt?: string | null;
|
|
451
|
+
createdBy: string;
|
|
452
|
+
realm: 'boost' | 'thrive';
|
|
453
|
+
name: string;
|
|
454
|
+
description?: string | null;
|
|
455
|
+
type: 'static_list' | 'attribute_rule' | 'sso';
|
|
456
|
+
ownership: 'system' | 'custom';
|
|
457
|
+
editable: boolean;
|
|
458
|
+
deletable: boolean;
|
|
459
|
+
ruleJson?: SegmentRuleDto;
|
|
460
|
+
memberCount?: number;
|
|
461
|
+
}
|
|
462
|
+
export interface SegmentPaginationDto {
|
|
463
|
+
cursor?: string | null;
|
|
464
|
+
hasMore: boolean;
|
|
465
|
+
limit: number;
|
|
466
|
+
}
|
|
467
|
+
export interface SegmentListResponseDto {
|
|
468
|
+
data: SegmentResponseDto[];
|
|
469
|
+
pagination: SegmentPaginationDto;
|
|
470
|
+
}
|
|
471
|
+
export interface SegmentAttributeResponseDto {
|
|
472
|
+
key: string;
|
|
473
|
+
label: string;
|
|
474
|
+
}
|
|
475
|
+
export interface SegmentPreviewCountResponseDto {
|
|
476
|
+
count: number;
|
|
477
|
+
}
|
|
478
|
+
export interface CreateSegmentDto {
|
|
479
|
+
realm: 'boost' | 'thrive';
|
|
480
|
+
name: string;
|
|
481
|
+
description?: string;
|
|
482
|
+
type: 'static_list' | 'attribute_rule' | 'sso';
|
|
483
|
+
ruleJson?: SegmentRuleDto;
|
|
484
|
+
customerIds?: string[];
|
|
485
|
+
}
|
|
486
|
+
export interface UpdateSegmentDto {
|
|
487
|
+
name?: string;
|
|
488
|
+
description?: string;
|
|
489
|
+
ruleJson?: SegmentRuleDto;
|
|
490
|
+
}
|
|
491
|
+
export interface SegmentMemberResponseDto {
|
|
492
|
+
customerId: string;
|
|
493
|
+
addedAt: string;
|
|
494
|
+
addedBy: string;
|
|
495
|
+
}
|
|
496
|
+
export interface SegmentMembersListResponseDto {
|
|
497
|
+
data: SegmentMemberResponseDto[];
|
|
498
|
+
pagination: SegmentPaginationDto;
|
|
499
|
+
}
|
|
500
|
+
export interface SegmentMembersDto {
|
|
501
|
+
customerIds: string[];
|
|
502
|
+
}
|
|
503
|
+
export interface AddSegmentMembersResponseDto {
|
|
504
|
+
added: number;
|
|
505
|
+
}
|
|
506
|
+
export interface RemoveSegmentMembersResponseDto {
|
|
507
|
+
removed: number;
|
|
508
|
+
}
|
|
509
|
+
export interface RollbackRedemptionDto {
|
|
510
|
+
reason: string;
|
|
511
|
+
}
|
|
512
|
+
export interface RewardResponseDto {
|
|
513
|
+
id: string;
|
|
514
|
+
createdAt: string;
|
|
515
|
+
updatedAt: string;
|
|
516
|
+
deletedAt?: string | null;
|
|
517
|
+
createdBy: string;
|
|
518
|
+
realm: 'boost' | 'thrive';
|
|
519
|
+
siteId?: string | null;
|
|
520
|
+
name: string;
|
|
521
|
+
description?: string | null;
|
|
522
|
+
status: 'active' | 'paused' | 'archived';
|
|
523
|
+
earningRuleCount?: number;
|
|
524
|
+
}
|
|
525
|
+
export interface RewardPaginationDto {
|
|
526
|
+
cursor?: string | null;
|
|
527
|
+
hasMore: boolean;
|
|
528
|
+
limit: number;
|
|
529
|
+
}
|
|
530
|
+
export interface RewardListResponseDto {
|
|
531
|
+
data: RewardResponseDto[];
|
|
532
|
+
pagination: RewardPaginationDto;
|
|
533
|
+
}
|
|
534
|
+
export interface BrandExclusionDto {
|
|
535
|
+
siteId: string;
|
|
536
|
+
stationId: string;
|
|
537
|
+
}
|
|
538
|
+
export interface EarningRuleDto {
|
|
539
|
+
eventType: 'order_placed' | 'item_purchased' | 'amount_spent';
|
|
540
|
+
points: number;
|
|
541
|
+
spendThresholdCents?: number;
|
|
542
|
+
siteId?: string;
|
|
543
|
+
itemId?: string;
|
|
544
|
+
brandExclusions?: BrandExclusionDto[];
|
|
545
|
+
}
|
|
546
|
+
export interface MilestoneDto {
|
|
547
|
+
pointsRequired: number;
|
|
548
|
+
campaignId: string;
|
|
549
|
+
resetsAfterMilestone: boolean;
|
|
550
|
+
maxRewardCount?: number;
|
|
551
|
+
}
|
|
552
|
+
export interface RewardDetailResponseDto {
|
|
553
|
+
id: string;
|
|
554
|
+
createdAt: string;
|
|
555
|
+
updatedAt: string;
|
|
556
|
+
deletedAt?: string | null;
|
|
557
|
+
createdBy: string;
|
|
558
|
+
realm: 'boost' | 'thrive';
|
|
559
|
+
siteId?: string | null;
|
|
560
|
+
name: string;
|
|
561
|
+
description?: string | null;
|
|
562
|
+
status: 'active' | 'paused' | 'archived';
|
|
563
|
+
earningRuleCount?: number;
|
|
564
|
+
earningRules: EarningRuleDto[];
|
|
565
|
+
milestones: MilestoneDto[];
|
|
566
|
+
}
|
|
567
|
+
export interface CreateRewardDto {
|
|
568
|
+
realm: 'boost' | 'thrive';
|
|
569
|
+
siteId?: string;
|
|
570
|
+
name: string;
|
|
571
|
+
description?: string;
|
|
572
|
+
earningRules?: EarningRuleDto[];
|
|
573
|
+
milestones?: MilestoneDto[];
|
|
574
|
+
}
|
|
575
|
+
export interface UpdateRewardDto {
|
|
576
|
+
realm?: 'boost' | 'thrive';
|
|
577
|
+
siteId?: string;
|
|
578
|
+
name?: string;
|
|
579
|
+
description?: string;
|
|
580
|
+
earningRules?: EarningRuleDto[];
|
|
581
|
+
milestones?: MilestoneDto[];
|
|
582
|
+
}
|
|
583
|
+
export interface UpdateRewardStatusDto {
|
|
584
|
+
status: 'active' | 'paused' | 'archived';
|
|
585
|
+
}
|
|
586
|
+
export interface RewardCardResponseDto {
|
|
587
|
+
id: string;
|
|
588
|
+
createdAt: string;
|
|
589
|
+
updatedAt: string;
|
|
590
|
+
rewardId: string;
|
|
591
|
+
customerId: string;
|
|
592
|
+
pointsBalance: number;
|
|
593
|
+
lifetimePoints: number;
|
|
594
|
+
status: string;
|
|
595
|
+
}
|
|
596
|
+
export interface RewardCardListResponseDto {
|
|
597
|
+
data: RewardCardResponseDto[];
|
|
598
|
+
pagination: RewardPaginationDto;
|
|
599
|
+
}
|
|
600
|
+
export interface RewardEventResponseDto {
|
|
601
|
+
id: string;
|
|
602
|
+
createdAt: string;
|
|
603
|
+
cardId: string;
|
|
604
|
+
eventType: 'order_placed' | 'item_purchased' | 'amount_spent';
|
|
605
|
+
pointsDelta: number;
|
|
606
|
+
orderId?: string | null;
|
|
607
|
+
description?: string | null;
|
|
608
|
+
adjustedBy?: string | null;
|
|
609
|
+
}
|
|
610
|
+
export interface RewardCardDetailResponseDto {
|
|
611
|
+
id: string;
|
|
612
|
+
createdAt: string;
|
|
613
|
+
updatedAt: string;
|
|
614
|
+
rewardId: string;
|
|
615
|
+
customerId: string;
|
|
616
|
+
pointsBalance: number;
|
|
617
|
+
lifetimePoints: number;
|
|
618
|
+
status: string;
|
|
619
|
+
events: RewardEventResponseDto[];
|
|
620
|
+
}
|
|
621
|
+
export interface AdjustPointsDto {
|
|
622
|
+
pointsDelta: number;
|
|
623
|
+
description: string;
|
|
624
|
+
}
|
|
625
|
+
export interface EarnOrderItemDto {
|
|
626
|
+
id: string;
|
|
627
|
+
quantity: number;
|
|
628
|
+
priceCents?: number;
|
|
629
|
+
}
|
|
630
|
+
export interface EarnOrderDto {
|
|
631
|
+
orderId: string;
|
|
632
|
+
customerId: string;
|
|
633
|
+
realm: 'boost' | 'thrive';
|
|
634
|
+
siteId: string;
|
|
635
|
+
brandId: string;
|
|
636
|
+
amountCents: number;
|
|
637
|
+
items: EarnOrderItemDto[];
|
|
638
|
+
email?: string;
|
|
639
|
+
metadata?: Record<string, any>;
|
|
640
|
+
}
|
|
641
|
+
export interface EarnOrderResponseDto {
|
|
642
|
+
rewardId?: string | null;
|
|
643
|
+
rewardIds?: string[];
|
|
644
|
+
alreadyProcessed: boolean;
|
|
645
|
+
pointsAwarded: number;
|
|
646
|
+
issuedVoucherCodes: string[];
|
|
647
|
+
}
|
|
648
|
+
export interface GetLoyaltyBundlesQuery {
|
|
649
|
+
limit?: number;
|
|
650
|
+
cursor?: string;
|
|
651
|
+
realm?: 'boost' | 'thrive';
|
|
652
|
+
siteId?: string;
|
|
653
|
+
siteIds?: string[];
|
|
654
|
+
name?: string;
|
|
655
|
+
}
|
|
656
|
+
export type GetLoyaltyBundlesResponse = BundleListResponseDto;
|
|
657
|
+
export type PostLoyaltyBundleBody = CreateBundleDto;
|
|
658
|
+
export type PostLoyaltyBundleResponse = BundleDetailResponseDto;
|
|
659
|
+
export interface GetLoyaltyBundlePath {
|
|
660
|
+
id: string;
|
|
661
|
+
}
|
|
662
|
+
export type GetLoyaltyBundleResponse = BundleDetailResponseDto;
|
|
663
|
+
export interface PatchLoyaltyBundlePath {
|
|
664
|
+
id: string;
|
|
665
|
+
}
|
|
666
|
+
export type PatchLoyaltyBundleBody = UpdateBundleDto;
|
|
667
|
+
export type PatchLoyaltyBundleResponse = BundleDetailResponseDto;
|
|
668
|
+
export interface DeleteLoyaltyBundlePath {
|
|
669
|
+
id: string;
|
|
670
|
+
}
|
|
671
|
+
export type DeleteLoyaltyBundleResponse = {};
|
|
672
|
+
export interface GetLoyaltyCampaignsQuery {
|
|
673
|
+
limit?: number;
|
|
674
|
+
cursor?: string;
|
|
675
|
+
realm?: 'boost' | 'thrive';
|
|
676
|
+
status?: 'draft' | 'active' | 'paused' | 'expired' | 'archived';
|
|
677
|
+
type?: 'promo_code' | 'auto_apply';
|
|
678
|
+
name?: string;
|
|
679
|
+
startDateFrom?: string;
|
|
680
|
+
startDateTo?: string;
|
|
681
|
+
endDateFrom?: string;
|
|
682
|
+
endDateTo?: string;
|
|
683
|
+
sortBy?: 'name' | 'createdAt' | 'startDate' | 'status';
|
|
684
|
+
sortOrder?: 'ASC' | 'DESC';
|
|
685
|
+
hasRewards?: boolean;
|
|
686
|
+
}
|
|
687
|
+
export type GetLoyaltyCampaignsResponse = CampaignListResponseDto;
|
|
688
|
+
export type PostLoyaltyCampaignBody = CreateCampaignDto;
|
|
689
|
+
export type PostLoyaltyCampaignResponse = CampaignDetailResponseDto;
|
|
690
|
+
export interface GetLoyaltyCampaignPath {
|
|
691
|
+
id: string;
|
|
692
|
+
}
|
|
693
|
+
export type GetLoyaltyCampaignResponse = CampaignDetailResponseDto;
|
|
694
|
+
export interface PutLoyaltyCampaignPath {
|
|
695
|
+
id: string;
|
|
696
|
+
}
|
|
697
|
+
export type PutLoyaltyCampaignBody = UpdateCampaignDto;
|
|
698
|
+
export type PutLoyaltyCampaignResponse = CampaignDetailResponseDto;
|
|
699
|
+
export interface DeleteLoyaltyCampaignPath {
|
|
700
|
+
id: string;
|
|
701
|
+
}
|
|
702
|
+
export type DeleteLoyaltyCampaignResponse = {};
|
|
703
|
+
export interface PatchLoyaltyCampaignStatusPath {
|
|
704
|
+
id: string;
|
|
705
|
+
}
|
|
706
|
+
export type PatchLoyaltyCampaignStatusBody = UpdateCampaignStatusDto;
|
|
707
|
+
export type PatchLoyaltyCampaignStatusResponse = CampaignDetailResponseDto;
|
|
708
|
+
export interface PostLoyaltyCampaignClonePath {
|
|
709
|
+
id: string;
|
|
710
|
+
}
|
|
711
|
+
export type PostLoyaltyCampaignCloneResponse = CampaignDetailResponseDto;
|
|
712
|
+
export interface GetLoyaltyVouchersQuery {
|
|
713
|
+
limit?: number;
|
|
714
|
+
cursor?: string;
|
|
715
|
+
campaignId?: string;
|
|
716
|
+
realm?: 'boost' | 'thrive';
|
|
717
|
+
status?: 'active' | 'redeemed' | 'expired' | 'revoked';
|
|
718
|
+
code?: string;
|
|
719
|
+
codeType?: 'open' | 'personal' | 'auto_applied';
|
|
720
|
+
customerId?: string;
|
|
721
|
+
}
|
|
722
|
+
export type GetLoyaltyVouchersResponse = VoucherListResponseDto;
|
|
723
|
+
export type PostLoyaltyVoucherBody = CreateVoucherDto;
|
|
724
|
+
export type PostLoyaltyVoucherResponse = VoucherResponseDto;
|
|
725
|
+
export interface GetLoyaltyVoucherPath {
|
|
726
|
+
id: string;
|
|
727
|
+
}
|
|
728
|
+
export type GetLoyaltyVoucherResponse = VoucherResponseDto;
|
|
729
|
+
export interface PutLoyaltyVoucherPath {
|
|
730
|
+
id: string;
|
|
731
|
+
}
|
|
732
|
+
export type PutLoyaltyVoucherBody = UpdateVoucherDto;
|
|
733
|
+
export type PutLoyaltyVoucherResponse = VoucherResponseDto;
|
|
734
|
+
export interface DeleteLoyaltyVoucherPath {
|
|
735
|
+
id: string;
|
|
736
|
+
}
|
|
737
|
+
export type DeleteLoyaltyVoucherResponse = {};
|
|
738
|
+
export interface PostLoyaltyVoucherRevokePath {
|
|
739
|
+
id: string;
|
|
740
|
+
}
|
|
741
|
+
export type PostLoyaltyVoucherRevokeBody = RevokeVoucherDto;
|
|
742
|
+
export type PostLoyaltyVoucherRevokeResponse = VoucherResponseDto;
|
|
743
|
+
export type PostLoyaltyVouchersBatchBody = BatchVoucherDto;
|
|
744
|
+
export type PostLoyaltyVouchersBatchResponse = BatchVoucherResponseDto;
|
|
745
|
+
export interface GetLoyaltyVoucherRedemptionsPath {
|
|
746
|
+
id: string;
|
|
747
|
+
}
|
|
748
|
+
export interface GetLoyaltyVoucherRedemptionsQuery {
|
|
749
|
+
limit?: number;
|
|
750
|
+
cursor?: string;
|
|
751
|
+
}
|
|
752
|
+
export type GetLoyaltyVoucherRedemptionsResponse = RedemptionListResponseDto;
|
|
753
|
+
export type PostLoyaltyVouchersValidateBody = VoucherOperationDto;
|
|
754
|
+
export type PostLoyaltyVouchersValidateResponse = VoucherOperationResponseDto;
|
|
755
|
+
export type PostLoyaltyVouchersRedeemBody = VoucherOperationDto;
|
|
756
|
+
export type PostLoyaltyVouchersRedeemResponse = VoucherOperationResponseDto;
|
|
757
|
+
export interface GetLoyaltySegmentsQuery {
|
|
758
|
+
limit?: number;
|
|
759
|
+
cursor?: string;
|
|
760
|
+
realm?: 'boost' | 'thrive';
|
|
761
|
+
type?: 'static_list' | 'attribute_rule' | 'sso';
|
|
762
|
+
ownership?: 'system' | 'custom';
|
|
763
|
+
name?: string;
|
|
764
|
+
}
|
|
765
|
+
export type GetLoyaltySegmentsResponse = SegmentListResponseDto;
|
|
766
|
+
export type PostLoyaltySegmentBody = CreateSegmentDto;
|
|
767
|
+
export type PostLoyaltySegmentResponse = SegmentResponseDto;
|
|
768
|
+
export type GetLoyaltySegmentAttributesResponse = SegmentAttributeResponseDto[];
|
|
769
|
+
export type PostLoyaltySegmentPreviewCountBody = SegmentRuleDto;
|
|
770
|
+
export type PostLoyaltySegmentPreviewCountResponse = SegmentPreviewCountResponseDto;
|
|
771
|
+
export interface GetLoyaltySegmentPath {
|
|
772
|
+
id: string;
|
|
773
|
+
}
|
|
774
|
+
export type GetLoyaltySegmentResponse = SegmentResponseDto;
|
|
775
|
+
export interface PatchLoyaltySegmentPath {
|
|
776
|
+
id: string;
|
|
777
|
+
}
|
|
778
|
+
export type PatchLoyaltySegmentBody = UpdateSegmentDto;
|
|
779
|
+
export type PatchLoyaltySegmentResponse = SegmentResponseDto;
|
|
780
|
+
export interface DeleteLoyaltySegmentPath {
|
|
781
|
+
id: string;
|
|
782
|
+
}
|
|
783
|
+
export type DeleteLoyaltySegmentResponse = {};
|
|
784
|
+
export interface GetLoyaltySegmentMembersPath {
|
|
785
|
+
id: string;
|
|
786
|
+
}
|
|
787
|
+
export interface GetLoyaltySegmentMembersQuery {
|
|
788
|
+
limit?: number;
|
|
789
|
+
cursor?: string;
|
|
790
|
+
}
|
|
791
|
+
export type GetLoyaltySegmentMembersResponse = SegmentMembersListResponseDto;
|
|
792
|
+
export interface PostLoyaltySegmentMembersPath {
|
|
793
|
+
id: string;
|
|
794
|
+
}
|
|
795
|
+
export type PostLoyaltySegmentMembersBody = SegmentMembersDto;
|
|
796
|
+
export type PostLoyaltySegmentMembersResponse = AddSegmentMembersResponseDto;
|
|
797
|
+
export interface DeleteLoyaltySegmentMembersPath {
|
|
798
|
+
id: string;
|
|
799
|
+
}
|
|
800
|
+
export type DeleteLoyaltySegmentMembersBody = SegmentMembersDto;
|
|
801
|
+
export type DeleteLoyaltySegmentMembersResponse = RemoveSegmentMembersResponseDto;
|
|
802
|
+
export interface PostLoyaltyRedemptionRollbackPath {
|
|
803
|
+
id: string;
|
|
804
|
+
}
|
|
805
|
+
export type PostLoyaltyRedemptionRollbackBody = RollbackRedemptionDto;
|
|
806
|
+
export type PostLoyaltyRedemptionRollbackResponse = RedemptionResponseDto;
|
|
807
|
+
export interface GetLoyaltyRewardsQuery {
|
|
808
|
+
limit?: number;
|
|
809
|
+
cursor?: string;
|
|
810
|
+
query?: string;
|
|
811
|
+
realm?: 'boost' | 'thrive';
|
|
812
|
+
siteId?: string;
|
|
813
|
+
campaignId?: string;
|
|
814
|
+
status?: 'active' | 'paused' | 'archived';
|
|
815
|
+
}
|
|
816
|
+
export type GetLoyaltyRewardsResponse = RewardListResponseDto;
|
|
817
|
+
export type PostLoyaltyRewardBody = CreateRewardDto;
|
|
818
|
+
export type PostLoyaltyRewardResponse = RewardDetailResponseDto;
|
|
819
|
+
export interface GetLoyaltyRewardPath {
|
|
820
|
+
id: string;
|
|
821
|
+
}
|
|
822
|
+
export type GetLoyaltyRewardResponse = RewardDetailResponseDto;
|
|
823
|
+
export interface PutLoyaltyRewardPath {
|
|
824
|
+
id: string;
|
|
825
|
+
}
|
|
826
|
+
export type PutLoyaltyRewardBody = UpdateRewardDto;
|
|
827
|
+
export type PutLoyaltyRewardResponse = RewardDetailResponseDto;
|
|
828
|
+
export interface PatchLoyaltyRewardStatusPath {
|
|
829
|
+
id: string;
|
|
830
|
+
}
|
|
831
|
+
export type PatchLoyaltyRewardStatusBody = UpdateRewardStatusDto;
|
|
832
|
+
export type PatchLoyaltyRewardStatusResponse = RewardDetailResponseDto;
|
|
833
|
+
export interface GetLoyaltyRewardCardsPath {
|
|
834
|
+
id: string;
|
|
835
|
+
}
|
|
836
|
+
export interface GetLoyaltyRewardCardsQuery {
|
|
837
|
+
limit?: number;
|
|
838
|
+
cursor?: string;
|
|
839
|
+
}
|
|
840
|
+
export type GetLoyaltyRewardCardsResponse = RewardCardListResponseDto;
|
|
841
|
+
export interface GetLoyaltyRewardCardPath {
|
|
842
|
+
id: string;
|
|
843
|
+
customerId: string;
|
|
844
|
+
}
|
|
845
|
+
export type GetLoyaltyRewardCardResponse = RewardCardDetailResponseDto;
|
|
846
|
+
export interface PostLoyaltyRewardCardAdjustPath {
|
|
847
|
+
cardId: string;
|
|
848
|
+
}
|
|
849
|
+
export type PostLoyaltyRewardCardAdjustBody = AdjustPointsDto;
|
|
850
|
+
export type PostLoyaltyRewardCardAdjustResponse = RewardCardDetailResponseDto;
|
|
851
|
+
export type PostLoyaltyRewardOrderEarnBody = EarnOrderDto;
|
|
852
|
+
export type PostLoyaltyRewardOrderEarnResponse = EarnOrderResponseDto;
|
|
853
|
+
//# sourceMappingURL=loyalty.d.ts.map
|