@compassdigital/sdk.typescript 4.879.0 → 4.881.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.
@@ -589,7 +589,7 @@ export interface ConsumerDiscountIs {
589
589
  }
590
590
 
591
591
  export interface ConsumerVoucherifyMetaDataDiscount {
592
- type: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FIXED_PRICE';
592
+ type: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FIXED_PRICE' | 'FREE';
593
593
  amountOff?: number;
594
594
  percentOff?: number;
595
595
  fixedPrice?: number;
@@ -1449,11 +1449,28 @@ export interface ConsumerDiscountSchedule {
1449
1449
 
1450
1450
  export interface ConsumerDiscountMethod {
1451
1451
  // discount method name
1452
- name: Record<string, any>;
1452
+ name: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FIXED_PRICE' | 'FREE';
1453
1453
  // discount method value
1454
1454
  value: number;
1455
1455
  }
1456
1456
 
1457
+ export interface ConsumerItemLevelConfigDetails {
1458
+ // Marks the bundle group that receives the discount for Buy X Get Y.
1459
+ isDiscounted?: boolean;
1460
+ // How many extra items are discounted per qualified set for Buy X Get X. Applies to PERCENT_OFF, AMOUNT_OFF, and FREE.
1461
+ discountedItemQuantity?: number;
1462
+ bundleGroupName?: string;
1463
+ bundleGroupId?: string;
1464
+ minimum: number;
1465
+ }
1466
+
1467
+ export interface ConsumerItemLevelConfig {
1468
+ details: ConsumerItemLevelConfigDetails[];
1469
+ // Lower integer = higher priority when multiple overlapping bundles exist.
1470
+ bundlePriority?: number;
1471
+ sectorName?: string;
1472
+ }
1473
+
1457
1474
  export interface ConsumerDiscountChannelConfig {
1458
1475
  // thrive channel
1459
1476
  thrive: boolean;
@@ -1478,6 +1495,9 @@ export interface ConsumerDiscountDTO {
1478
1495
  schedule?: ConsumerDiscountSchedule;
1479
1496
  // discount method configuration
1480
1497
  method: ConsumerDiscountMethod;
1498
+ type: 'Total Order' | 'Single Items' | 'Bundle' | 'Buy X Get Y' | 'Buy X Get X';
1499
+ // bundle groups of an item level discount
1500
+ itemLevelConfig?: ConsumerItemLevelConfig;
1481
1501
  createdAt: string;
1482
1502
  updatedAt: string;
1483
1503
  name: string;
@@ -1485,7 +1505,6 @@ export interface ConsumerDiscountDTO {
1485
1505
  is?: ConsumerDiscountIs;
1486
1506
  meta?: ConsumerDiscountMeta;
1487
1507
  channelConfig: ConsumerDiscountChannelConfig;
1488
- type: Record<string, any>;
1489
1508
  }
1490
1509
 
1491
1510
  export interface ConsumerMenuHours {
@@ -0,0 +1,37 @@
1
+ // THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
2
+
3
+ export interface CampaignStatusChangedEvent {
4
+ id: string;
5
+ type: 'CampaignStatusChangedEvent';
6
+ version: '0.0.1';
7
+ timestamp: string;
8
+ traceContext: {
9
+ // W3C traceparent, injected by MessageBus from the active trace context
10
+ traceparent?: string;
11
+ };
12
+ source: string;
13
+ // Owning domain, optionally dotted for subdomains. Names the Kafka topic; absent keeps the superseded naming.
14
+ domain?: string;
15
+ // Whether other domains may integrate against this message. Absent means private.
16
+ visibility?: 'public' | 'private';
17
+ payload: {
18
+ // Id of the campaign whose status changed
19
+ campaignId: string;
20
+ // Id of the campaign status history row the transition wrote. One per transition, so consumers can drop a redelivered event by it
21
+ transitionId: string;
22
+ // Campaign status before the transition
23
+ previousStatus: 'draft' | 'active' | 'paused' | 'expired' | 'archived';
24
+ // Campaign status after the transition
25
+ status: 'draft' | 'active' | 'paused' | 'expired' | 'archived';
26
+ // Free-text reason the caller gave for the transition, null or absent when none was given
27
+ reason?: string | null;
28
+ // Location-service sector name the campaign is scoped to, e.g. Eurest. A name, not a sector id
29
+ sector: string;
30
+ // Country the campaign is scoped to
31
+ country: 'CA' | 'US';
32
+ // Subject of the authenticated caller that made the transition, typically a user id
33
+ changedBy: string;
34
+ // ISO 8601 time of the transition, the campaign's updatedAt as written by the status update
35
+ changedAt: string;
36
+ };
37
+ }
@@ -4,6 +4,8 @@ export { AuditEvent } from './AuditEvent';
4
4
 
5
5
  export { AvrideOrderStatusUpdatedEvent } from './AvrideOrderStatusUpdatedEvent';
6
6
 
7
+ export { CampaignStatusChangedEvent } from './CampaignStatusChangedEvent';
8
+
7
9
  export { DeliveryDropOffLeaveWarningEvent } from './DeliveryDropOffLeaveWarningEvent';
8
10
 
9
11
  export { DiscountCreatedEvent } from './DiscountCreatedEvent';