@compassdigital/sdk.typescript 4.219.0 → 4.221.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.
@@ -0,0 +1,88 @@
1
+ export interface LocationAddress {
2
+ address?: string;
3
+ city?: string;
4
+ state?: string;
5
+ zip?: string;
6
+ country?: string;
7
+ coordinates?: {
8
+ latitude: number;
9
+ longitude: number;
10
+ };
11
+ }
12
+ export interface LocationIs {
13
+ scanAndGoSupported?: boolean;
14
+ frictionlessSupported?: boolean;
15
+ pickupSupported?: boolean;
16
+ deliverySupported?: boolean;
17
+ specialInstructionsEnabled?: boolean;
18
+ cafe360?: boolean;
19
+ hidden?: boolean;
20
+ webOrderEnabled?: boolean;
21
+ itemLabelEditEnabled?: boolean;
22
+ localImagesEnabled?: boolean;
23
+ pluEnabled?: boolean;
24
+ }
25
+ export interface LocationTimeslots {
26
+ averagePrepTime?: string;
27
+ customersPerSlot?: number;
28
+ time?: string;
29
+ deliveryPrepTime?: string;
30
+ deliveryIsUserDefined?: boolean;
31
+ deliveryTime?: string;
32
+ deliveryDestinations?: string[];
33
+ deliveryUserDefined?: string[];
34
+ deliveryCustomersPerSlot?: number;
35
+ }
36
+ export interface LocationUpdatedEvent {
37
+ id: string;
38
+ type: 'LocationUpdatedEvent';
39
+ version: '0.0.1';
40
+ timestamp: string;
41
+ traceContext: {
42
+ traceId?: string;
43
+ };
44
+ payload: {
45
+ location: {
46
+ id: string;
47
+ createdBy: string;
48
+ updatedBy?: string;
49
+ createdAt: string;
50
+ updatedAt: string;
51
+ name: string;
52
+ type: string;
53
+ multiGroup?: string;
54
+ group?: string;
55
+ location?: string;
56
+ sector?: string;
57
+ company?: string;
58
+ externalId?: string;
59
+ address?: LocationAddress;
60
+ label?: Record<string, any>;
61
+ style?: Record<string, any>;
62
+ meta?: Record<string, any>;
63
+ deviceMapping?: Record<string, any>;
64
+ is?: LocationIs;
65
+ timeslots?: LocationTimeslots;
66
+ menus?: Record<string, any>[];
67
+ hours?: Record<string, any>[];
68
+ deliveryHours?: Record<string, any>[];
69
+ descriptions?: Record<string, any>;
70
+ paymentProvider?: string;
71
+ latitude?: number;
72
+ longitude?: number;
73
+ timezone?: string;
74
+ geohash?: string;
75
+ operationId?: number;
76
+ locationDescription?: string;
77
+ pos?: string;
78
+ terminals?: Record<string, any>[];
79
+ marketPlace?: Record<string, any>;
80
+ foodlocker?: boolean;
81
+ archived?: boolean;
82
+ sortSequence?: number;
83
+ information?: string;
84
+ };
85
+ };
86
+ source: string;
87
+ }
88
+ //# sourceMappingURL=LocationUpdatedEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocationUpdatedEvent.d.ts","sourceRoot":"","sources":["../../../src/messages/events/LocationUpdatedEvent.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KAClB,CAAC;CACF;AAED,MAAM,WAAW,UAAU;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,O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DO NOT MODIFY
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=LocationUpdatedEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocationUpdatedEvent.js","sourceRoot":"","sources":["../../../src/messages/events/LocationUpdatedEvent.ts"],"names":[],"mappings":";AAAA,sDAAsD"}
@@ -0,0 +1,231 @@
1
+ export interface OrderCompletedEvent {
2
+ id: string;
3
+ type: 'OrderCompletedEvent';
4
+ version: '0.0.1';
5
+ timestamp: string;
6
+ traceContext: {
7
+ traceId?: string;
8
+ };
9
+ payload: {
10
+ order?: {
11
+ id?: string;
12
+ locationBrand?: string;
13
+ location?: string;
14
+ shoppingcart?: string;
15
+ payment?: {
16
+ token?: string;
17
+ creditCard?: {
18
+ cardType?: string;
19
+ last4?: string;
20
+ };
21
+ digitalWalletPay?: string;
22
+ badgePay?: {
23
+ id?: string;
24
+ tender?: string;
25
+ name?: string;
26
+ total?: number;
27
+ };
28
+ stipend?: {
29
+ id?: string;
30
+ tender?: string;
31
+ name?: string;
32
+ total?: number;
33
+ };
34
+ voucher?: {
35
+ id?: string;
36
+ tender?: string;
37
+ name?: string;
38
+ total?: number;
39
+ };
40
+ couponVoucher?: {
41
+ id?: string;
42
+ tender?: string;
43
+ name?: string;
44
+ total?: number;
45
+ };
46
+ pos?: {
47
+ provider?: string;
48
+ transactionId?: string;
49
+ [index: string]: any;
50
+ };
51
+ };
52
+ mealplan?: {
53
+ id?: string;
54
+ tender?: string;
55
+ name?: string;
56
+ };
57
+ mealSwipes?: {
58
+ id?: string;
59
+ tender?: string;
60
+ tenderName?: string;
61
+ swipes?: number;
62
+ total?: number;
63
+ };
64
+ mealExchange?: {
65
+ id?: string;
66
+ tender?: string;
67
+ name?: string;
68
+ };
69
+ customer?: string;
70
+ is?: {
71
+ accepted?: boolean;
72
+ inProgress?: boolean;
73
+ ready?: boolean;
74
+ outForDelivery?: boolean;
75
+ delivered?: boolean;
76
+ checkinOrder?: boolean;
77
+ diningHallOrder?: boolean;
78
+ noShow?: boolean;
79
+ collected?: boolean;
80
+ cancelled?: boolean;
81
+ };
82
+ date?: {
83
+ accepted?: string;
84
+ created?: string;
85
+ modified?: string;
86
+ shouldStart?: string;
87
+ completionWarning?: string;
88
+ ready?: string;
89
+ started?: string;
90
+ showAsActiveUntil?: string;
91
+ noShow?: string;
92
+ collected?: string;
93
+ delivered?: string;
94
+ pickup?: string;
95
+ cancelled?: string;
96
+ polled?: string;
97
+ };
98
+ pickup?: string;
99
+ pickupName?: string;
100
+ pickupId?: string;
101
+ requestedDate?: string;
102
+ details?: {
103
+ name?: string;
104
+ displayId?: string;
105
+ contactNumber?: string;
106
+ countryCode?: string;
107
+ orderType?: string;
108
+ duration?: string;
109
+ destination?: string;
110
+ instructions?: string;
111
+ receiptEmail?: string;
112
+ };
113
+ meta?: {
114
+ checkinUuid?: string;
115
+ refunds?: {
116
+ originalShoppingcart?: string;
117
+ refundDate?: string;
118
+ [index: string]: any;
119
+ }[];
120
+ source?: 'web' | 'mobile' | 'pos';
121
+ transaction?: {
122
+ mxTotals?: {
123
+ amount?: number;
124
+ meals?: number;
125
+ };
126
+ transactionRemainderAmount?: number;
127
+ [index: string]: any;
128
+ };
129
+ shoppingcart?: {
130
+ total?: {
131
+ amount?: number;
132
+ meals?: number;
133
+ };
134
+ originalTotal?: {
135
+ amount?: number;
136
+ meals?: number;
137
+ };
138
+ [index: string]: any;
139
+ };
140
+ active?: boolean;
141
+ activeOverride?: boolean;
142
+ delivery?: {
143
+ provider?: string;
144
+ trackerUrl?: string;
145
+ loadingCode?: string;
146
+ [index: string]: any;
147
+ };
148
+ discount?: {
149
+ app?: string;
150
+ code?: string;
151
+ [index: string]: any;
152
+ };
153
+ discounts?: {
154
+ app?: string;
155
+ code?: string;
156
+ [index: string]: any;
157
+ }[];
158
+ discountsRefund?: {
159
+ app?: string;
160
+ date?: string;
161
+ orderCreatedAt?: string;
162
+ orderId?: string;
163
+ orderItems?: {
164
+ sourceId?: string;
165
+ quantity?: number;
166
+ price?: number;
167
+ }[];
168
+ orderTotal?: number;
169
+ reason?: string;
170
+ redemptionId?: string;
171
+ result?: boolean;
172
+ [index: string]: any;
173
+ };
174
+ typeOfKds?: string;
175
+ cancelEligible?: boolean;
176
+ pickupInstruction?: {
177
+ en?: string;
178
+ fr?: string;
179
+ };
180
+ marketPlaceLabel?: {
181
+ en?: string;
182
+ fr?: string;
183
+ };
184
+ marketPlaceDescription?: {
185
+ en?: string;
186
+ fr?: string;
187
+ };
188
+ apexCode?: string;
189
+ apexQr?: string;
190
+ apexCodes?: {
191
+ customerCode?: {
192
+ qrExpiryDate?: string;
193
+ };
194
+ [index: string]: any;
195
+ };
196
+ [index: string]: any;
197
+ };
198
+ issue?: {
199
+ id?: string;
200
+ type?: string;
201
+ items?: any;
202
+ [index: string]: any;
203
+ };
204
+ pastIssues?: {
205
+ id?: string;
206
+ type?: string;
207
+ items?: any;
208
+ [index: string]: any;
209
+ }[];
210
+ runner?: string;
211
+ reorderEligibility?: 'eligible' | 'order_type_ineligible' | 'location_ineligible' | 'active_order' | 'old_order' | 'marketplace_order' | 'duplicate_order' | 'brand_unavailable' | 'menu_unavailable' | 'items_unavailable' | 'refunded_order' | 'modifiers_unavailable' | 'modified_items' | 'cancelled_order';
212
+ refunds?: {
213
+ id?: string;
214
+ amount?: number;
215
+ reason?: string;
216
+ date?: string;
217
+ [index: string]: any;
218
+ }[];
219
+ latestRefunds?: {
220
+ id?: string;
221
+ amount?: number;
222
+ reason?: string;
223
+ date?: string;
224
+ [index: string]: any;
225
+ }[];
226
+ [index: string]: any;
227
+ };
228
+ };
229
+ source: string;
230
+ }
231
+ //# sourceMappingURL=OrderCompletedEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderCompletedEvent.d.ts","sourceRoot":"","sources":["../../../src/messages/events/OrderCompletedEvent.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX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AAC;SACrB,CAAC;KACF,CAAC;IACF,MAAM,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=OrderCompletedEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderCompletedEvent.js","sourceRoot":"","sources":["../../../src/messages/events/OrderCompletedEvent.ts"],"names":[],"mappings":";AAAA,sDAAsD"}
@@ -2,4 +2,6 @@ export { DiscountCreatedEvent } from './DiscountCreatedEvent';
2
2
  export { DiscountDeletedEvent } from './DiscountDeletedEvent';
3
3
  export { DiscountUpdatedEvent } from './DiscountUpdatedEvent';
4
4
  export { FakeEvent } from './FakeEvent';
5
+ export { LocationUpdatedEvent } from './LocationUpdatedEvent';
6
+ export { OrderCompletedEvent } from './OrderCompletedEvent';
5
7
  //# 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,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/messages/events/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compassdigital/sdk.typescript",
3
- "version": "4.219.0",
3
+ "version": "4.221.0",
4
4
  "description": "Compass Digital Labs TypeScript SDK",
5
5
  "type": "commonjs",
6
6
  "main": "./lib/index.js",
@@ -0,0 +1,121 @@
1
+ // THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
2
+
3
+ export interface LocationAddress {
4
+ address?: string;
5
+ city?: string;
6
+ state?: string;
7
+ zip?: string;
8
+ country?: string;
9
+ coordinates?: {
10
+ latitude: number;
11
+ longitude: number;
12
+ };
13
+ }
14
+
15
+ export interface LocationIs {
16
+ scanAndGoSupported?: boolean;
17
+ frictionlessSupported?: boolean;
18
+ pickupSupported?: boolean;
19
+ deliverySupported?: boolean;
20
+ specialInstructionsEnabled?: boolean;
21
+ cafe360?: boolean;
22
+ hidden?: boolean;
23
+ webOrderEnabled?: boolean;
24
+ itemLabelEditEnabled?: boolean;
25
+ localImagesEnabled?: boolean;
26
+ pluEnabled?: boolean;
27
+ }
28
+
29
+ export interface LocationTimeslots {
30
+ averagePrepTime?: string;
31
+ customersPerSlot?: number;
32
+ time?: string;
33
+ deliveryPrepTime?: string;
34
+ deliveryIsUserDefined?: boolean;
35
+ deliveryTime?: string;
36
+ deliveryDestinations?: string[];
37
+ deliveryUserDefined?: string[];
38
+ deliveryCustomersPerSlot?: number;
39
+ }
40
+
41
+ export interface LocationUpdatedEvent {
42
+ id: string;
43
+ type: 'LocationUpdatedEvent';
44
+ version: '0.0.1';
45
+ timestamp: string;
46
+ traceContext: {
47
+ traceId?: string;
48
+ };
49
+ payload: {
50
+ location: {
51
+ // location id
52
+ id: string;
53
+ // user id of location creator
54
+ createdBy: string;
55
+ // user id of most recent update
56
+ updatedBy?: string;
57
+ createdAt: string;
58
+ updatedAt: string;
59
+ // Name of the location
60
+ name: string;
61
+ // Type of entity (e.g., brand, location, group, etc.)
62
+ type: string;
63
+ // Multi-group association
64
+ multiGroup?: string;
65
+ // Group association
66
+ group?: string;
67
+ // Location identifier
68
+ location?: string;
69
+ // Sector identifier
70
+ sector?: string;
71
+ // Company identifier
72
+ company?: string;
73
+ // External identifier for cross-system references
74
+ externalId?: string;
75
+ address?: LocationAddress;
76
+ // Labeling metadata
77
+ label?: Record<string, any>;
78
+ // Styling metadata
79
+ style?: Record<string, any>;
80
+ // Additional metadata
81
+ meta?: Record<string, any>;
82
+ // Device mapping information
83
+ deviceMapping?: Record<string, any>;
84
+ is?: LocationIs;
85
+ timeslots?: LocationTimeslots;
86
+ menus?: Record<string, any>[];
87
+ hours?: Record<string, any>[];
88
+ deliveryHours?: Record<string, any>[];
89
+ // Description data for the entity
90
+ descriptions?: Record<string, any>;
91
+ // Payment provider associated with the entity
92
+ paymentProvider?: string;
93
+ // Latitude coordinate
94
+ latitude?: number;
95
+ // Longitude coordinate
96
+ longitude?: number;
97
+ // Timezone for the entity
98
+ timezone?: string;
99
+ // Geohash of the entity's location
100
+ geohash?: string;
101
+ // Associated operation ID
102
+ operationId?: number;
103
+ // Description of the location
104
+ locationDescription?: string;
105
+ // Point-of-sale system identifier
106
+ pos?: string;
107
+ terminals?: Record<string, any>[];
108
+ // Marketplace information
109
+ marketPlace?: Record<string, any>;
110
+ // Indicates if the location has a food locker
111
+ foodlocker?: boolean;
112
+ // Indicates if the entity is archived
113
+ archived?: boolean;
114
+ // Sorting order for listings
115
+ sortSequence?: number;
116
+ // Additional information
117
+ information?: string;
118
+ };
119
+ };
120
+ source: string;
121
+ }
@@ -0,0 +1,295 @@
1
+ // THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
2
+
3
+ export interface OrderCompletedEvent {
4
+ id: string;
5
+ type: 'OrderCompletedEvent';
6
+ version: '0.0.1';
7
+ timestamp: string;
8
+ traceContext: {
9
+ traceId?: string;
10
+ };
11
+ payload: {
12
+ order?: {
13
+ // order id
14
+ id?: string;
15
+ // The CDL id representing the brand location
16
+ locationBrand?: string;
17
+ // The CDL id representing the location
18
+ location?: string;
19
+ // The CDL id representing the shopping cart
20
+ shoppingcart?: string;
21
+ payment?: {
22
+ token?: string;
23
+ creditCard?: {
24
+ cardType?: string;
25
+ last4?: string;
26
+ };
27
+ digitalWalletPay?: string;
28
+ badgePay?: {
29
+ id?: string;
30
+ tender?: string;
31
+ name?: string;
32
+ total?: number;
33
+ };
34
+ stipend?: {
35
+ id?: string;
36
+ tender?: string;
37
+ name?: string;
38
+ total?: number;
39
+ };
40
+ voucher?: {
41
+ id?: string;
42
+ tender?: string;
43
+ name?: string;
44
+ total?: number;
45
+ };
46
+ couponVoucher?: {
47
+ id?: string;
48
+ tender?: string;
49
+ name?: string;
50
+ total?: number;
51
+ };
52
+ pos?: {
53
+ provider?: string;
54
+ transactionId?: string;
55
+ [index: string]: any;
56
+ };
57
+ };
58
+ mealplan?: {
59
+ id?: string;
60
+ tender?: string;
61
+ name?: string;
62
+ };
63
+ mealSwipes?: {
64
+ id?: string;
65
+ tender?: string;
66
+ tenderName?: string;
67
+ swipes?: number;
68
+ total?: number;
69
+ };
70
+ mealExchange?: {
71
+ id?: string;
72
+ tender?: string;
73
+ name?: string;
74
+ };
75
+ // The CDL id representing the customer
76
+ customer?: string;
77
+ is?: {
78
+ accepted?: boolean;
79
+ inProgress?: boolean;
80
+ ready?: boolean;
81
+ outForDelivery?: boolean;
82
+ delivered?: boolean;
83
+ checkinOrder?: boolean;
84
+ diningHallOrder?: boolean;
85
+ noShow?: boolean;
86
+ collected?: boolean;
87
+ cancelled?: boolean;
88
+ };
89
+ date?: {
90
+ // Date order was accepted into our system and shown on kitchen apps
91
+ accepted?: string;
92
+ created?: string;
93
+ modified?: string;
94
+ // Date kitchen should start preparation ideally(not mandatory)
95
+ shouldStart?: string;
96
+ // Date kitchen should be half way preparation ideally(not mandatory)
97
+ completionWarning?: string;
98
+ // Date kitchen finished preparation
99
+ ready?: string;
100
+ // Date kitchen started preparation
101
+ started?: string;
102
+ // Date till which show orders as active
103
+ showAsActiveUntil?: string;
104
+ // For delivery orders - date customer did not pick the order
105
+ noShow?: string;
106
+ // For delivery orders - date customer completed the order collected and sent back robot
107
+ collected?: string;
108
+ // For delivery orders - date order was delivered to destination(not picked by user)
109
+ delivered?: string;
110
+ // For delivery orders - date order was picked up from station for delivery(out_for_delivery)
111
+ pickup?: string;
112
+ // Date order was cancelled
113
+ cancelled?: string;
114
+ // Date order was polled for kds
115
+ polled?: string;
116
+ };
117
+ // @deprecated
118
+ pickup?: string;
119
+ // @deprecated
120
+ pickupName?: string;
121
+ // @deprecated
122
+ pickupId?: string;
123
+ requestedDate?: string;
124
+ details?: {
125
+ name?: string;
126
+ displayId?: string;
127
+ contactNumber?: string;
128
+ countryCode?: string;
129
+ orderType?: string;
130
+ duration?: string;
131
+ destination?: string;
132
+ // Pickup or delivery instructions
133
+ instructions?: string;
134
+ // Email address for receipt
135
+ receiptEmail?: string;
136
+ };
137
+ meta?: {
138
+ // Check-in UUID for frictionless orders
139
+ checkinUuid?: string;
140
+ refunds?: {
141
+ originalShoppingcart?: string;
142
+ refundDate?: string;
143
+ [index: string]: any;
144
+ }[];
145
+ // which ui the order was placed on
146
+ source?: 'web' | 'mobile' | 'pos';
147
+ // details pertaining to the amount charged on the order
148
+ transaction?: {
149
+ // used in mx orders - cart totals in dollars and meal exchange value (meals)
150
+ mxTotals?: {
151
+ amount?: number;
152
+ meals?: number;
153
+ };
154
+ // the amount remaining on the transaction after refund - remaining amount available for refund
155
+ transactionRemainderAmount?: number;
156
+ [index: string]: any;
157
+ };
158
+ // Shoppingcart details
159
+ shoppingcart?: {
160
+ total?: {
161
+ amount?: number;
162
+ meals?: number;
163
+ };
164
+ // Total of first cart on order. Carts can change after refunds, so this is original value
165
+ originalTotal?: {
166
+ amount?: number;
167
+ meals?: number;
168
+ };
169
+ [index: string]: any;
170
+ };
171
+ // Indicate whether the order is active or inactive
172
+ active?: boolean;
173
+ // Override for meta.active for testing purposes
174
+ activeOverride?: boolean;
175
+ // Delivery details
176
+ delivery?: {
177
+ provider?: string;
178
+ trackerUrl?: string;
179
+ loadingCode?: string;
180
+ [index: string]: any;
181
+ };
182
+ // Discount details
183
+ discount?: {
184
+ app?: string;
185
+ code?: string;
186
+ [index: string]: any;
187
+ };
188
+ discounts?: {
189
+ app?: string;
190
+ code?: string;
191
+ [index: string]: any;
192
+ }[];
193
+ // Discounts for refunds
194
+ discountsRefund?: {
195
+ // Client app that applied the discount
196
+ app?: string;
197
+ // Date the discount was refunded
198
+ date?: string;
199
+ // Date the order was created
200
+ orderCreatedAt?: string;
201
+ // Vocuherify Order ID
202
+ orderId?: string;
203
+ // Order items
204
+ orderItems?: {
205
+ // Compassdigital item id
206
+ sourceId?: string;
207
+ // Quantity of the item
208
+ quantity?: number;
209
+ // Price of the item in cents
210
+ price?: number;
211
+ }[];
212
+ // Order total
213
+ orderTotal?: number;
214
+ // Reason for refund
215
+ reason?: string;
216
+ // Voucherify parent redemption id for the stacked discounts
217
+ redemptionId?: string;
218
+ // true if refund succeeded
219
+ result?: boolean;
220
+ [index: string]: any;
221
+ };
222
+ // The type of kds that the brand uses
223
+ typeOfKds?: string;
224
+ // Indicate whether the order is eligible for cancellation
225
+ cancelEligible?: boolean;
226
+ pickupInstruction?: {
227
+ en?: string;
228
+ fr?: string;
229
+ };
230
+ marketPlaceLabel?: {
231
+ en?: string;
232
+ fr?: string;
233
+ };
234
+ marketPlaceDescription?: {
235
+ en?: string;
236
+ fr?: string;
237
+ };
238
+ apexCode?: string;
239
+ apexQr?: string;
240
+ apexCodes?: {
241
+ customerCode?: {
242
+ qrExpiryDate?: string;
243
+ };
244
+ [index: string]: any;
245
+ };
246
+ [index: string]: any;
247
+ };
248
+ issue?: {
249
+ id?: string;
250
+ type?: string;
251
+ items?: any;
252
+ [index: string]: any;
253
+ };
254
+ pastIssues?: {
255
+ id?: string;
256
+ type?: string;
257
+ items?: any;
258
+ [index: string]: any;
259
+ }[];
260
+ // Delivery user
261
+ runner?: string;
262
+ reorderEligibility?:
263
+ | 'eligible'
264
+ | 'order_type_ineligible'
265
+ | 'location_ineligible'
266
+ | 'active_order'
267
+ | 'old_order'
268
+ | 'marketplace_order'
269
+ | 'duplicate_order'
270
+ | 'brand_unavailable'
271
+ | 'menu_unavailable'
272
+ | 'items_unavailable'
273
+ | 'refunded_order'
274
+ | 'modifiers_unavailable'
275
+ | 'modified_items'
276
+ | 'cancelled_order';
277
+ refunds?: {
278
+ id?: string;
279
+ amount?: number;
280
+ reason?: string;
281
+ date?: string;
282
+ [index: string]: any;
283
+ }[];
284
+ latestRefunds?: {
285
+ id?: string;
286
+ amount?: number;
287
+ reason?: string;
288
+ date?: string;
289
+ [index: string]: any;
290
+ }[];
291
+ [index: string]: any;
292
+ };
293
+ };
294
+ source: string;
295
+ }
@@ -7,3 +7,7 @@ export { DiscountDeletedEvent } from './DiscountDeletedEvent';
7
7
  export { DiscountUpdatedEvent } from './DiscountUpdatedEvent';
8
8
 
9
9
  export { FakeEvent } from './FakeEvent';
10
+
11
+ export { LocationUpdatedEvent } from './LocationUpdatedEvent';
12
+
13
+ export { OrderCompletedEvent } from './OrderCompletedEvent';