@compassdigital/sdk.typescript 4.528.0 → 4.528.1-beta.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 +308 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +373 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/loyalty.d.ts +402 -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 +914 -0
- package/src/interface/loyalty.ts +659 -0
|
@@ -0,0 +1,659 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
3
|
+
|
|
4
|
+
import { RequestQuery, BaseRequest } from './util';
|
|
5
|
+
|
|
6
|
+
export interface ErrorDisplayMessage {
|
|
7
|
+
// user message title
|
|
8
|
+
title: string;
|
|
9
|
+
// user message description
|
|
10
|
+
description: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ErrorData {
|
|
14
|
+
// http status code
|
|
15
|
+
statusCode: number;
|
|
16
|
+
// http status text
|
|
17
|
+
statusText: string;
|
|
18
|
+
timestamp: string;
|
|
19
|
+
// user friendly error message
|
|
20
|
+
displayMessage: ErrorDisplayMessage;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface Error {
|
|
24
|
+
// business error code
|
|
25
|
+
code: number;
|
|
26
|
+
// business error description
|
|
27
|
+
message: string;
|
|
28
|
+
// additional error data
|
|
29
|
+
data: ErrorData;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface BundleGroupDto {
|
|
33
|
+
groupName: string;
|
|
34
|
+
minimumQuantity: number;
|
|
35
|
+
itemIds: string[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface CreateBundleDto {
|
|
39
|
+
realm: 'boost' | 'thrive';
|
|
40
|
+
siteId?: string;
|
|
41
|
+
name: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
groups: BundleGroupDto[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface UpdateBundleDto {
|
|
47
|
+
realm?: 'boost' | 'thrive';
|
|
48
|
+
siteId?: string;
|
|
49
|
+
name?: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
groups?: BundleGroupDto[];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface DailyScheduleDto {
|
|
55
|
+
dayOfWeek: 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
|
|
56
|
+
active: boolean;
|
|
57
|
+
// HH:MM:SS format
|
|
58
|
+
startTime: string;
|
|
59
|
+
// HH:MM:SS format
|
|
60
|
+
endTime: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface EligibilityDto {
|
|
64
|
+
eligibilityType: 'everyone' | 'meal_plan' | 'badge_pay' | 'sso_group' | 'segment';
|
|
65
|
+
ssoGroupId?: string;
|
|
66
|
+
segmentId?: string;
|
|
67
|
+
maxRedemptionsPerCustomer?: number;
|
|
68
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface SiteScopeDto {
|
|
72
|
+
siteId: string;
|
|
73
|
+
excluded?: boolean;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface StationScopeDto {
|
|
77
|
+
siteId: string;
|
|
78
|
+
stationId: string;
|
|
79
|
+
excluded?: boolean;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface ItemTargetDto {
|
|
83
|
+
siteId?: string;
|
|
84
|
+
stationId?: string;
|
|
85
|
+
menuId?: string;
|
|
86
|
+
categoryId?: string;
|
|
87
|
+
itemId?: string;
|
|
88
|
+
maxDiscountCents?: number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface CreateCampaignDto {
|
|
92
|
+
realm: 'boost' | 'thrive';
|
|
93
|
+
name: string;
|
|
94
|
+
description?: string;
|
|
95
|
+
type: 'promo_code' | 'auto_apply' | 'loyalty_reward';
|
|
96
|
+
discountType: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
97
|
+
discountScope: 'order' | 'items';
|
|
98
|
+
discountValueCents?: number;
|
|
99
|
+
discountPercent?: number;
|
|
100
|
+
appliesToCheapest?: boolean;
|
|
101
|
+
maxDiscountCents?: number;
|
|
102
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
103
|
+
// YYYY-MM-DD
|
|
104
|
+
startDate?: string;
|
|
105
|
+
// YYYY-MM-DD
|
|
106
|
+
endDate?: string;
|
|
107
|
+
maxRedemptions?: number;
|
|
108
|
+
maxRedemptionsPerCustomer?: number;
|
|
109
|
+
maxRedemptionsDaily?: number;
|
|
110
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
111
|
+
minOrderValueCents?: number;
|
|
112
|
+
maxOrderValueCents?: number;
|
|
113
|
+
dailySchedule?: DailyScheduleDto[];
|
|
114
|
+
eligibility?: EligibilityDto[];
|
|
115
|
+
siteScopes?: SiteScopeDto[];
|
|
116
|
+
stationScopes?: StationScopeDto[];
|
|
117
|
+
itemTargets?: ItemTargetDto[];
|
|
118
|
+
// Reference to a reusable bundle for cart-content conditions
|
|
119
|
+
bundleId?: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface UpdateCampaignDto {
|
|
123
|
+
realm?: 'boost' | 'thrive';
|
|
124
|
+
name?: string;
|
|
125
|
+
description?: string;
|
|
126
|
+
type?: 'promo_code' | 'auto_apply' | 'loyalty_reward';
|
|
127
|
+
discountType?: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
128
|
+
discountScope?: 'order' | 'items';
|
|
129
|
+
discountValueCents?: number;
|
|
130
|
+
discountPercent?: number;
|
|
131
|
+
appliesToCheapest?: boolean;
|
|
132
|
+
maxDiscountCents?: number;
|
|
133
|
+
codeType?: 'open' | 'personal' | 'auto_applied';
|
|
134
|
+
// YYYY-MM-DD
|
|
135
|
+
startDate?: string;
|
|
136
|
+
// YYYY-MM-DD
|
|
137
|
+
endDate?: string;
|
|
138
|
+
maxRedemptions?: number;
|
|
139
|
+
maxRedemptionsPerCustomer?: number;
|
|
140
|
+
maxRedemptionsDaily?: number;
|
|
141
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
142
|
+
minOrderValueCents?: number;
|
|
143
|
+
maxOrderValueCents?: number;
|
|
144
|
+
dailySchedule?: DailyScheduleDto[];
|
|
145
|
+
eligibility?: EligibilityDto[];
|
|
146
|
+
siteScopes?: SiteScopeDto[];
|
|
147
|
+
stationScopes?: StationScopeDto[];
|
|
148
|
+
itemTargets?: ItemTargetDto[];
|
|
149
|
+
// Reference to a reusable bundle for cart-content conditions
|
|
150
|
+
bundleId?: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface UpdateCampaignStatusDto {
|
|
154
|
+
status: 'draft' | 'active' | 'paused' | 'expired' | 'archived';
|
|
155
|
+
reason?: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface CreateVoucherDto {
|
|
159
|
+
campaignId: string;
|
|
160
|
+
code: string;
|
|
161
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
162
|
+
// Required when codeType = personal
|
|
163
|
+
customerId?: string;
|
|
164
|
+
expiresAt?: string;
|
|
165
|
+
issueReason?: string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface UpdateVoucherDto {
|
|
169
|
+
expiresAt?: string;
|
|
170
|
+
customerId?: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface RevokeVoucherDto {
|
|
174
|
+
// Reason for revoking the voucher
|
|
175
|
+
reason: string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface BatchVoucherDto {
|
|
179
|
+
campaignId: string;
|
|
180
|
+
count: number;
|
|
181
|
+
codeType: 'open' | 'personal';
|
|
182
|
+
// Prefix prepended to generated codes
|
|
183
|
+
prefix?: string;
|
|
184
|
+
expiresAt?: string;
|
|
185
|
+
// Required when codeType = personal; length must match count
|
|
186
|
+
customerIds?: string[];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface CreateSegmentDto {
|
|
190
|
+
realm: 'boost' | 'thrive';
|
|
191
|
+
siteId: string;
|
|
192
|
+
name: string;
|
|
193
|
+
description?: string;
|
|
194
|
+
type: 'static_list' | 'sso_group' | 'attribute_rule';
|
|
195
|
+
// Required when type = sso_group
|
|
196
|
+
ssoGroupId?: string;
|
|
197
|
+
// Required when type = attribute_rule
|
|
198
|
+
ruleJson?: Record<string, any>;
|
|
199
|
+
// Initial members for static_list segments
|
|
200
|
+
customerIds?: string[];
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export interface UpdateSegmentDto {
|
|
204
|
+
name?: string;
|
|
205
|
+
description?: string;
|
|
206
|
+
ssoGroupId?: string;
|
|
207
|
+
ruleJson?: Record<string, any>;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface SegmentMembersDto {
|
|
211
|
+
// List of customer IDs
|
|
212
|
+
customerIds: string[];
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface RollbackRedemptionDto {
|
|
216
|
+
// Reason for rolling back the redemption
|
|
217
|
+
reason: string;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface BrandExclusionDto {
|
|
221
|
+
siteId: string;
|
|
222
|
+
stationId: string;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export interface EarningRuleDto {
|
|
226
|
+
eventType: 'order_placed' | 'item_purchased' | 'amount_spent';
|
|
227
|
+
points: number;
|
|
228
|
+
spendThresholdCents?: number;
|
|
229
|
+
siteId?: string;
|
|
230
|
+
itemId?: string;
|
|
231
|
+
// Stations excluded from earning on this rule
|
|
232
|
+
brandExclusions?: BrandExclusionDto[];
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface MilestoneDto {
|
|
236
|
+
pointsRequired: number;
|
|
237
|
+
campaignId: string;
|
|
238
|
+
resetsAfterMilestone: boolean;
|
|
239
|
+
maxRewardCount?: number;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface CreateProgramDto {
|
|
243
|
+
realm: 'boost' | 'thrive';
|
|
244
|
+
name: string;
|
|
245
|
+
description?: string;
|
|
246
|
+
earningRules?: EarningRuleDto[];
|
|
247
|
+
milestones?: MilestoneDto[];
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface UpdateProgramDto {
|
|
251
|
+
realm?: 'boost' | 'thrive';
|
|
252
|
+
name?: string;
|
|
253
|
+
description?: string;
|
|
254
|
+
earningRules?: EarningRuleDto[];
|
|
255
|
+
milestones?: MilestoneDto[];
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface UpdateProgramStatusDto {
|
|
259
|
+
status: 'active' | 'paused' | 'archived';
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export interface AdjustPointsDto {
|
|
263
|
+
// Positive to add, negative to deduct
|
|
264
|
+
pointsDelta: number;
|
|
265
|
+
description: string;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// GET /loyalty/bundles - List bundles with optional filters
|
|
269
|
+
|
|
270
|
+
export interface BundleControllerFindAllQuery {
|
|
271
|
+
// Max items to return
|
|
272
|
+
limit?: number;
|
|
273
|
+
// Opaque cursor from previous response
|
|
274
|
+
cursor?: string;
|
|
275
|
+
realm?: 'boost' | 'thrive';
|
|
276
|
+
siteId?: string;
|
|
277
|
+
name?: string;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export type BundleControllerFindAllResponse = {};
|
|
281
|
+
|
|
282
|
+
// POST /loyalty/bundles - Create a new bundle
|
|
283
|
+
|
|
284
|
+
export type BundleControllerCreateBody = CreateBundleDto;
|
|
285
|
+
|
|
286
|
+
export type BundleControllerCreateResponse = {};
|
|
287
|
+
|
|
288
|
+
// GET /loyalty/bundles/{id} - Get bundle by ID with groups
|
|
289
|
+
|
|
290
|
+
export interface BundleControllerFindOnePath {
|
|
291
|
+
id: string;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export type BundleControllerFindOneResponse = {};
|
|
295
|
+
|
|
296
|
+
// PATCH /loyalty/bundles/{id} - Update a bundle
|
|
297
|
+
|
|
298
|
+
export interface BundleControllerUpdatePath {
|
|
299
|
+
id: string;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export type BundleControllerUpdateBody = UpdateBundleDto;
|
|
303
|
+
|
|
304
|
+
export type BundleControllerUpdateResponse = {};
|
|
305
|
+
|
|
306
|
+
// DELETE /loyalty/bundles/{id} - Soft-delete a bundle
|
|
307
|
+
|
|
308
|
+
export interface BundleControllerRemovePath {
|
|
309
|
+
id: string;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export type BundleControllerRemoveResponse = {};
|
|
313
|
+
|
|
314
|
+
// GET /loyalty/campaigns - List campaigns with filters and pagination
|
|
315
|
+
|
|
316
|
+
export interface CampaignControllerListQuery {
|
|
317
|
+
// Max items to return
|
|
318
|
+
limit?: number;
|
|
319
|
+
// Opaque cursor from previous response
|
|
320
|
+
cursor?: string;
|
|
321
|
+
realm?: 'boost' | 'thrive';
|
|
322
|
+
status?: 'draft' | 'active' | 'paused' | 'expired' | 'archived';
|
|
323
|
+
type?: 'promo_code' | 'auto_apply' | 'loyalty_reward';
|
|
324
|
+
// Case-insensitive partial name match
|
|
325
|
+
name?: string;
|
|
326
|
+
// YYYY-MM-DD
|
|
327
|
+
startDateFrom?: string;
|
|
328
|
+
// YYYY-MM-DD
|
|
329
|
+
startDateTo?: string;
|
|
330
|
+
// YYYY-MM-DD
|
|
331
|
+
endDateFrom?: string;
|
|
332
|
+
// YYYY-MM-DD
|
|
333
|
+
endDateTo?: string;
|
|
334
|
+
sortBy?: 'name' | 'createdAt' | 'startDate' | 'status';
|
|
335
|
+
sortOrder?: 'ASC' | 'DESC';
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export type CampaignControllerListResponse = {};
|
|
339
|
+
|
|
340
|
+
// POST /loyalty/campaigns - Create a campaign with nested child entities
|
|
341
|
+
|
|
342
|
+
export type CampaignControllerCreateBody = CreateCampaignDto;
|
|
343
|
+
|
|
344
|
+
export type CampaignControllerCreateResponse = {};
|
|
345
|
+
|
|
346
|
+
// GET /loyalty/campaigns/{id} - Get campaign detail with all child entities
|
|
347
|
+
|
|
348
|
+
export interface CampaignControllerFindOnePath {
|
|
349
|
+
id: string;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export type CampaignControllerFindOneResponse = {};
|
|
353
|
+
|
|
354
|
+
// PUT /loyalty/campaigns/{id} - Update a campaign and its child entities
|
|
355
|
+
|
|
356
|
+
export interface CampaignControllerUpdatePath {
|
|
357
|
+
id: string;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
export type CampaignControllerUpdateBody = UpdateCampaignDto;
|
|
361
|
+
|
|
362
|
+
export type CampaignControllerUpdateResponse = {};
|
|
363
|
+
|
|
364
|
+
// DELETE /loyalty/campaigns/{id} - Soft-delete a campaign
|
|
365
|
+
|
|
366
|
+
export interface CampaignControllerRemovePath {
|
|
367
|
+
id: string;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export type CampaignControllerRemoveResponse = {};
|
|
371
|
+
|
|
372
|
+
// PATCH /loyalty/campaigns/{id}/status - Transition campaign status
|
|
373
|
+
|
|
374
|
+
export interface CampaignControllerUpdateStatusPath {
|
|
375
|
+
id: string;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export type CampaignControllerUpdateStatusBody = UpdateCampaignStatusDto;
|
|
379
|
+
|
|
380
|
+
export type CampaignControllerUpdateStatusResponse = {};
|
|
381
|
+
|
|
382
|
+
// POST /loyalty/campaigns/{id}/clone - Deep clone a campaign and all child entities
|
|
383
|
+
|
|
384
|
+
export interface CampaignControllerClonePath {
|
|
385
|
+
id: string;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export type CampaignControllerCloneResponse = {};
|
|
389
|
+
|
|
390
|
+
// GET /loyalty/vouchers - List vouchers with optional filters
|
|
391
|
+
|
|
392
|
+
export interface VoucherControllerFindAllQuery {
|
|
393
|
+
// Max items to return
|
|
394
|
+
limit?: number;
|
|
395
|
+
// Opaque cursor from previous response
|
|
396
|
+
cursor?: string;
|
|
397
|
+
campaignId?: string;
|
|
398
|
+
realm?: 'boost' | 'thrive';
|
|
399
|
+
status?: 'active' | 'redeemed' | 'expired' | 'revoked';
|
|
400
|
+
// Exact code match
|
|
401
|
+
code?: string;
|
|
402
|
+
codeType?: 'open' | 'personal' | 'auto_applied';
|
|
403
|
+
customerId?: string;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export type VoucherControllerFindAllResponse = {};
|
|
407
|
+
|
|
408
|
+
// POST /loyalty/vouchers - Create a single voucher
|
|
409
|
+
|
|
410
|
+
export type VoucherControllerCreateBody = CreateVoucherDto;
|
|
411
|
+
|
|
412
|
+
export type VoucherControllerCreateResponse = {};
|
|
413
|
+
|
|
414
|
+
// GET /loyalty/vouchers/{id} - Get voucher by ID with campaign info and redemption count
|
|
415
|
+
|
|
416
|
+
export interface VoucherControllerFindOnePath {
|
|
417
|
+
id: string;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export type VoucherControllerFindOneResponse = {};
|
|
421
|
+
|
|
422
|
+
// PUT /loyalty/vouchers/{id} - Update a voucher
|
|
423
|
+
|
|
424
|
+
export interface VoucherControllerUpdatePath {
|
|
425
|
+
id: string;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export type VoucherControllerUpdateBody = UpdateVoucherDto;
|
|
429
|
+
|
|
430
|
+
export type VoucherControllerUpdateResponse = {};
|
|
431
|
+
|
|
432
|
+
// DELETE /loyalty/vouchers/{id} - Soft-delete a voucher
|
|
433
|
+
|
|
434
|
+
export interface VoucherControllerRemovePath {
|
|
435
|
+
id: string;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export type VoucherControllerRemoveResponse = {};
|
|
439
|
+
|
|
440
|
+
// POST /loyalty/vouchers/{id}/revoke - Revoke a voucher with a required reason
|
|
441
|
+
|
|
442
|
+
export interface VoucherControllerRevokePath {
|
|
443
|
+
id: string;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export type VoucherControllerRevokeBody = RevokeVoucherDto;
|
|
447
|
+
|
|
448
|
+
export type VoucherControllerRevokeResponse = {};
|
|
449
|
+
|
|
450
|
+
// POST /loyalty/vouchers/batch - Batch generate voucher codes for a campaign
|
|
451
|
+
|
|
452
|
+
export type VoucherControllerBatchGenerateBody = BatchVoucherDto;
|
|
453
|
+
|
|
454
|
+
export type VoucherControllerBatchGenerateResponse = {};
|
|
455
|
+
|
|
456
|
+
// GET /loyalty/vouchers/{id}/redemptions - Get redemption history for a voucher
|
|
457
|
+
|
|
458
|
+
export interface VoucherControllerFindRedemptionsPath {
|
|
459
|
+
id: string;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
export interface VoucherControllerFindRedemptionsQuery {
|
|
463
|
+
// Max items to return
|
|
464
|
+
limit?: number;
|
|
465
|
+
// Opaque cursor from previous response
|
|
466
|
+
cursor?: string;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export type VoucherControllerFindRedemptionsResponse = {};
|
|
470
|
+
|
|
471
|
+
// POST /loyalty/vouchers/validate - Validate a voucher code (stub)
|
|
472
|
+
|
|
473
|
+
export type VoucherControllerValidateResponse = {};
|
|
474
|
+
|
|
475
|
+
// POST /loyalty/vouchers/redeem - Redeem a voucher code (stub)
|
|
476
|
+
|
|
477
|
+
export type VoucherControllerRedeemResponse = {};
|
|
478
|
+
|
|
479
|
+
// GET /loyalty/segments - List segments with optional filters
|
|
480
|
+
|
|
481
|
+
export interface SegmentControllerFindAllQuery {
|
|
482
|
+
// Max items to return
|
|
483
|
+
limit?: number;
|
|
484
|
+
// Opaque cursor from previous response
|
|
485
|
+
cursor?: string;
|
|
486
|
+
realm?: 'boost' | 'thrive';
|
|
487
|
+
type?: 'static_list' | 'sso_group' | 'attribute_rule';
|
|
488
|
+
siteId?: string;
|
|
489
|
+
// Case-insensitive partial name match
|
|
490
|
+
name?: string;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export type SegmentControllerFindAllResponse = {};
|
|
494
|
+
|
|
495
|
+
// POST /loyalty/segments - Create a new segment
|
|
496
|
+
|
|
497
|
+
export type SegmentControllerCreateBody = CreateSegmentDto;
|
|
498
|
+
|
|
499
|
+
export type SegmentControllerCreateResponse = {};
|
|
500
|
+
|
|
501
|
+
// GET /loyalty/segments/attributes - List available attributes for rule-based segments
|
|
502
|
+
|
|
503
|
+
export type SegmentControllerGetAttributesResponse = {};
|
|
504
|
+
|
|
505
|
+
// POST /loyalty/segments/preview-count - Preview how many customers match a segment rule
|
|
506
|
+
|
|
507
|
+
export type SegmentControllerPreviewRuleCountResponse = {};
|
|
508
|
+
|
|
509
|
+
// GET /loyalty/segments/{id} - Get segment by ID
|
|
510
|
+
|
|
511
|
+
export interface SegmentControllerFindOnePath {
|
|
512
|
+
id: string;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export type SegmentControllerFindOneResponse = {};
|
|
516
|
+
|
|
517
|
+
// PATCH /loyalty/segments/{id} - Update a segment
|
|
518
|
+
|
|
519
|
+
export interface SegmentControllerUpdatePath {
|
|
520
|
+
id: string;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export type SegmentControllerUpdateBody = UpdateSegmentDto;
|
|
524
|
+
|
|
525
|
+
export type SegmentControllerUpdateResponse = {};
|
|
526
|
+
|
|
527
|
+
// DELETE /loyalty/segments/{id} - Soft-delete a segment
|
|
528
|
+
|
|
529
|
+
export interface SegmentControllerRemovePath {
|
|
530
|
+
id: string;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export type SegmentControllerRemoveResponse = {};
|
|
534
|
+
|
|
535
|
+
// GET /loyalty/segments/{id}/members - List members of a static_list segment
|
|
536
|
+
|
|
537
|
+
export interface SegmentControllerFindMembersPath {
|
|
538
|
+
id: string;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
export interface SegmentControllerFindMembersQuery {
|
|
542
|
+
// Max items to return
|
|
543
|
+
limit?: number;
|
|
544
|
+
// Opaque cursor from previous response
|
|
545
|
+
cursor?: string;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
export type SegmentControllerFindMembersResponse = {};
|
|
549
|
+
|
|
550
|
+
// POST /loyalty/segments/{id}/members - Add members to a segment
|
|
551
|
+
|
|
552
|
+
export interface SegmentControllerAddMembersPath {
|
|
553
|
+
id: string;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
export type SegmentControllerAddMembersBody = SegmentMembersDto;
|
|
557
|
+
|
|
558
|
+
export type SegmentControllerAddMembersResponse = {};
|
|
559
|
+
|
|
560
|
+
// DELETE /loyalty/segments/{id}/members - Remove members from a segment
|
|
561
|
+
|
|
562
|
+
export interface SegmentControllerRemoveMembersPath {
|
|
563
|
+
id: string;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
export type SegmentControllerRemoveMembersBody = SegmentMembersDto;
|
|
567
|
+
|
|
568
|
+
export type SegmentControllerRemoveMembersResponse = {};
|
|
569
|
+
|
|
570
|
+
// POST /loyalty/redemptions/{id}/rollback - Roll back a redemption and restore the voucher
|
|
571
|
+
|
|
572
|
+
export interface RedemptionControllerRollbackPath {
|
|
573
|
+
id: string;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
export type RedemptionControllerRollbackBody = RollbackRedemptionDto;
|
|
577
|
+
|
|
578
|
+
export type RedemptionControllerRollbackResponse = {};
|
|
579
|
+
|
|
580
|
+
// GET /loyalty/loyalty/programs - List loyalty programs with filters and pagination
|
|
581
|
+
|
|
582
|
+
export interface LoyaltyControllerListProgramsQuery {
|
|
583
|
+
// Max items to return
|
|
584
|
+
limit?: number;
|
|
585
|
+
// Opaque cursor from previous response
|
|
586
|
+
cursor?: string;
|
|
587
|
+
realm?: 'boost' | 'thrive';
|
|
588
|
+
status?: 'active' | 'paused' | 'archived';
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
export type LoyaltyControllerListProgramsResponse = {};
|
|
592
|
+
|
|
593
|
+
// POST /loyalty/loyalty/programs - Create a loyalty program with earning rules and milestones
|
|
594
|
+
|
|
595
|
+
export type LoyaltyControllerCreateProgramBody = CreateProgramDto;
|
|
596
|
+
|
|
597
|
+
export type LoyaltyControllerCreateProgramResponse = {};
|
|
598
|
+
|
|
599
|
+
// GET /loyalty/loyalty/programs/{id} - Get loyalty program detail with earning rules and milestones
|
|
600
|
+
|
|
601
|
+
export interface LoyaltyControllerFindOneProgramPath {
|
|
602
|
+
id: string;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
export type LoyaltyControllerFindOneProgramResponse = {};
|
|
606
|
+
|
|
607
|
+
// PUT /loyalty/loyalty/programs/{id} - Update a loyalty program and replace its earning rules and milestones
|
|
608
|
+
|
|
609
|
+
export interface LoyaltyControllerUpdateProgramPath {
|
|
610
|
+
id: string;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export type LoyaltyControllerUpdateProgramBody = UpdateProgramDto;
|
|
614
|
+
|
|
615
|
+
export type LoyaltyControllerUpdateProgramResponse = {};
|
|
616
|
+
|
|
617
|
+
// PATCH /loyalty/loyalty/programs/{id}/status - Transition loyalty program status
|
|
618
|
+
|
|
619
|
+
export interface LoyaltyControllerUpdateProgramStatusPath {
|
|
620
|
+
id: string;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
export type LoyaltyControllerUpdateProgramStatusBody = UpdateProgramStatusDto;
|
|
624
|
+
|
|
625
|
+
export type LoyaltyControllerUpdateProgramStatusResponse = {};
|
|
626
|
+
|
|
627
|
+
// GET /loyalty/loyalty/programs/{id}/cards - List enrolled customer cards for a program
|
|
628
|
+
|
|
629
|
+
export interface LoyaltyControllerListCardsPath {
|
|
630
|
+
id: string;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
export interface LoyaltyControllerListCardsQuery {
|
|
634
|
+
// Max items to return
|
|
635
|
+
limit?: number;
|
|
636
|
+
// Opaque cursor from previous response
|
|
637
|
+
cursor?: string;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
export type LoyaltyControllerListCardsResponse = {};
|
|
641
|
+
|
|
642
|
+
// GET /loyalty/loyalty/programs/{id}/cards/{customerId} - Get card detail with transaction event history
|
|
643
|
+
|
|
644
|
+
export interface LoyaltyControllerFindCardPath {
|
|
645
|
+
id: string;
|
|
646
|
+
customerId: string;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
export type LoyaltyControllerFindCardResponse = {};
|
|
650
|
+
|
|
651
|
+
// POST /loyalty/loyalty/cards/{cardId}/adjust - Manual point adjustment on a loyalty card
|
|
652
|
+
|
|
653
|
+
export interface LoyaltyControllerAdjustPointsPath {
|
|
654
|
+
cardId: string;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
export type LoyaltyControllerAdjustPointsBody = AdjustPointsDto;
|
|
658
|
+
|
|
659
|
+
export type LoyaltyControllerAdjustPointsResponse = {};
|