@compassdigital/sdk.typescript 4.937.0 → 4.939.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 +18 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/forecasting.d.ts +81 -1
- package/lib/interface/forecasting.d.ts.map +1 -1
- package/lib/interface/loyalty.d.ts +59 -23
- package/lib/interface/loyalty.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +46 -0
- package/src/interface/forecasting.ts +131 -2
- package/src/interface/loyalty.ts +75 -27
package/src/interface/loyalty.ts
CHANGED
|
@@ -168,6 +168,64 @@ export interface CampaignStatsResponseDto {
|
|
|
168
168
|
redemptionsByDay: CampaignStatsDayDto[];
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
+
export interface RedemptionItemResponseDto {
|
|
172
|
+
id: string;
|
|
173
|
+
itemId: string;
|
|
174
|
+
itemName?: string | null;
|
|
175
|
+
originalPriceCents: number;
|
|
176
|
+
discountAmountCents: number;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface VoucherDiscountResponseDto {
|
|
180
|
+
type: string;
|
|
181
|
+
amount_off: number;
|
|
182
|
+
percent_off: number;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface VoucherRedemptionVoucherDto {
|
|
186
|
+
id: string;
|
|
187
|
+
code: string;
|
|
188
|
+
discount: VoucherDiscountResponseDto;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface CampaignRedemptionResponseDto {
|
|
192
|
+
id: string;
|
|
193
|
+
createdAt: string;
|
|
194
|
+
voucherId?: string | null;
|
|
195
|
+
customerId?: string | null;
|
|
196
|
+
orderId?: string | null;
|
|
197
|
+
siteId?: string | null;
|
|
198
|
+
stationId?: string | null;
|
|
199
|
+
sector?: string;
|
|
200
|
+
country?: 'CA' | 'US';
|
|
201
|
+
discountAmountCents?: number;
|
|
202
|
+
orderTotalCents?: number;
|
|
203
|
+
status?: string;
|
|
204
|
+
rolledBackAt?: string | null;
|
|
205
|
+
rollbackReason?: string | null;
|
|
206
|
+
externalRedemptionId?: string | null;
|
|
207
|
+
// Null when the redemption recorded no line items
|
|
208
|
+
items?: RedemptionItemResponseDto[] | null;
|
|
209
|
+
date?: string;
|
|
210
|
+
result?: string;
|
|
211
|
+
object?: string;
|
|
212
|
+
app?: string;
|
|
213
|
+
voucher?: VoucherRedemptionVoucherDto;
|
|
214
|
+
// Code of the voucher this redemption consumed
|
|
215
|
+
voucherCode: string;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface VoucherPaginationDto {
|
|
219
|
+
cursor?: string | null;
|
|
220
|
+
hasMore: boolean;
|
|
221
|
+
limit: number;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export interface CampaignRedemptionListResponseDto {
|
|
225
|
+
data: CampaignRedemptionResponseDto[];
|
|
226
|
+
pagination: VoucherPaginationDto;
|
|
227
|
+
}
|
|
228
|
+
|
|
171
229
|
export interface CampaignDailyScheduleResponseDto {
|
|
172
230
|
id: string;
|
|
173
231
|
campaignId: string;
|
|
@@ -407,12 +465,6 @@ export interface VoucherResponseDto {
|
|
|
407
465
|
redemptionCount?: number;
|
|
408
466
|
}
|
|
409
467
|
|
|
410
|
-
export interface VoucherPaginationDto {
|
|
411
|
-
cursor?: string | null;
|
|
412
|
-
hasMore: boolean;
|
|
413
|
-
limit: number;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
468
|
export interface VoucherListResponseDto {
|
|
417
469
|
data: VoucherResponseDto[];
|
|
418
470
|
pagination: VoucherPaginationDto;
|
|
@@ -474,26 +526,6 @@ export interface BatchVoucherResponseDto {
|
|
|
474
526
|
codes: string[];
|
|
475
527
|
}
|
|
476
528
|
|
|
477
|
-
export interface RedemptionItemResponseDto {
|
|
478
|
-
id: string;
|
|
479
|
-
itemId: string;
|
|
480
|
-
itemName?: string | null;
|
|
481
|
-
originalPriceCents: number;
|
|
482
|
-
discountAmountCents: number;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
export interface VoucherDiscountResponseDto {
|
|
486
|
-
type: string;
|
|
487
|
-
amount_off: number;
|
|
488
|
-
percent_off: number;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
export interface VoucherRedemptionVoucherDto {
|
|
492
|
-
id: string;
|
|
493
|
-
code: string;
|
|
494
|
-
discount: VoucherDiscountResponseDto;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
529
|
export interface RedemptionResponseDto {
|
|
498
530
|
id: string;
|
|
499
531
|
createdAt: string;
|
|
@@ -510,7 +542,8 @@ export interface RedemptionResponseDto {
|
|
|
510
542
|
rolledBackAt?: string | null;
|
|
511
543
|
rollbackReason?: string | null;
|
|
512
544
|
externalRedemptionId?: string | null;
|
|
513
|
-
items
|
|
545
|
+
// Null when the redemption recorded no line items
|
|
546
|
+
items?: RedemptionItemResponseDto[] | null;
|
|
514
547
|
date?: string;
|
|
515
548
|
result?: string;
|
|
516
549
|
object?: string;
|
|
@@ -970,6 +1003,21 @@ export interface GetLoyaltyCampaignStatsQuery {
|
|
|
970
1003
|
|
|
971
1004
|
export type GetLoyaltyCampaignStatsResponse = CampaignStatsResponseDto;
|
|
972
1005
|
|
|
1006
|
+
// GET /loyalty/campaigns/{id}/redemptions - Get redemption history across all vouchers of a campaign
|
|
1007
|
+
|
|
1008
|
+
export interface GetLoyaltyCampaignRedemptionsPath {
|
|
1009
|
+
id: string;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
export interface GetLoyaltyCampaignRedemptionsQuery {
|
|
1013
|
+
// Max items to return
|
|
1014
|
+
limit?: number;
|
|
1015
|
+
// Opaque cursor from previous response
|
|
1016
|
+
cursor?: string;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
export type GetLoyaltyCampaignRedemptionsResponse = CampaignRedemptionListResponseDto;
|
|
1020
|
+
|
|
973
1021
|
// GET /loyalty/campaigns/{id} - Get campaign detail with all child entities
|
|
974
1022
|
|
|
975
1023
|
export interface GetLoyaltyCampaignPath {
|