@compassdigital/sdk.typescript 4.67.0 → 4.69.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 +58 -57
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +503 -501
- package/lib/index.js.map +1 -1
- package/lib/interface/ai.d.ts +1 -1
- package/lib/interface/ai.d.ts.map +1 -1
- package/lib/interface/announcement.d.ts +1 -1
- package/lib/interface/announcement.d.ts.map +1 -1
- package/lib/interface/auth.d.ts +3 -3
- package/lib/interface/auth.d.ts.map +1 -1
- package/lib/interface/calendar.d.ts +2 -2
- package/lib/interface/calendar.d.ts.map +1 -1
- package/lib/interface/centricos.d.ts +11 -11
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/compassconnect.d.ts +1 -1
- package/lib/interface/compassconnect.d.ts.map +1 -1
- package/lib/interface/config.d.ts +1 -1
- package/lib/interface/config.d.ts.map +1 -1
- package/lib/interface/datalake.d.ts +1 -1
- package/lib/interface/datalake.d.ts.map +1 -1
- package/lib/interface/email.d.ts +1 -1
- package/lib/interface/email.d.ts.map +1 -1
- package/lib/interface/file.d.ts +2 -2
- package/lib/interface/file.d.ts.map +1 -1
- package/lib/interface/frictionless.d.ts +9 -9
- package/lib/interface/frictionless.d.ts.map +1 -1
- package/lib/interface/kds.d.ts +1 -1
- package/lib/interface/kds.d.ts.map +1 -1
- package/lib/interface/location.d.ts +6 -4
- package/lib/interface/location.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts +2 -1
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +149 -109
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/notification.d.ts +3 -3
- package/lib/interface/notification.d.ts.map +1 -1
- package/lib/interface/order.d.ts +7 -7
- package/lib/interface/order.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +10 -10
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/payment.d.ts +3 -3
- package/lib/interface/payment.d.ts.map +1 -1
- package/lib/interface/promo.d.ts +8 -8
- package/lib/interface/promo.d.ts.map +1 -1
- package/lib/interface/report.d.ts +10 -10
- package/lib/interface/report.d.ts.map +1 -1
- package/lib/interface/search.d.ts +8 -8
- package/lib/interface/search.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +7 -7
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/lib/interface/task.d.ts +8 -8
- package/lib/interface/task.d.ts.map +1 -1
- package/lib/interface/tax.d.ts +2 -2
- package/lib/interface/tax.d.ts.map +1 -1
- package/lib/interface/user.d.ts +16 -16
- package/lib/interface/user.d.ts.map +1 -1
- package/lib/interface/vendor.d.ts +6 -6
- package/lib/interface/vendor.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +10395 -10394
- package/src/interface/ai.ts +22 -22
- package/src/interface/announcement.ts +60 -60
- package/src/interface/auth.ts +68 -68
- package/src/interface/calendar.ts +94 -94
- package/src/interface/centricos.ts +145 -145
- package/src/interface/compassconnect.ts +59 -59
- package/src/interface/config.ts +166 -166
- package/src/interface/datalake.ts +13 -13
- package/src/interface/email.ts +13 -13
- package/src/interface/file.ts +18 -18
- package/src/interface/frictionless.ts +177 -177
- package/src/interface/kds.ts +49 -49
- package/src/interface/location.ts +771 -769
- package/src/interface/mealplan.ts +155 -154
- package/src/interface/menu.ts +4079 -4018
- package/src/interface/notification.ts +51 -51
- package/src/interface/order.ts +464 -464
- package/src/interface/partner.ts +823 -823
- package/src/interface/payment.ts +278 -278
- package/src/interface/promo.ts +373 -373
- package/src/interface/report.ts +348 -348
- package/src/interface/search.ts +135 -135
- package/src/interface/shoppingcart.ts +429 -429
- package/src/interface/task.ts +212 -212
- package/src/interface/tax.ts +69 -69
- package/src/interface/user.ts +410 -410
- package/src/interface/vendor.ts +215 -215
package/src/interface/promo.ts
CHANGED
|
@@ -1,419 +1,419 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
// THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY
|
|
3
3
|
|
|
4
|
-
import { RequestQuery, BaseRequest } from
|
|
4
|
+
import { RequestQuery, BaseRequest } from './util';
|
|
5
5
|
|
|
6
6
|
export interface Error {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
message?: string;
|
|
8
|
+
code?: number;
|
|
9
|
+
data?: Record<string, any>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface PromotionBody {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
label: {
|
|
14
|
+
en?: string;
|
|
15
|
+
};
|
|
16
|
+
description: {
|
|
17
|
+
en?: string;
|
|
18
|
+
};
|
|
19
|
+
// A message shown to the user
|
|
20
|
+
badge: {
|
|
21
|
+
en?: string;
|
|
22
|
+
fr?: string;
|
|
23
|
+
};
|
|
24
|
+
multigroup: string;
|
|
25
|
+
type: 'bogo' | 'bundle' | 'lto';
|
|
26
|
+
items: PromotionItems;
|
|
27
|
+
status: Status;
|
|
28
|
+
location_group_ids: string[];
|
|
29
|
+
company: string;
|
|
30
|
+
calendar: Calendar;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export interface Promotion {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export type Status =
|
|
34
|
+
// promo
|
|
35
|
+
id: string;
|
|
36
|
+
label: {
|
|
37
|
+
en?: string;
|
|
38
|
+
};
|
|
39
|
+
date?: {
|
|
40
|
+
created?: string;
|
|
41
|
+
modified?: string;
|
|
42
|
+
};
|
|
43
|
+
description?: {
|
|
44
|
+
en?: string;
|
|
45
|
+
};
|
|
46
|
+
// A message shown to the user
|
|
47
|
+
badge: {
|
|
48
|
+
en?: string;
|
|
49
|
+
fr?: string;
|
|
50
|
+
};
|
|
51
|
+
multigroup?: string;
|
|
52
|
+
type: 'bogo' | 'bundle' | 'lto';
|
|
53
|
+
items: PromotionItems;
|
|
54
|
+
status: Status;
|
|
55
|
+
location_group_ids?: string[];
|
|
56
|
+
company: string;
|
|
57
|
+
calendar?: Calendar;
|
|
58
|
+
meta?: PromoMeta;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export type Status = 'active' | 'scheduled' | 'paused' | 'expired' | 'archived';
|
|
62
62
|
|
|
63
63
|
export interface DatetimeObject {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
year: number;
|
|
65
|
+
// 1-12
|
|
66
|
+
month: number;
|
|
67
|
+
day: number;
|
|
68
|
+
// 0-23
|
|
69
|
+
hour: number;
|
|
70
|
+
// 0-59
|
|
71
|
+
minute: number;
|
|
72
|
+
zone?: string;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
export interface Event {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
76
|
+
data?: {
|
|
77
|
+
calendar?: 'hours' | 'holidays';
|
|
78
|
+
[index: string]: any;
|
|
79
|
+
};
|
|
80
|
+
schedule?: {
|
|
81
|
+
start: DatetimeObject;
|
|
82
|
+
end?: DatetimeObject;
|
|
83
|
+
times?: string[];
|
|
84
|
+
// Is used to calculate the time event will end (times[0]+duration)
|
|
85
|
+
duration?: number;
|
|
86
|
+
// Defines the type of duration property
|
|
87
|
+
durationUnit?: 'minutes' | 'hours' | 'days';
|
|
88
|
+
dayOfWeek?: number[];
|
|
89
|
+
dayOfMonth?: number[];
|
|
90
|
+
dayOfYear?: number[];
|
|
91
|
+
[index: string]: any;
|
|
92
|
+
};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
export interface Calendar {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
timezones: {
|
|
97
|
+
[index: string]: string;
|
|
98
|
+
};
|
|
99
|
+
events: Event[];
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export interface Promotions {
|
|
103
|
-
|
|
103
|
+
promos?: Promotion[];
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
export interface PromotionItems {
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
main: PromotionMenuItems;
|
|
108
|
+
additional?: PromotionMenuItems;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
export type PromotionMenuItems = {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
112
|
+
id: string;
|
|
113
|
+
discount?: Discount;
|
|
114
|
+
min?: number;
|
|
115
|
+
max?: number;
|
|
116
|
+
quantity?: number;
|
|
117
|
+
meta?: {
|
|
118
|
+
[index: string]: any;
|
|
119
|
+
};
|
|
120
120
|
}[];
|
|
121
121
|
|
|
122
122
|
export interface PromoMeta {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
123
|
+
// Date promo started
|
|
124
|
+
promo_start?: string;
|
|
125
|
+
// Date promo ended
|
|
126
|
+
promo_end?: string;
|
|
127
|
+
hours?: {
|
|
128
|
+
// Time promo starts being active
|
|
129
|
+
start?: string;
|
|
130
|
+
// Time promo ends being active
|
|
131
|
+
end?: string;
|
|
132
|
+
}[];
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
export interface Success {
|
|
136
|
-
|
|
136
|
+
success?: boolean;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
export interface PromoValidateRequest {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
140
|
+
code?: string;
|
|
141
|
+
email?: string;
|
|
142
|
+
app?: string;
|
|
143
|
+
realm?: string;
|
|
144
|
+
location_brand?: string;
|
|
145
|
+
shoppingcart?: {
|
|
146
|
+
id?: string;
|
|
147
|
+
date_created?: string;
|
|
148
|
+
items?: ItemResponse[];
|
|
149
|
+
};
|
|
150
|
+
totals?: {
|
|
151
|
+
amount?: number;
|
|
152
|
+
currency?: string;
|
|
153
|
+
};
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
export interface PromoRedeemRequest {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
157
|
+
code?: string;
|
|
158
|
+
email?: string;
|
|
159
|
+
app?: string;
|
|
160
|
+
realm?: string;
|
|
161
|
+
location_brand?: string;
|
|
162
|
+
shoppingcart?: {
|
|
163
|
+
id?: string;
|
|
164
|
+
date_created?: string;
|
|
165
|
+
items?: ItemResponse[];
|
|
166
|
+
};
|
|
167
|
+
totals?: {
|
|
168
|
+
amount?: number;
|
|
169
|
+
discount?: number;
|
|
170
|
+
currency?: string;
|
|
171
|
+
};
|
|
172
|
+
provider_data?: FPValidationData;
|
|
173
|
+
payment_request_id?: string;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
export interface CreateVoucher {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
177
|
+
code?: string;
|
|
178
|
+
discount?: {
|
|
179
|
+
amount_off?: number;
|
|
180
|
+
percent_off?: number;
|
|
181
|
+
};
|
|
182
|
+
[index: string]: any;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
export interface UpdateVoucher {
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
active?: boolean;
|
|
187
|
+
[index: string]: any;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
export interface Voucher {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
191
|
+
provider?: 'fp' | 'voucherify';
|
|
192
|
+
code?: string;
|
|
193
|
+
valid?: boolean;
|
|
194
|
+
discount?: AppliedDiscount;
|
|
195
|
+
app?: string;
|
|
196
|
+
provider_data?: FPValidationData;
|
|
197
|
+
[index: string]: any;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
export interface Redemption {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
201
|
+
code?: string;
|
|
202
|
+
// redemption
|
|
203
|
+
id?: string;
|
|
204
|
+
date?: string;
|
|
205
|
+
result?: boolean;
|
|
206
|
+
discount?: AppliedDiscount;
|
|
207
|
+
type?: string;
|
|
208
|
+
app?: string;
|
|
209
|
+
[index: string]: any;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
export interface VoucherifyCustomer {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
213
|
+
user_id?: string;
|
|
214
|
+
mealplan_id?: string;
|
|
215
|
+
app?: string;
|
|
216
|
+
realm?: string;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
export interface RedemptionReversal {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
220
|
+
code?: string;
|
|
221
|
+
// redemption
|
|
222
|
+
id?: string;
|
|
223
|
+
date?: string;
|
|
224
|
+
result?: boolean;
|
|
225
|
+
discount?: {
|
|
226
|
+
amount_off?: number;
|
|
227
|
+
percent_off?: number;
|
|
228
|
+
amount_limit?: number;
|
|
229
|
+
};
|
|
230
|
+
type?: string;
|
|
231
|
+
reason?: string;
|
|
232
|
+
// redemption
|
|
233
|
+
original_redemption?: string;
|
|
234
|
+
app?: string;
|
|
235
|
+
[index: string]: any;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
export interface PromoReverseRequest {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
239
|
+
reason?: string;
|
|
240
|
+
app?: string;
|
|
241
|
+
location_brand?: string;
|
|
242
|
+
totals?: {
|
|
243
|
+
amount?: number;
|
|
244
|
+
currency?: string;
|
|
245
|
+
};
|
|
246
|
+
shoppingcart?: {
|
|
247
|
+
id?: string;
|
|
248
|
+
date_created?: string;
|
|
249
|
+
};
|
|
250
|
+
redemption?: Redemption;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
export interface Customer {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
254
|
+
id?: string;
|
|
255
|
+
source_id?: string;
|
|
256
|
+
name?: string;
|
|
257
|
+
email?: string;
|
|
258
|
+
description?: string;
|
|
259
|
+
address?: {
|
|
260
|
+
[index: string]: any;
|
|
261
|
+
};
|
|
262
|
+
phone?: string;
|
|
263
|
+
summary?: {
|
|
264
|
+
[index: string]: any;
|
|
265
|
+
};
|
|
266
|
+
loyalty?: {
|
|
267
|
+
[index: string]: any;
|
|
268
|
+
};
|
|
269
|
+
metadata?: {
|
|
270
|
+
origin?: string;
|
|
271
|
+
[index: string]: any;
|
|
272
|
+
};
|
|
273
|
+
created_at?: string;
|
|
274
|
+
updated_at?: string;
|
|
275
|
+
object?: string;
|
|
276
|
+
[index: string]: any;
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
export interface SFMCConfig {
|
|
280
|
-
|
|
280
|
+
[index: string]: any;
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
export interface Discount {
|
|
284
|
-
|
|
285
|
-
|
|
284
|
+
amount_off?: number;
|
|
285
|
+
percent_off?: number;
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
export interface FPValidationData {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
289
|
+
discountIncentives?: {
|
|
290
|
+
id?: string;
|
|
291
|
+
program?: {
|
|
292
|
+
code?: string;
|
|
293
|
+
};
|
|
294
|
+
[index: string]: any;
|
|
295
|
+
}[];
|
|
296
|
+
[index: string]: any;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
export interface AppliedDiscount {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
300
|
+
type?: string;
|
|
301
|
+
amount_off?: number;
|
|
302
|
+
percent_off?: number;
|
|
303
|
+
amount_limit?: number;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
export type VoucherCode = PromoValidateRequest;
|
|
307
307
|
|
|
308
308
|
export interface ItemResponse {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
309
|
+
// can be cdl item id or stringified timestamp
|
|
310
|
+
id: string;
|
|
311
|
+
description?: Label;
|
|
312
|
+
// index based on cdl id or stringified timestamp
|
|
313
|
+
_index?: string;
|
|
314
|
+
quantity: Quantity;
|
|
315
|
+
unit?: number;
|
|
316
|
+
price?: Price;
|
|
317
|
+
// Final item price after LTO/Bundle/BOGO etc is applied on the item.
|
|
318
|
+
sale_price?: {
|
|
319
|
+
active?: boolean;
|
|
320
|
+
amount?: MonetaryValue;
|
|
321
|
+
};
|
|
322
|
+
// Subtotal of the item including all options
|
|
323
|
+
_subtotal?: {
|
|
324
|
+
amount?: MonetaryValue;
|
|
325
|
+
};
|
|
326
|
+
// Promo applied to this item
|
|
327
|
+
_promo?: {
|
|
328
|
+
amount?: MonetaryValue;
|
|
329
|
+
};
|
|
330
|
+
// discount applied to this item
|
|
331
|
+
_discount?: {
|
|
332
|
+
amount?: MonetaryValue;
|
|
333
|
+
};
|
|
334
|
+
meta?: {
|
|
335
|
+
// menu id
|
|
336
|
+
menu?: string;
|
|
337
|
+
// brand id
|
|
338
|
+
brand?: string;
|
|
339
|
+
brand_label?: Label;
|
|
340
|
+
taxes?: string[];
|
|
341
|
+
tax?: {
|
|
342
|
+
tax_tag_code?: string;
|
|
343
|
+
};
|
|
344
|
+
menu_tax_tags?: string[];
|
|
345
|
+
orderable?: boolean;
|
|
346
|
+
volante_id?: string;
|
|
347
|
+
barcodes?: string[];
|
|
348
|
+
plu?: string;
|
|
349
|
+
[index: string]: any;
|
|
350
|
+
};
|
|
351
|
+
options?: ModifierGroupResponse[];
|
|
352
|
+
// Details about discount like BOGO, LTO, Bundle etc.
|
|
353
|
+
item_discount?: Record<string, any>;
|
|
354
|
+
// user specified instructions for the item
|
|
355
|
+
special_instructions?: string;
|
|
356
|
+
amount_off_exclusions?: AmountOffExclusion[];
|
|
357
|
+
added_on?: string;
|
|
358
|
+
meal_value?: IntegerValue;
|
|
359
|
+
category?: Label;
|
|
360
|
+
menu_label?: Label;
|
|
361
|
+
tax_rate?: MonetaryValue;
|
|
362
|
+
label?: Label;
|
|
363
|
+
reporting?: {
|
|
364
|
+
category?: {
|
|
365
|
+
primary?: string;
|
|
366
|
+
secondary?: string;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
export interface ModifierGroupResponse {
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
372
|
+
id?: string;
|
|
373
|
+
label?: Label;
|
|
374
|
+
meta?: {
|
|
375
|
+
taxes?: string[];
|
|
376
|
+
original_label?: Label;
|
|
377
|
+
[index: string]: any;
|
|
378
|
+
};
|
|
379
|
+
items?: ModifierResponse[];
|
|
380
|
+
is?: {
|
|
381
|
+
disabled?: boolean;
|
|
382
|
+
};
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
export interface ModifierResponse {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
386
|
+
// option/modifier
|
|
387
|
+
id?: string;
|
|
388
|
+
price?: Price;
|
|
389
|
+
quantity?: Quantity;
|
|
390
|
+
label?: Label;
|
|
391
|
+
// index
|
|
392
|
+
_index?: string;
|
|
393
|
+
meta?: {
|
|
394
|
+
sort_number?: number;
|
|
395
|
+
original_label?: Label;
|
|
396
|
+
taxes?: string[];
|
|
397
|
+
[index: string]: any;
|
|
398
|
+
};
|
|
399
|
+
amount_off_exclusions?: AmountOffExclusion[];
|
|
400
|
+
is?: {
|
|
401
|
+
disabled?: boolean;
|
|
402
|
+
};
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
export interface Label {
|
|
406
|
-
|
|
407
|
-
|
|
406
|
+
en?: string;
|
|
407
|
+
fr?: string;
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
export interface Price {
|
|
411
|
-
|
|
411
|
+
amount?: MonetaryValue;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
export type MonetaryValue = number;
|
|
415
415
|
|
|
416
|
-
export type AmountOffExclusion =
|
|
416
|
+
export type AmountOffExclusion = 'discount' | 'promo';
|
|
417
417
|
|
|
418
418
|
export type IntegerValue = number;
|
|
419
419
|
|
|
@@ -426,16 +426,16 @@ export type PostPromoBody = PromotionBody;
|
|
|
426
426
|
export type PostPromoResponse = Promotion;
|
|
427
427
|
|
|
428
428
|
export interface PostPromoRequest extends BaseRequest {
|
|
429
|
-
|
|
429
|
+
body: PostPromoBody;
|
|
430
430
|
}
|
|
431
431
|
|
|
432
432
|
// GET /promo - Get all promotions
|
|
433
433
|
|
|
434
434
|
export interface GetPromosQuery {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
435
|
+
// Limit to promotions in selected multigroup
|
|
436
|
+
multigroup?: string;
|
|
437
|
+
// Graphql query string
|
|
438
|
+
_query?: string;
|
|
439
439
|
}
|
|
440
440
|
|
|
441
441
|
export type GetPromosResponse = Promotions;
|
|
@@ -445,15 +445,15 @@ export interface GetPromosRequest extends BaseRequest, RequestQuery<GetPromosQue
|
|
|
445
445
|
// GET /promo/{id} - Get an individual promotion
|
|
446
446
|
|
|
447
447
|
export interface GetPromoPath {
|
|
448
|
-
|
|
449
|
-
|
|
448
|
+
// promo
|
|
449
|
+
id: string;
|
|
450
450
|
}
|
|
451
451
|
|
|
452
452
|
export interface GetPromoQuery {
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
453
|
+
// Show all props of the promotion(ex., location_group_ids)
|
|
454
|
+
extended?: boolean;
|
|
455
|
+
// Graphql query string
|
|
456
|
+
_query?: string;
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
export type GetPromoResponse = Promotion;
|
|
@@ -463,8 +463,8 @@ export interface GetPromoRequest extends BaseRequest, RequestQuery<GetPromoQuery
|
|
|
463
463
|
// PUT /promo/{id} - Update a promotion
|
|
464
464
|
|
|
465
465
|
export interface PutPromoPath {
|
|
466
|
-
|
|
467
|
-
|
|
466
|
+
// Id of a promotion
|
|
467
|
+
id: string;
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
export type PutPromoBody = Promotion;
|
|
@@ -472,14 +472,14 @@ export type PutPromoBody = Promotion;
|
|
|
472
472
|
export type PutPromoResponse = Promotion;
|
|
473
473
|
|
|
474
474
|
export interface PutPromoRequest extends BaseRequest, PutPromoPath {
|
|
475
|
-
|
|
475
|
+
body: PutPromoBody;
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
// DELETE /promo/{id} - Delete promotion
|
|
479
479
|
|
|
480
480
|
export interface DeletePromoPath {
|
|
481
|
-
|
|
482
|
-
|
|
481
|
+
// Id of a promotion
|
|
482
|
+
id: string;
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
export type DeletePromoResponse = Success;
|
|
@@ -489,26 +489,26 @@ export interface DeletePromoRequest extends BaseRequest, DeletePromoPath {}
|
|
|
489
489
|
// GET /promo/company/{company}/location/group/{location_group} - Get all promotions within company for a location group
|
|
490
490
|
|
|
491
491
|
export interface GetPromoCompanyLocationGroupPath {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
492
|
+
// Show promotions for selected company
|
|
493
|
+
company: string;
|
|
494
|
+
// Show promotions for selected location group
|
|
495
|
+
location_group: string;
|
|
496
496
|
}
|
|
497
497
|
|
|
498
498
|
export interface GetPromoCompanyLocationGroupQuery {
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
499
|
+
// Return only promos of certain status.
|
|
500
|
+
status?: string;
|
|
501
|
+
// Graphql query string
|
|
502
|
+
_query?: string;
|
|
503
|
+
nocache?: boolean;
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
export type GetPromoCompanyLocationGroupResponse = Promotions;
|
|
507
507
|
|
|
508
508
|
export interface GetPromoCompanyLocationGroupRequest
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
509
|
+
extends BaseRequest,
|
|
510
|
+
RequestQuery<GetPromoCompanyLocationGroupQuery>,
|
|
511
|
+
GetPromoCompanyLocationGroupPath {}
|
|
512
512
|
|
|
513
513
|
// POST /promo/validate/voucher - Validate a promo voucher
|
|
514
514
|
|
|
@@ -517,7 +517,7 @@ export type PostPromoValidateVoucherBody = PromoValidateRequest;
|
|
|
517
517
|
export type PostPromoValidateVoucherResponse = Voucher;
|
|
518
518
|
|
|
519
519
|
export interface PostPromoValidateVoucherRequest extends BaseRequest {
|
|
520
|
-
|
|
520
|
+
body: PostPromoValidateVoucherBody;
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
// POST /promo/redeem/voucher - Redeem a promo voucher
|
|
@@ -527,7 +527,7 @@ export type PostPromoRedeemVoucherBody = PromoRedeemRequest;
|
|
|
527
527
|
export type PostPromoRedeemVoucherResponse = Redemption;
|
|
528
528
|
|
|
529
529
|
export interface PostPromoRedeemVoucherRequest extends BaseRequest {
|
|
530
|
-
|
|
530
|
+
body: PostPromoRedeemVoucherBody;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
533
|
// POST /promo/voucher - Create new voucher
|
|
@@ -537,13 +537,13 @@ export type PostPromoVoucherBody = CreateVoucher;
|
|
|
537
537
|
export type PostPromoVoucherResponse = Voucher;
|
|
538
538
|
|
|
539
539
|
export interface PostPromoVoucherRequest extends BaseRequest {
|
|
540
|
-
|
|
540
|
+
body: PostPromoVoucherBody;
|
|
541
541
|
}
|
|
542
542
|
|
|
543
543
|
// PUT /promo/voucher/{id} - Update voucher
|
|
544
544
|
|
|
545
545
|
export interface PutPromoVoucherPath {
|
|
546
|
-
|
|
546
|
+
id: string;
|
|
547
547
|
}
|
|
548
548
|
|
|
549
549
|
export type PutPromoVoucherBody = UpdateVoucher;
|
|
@@ -551,28 +551,28 @@ export type PutPromoVoucherBody = UpdateVoucher;
|
|
|
551
551
|
export type PutPromoVoucherResponse = Voucher;
|
|
552
552
|
|
|
553
553
|
export interface PutPromoVoucherRequest extends BaseRequest, PutPromoVoucherPath {
|
|
554
|
-
|
|
554
|
+
body: PutPromoVoucherBody;
|
|
555
555
|
}
|
|
556
556
|
|
|
557
557
|
// DELETE /promo/voucher/{id} - Delete voucher
|
|
558
558
|
|
|
559
559
|
export interface DeletePromoVoucherPath {
|
|
560
|
-
|
|
560
|
+
id: string;
|
|
561
561
|
}
|
|
562
562
|
|
|
563
563
|
export interface DeletePromoVoucherQuery {
|
|
564
|
-
|
|
565
|
-
|
|
564
|
+
// app
|
|
565
|
+
app?: string;
|
|
566
566
|
}
|
|
567
567
|
|
|
568
568
|
export interface DeletePromoVoucherResponse {
|
|
569
|
-
|
|
569
|
+
success?: boolean;
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
export interface DeletePromoVoucherRequest
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
573
|
+
extends BaseRequest,
|
|
574
|
+
RequestQuery<DeletePromoVoucherQuery>,
|
|
575
|
+
DeletePromoVoucherPath {}
|
|
576
576
|
|
|
577
577
|
// POST /promo/customer - Add user to voucherify
|
|
578
578
|
|
|
@@ -581,30 +581,30 @@ export type PostPromoCustomerBody = VoucherifyCustomer;
|
|
|
581
581
|
export type PostPromoCustomerResponse = Customer;
|
|
582
582
|
|
|
583
583
|
export interface PostPromoCustomerRequest extends BaseRequest {
|
|
584
|
-
|
|
584
|
+
body: PostPromoCustomerBody;
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
// DELETE /promo/customer - Delete user from voucherify
|
|
588
588
|
|
|
589
589
|
export interface DeletePromoCustomerBody {
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
590
|
+
user_id?: string;
|
|
591
|
+
mealplan_id?: string;
|
|
592
|
+
realm?: string;
|
|
593
593
|
}
|
|
594
594
|
|
|
595
595
|
export interface DeletePromoCustomerResponse {
|
|
596
|
-
|
|
596
|
+
success?: boolean;
|
|
597
597
|
}
|
|
598
598
|
|
|
599
599
|
export interface DeletePromoCustomerRequest extends BaseRequest {
|
|
600
|
-
|
|
600
|
+
body: DeletePromoCustomerBody;
|
|
601
601
|
}
|
|
602
602
|
|
|
603
603
|
// POST /promo/voucher/{id}/reverse - Reverse a redemption from a promo voucher
|
|
604
604
|
|
|
605
605
|
export interface PostPromoVoucherReversePath {
|
|
606
|
-
|
|
607
|
-
|
|
606
|
+
// For FP: order request ID (`requestID` from the FP invoice service)
|
|
607
|
+
id: string;
|
|
608
608
|
}
|
|
609
609
|
|
|
610
610
|
export type PostPromoVoucherReverseBody = PromoReverseRequest;
|
|
@@ -612,7 +612,7 @@ export type PostPromoVoucherReverseBody = PromoReverseRequest;
|
|
|
612
612
|
export type PostPromoVoucherReverseResponse = RedemptionReversal;
|
|
613
613
|
|
|
614
614
|
export interface PostPromoVoucherReverseRequest extends BaseRequest, PostPromoVoucherReversePath {
|
|
615
|
-
|
|
615
|
+
body: PostPromoVoucherReverseBody;
|
|
616
616
|
}
|
|
617
617
|
|
|
618
618
|
// POST /promo/voucherify/activity/execute - Execute a Journey custom Activity request
|
|
@@ -622,18 +622,18 @@ export type PostPromoVoucherifyActivityExecuteBody = string;
|
|
|
622
622
|
export type PostPromoVoucherifyActivityExecuteResponse = Customer;
|
|
623
623
|
|
|
624
624
|
export interface PostPromoVoucherifyActivityExecuteRequest extends BaseRequest {
|
|
625
|
-
|
|
625
|
+
body: PostPromoVoucherifyActivityExecuteBody;
|
|
626
626
|
}
|
|
627
627
|
|
|
628
628
|
// GET /promo/voucherify/activity/config.json - Get SFMC Journey Custom Activity configuration
|
|
629
629
|
|
|
630
630
|
export interface GetPromoVoucherifyActivityConfigQuery {
|
|
631
|
-
|
|
632
|
-
|
|
631
|
+
// Graphql query string
|
|
632
|
+
_query?: string;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
export type GetPromoVoucherifyActivityConfigResponse = SFMCConfig;
|
|
636
636
|
|
|
637
637
|
export interface GetPromoVoucherifyActivityConfigRequest
|
|
638
|
-
|
|
639
|
-
|
|
638
|
+
extends BaseRequest,
|
|
639
|
+
RequestQuery<GetPromoVoucherifyActivityConfigQuery> {}
|