@compassdigital/sdk.typescript 4.594.0 → 4.596.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 +10 -5
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -1
- package/lib/interface/consumer.d.ts +8 -0
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/discount.d.ts +11 -17
- package/lib/interface/discount.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +22 -4
- package/src/interface/consumer.ts +15 -0
- package/src/interface/discount.ts +13 -22
|
@@ -259,7 +259,6 @@ export interface DiscountTaxonomy {
|
|
|
259
259
|
export interface PostDiscountRequestDTO {
|
|
260
260
|
// What the discount type is
|
|
261
261
|
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
262
|
-
createdBy: string;
|
|
263
262
|
name: string;
|
|
264
263
|
is?: DiscountIs;
|
|
265
264
|
meta?: DiscountMeta;
|
|
@@ -268,6 +267,7 @@ export interface PostDiscountRequestDTO {
|
|
|
268
267
|
itemLevelConfig?: ItemLevelConfig;
|
|
269
268
|
taxonomy?: DiscountTaxonomy;
|
|
270
269
|
status?: DiscountStatus;
|
|
270
|
+
createdBy: string;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
export interface PostDiscountResponseDTO {
|
|
@@ -410,20 +410,16 @@ export interface PostValidateDiscountsRequestDTO {
|
|
|
410
410
|
siteId: string;
|
|
411
411
|
// Brand IDs
|
|
412
412
|
brandIds: string[];
|
|
413
|
-
// Shopping cart ID
|
|
414
|
-
cartId: string;
|
|
415
413
|
// Total cart amount
|
|
416
414
|
cartTotal: number;
|
|
417
|
-
// ISO 8601 creation date
|
|
418
|
-
createdDate: string;
|
|
419
|
-
// Currency code
|
|
420
|
-
currency: string;
|
|
421
415
|
// Payment methods used in the cart
|
|
422
|
-
usedPaymentMethods
|
|
416
|
+
usedPaymentMethods: UsedPaymentMethodsDTO;
|
|
417
|
+
// Status filter for discounts
|
|
418
|
+
statusFilter?: string;
|
|
419
|
+
// Validate schedule flag
|
|
420
|
+
validateSchedule?: boolean;
|
|
423
421
|
// Total of other incentives already applied
|
|
424
422
|
currentIncentivesTotal?: number;
|
|
425
|
-
// Customer ID for personalized discounts
|
|
426
|
-
customerId?: string;
|
|
427
423
|
// Items in the cart
|
|
428
424
|
cartItems: Record<string, any>[];
|
|
429
425
|
}
|
|
@@ -460,15 +456,15 @@ export interface PostValidateDiscountsResponseDTO {
|
|
|
460
456
|
export interface PutDiscountRequestDTO {
|
|
461
457
|
// What the discount type is
|
|
462
458
|
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
463
|
-
updatedBy: string;
|
|
464
|
-
taxonomy?: DiscountTaxonomy;
|
|
465
|
-
status?: DiscountStatus;
|
|
466
459
|
name: string;
|
|
467
460
|
is?: DiscountIs;
|
|
468
461
|
meta?: DiscountMeta;
|
|
469
462
|
schedule?: DiscountSchedule;
|
|
470
463
|
channelConfig: DiscountChannelConfig;
|
|
471
464
|
itemLevelConfig?: ItemLevelConfig;
|
|
465
|
+
updatedBy: string;
|
|
466
|
+
taxonomy?: DiscountTaxonomy;
|
|
467
|
+
status?: DiscountStatus;
|
|
472
468
|
}
|
|
473
469
|
|
|
474
470
|
export interface PutDiscountResponseDTO {
|
|
@@ -505,15 +501,15 @@ export interface PutDiscountPublishResponseDTO {
|
|
|
505
501
|
updatedBy: string;
|
|
506
502
|
// What the discount type is
|
|
507
503
|
type: 'Total Order' | 'Single Items' | 'Bundle';
|
|
508
|
-
is: DiscountIs;
|
|
509
|
-
meta: DiscountMeta;
|
|
510
|
-
schedule: DiscountSchedule;
|
|
511
|
-
channelConfig: DiscountChannelConfig;
|
|
512
504
|
createdAt: string;
|
|
513
505
|
updatedAt: string;
|
|
514
506
|
name: string;
|
|
515
507
|
status: DiscountStatus;
|
|
516
508
|
itemLevelConfig?: ItemLevelConfig;
|
|
509
|
+
is: DiscountIs;
|
|
510
|
+
meta: DiscountMeta;
|
|
511
|
+
schedule: DiscountSchedule;
|
|
512
|
+
channelConfig: DiscountChannelConfig;
|
|
517
513
|
}
|
|
518
514
|
|
|
519
515
|
// DELETE /discount/{id} - Delete a discount
|
|
@@ -595,11 +591,6 @@ export type PostRewardsResponse = PostRewardsResponseDTO;
|
|
|
595
591
|
|
|
596
592
|
// POST /discount/validate-discounts - Validate and calculate discounts for a shopping cart
|
|
597
593
|
|
|
598
|
-
export interface PostDiscountValidateDiscountsQuery {
|
|
599
|
-
statusFilter?: string;
|
|
600
|
-
validateSchedule?: boolean;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
594
|
export type PostDiscountValidateDiscountsBody = PostValidateDiscountsRequestDTO;
|
|
604
595
|
|
|
605
596
|
export type PostDiscountValidateDiscountsResponse = PostValidateDiscountsResponseDTO;
|