@compassdigital/sdk.typescript 4.962.0 → 4.964.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/interface/vendor.d.ts.map +1 -1
- package/lib/messages/events/CampaignPublishedEvent.d.ts +77 -0
- package/lib/messages/events/CampaignPublishedEvent.d.ts.map +1 -0
- package/lib/messages/events/CampaignPublishedEvent.js +4 -0
- package/lib/messages/events/CampaignPublishedEvent.js.map +1 -0
- package/lib/messages/events/RewardCampaignPublishedEvent.d.ts +103 -1
- package/lib/messages/events/RewardCampaignPublishedEvent.d.ts.map +1 -1
- package/lib/messages/events/RewardCreatedEvent.d.ts +20 -1
- package/lib/messages/events/RewardCreatedEvent.d.ts.map +1 -1
- package/lib/messages/events/RewardPublishedEvent.d.ts +49 -0
- package/lib/messages/events/RewardPublishedEvent.d.ts.map +1 -0
- package/lib/messages/events/RewardPublishedEvent.js +4 -0
- package/lib/messages/events/RewardPublishedEvent.js.map +1 -0
- package/lib/messages/events/RewardRedeemedEvent.d.ts +16 -1
- package/lib/messages/events/RewardRedeemedEvent.d.ts.map +1 -1
- package/lib/messages/events/VoucherCreatedEvent.d.ts +30 -0
- package/lib/messages/events/VoucherCreatedEvent.d.ts.map +1 -0
- package/lib/messages/events/VoucherCreatedEvent.js +4 -0
- package/lib/messages/events/VoucherCreatedEvent.js.map +1 -0
- package/lib/messages/events/index.d.ts +3 -0
- package/lib/messages/events/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/interface/vendor.ts +1 -0
- package/src/messages/events/CampaignPublishedEvent.ts +95 -0
- package/src/messages/events/RewardCampaignPublishedEvent.ts +136 -1
- package/src/messages/events/RewardCreatedEvent.ts +31 -1
- package/src/messages/events/RewardPublishedEvent.ts +70 -0
- package/src/messages/events/RewardRedeemedEvent.ts +30 -1
- package/src/messages/events/VoucherCreatedEvent.ts +43 -0
- package/src/messages/events/index.ts +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
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: string;
|
|
3
|
+
type: 'CampaignPublishedEvent';
|
|
4
|
+
version: '0.0.1';
|
|
5
|
+
timestamp: string;
|
|
6
|
+
traceContext: {
|
|
7
|
+
traceparent?: string;
|
|
8
|
+
};
|
|
9
|
+
source: string;
|
|
10
|
+
domain?: string;
|
|
11
|
+
visibility?: 'public' | 'private';
|
|
12
|
+
payload: {
|
|
13
|
+
campaignId: string;
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
type: 'promo_code' | 'auto_apply';
|
|
17
|
+
status: 'draft' | 'active' | 'paused' | 'expired' | 'archived';
|
|
18
|
+
discountType: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
19
|
+
discountScope: 'order' | 'items';
|
|
20
|
+
discountValueCents?: number;
|
|
21
|
+
discountPercent?: number;
|
|
22
|
+
appliesToCheapest?: boolean;
|
|
23
|
+
maxDiscountCents?: number;
|
|
24
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
25
|
+
startDate?: string;
|
|
26
|
+
endDate?: string;
|
|
27
|
+
maxRedemptions?: number;
|
|
28
|
+
maxRedemptionsPerCustomer?: number;
|
|
29
|
+
maxRedemptionsDaily?: number;
|
|
30
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
31
|
+
minOrderValueCents?: number;
|
|
32
|
+
maxOrderValueCents?: number;
|
|
33
|
+
bundleId?: string;
|
|
34
|
+
sector: string;
|
|
35
|
+
country: 'US' | 'CA';
|
|
36
|
+
originSystems?: ('boost' | 'thrive' | 'volante' | 'genius' | 'agilysys')[];
|
|
37
|
+
dailySchedule?: {
|
|
38
|
+
dayOfWeek: 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
|
|
39
|
+
active: boolean;
|
|
40
|
+
startTime: string;
|
|
41
|
+
endTime: string;
|
|
42
|
+
}[];
|
|
43
|
+
eligibility?: {
|
|
44
|
+
eligibilityType: 'everyone' | 'meal_plan' | 'badge_pay' | 'segment';
|
|
45
|
+
segmentId?: string;
|
|
46
|
+
maxRedemptionsPerCustomer?: number;
|
|
47
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
48
|
+
}[];
|
|
49
|
+
siteScopes?: {
|
|
50
|
+
siteId: string;
|
|
51
|
+
}[];
|
|
52
|
+
stationScopes?: {
|
|
53
|
+
siteId: string;
|
|
54
|
+
stationId: string;
|
|
55
|
+
}[];
|
|
56
|
+
itemTargets?: {
|
|
57
|
+
siteId?: string;
|
|
58
|
+
stationId?: string;
|
|
59
|
+
menuId?: string;
|
|
60
|
+
categoryId?: string;
|
|
61
|
+
itemId?: string;
|
|
62
|
+
maxDiscountCents?: number;
|
|
63
|
+
siteName?: string;
|
|
64
|
+
stationName?: string;
|
|
65
|
+
menuName?: string;
|
|
66
|
+
categoryName?: string;
|
|
67
|
+
itemName?: string;
|
|
68
|
+
}[];
|
|
69
|
+
salesChannels?: string[];
|
|
70
|
+
paymentRestrictions?: string[];
|
|
71
|
+
createdAt?: string;
|
|
72
|
+
updatedAt?: string;
|
|
73
|
+
createdBy?: string;
|
|
74
|
+
updatedBy?: string;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=CampaignPublishedEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CampaignPublishedEvent.d.ts","sourceRoot":"","sources":["../../../src/messages/events/CampaignPublishedEvent.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,wBAAwB,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE;QAEb,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAElC,OAAO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src/messages/events/CampaignPublishedEvent.ts"],"names":[],"mappings":";AAAA,sDAAsD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface RewardCampaignPublishedEvent {
|
|
2
2
|
id: string;
|
|
3
3
|
type: 'RewardCampaignPublishedEvent';
|
|
4
|
-
version: '0.0
|
|
4
|
+
version: '0.1.0';
|
|
5
5
|
timestamp: string;
|
|
6
6
|
traceContext: {
|
|
7
7
|
traceparent?: string;
|
|
@@ -19,6 +19,108 @@ export interface RewardCampaignPublishedEvent {
|
|
|
19
19
|
associatedBrandIds?: string[];
|
|
20
20
|
maxRewardCount?: number;
|
|
21
21
|
rewardMilestone?: number;
|
|
22
|
+
backfillData?: {
|
|
23
|
+
reward: {
|
|
24
|
+
rewardId: string;
|
|
25
|
+
campaignId?: string;
|
|
26
|
+
name: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
status: 'draft' | 'active' | 'paused' | 'archived';
|
|
29
|
+
sector: string;
|
|
30
|
+
country: 'US' | 'CA';
|
|
31
|
+
realm?: string;
|
|
32
|
+
earning: {
|
|
33
|
+
siteIds?: string[];
|
|
34
|
+
stationIds?: string[];
|
|
35
|
+
startDate?: string;
|
|
36
|
+
endDate?: string;
|
|
37
|
+
};
|
|
38
|
+
redemption?: {
|
|
39
|
+
siteIds?: string[];
|
|
40
|
+
stationIds?: string[];
|
|
41
|
+
startDate?: string;
|
|
42
|
+
endDate?: string;
|
|
43
|
+
};
|
|
44
|
+
earningRules?: {
|
|
45
|
+
eventType: string;
|
|
46
|
+
points: number;
|
|
47
|
+
spendThresholdCents?: number;
|
|
48
|
+
itemId?: string;
|
|
49
|
+
}[];
|
|
50
|
+
milestone?: {
|
|
51
|
+
pointsRequired: number;
|
|
52
|
+
resetsAfterMilestone: boolean;
|
|
53
|
+
maxRewardCount?: number;
|
|
54
|
+
};
|
|
55
|
+
createdAt?: string;
|
|
56
|
+
updatedAt?: string;
|
|
57
|
+
createdBy?: string;
|
|
58
|
+
};
|
|
59
|
+
campaign?: {
|
|
60
|
+
campaignId: string;
|
|
61
|
+
name: string;
|
|
62
|
+
description?: string;
|
|
63
|
+
type: 'promo_code' | 'auto_apply';
|
|
64
|
+
status: 'draft' | 'active' | 'paused' | 'expired' | 'archived';
|
|
65
|
+
discountType: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
66
|
+
discountScope: 'order' | 'items';
|
|
67
|
+
discountValueCents?: number;
|
|
68
|
+
discountPercent?: number;
|
|
69
|
+
appliesToCheapest?: boolean;
|
|
70
|
+
maxDiscountCents?: number;
|
|
71
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
72
|
+
startDate?: string;
|
|
73
|
+
endDate?: string;
|
|
74
|
+
maxRedemptions?: number;
|
|
75
|
+
maxRedemptionsPerCustomer?: number;
|
|
76
|
+
maxRedemptionsDaily?: number;
|
|
77
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
78
|
+
minOrderValueCents?: number;
|
|
79
|
+
maxOrderValueCents?: number;
|
|
80
|
+
bundleId?: string;
|
|
81
|
+
sector: string;
|
|
82
|
+
country: 'US' | 'CA';
|
|
83
|
+
originSystems?: ('boost' | 'thrive' | 'volante' | 'genius' | 'agilysys')[];
|
|
84
|
+
dailySchedule?: {
|
|
85
|
+
dayOfWeek: 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
|
|
86
|
+
active: boolean;
|
|
87
|
+
startTime: string;
|
|
88
|
+
endTime: string;
|
|
89
|
+
}[];
|
|
90
|
+
eligibility?: {
|
|
91
|
+
eligibilityType: 'everyone' | 'meal_plan' | 'badge_pay' | 'segment';
|
|
92
|
+
segmentId?: string;
|
|
93
|
+
maxRedemptionsPerCustomer?: number;
|
|
94
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
95
|
+
}[];
|
|
96
|
+
siteScopes?: {
|
|
97
|
+
siteId: string;
|
|
98
|
+
}[];
|
|
99
|
+
stationScopes?: {
|
|
100
|
+
siteId: string;
|
|
101
|
+
stationId: string;
|
|
102
|
+
}[];
|
|
103
|
+
itemTargets?: {
|
|
104
|
+
siteId?: string;
|
|
105
|
+
stationId?: string;
|
|
106
|
+
menuId?: string;
|
|
107
|
+
categoryId?: string;
|
|
108
|
+
itemId?: string;
|
|
109
|
+
maxDiscountCents?: number;
|
|
110
|
+
siteName?: string;
|
|
111
|
+
stationName?: string;
|
|
112
|
+
menuName?: string;
|
|
113
|
+
categoryName?: string;
|
|
114
|
+
itemName?: string;
|
|
115
|
+
}[];
|
|
116
|
+
salesChannels?: string[];
|
|
117
|
+
paymentRestrictions?: string[];
|
|
118
|
+
createdAt?: string;
|
|
119
|
+
updatedAt?: string;
|
|
120
|
+
createdBy?: string;
|
|
121
|
+
updatedBy?: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
22
124
|
};
|
|
23
125
|
}
|
|
24
126
|
//# sourceMappingURL=RewardCampaignPublishedEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RewardCampaignPublishedEvent.d.ts","sourceRoot":"","sources":["../../../src/messages/events/RewardCampaignPublishedEvent.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,4BAA4B;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE;QAEb,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC,OAAO,EAAE;
|
|
1
|
+
{"version":3,"file":"RewardCampaignPublishedEvent.d.ts","sourceRoot":"","sources":["../../../src/messages/events/RewardCampaignPublishedEvent.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,4BAA4B;IAC5C,EAAE,EAAE,MAAM,CAAC;I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B,MAAM,CAAC,EAAE,MAAM,CAAC;oBAChB,UAAU,CAAC,EAAE,MAAM,CAAC;oBACpB,MAAM,CAAC,EAAE,MAAM,CAAC;oBAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;oBAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;oBAClB,WAAW,CAAC,EAAE,MAAM,CAAC;oBACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;oBAClB,YAAY,CAAC,EAAE,MAAM,CAAC;oBACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;iBAClB,EAAE,CAAC;gBACJ,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;gBACzB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;gBAE/B,SAAS,CAAC,EAAE,MAAM,CAAC;gBAEnB,SAAS,CAAC,EAAE,MAAM,CAAC;gBACnB,SAAS,CAAC,EAAE,MAAM,CAAC;gBACnB,SAAS,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;SACF,CAAC;KACF,CAAC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface RewardCreatedEvent {
|
|
2
2
|
id: string;
|
|
3
3
|
type: 'RewardCreatedEvent';
|
|
4
|
-
version: '0.0
|
|
4
|
+
version: '0.1.0';
|
|
5
5
|
timestamp: string;
|
|
6
6
|
traceContext: {
|
|
7
7
|
traceparent?: string;
|
|
@@ -22,6 +22,25 @@ export interface RewardCreatedEvent {
|
|
|
22
22
|
campaignId: string;
|
|
23
23
|
associatedSiteIds?: string[];
|
|
24
24
|
associatedBrandIds?: string[];
|
|
25
|
+
backfillData?: {
|
|
26
|
+
voucher: {
|
|
27
|
+
voucherId: string;
|
|
28
|
+
voucherCode: string;
|
|
29
|
+
campaignId: string;
|
|
30
|
+
rewardId: string;
|
|
31
|
+
customerId: string;
|
|
32
|
+
orderId?: string;
|
|
33
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
34
|
+
status?: string;
|
|
35
|
+
discountType: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
36
|
+
discountValueCents?: number;
|
|
37
|
+
discountPercent?: number;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
expiresAt?: string;
|
|
40
|
+
sector: string;
|
|
41
|
+
country: 'US' | 'CA';
|
|
42
|
+
};
|
|
43
|
+
};
|
|
25
44
|
};
|
|
26
45
|
}
|
|
27
46
|
//# sourceMappingURL=RewardCreatedEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RewardCreatedEvent.d.ts","sourceRoot":"","sources":["../../../src/messages/events/RewardCreatedEvent.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,oBAAoB,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE;QAEb,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC,OAAO,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,mBAAmB,EAAE,aAAa,GAAG,YAAY,GAAG,WAAW,CAAC;QAEhE,oBAAoB,EAAE,MAAM,CAAC;QAC7B,oBAAoB,EAAE,MAAM,CAAC;QAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"RewardCreatedEvent.d.ts","sourceRoot":"","sources":["../../../src/messages/events/RewardCreatedEvent.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IAClC,EAAE,EAA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B,SAAS,EAAE,MAAM,CAAC;gBAElB,SAAS,CAAC,EAAE,MAAM,CAAC;gBACnB,MAAM,EAAE,MAAM,CAAC;gBACf,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;aACrB,CAAC;SACF,CAAC;KACF,CAAC;CACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface RewardPublishedEvent {
|
|
2
|
+
id: string;
|
|
3
|
+
type: 'RewardPublishedEvent';
|
|
4
|
+
version: '0.0.1';
|
|
5
|
+
timestamp: string;
|
|
6
|
+
traceContext: {
|
|
7
|
+
traceparent?: string;
|
|
8
|
+
};
|
|
9
|
+
source: string;
|
|
10
|
+
domain?: string;
|
|
11
|
+
visibility?: 'public' | 'private';
|
|
12
|
+
payload: {
|
|
13
|
+
rewardId: string;
|
|
14
|
+
campaignId?: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
status: 'draft' | 'active' | 'paused' | 'archived';
|
|
18
|
+
sector: string;
|
|
19
|
+
country: 'US' | 'CA';
|
|
20
|
+
realm?: string;
|
|
21
|
+
earning: {
|
|
22
|
+
siteIds?: string[];
|
|
23
|
+
stationIds?: string[];
|
|
24
|
+
startDate?: string;
|
|
25
|
+
endDate?: string;
|
|
26
|
+
};
|
|
27
|
+
redemption?: {
|
|
28
|
+
siteIds?: string[];
|
|
29
|
+
stationIds?: string[];
|
|
30
|
+
startDate?: string;
|
|
31
|
+
endDate?: string;
|
|
32
|
+
};
|
|
33
|
+
earningRules?: {
|
|
34
|
+
eventType: string;
|
|
35
|
+
points: number;
|
|
36
|
+
spendThresholdCents?: number;
|
|
37
|
+
itemId?: string;
|
|
38
|
+
}[];
|
|
39
|
+
milestone?: {
|
|
40
|
+
pointsRequired: number;
|
|
41
|
+
resetsAfterMilestone: boolean;
|
|
42
|
+
maxRewardCount?: number;
|
|
43
|
+
};
|
|
44
|
+
createdAt?: string;
|
|
45
|
+
updatedAt?: string;
|
|
46
|
+
createdBy?: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=RewardPublishedEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RewardPublishedEvent.d.ts","sourceRoot":"","sources":["../../../src/messages/events/RewardPublishedEvent.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,sBAAsB,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE;QAEb,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAElC,OAAO,EAAE;QAER,QAAQ,EAAE,MAAM,CAAC;QAEjB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;QACnD,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;QAErB,KAAK,CAAC,EAAE,MAAM,CAAC;QAEf,OAAO,EAAE;YAER,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;YAEnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;YAEtB,SAAS,CAAC,EAAE,MAAM,CAAC;YAEnB,OAAO,CAAC,EAAE,MAAM,CAAC;SACjB,CAAC;QAEF,UAAU,CAAC,EAAE;YAEZ,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;YAEnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;YAEtB,SAAS,CAAC,EAAE,MAAM,CAAC;YAEnB,OAAO,CAAC,EAAE,MAAM,CAAC;SACjB,CAAC;QACF,YAAY,CAAC,EAAE;YAEd,SAAS,EAAE,MAAM,CAAC;YAClB,MAAM,EAAE,MAAM,CAAC;YACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;YAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;SAChB,EAAE,CAAC;QACJ,SAAS,CAAC,EAAE;YACX,cAAc,EAAE,MAAM,CAAC;YACvB,oBAAoB,EAAE,OAAO,CAAC;YAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;QAEF,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RewardPublishedEvent.js","sourceRoot":"","sources":["../../../src/messages/events/RewardPublishedEvent.ts"],"names":[],"mappings":";AAAA,sDAAsD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface RewardRedeemedEvent {
|
|
2
2
|
id: string;
|
|
3
3
|
type: 'RewardRedeemedEvent';
|
|
4
|
-
version: '0.0
|
|
4
|
+
version: '0.1.0';
|
|
5
5
|
timestamp: string;
|
|
6
6
|
traceContext: {
|
|
7
7
|
traceparent?: string;
|
|
@@ -22,6 +22,21 @@ export interface RewardRedeemedEvent {
|
|
|
22
22
|
campaignId: string;
|
|
23
23
|
associatedSiteIds?: string[];
|
|
24
24
|
associatedBrandIds?: string[];
|
|
25
|
+
backfillData?: {
|
|
26
|
+
redemption: {
|
|
27
|
+
redemptionId: string;
|
|
28
|
+
voucherId: string;
|
|
29
|
+
voucherCode: string;
|
|
30
|
+
campaignId: string;
|
|
31
|
+
orderId: string;
|
|
32
|
+
customerId: string;
|
|
33
|
+
siteId: string;
|
|
34
|
+
sector: string;
|
|
35
|
+
country: 'CA' | 'US';
|
|
36
|
+
discountAmountCents: number;
|
|
37
|
+
};
|
|
38
|
+
rewardId: string;
|
|
39
|
+
};
|
|
25
40
|
};
|
|
26
41
|
}
|
|
27
42
|
//# sourceMappingURL=RewardRedeemedEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RewardRedeemedEvent.d.ts","sourceRoot":"","sources":["../../../src/messages/events/RewardRedeemedEvent.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE;QAEb,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC,OAAO,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,mBAAmB,EAAE,aAAa,GAAG,YAAY,GAAG,WAAW,CAAC;QAEhE,oBAAoB,EAAE,MAAM,CAAC;QAC7B,oBAAoB,EAAE,MAAM,CAAC;QAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"RewardRedeemedEvent.d.ts","sourceRoot":"","sources":["../../../src/messages/events/RewardRedeemedEvent.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE;QAEb,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAClC,OAAO,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,mBAAmB,EAAE,aAAa,GAAG,YAAY,GAAG,WAAW,CAAC;QAEhE,oBAAoB,EAAE,MAAM,CAAC;QAC7B,oBAAoB,EAAE,MAAM,CAAC;QAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,EAAE,MAAM,CAAC;QACvB,eAAe,EAAE,MAAM,CAAC;QAExB,UAAU,EAAE,MAAM,CAAC;QACnB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;QAE9B,YAAY,CAAC,EAAE;YAEd,UAAU,EAAE;gBAEX,YAAY,EAAE,MAAM,CAAC;gBAErB,SAAS,EAAE,MAAM,CAAC;gBAElB,WAAW,EAAE,MAAM,CAAC;gBAEpB,UAAU,EAAE,MAAM,CAAC;gBAEnB,OAAO,EAAE,MAAM,CAAC;gBAEhB,UAAU,EAAE,MAAM,CAAC;gBAEnB,MAAM,EAAE,MAAM,CAAC;gBAEf,MAAM,EAAE,MAAM,CAAC;gBAEf,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;gBAErB,mBAAmB,EAAE,MAAM,CAAC;aAC5B,CAAC;YAEF,QAAQ,EAAE,MAAM,CAAC;SACjB,CAAC;KACF,CAAC;CACF"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface VoucherCreatedEvent {
|
|
2
|
+
id: string;
|
|
3
|
+
type: 'VoucherCreatedEvent';
|
|
4
|
+
version: '0.0.1';
|
|
5
|
+
timestamp: string;
|
|
6
|
+
traceContext: {
|
|
7
|
+
traceparent?: string;
|
|
8
|
+
};
|
|
9
|
+
source: string;
|
|
10
|
+
domain?: string;
|
|
11
|
+
visibility?: 'public' | 'private';
|
|
12
|
+
payload: {
|
|
13
|
+
voucherId: string;
|
|
14
|
+
voucherCode: string;
|
|
15
|
+
campaignId: string;
|
|
16
|
+
rewardId: string;
|
|
17
|
+
customerId: string;
|
|
18
|
+
orderId?: string;
|
|
19
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
20
|
+
status?: string;
|
|
21
|
+
discountType: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
22
|
+
discountValueCents?: number;
|
|
23
|
+
discountPercent?: number;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
expiresAt?: string;
|
|
26
|
+
sector: string;
|
|
27
|
+
country: 'US' | 'CA';
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=VoucherCreatedEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoucherCreatedEvent.d.ts","sourceRoot":"","sources":["../../../src/messages/events/VoucherCreatedEvent.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE;QAEb,WAAW,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,UAAU,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAElC,OAAO,EAAE;QACR,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QAEpB,UAAU,EAAE,MAAM,CAAC;QAEnB,QAAQ,EAAE,MAAM,CAAC;QAEjB,UAAU,EAAE,MAAM,CAAC;QAEnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,MAAM,GAAG,UAAU,GAAG,cAAc,CAAC;QAC/C,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,YAAY,GAAG,aAAa,GAAG,WAAW,CAAC;QAEzD,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAE5B,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB,SAAS,EAAE,MAAM,CAAC;QAElB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;KACrB,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VoucherCreatedEvent.js","sourceRoot":"","sources":["../../../src/messages/events/VoucherCreatedEvent.ts"],"names":[],"mappings":";AAAA,sDAAsD"}
|
|
@@ -3,6 +3,7 @@ export { AvrideOrderStatusUpdatedEvent } from './AvrideOrderStatusUpdatedEvent';
|
|
|
3
3
|
export { CalendarEventCreatedEvent } from './CalendarEventCreatedEvent';
|
|
4
4
|
export { CalendarEventDeletedEvent } from './CalendarEventDeletedEvent';
|
|
5
5
|
export { CalendarEventUpdatedEvent } from './CalendarEventUpdatedEvent';
|
|
6
|
+
export { CampaignPublishedEvent } from './CampaignPublishedEvent';
|
|
6
7
|
export { CampaignStatusChangedEvent } from './CampaignStatusChangedEvent';
|
|
7
8
|
export { DeliveryDropOffLeaveWarningEvent } from './DeliveryDropOffLeaveWarningEvent';
|
|
8
9
|
export { DiscountCreatedEvent } from './DiscountCreatedEvent';
|
|
@@ -46,6 +47,7 @@ export { RewardCardEarnedEvent } from './RewardCardEarnedEvent';
|
|
|
46
47
|
export { RewardCardPointsAdjustedEvent } from './RewardCardPointsAdjustedEvent';
|
|
47
48
|
export { RewardCreatedEvent } from './RewardCreatedEvent';
|
|
48
49
|
export { RewardMilestoneReachedEvent } from './RewardMilestoneReachedEvent';
|
|
50
|
+
export { RewardPublishedEvent } from './RewardPublishedEvent';
|
|
49
51
|
export { RewardRedeemedEvent } from './RewardRedeemedEvent';
|
|
50
52
|
export { SegmentMembersAddedEvent } from './SegmentMembersAddedEvent';
|
|
51
53
|
export { SegmentMembersRemovedEvent } from './SegmentMembersRemovedEvent';
|
|
@@ -62,5 +64,6 @@ export { UserPasswordChangedEvent } from './UserPasswordChangedEvent';
|
|
|
62
64
|
export { UserPasswordResetRequestedEvent } from './UserPasswordResetRequestedEvent';
|
|
63
65
|
export { UserSoftDeletedEvent } from './UserSoftDeletedEvent';
|
|
64
66
|
export { UserUpdatedEvent } from './UserUpdatedEvent';
|
|
67
|
+
export { VoucherCreatedEvent } from './VoucherCreatedEvent';
|
|
65
68
|
export { VoucherRedeemedEvent } from './VoucherRedeemedEvent';
|
|
66
69
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/events/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAEtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,0BAA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AoB,CAAC;AAEtD,OAAO,EAAE,mCAAmC,EAAE,MAAM,uCAAuC,CAAC;AAE5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAEpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/package.json
CHANGED
package/src/interface/vendor.ts
CHANGED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
|
+
|
|
3
|
+
export interface CampaignPublishedEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
type: 'CampaignPublishedEvent';
|
|
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
|
+
// The whole loyalty campaign as stored, at the time it was published.
|
|
18
|
+
payload: {
|
|
19
|
+
// Loyalty campaign id.
|
|
20
|
+
campaignId: string;
|
|
21
|
+
name: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
type: 'promo_code' | 'auto_apply';
|
|
24
|
+
status: 'draft' | 'active' | 'paused' | 'expired' | 'archived';
|
|
25
|
+
discountType: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
26
|
+
discountScope: 'order' | 'items';
|
|
27
|
+
// AMOUNT_OFF only, minor units.
|
|
28
|
+
discountValueCents?: number;
|
|
29
|
+
// PERCENT_OFF only.
|
|
30
|
+
discountPercent?: number;
|
|
31
|
+
appliesToCheapest?: boolean;
|
|
32
|
+
maxDiscountCents?: number;
|
|
33
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
34
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
35
|
+
startDate?: string;
|
|
36
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
37
|
+
endDate?: string;
|
|
38
|
+
maxRedemptions?: number;
|
|
39
|
+
maxRedemptionsPerCustomer?: number;
|
|
40
|
+
maxRedemptionsDaily?: number;
|
|
41
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
42
|
+
minOrderValueCents?: number;
|
|
43
|
+
maxOrderValueCents?: number;
|
|
44
|
+
bundleId?: string;
|
|
45
|
+
// Location-service sector name, e.g. Eurest.
|
|
46
|
+
sector: string;
|
|
47
|
+
country: 'US' | 'CA';
|
|
48
|
+
// Origin systems the campaign applies to, e.g. thrive.
|
|
49
|
+
originSystems?: ('boost' | 'thrive' | 'volante' | 'genius' | 'agilysys')[];
|
|
50
|
+
dailySchedule?: {
|
|
51
|
+
dayOfWeek: 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
|
|
52
|
+
active: boolean;
|
|
53
|
+
// HH:MM
|
|
54
|
+
startTime: string;
|
|
55
|
+
// HH:MM
|
|
56
|
+
endTime: string;
|
|
57
|
+
}[];
|
|
58
|
+
eligibility?: {
|
|
59
|
+
eligibilityType: 'everyone' | 'meal_plan' | 'badge_pay' | 'segment';
|
|
60
|
+
segmentId?: string;
|
|
61
|
+
maxRedemptionsPerCustomer?: number;
|
|
62
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
63
|
+
}[];
|
|
64
|
+
// Sites where the campaign redeems.
|
|
65
|
+
siteScopes?: {
|
|
66
|
+
siteId: string;
|
|
67
|
+
}[];
|
|
68
|
+
// Stations where the campaign redeems.
|
|
69
|
+
stationScopes?: {
|
|
70
|
+
siteId: string;
|
|
71
|
+
stationId: string;
|
|
72
|
+
}[];
|
|
73
|
+
itemTargets?: {
|
|
74
|
+
siteId?: string;
|
|
75
|
+
stationId?: string;
|
|
76
|
+
menuId?: string;
|
|
77
|
+
categoryId?: string;
|
|
78
|
+
itemId?: string;
|
|
79
|
+
maxDiscountCents?: number;
|
|
80
|
+
siteName?: string;
|
|
81
|
+
stationName?: string;
|
|
82
|
+
menuName?: string;
|
|
83
|
+
categoryName?: string;
|
|
84
|
+
itemName?: string;
|
|
85
|
+
}[];
|
|
86
|
+
salesChannels?: string[];
|
|
87
|
+
paymentRestrictions?: string[];
|
|
88
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
89
|
+
createdAt?: string;
|
|
90
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
91
|
+
updatedAt?: string;
|
|
92
|
+
createdBy?: string;
|
|
93
|
+
updatedBy?: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export interface RewardCampaignPublishedEvent {
|
|
4
4
|
id: string;
|
|
5
5
|
type: 'RewardCampaignPublishedEvent';
|
|
6
|
-
version: '0.0
|
|
6
|
+
version: '0.1.0';
|
|
7
7
|
timestamp: string;
|
|
8
8
|
traceContext: {
|
|
9
9
|
// W3C traceparent, injected by MessageBus from the active trace context
|
|
@@ -15,6 +15,7 @@ export interface RewardCampaignPublishedEvent {
|
|
|
15
15
|
// Whether other domains may integrate against this message. Absent means private.
|
|
16
16
|
visibility?: 'public' | 'private';
|
|
17
17
|
payload: {
|
|
18
|
+
// Voucherify campaign id when source is discount-service. Loyalty reward id when source is loyalty-service. Consumers split on the envelope source.
|
|
18
19
|
campaignId: string;
|
|
19
20
|
campaignName: string;
|
|
20
21
|
campaignDescription?: string;
|
|
@@ -24,5 +25,139 @@ export interface RewardCampaignPublishedEvent {
|
|
|
24
25
|
associatedBrandIds?: string[];
|
|
25
26
|
maxRewardCount?: number;
|
|
26
27
|
rewardMilestone?: number;
|
|
28
|
+
// Loyalty-service only. The loyalty-shaped payloads for this row, so the data team can rebuild it into the new events without a replay. Absent from discount-service events.
|
|
29
|
+
backfillData?: {
|
|
30
|
+
// The whole loyalty reward as stored, at the time it was published.
|
|
31
|
+
reward: {
|
|
32
|
+
// Loyalty reward id.
|
|
33
|
+
rewardId: string;
|
|
34
|
+
// Loyalty campaign the milestone voucher redeems against.
|
|
35
|
+
campaignId?: string;
|
|
36
|
+
name: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
status: 'draft' | 'active' | 'paused' | 'archived';
|
|
39
|
+
sector: string;
|
|
40
|
+
country: 'US' | 'CA';
|
|
41
|
+
// Consumer app realm, e.g. boost or thrive.
|
|
42
|
+
realm?: string;
|
|
43
|
+
// Where and when customers earn toward the reward (reward_association). No dates until loyalty has an earning schedule.
|
|
44
|
+
earning: {
|
|
45
|
+
// Site ids.
|
|
46
|
+
siteIds?: string[];
|
|
47
|
+
// Station (brand) ids.
|
|
48
|
+
stationIds?: string[];
|
|
49
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
50
|
+
startDate?: string;
|
|
51
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
52
|
+
endDate?: string;
|
|
53
|
+
};
|
|
54
|
+
// Where and when the voucher redeems (the campaign's site and station scope and dates).
|
|
55
|
+
redemption?: {
|
|
56
|
+
// Site ids.
|
|
57
|
+
siteIds?: string[];
|
|
58
|
+
// Station (brand) ids.
|
|
59
|
+
stationIds?: string[];
|
|
60
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
61
|
+
startDate?: string;
|
|
62
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
63
|
+
endDate?: string;
|
|
64
|
+
};
|
|
65
|
+
earningRules?: {
|
|
66
|
+
// e.g. order_placed
|
|
67
|
+
eventType: string;
|
|
68
|
+
points: number;
|
|
69
|
+
spendThresholdCents?: number;
|
|
70
|
+
itemId?: string;
|
|
71
|
+
}[];
|
|
72
|
+
milestone?: {
|
|
73
|
+
pointsRequired: number;
|
|
74
|
+
resetsAfterMilestone: boolean;
|
|
75
|
+
maxRewardCount?: number;
|
|
76
|
+
};
|
|
77
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
78
|
+
createdAt?: string;
|
|
79
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
80
|
+
updatedAt?: string;
|
|
81
|
+
createdBy?: string;
|
|
82
|
+
};
|
|
83
|
+
// The whole loyalty campaign as stored, at the time it was published.
|
|
84
|
+
campaign?: {
|
|
85
|
+
// Loyalty campaign id.
|
|
86
|
+
campaignId: string;
|
|
87
|
+
name: string;
|
|
88
|
+
description?: string;
|
|
89
|
+
type: 'promo_code' | 'auto_apply';
|
|
90
|
+
status: 'draft' | 'active' | 'paused' | 'expired' | 'archived';
|
|
91
|
+
discountType: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
92
|
+
discountScope: 'order' | 'items';
|
|
93
|
+
// AMOUNT_OFF only, minor units.
|
|
94
|
+
discountValueCents?: number;
|
|
95
|
+
// PERCENT_OFF only.
|
|
96
|
+
discountPercent?: number;
|
|
97
|
+
appliesToCheapest?: boolean;
|
|
98
|
+
maxDiscountCents?: number;
|
|
99
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
100
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
101
|
+
startDate?: string;
|
|
102
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
103
|
+
endDate?: string;
|
|
104
|
+
maxRedemptions?: number;
|
|
105
|
+
maxRedemptionsPerCustomer?: number;
|
|
106
|
+
maxRedemptionsDaily?: number;
|
|
107
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
108
|
+
minOrderValueCents?: number;
|
|
109
|
+
maxOrderValueCents?: number;
|
|
110
|
+
bundleId?: string;
|
|
111
|
+
// Location-service sector name, e.g. Eurest.
|
|
112
|
+
sector: string;
|
|
113
|
+
country: 'US' | 'CA';
|
|
114
|
+
// Origin systems the campaign applies to, e.g. thrive.
|
|
115
|
+
originSystems?: ('boost' | 'thrive' | 'volante' | 'genius' | 'agilysys')[];
|
|
116
|
+
dailySchedule?: {
|
|
117
|
+
dayOfWeek: 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
|
|
118
|
+
active: boolean;
|
|
119
|
+
// HH:MM
|
|
120
|
+
startTime: string;
|
|
121
|
+
// HH:MM
|
|
122
|
+
endTime: string;
|
|
123
|
+
}[];
|
|
124
|
+
eligibility?: {
|
|
125
|
+
eligibilityType: 'everyone' | 'meal_plan' | 'badge_pay' | 'segment';
|
|
126
|
+
segmentId?: string;
|
|
127
|
+
maxRedemptionsPerCustomer?: number;
|
|
128
|
+
maxRedemptionsPerCustomerDaily?: number;
|
|
129
|
+
}[];
|
|
130
|
+
// Sites where the campaign redeems.
|
|
131
|
+
siteScopes?: {
|
|
132
|
+
siteId: string;
|
|
133
|
+
}[];
|
|
134
|
+
// Stations where the campaign redeems.
|
|
135
|
+
stationScopes?: {
|
|
136
|
+
siteId: string;
|
|
137
|
+
stationId: string;
|
|
138
|
+
}[];
|
|
139
|
+
itemTargets?: {
|
|
140
|
+
siteId?: string;
|
|
141
|
+
stationId?: string;
|
|
142
|
+
menuId?: string;
|
|
143
|
+
categoryId?: string;
|
|
144
|
+
itemId?: string;
|
|
145
|
+
maxDiscountCents?: number;
|
|
146
|
+
siteName?: string;
|
|
147
|
+
stationName?: string;
|
|
148
|
+
menuName?: string;
|
|
149
|
+
categoryName?: string;
|
|
150
|
+
itemName?: string;
|
|
151
|
+
}[];
|
|
152
|
+
salesChannels?: string[];
|
|
153
|
+
paymentRestrictions?: string[];
|
|
154
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
155
|
+
createdAt?: string;
|
|
156
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
157
|
+
updatedAt?: string;
|
|
158
|
+
createdBy?: string;
|
|
159
|
+
updatedBy?: string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
27
162
|
};
|
|
28
163
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export interface RewardCreatedEvent {
|
|
4
4
|
id: string;
|
|
5
5
|
type: 'RewardCreatedEvent';
|
|
6
|
-
version: '0.0
|
|
6
|
+
version: '0.1.0';
|
|
7
7
|
timestamp: string;
|
|
8
8
|
traceContext: {
|
|
9
9
|
// W3C traceparent, injected by MessageBus from the active trace context
|
|
@@ -25,8 +25,38 @@ export interface RewardCreatedEvent {
|
|
|
25
25
|
voucherExpiryDate?: string;
|
|
26
26
|
redemptionDate?: string;
|
|
27
27
|
redeemedOrderId?: string;
|
|
28
|
+
// Voucherify campaign id when source is discount-service. Loyalty reward id when source is loyalty-service. Consumers split on the envelope source.
|
|
28
29
|
campaignId: string;
|
|
29
30
|
associatedSiteIds?: string[];
|
|
30
31
|
associatedBrandIds?: string[];
|
|
32
|
+
// Loyalty-service only. The loyalty-shaped payloads for this row, so the data team can rebuild it into the new events without a replay. Absent from discount-service events.
|
|
33
|
+
backfillData?: {
|
|
34
|
+
// The loyalty voucher as stored when a milestone issued it.
|
|
35
|
+
voucher: {
|
|
36
|
+
voucherId: string;
|
|
37
|
+
voucherCode: string;
|
|
38
|
+
// Loyalty campaign the voucher redeems against.
|
|
39
|
+
campaignId: string;
|
|
40
|
+
// Reward whose milestone issued the voucher.
|
|
41
|
+
rewardId: string;
|
|
42
|
+
// CDL customer id.
|
|
43
|
+
customerId: string;
|
|
44
|
+
// Order whose points reached the milestone.
|
|
45
|
+
orderId?: string;
|
|
46
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
47
|
+
status?: string;
|
|
48
|
+
discountType: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
49
|
+
// AMOUNT_OFF only, minor units.
|
|
50
|
+
discountValueCents?: number;
|
|
51
|
+
// PERCENT_OFF only.
|
|
52
|
+
discountPercent?: number;
|
|
53
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
54
|
+
createdAt: string;
|
|
55
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
56
|
+
expiresAt?: string;
|
|
57
|
+
sector: string;
|
|
58
|
+
country: 'US' | 'CA';
|
|
59
|
+
};
|
|
60
|
+
};
|
|
31
61
|
};
|
|
32
62
|
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
|
+
|
|
3
|
+
export interface RewardPublishedEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
type: 'RewardPublishedEvent';
|
|
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
|
+
// The whole loyalty reward as stored, at the time it was published.
|
|
18
|
+
payload: {
|
|
19
|
+
// Loyalty reward id.
|
|
20
|
+
rewardId: string;
|
|
21
|
+
// Loyalty campaign the milestone voucher redeems against.
|
|
22
|
+
campaignId?: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
status: 'draft' | 'active' | 'paused' | 'archived';
|
|
26
|
+
sector: string;
|
|
27
|
+
country: 'US' | 'CA';
|
|
28
|
+
// Consumer app realm, e.g. boost or thrive.
|
|
29
|
+
realm?: string;
|
|
30
|
+
// Where and when customers earn toward the reward (reward_association). No dates until loyalty has an earning schedule.
|
|
31
|
+
earning: {
|
|
32
|
+
// Site ids.
|
|
33
|
+
siteIds?: string[];
|
|
34
|
+
// Station (brand) ids.
|
|
35
|
+
stationIds?: string[];
|
|
36
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
37
|
+
startDate?: string;
|
|
38
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
39
|
+
endDate?: string;
|
|
40
|
+
};
|
|
41
|
+
// Where and when the voucher redeems (the campaign's site and station scope and dates).
|
|
42
|
+
redemption?: {
|
|
43
|
+
// Site ids.
|
|
44
|
+
siteIds?: string[];
|
|
45
|
+
// Station (brand) ids.
|
|
46
|
+
stationIds?: string[];
|
|
47
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
48
|
+
startDate?: string;
|
|
49
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
50
|
+
endDate?: string;
|
|
51
|
+
};
|
|
52
|
+
earningRules?: {
|
|
53
|
+
// e.g. order_placed
|
|
54
|
+
eventType: string;
|
|
55
|
+
points: number;
|
|
56
|
+
spendThresholdCents?: number;
|
|
57
|
+
itemId?: string;
|
|
58
|
+
}[];
|
|
59
|
+
milestone?: {
|
|
60
|
+
pointsRequired: number;
|
|
61
|
+
resetsAfterMilestone: boolean;
|
|
62
|
+
maxRewardCount?: number;
|
|
63
|
+
};
|
|
64
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
65
|
+
createdAt?: string;
|
|
66
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
67
|
+
updatedAt?: string;
|
|
68
|
+
createdBy?: string;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export interface RewardRedeemedEvent {
|
|
4
4
|
id: string;
|
|
5
5
|
type: 'RewardRedeemedEvent';
|
|
6
|
-
version: '0.0
|
|
6
|
+
version: '0.1.0';
|
|
7
7
|
timestamp: string;
|
|
8
8
|
traceContext: {
|
|
9
9
|
// W3C traceparent, injected by MessageBus from the active trace context
|
|
@@ -25,8 +25,37 @@ export interface RewardRedeemedEvent {
|
|
|
25
25
|
voucherExpiryDate?: string;
|
|
26
26
|
redemptionDate: string;
|
|
27
27
|
redeemedOrderId: string;
|
|
28
|
+
// Voucherify campaign id when source is discount-service. Loyalty reward id when source is loyalty-service. Consumers split on the envelope source.
|
|
28
29
|
campaignId: string;
|
|
29
30
|
associatedSiteIds?: string[];
|
|
30
31
|
associatedBrandIds?: string[];
|
|
32
|
+
// Loyalty-service only. The loyalty-shaped payloads for this row, so the data team can rebuild it into the new events without a replay. Absent from discount-service events.
|
|
33
|
+
backfillData?: {
|
|
34
|
+
// The VoucherRedeemedEvent payload for this redemption.
|
|
35
|
+
redemption: {
|
|
36
|
+
// Id of the redemption this event records. A RedemptionRolledBackEvent for the same redemption carries the same id, so consumers pair the two on it.
|
|
37
|
+
redemptionId: string;
|
|
38
|
+
// Id of the redeemed voucher.
|
|
39
|
+
voucherId: string;
|
|
40
|
+
// Code of the redeemed voucher, exactly as loyalty stores it: upper-cased, except reward codes (boore, boorb, thrre and thrrb prefixes), which stay lower-case. Compare it as-is.
|
|
41
|
+
voucherCode: string;
|
|
42
|
+
// Id of the campaign the voucher belongs to.
|
|
43
|
+
campaignId: string;
|
|
44
|
+
// Id of the order the voucher was redeemed against: order.metadata.order_id from the redeem request, or order.source_id when that is absent.
|
|
45
|
+
orderId: string;
|
|
46
|
+
// Customer who redeemed the voucher: customer.source_id from the redeem request, or the customer's email when no source_id was sent. The redemption stores the same value, so the paired RedemptionRolledBackEvent carries the same identifier.
|
|
47
|
+
customerId: string;
|
|
48
|
+
// Id of the site the order was placed at: order.metadata.site_id from the redeem request, or order.metadata.location_group_id when that is absent.
|
|
49
|
+
siteId: string;
|
|
50
|
+
// Sector the voucher's campaign is scoped to, as a location-service sector name (e.g. Eurest). Copied onto the redemption when it is written.
|
|
51
|
+
sector: string;
|
|
52
|
+
// Country the voucher's campaign is scoped to. Copied onto the redemption when it is written.
|
|
53
|
+
country: 'CA' | 'US';
|
|
54
|
+
// Discount this redemption applied to the order, in cents.
|
|
55
|
+
discountAmountCents: number;
|
|
56
|
+
};
|
|
57
|
+
// Reward whose milestone issued the voucher.
|
|
58
|
+
rewardId: string;
|
|
59
|
+
};
|
|
31
60
|
};
|
|
32
61
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
2
|
+
|
|
3
|
+
export interface VoucherCreatedEvent {
|
|
4
|
+
id: string;
|
|
5
|
+
type: 'VoucherCreatedEvent';
|
|
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
|
+
// The loyalty voucher as stored when a milestone issued it.
|
|
18
|
+
payload: {
|
|
19
|
+
voucherId: string;
|
|
20
|
+
voucherCode: string;
|
|
21
|
+
// Loyalty campaign the voucher redeems against.
|
|
22
|
+
campaignId: string;
|
|
23
|
+
// Reward whose milestone issued the voucher.
|
|
24
|
+
rewardId: string;
|
|
25
|
+
// CDL customer id.
|
|
26
|
+
customerId: string;
|
|
27
|
+
// Order whose points reached the milestone.
|
|
28
|
+
orderId?: string;
|
|
29
|
+
codeType: 'open' | 'personal' | 'auto_applied';
|
|
30
|
+
status?: string;
|
|
31
|
+
discountType: 'AMOUNT_OFF' | 'PERCENT_OFF' | 'FREE_ITEM';
|
|
32
|
+
// AMOUNT_OFF only, minor units.
|
|
33
|
+
discountValueCents?: number;
|
|
34
|
+
// PERCENT_OFF only.
|
|
35
|
+
discountPercent?: number;
|
|
36
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
37
|
+
createdAt: string;
|
|
38
|
+
// ISO 8601 with Z or an offset. Omitted when unknown, never null.
|
|
39
|
+
expiresAt?: string;
|
|
40
|
+
sector: string;
|
|
41
|
+
country: 'US' | 'CA';
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -10,6 +10,8 @@ export { CalendarEventDeletedEvent } from './CalendarEventDeletedEvent';
|
|
|
10
10
|
|
|
11
11
|
export { CalendarEventUpdatedEvent } from './CalendarEventUpdatedEvent';
|
|
12
12
|
|
|
13
|
+
export { CampaignPublishedEvent } from './CampaignPublishedEvent';
|
|
14
|
+
|
|
13
15
|
export { CampaignStatusChangedEvent } from './CampaignStatusChangedEvent';
|
|
14
16
|
|
|
15
17
|
export { DeliveryDropOffLeaveWarningEvent } from './DeliveryDropOffLeaveWarningEvent';
|
|
@@ -96,6 +98,8 @@ export { RewardCreatedEvent } from './RewardCreatedEvent';
|
|
|
96
98
|
|
|
97
99
|
export { RewardMilestoneReachedEvent } from './RewardMilestoneReachedEvent';
|
|
98
100
|
|
|
101
|
+
export { RewardPublishedEvent } from './RewardPublishedEvent';
|
|
102
|
+
|
|
99
103
|
export { RewardRedeemedEvent } from './RewardRedeemedEvent';
|
|
100
104
|
|
|
101
105
|
export { SegmentMembersAddedEvent } from './SegmentMembersAddedEvent';
|
|
@@ -128,4 +132,6 @@ export { UserSoftDeletedEvent } from './UserSoftDeletedEvent';
|
|
|
128
132
|
|
|
129
133
|
export { UserUpdatedEvent } from './UserUpdatedEvent';
|
|
130
134
|
|
|
135
|
+
export { VoucherCreatedEvent } from './VoucherCreatedEvent';
|
|
136
|
+
|
|
131
137
|
export { VoucherRedeemedEvent } from './VoucherRedeemedEvent';
|