@compassdigital/sdk.typescript 4.97.0 → 4.99.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 +115 -17
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +132 -22
- package/lib/index.js.map +1 -1
- package/lib/interface/announcement.d.ts +2 -2
- package/lib/interface/announcement.d.ts.map +1 -1
- package/lib/interface/centricos.d.ts +1 -1
- package/lib/interface/centricos.d.ts.map +1 -1
- package/lib/interface/consumer.d.ts +430 -62
- package/lib/interface/consumer.d.ts.map +1 -1
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +559 -67
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/order.d.ts +22 -0
- package/lib/interface/order.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +321 -46
- package/src/interface/announcement.ts +2 -2
- package/src/interface/centricos.ts +1 -1
- package/src/interface/consumer.ts +567 -70
- package/src/interface/mealplan.ts +0 -3
- package/src/interface/menu.ts +649 -80
- package/src/interface/order.ts +25 -24
|
@@ -76,28 +76,127 @@ export interface NotFoundErrorDTO {
|
|
|
76
76
|
data: Record<string, any>;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
export interface
|
|
79
|
+
export interface OrderTotals {
|
|
80
|
+
amount?: number;
|
|
81
|
+
meals?: number;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface OrderTransaction {
|
|
85
|
+
mx_totals?: OrderTotals;
|
|
86
|
+
// the amount remaining on the transaction after refund - remaining amount available for refund
|
|
87
|
+
transaction_remainder_amount?: number;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface OrderMetaShoppingcart {
|
|
91
|
+
original_total?: OrderTotals;
|
|
92
|
+
total?: OrderTotals;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface OrderDelivery {
|
|
96
|
+
// provider
|
|
97
|
+
provider?: string;
|
|
98
|
+
tracker_url?: string;
|
|
99
|
+
loading_code?: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface OrderDiscount {
|
|
103
|
+
app?: string;
|
|
104
|
+
code?: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface OrderRefundTransaction {
|
|
108
|
+
// shoppingcart
|
|
109
|
+
original_shoppingcart?: string;
|
|
110
|
+
// user
|
|
111
|
+
issued_by?: string;
|
|
112
|
+
refund_date?: string;
|
|
113
|
+
amount?: number;
|
|
114
|
+
refund_amount?: number;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface MultiLanguageLabel {
|
|
118
|
+
en: string;
|
|
119
|
+
fr?: string;
|
|
120
|
+
es?: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface ApexCodeProperties {
|
|
124
|
+
codeType: string;
|
|
125
|
+
codeValue: string;
|
|
126
|
+
qrImage: string;
|
|
127
|
+
qrExpiryDate?: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface ApexCodes {
|
|
131
|
+
operator_code: ApexCodeProperties;
|
|
132
|
+
customer_code: ApexCodeProperties;
|
|
133
|
+
reclaim_code: ApexCodeProperties;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export interface OrderMeta {
|
|
137
|
+
// Check-in UUID for frictionless orders
|
|
138
|
+
checkin_uuid?: string;
|
|
139
|
+
// which ui the order was placed on
|
|
140
|
+
source?: 'web' | 'mobile';
|
|
141
|
+
transaction?: OrderTransaction;
|
|
142
|
+
shoppingcart?: OrderMetaShoppingcart;
|
|
143
|
+
// Indicate whether the order is active or inactive
|
|
144
|
+
active?: boolean;
|
|
145
|
+
// Override for meta.active for testing purposes
|
|
146
|
+
active_override?: boolean;
|
|
147
|
+
delivery?: OrderDelivery;
|
|
148
|
+
discount?: OrderDiscount;
|
|
149
|
+
// The type of kds that the brand uses
|
|
150
|
+
type_of_kds?: string;
|
|
151
|
+
// Indicate whether the order is eligible for cancellation
|
|
152
|
+
cancel_eligible?: boolean;
|
|
153
|
+
refunds?: OrderRefundTransaction[];
|
|
154
|
+
pickup_instruction?: MultiLanguageLabel;
|
|
155
|
+
market_place_label?: MultiLanguageLabel;
|
|
156
|
+
market_place_description?: MultiLanguageLabel;
|
|
157
|
+
apex_code?: string;
|
|
158
|
+
apex_qr?: string;
|
|
159
|
+
apex_codes?: ApexCodes;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface CustomerOrderBrandDTO {
|
|
80
163
|
id: string;
|
|
81
|
-
name
|
|
164
|
+
name: string;
|
|
165
|
+
location_description: string;
|
|
82
166
|
}
|
|
83
167
|
|
|
84
168
|
export interface OrderDate {
|
|
169
|
+
// Date order was accepted into our system and shown on kitchen apps
|
|
85
170
|
accepted?: string;
|
|
86
|
-
|
|
87
|
-
modified?: string;
|
|
171
|
+
// Date kitchen should start preparation ideally(not mandatory)
|
|
88
172
|
should_start?: string;
|
|
173
|
+
// Date kitchen should be half way preparation ideally(not mandatory)
|
|
89
174
|
completion_warning?: string;
|
|
175
|
+
// Date kitchen finished preparation
|
|
90
176
|
ready?: string;
|
|
177
|
+
// Date kitchen started preparation
|
|
91
178
|
started?: string;
|
|
179
|
+
// Date till which show orders as active
|
|
92
180
|
show_as_active_until?: string;
|
|
181
|
+
// For delivery orders - date customer did not pick the order
|
|
93
182
|
no_show?: string;
|
|
183
|
+
// For delivery orders - date customer completed the order collected and sent back robot
|
|
94
184
|
collected?: string;
|
|
185
|
+
// For delivery orders - date order was delivered to destination(not picked by user)
|
|
95
186
|
delivered?: string;
|
|
187
|
+
// For delivery orders - date order was picked up from station for delivery(out_for_delivery)
|
|
96
188
|
pickup?: string;
|
|
189
|
+
// Date order was cancelled
|
|
97
190
|
cancelled?: string;
|
|
191
|
+
// Date order was polled for kds
|
|
192
|
+
polled?: string;
|
|
193
|
+
created?: string;
|
|
194
|
+
modified?: string;
|
|
98
195
|
}
|
|
99
196
|
|
|
100
197
|
export interface OrderDetails {
|
|
198
|
+
// Pickup or delivery instructions
|
|
199
|
+
instructions?: string;
|
|
101
200
|
name?: string;
|
|
102
201
|
display_id?: string;
|
|
103
202
|
contact_number?: string;
|
|
@@ -105,22 +204,71 @@ export interface OrderDetails {
|
|
|
105
204
|
order_type?: string;
|
|
106
205
|
duration?: string;
|
|
107
206
|
destination?: string;
|
|
108
|
-
instructions?: string;
|
|
109
207
|
}
|
|
110
208
|
|
|
111
|
-
export interface
|
|
209
|
+
export interface OrderMonetaryValue {
|
|
112
210
|
amount?: number;
|
|
113
211
|
}
|
|
114
212
|
|
|
115
|
-
export interface
|
|
213
|
+
export interface OrderRefundItem {
|
|
214
|
+
// Item ID
|
|
116
215
|
id?: string;
|
|
216
|
+
// unique index within cart
|
|
117
217
|
_index?: string;
|
|
218
|
+
// Quantity of the item
|
|
118
219
|
quantity?: number;
|
|
119
|
-
price?:
|
|
220
|
+
price?: OrderMonetaryValue;
|
|
221
|
+
// Reason for refund
|
|
120
222
|
reason?: string;
|
|
121
223
|
}
|
|
122
224
|
|
|
123
|
-
export interface
|
|
225
|
+
export interface OrderCreditCard {
|
|
226
|
+
// The credit card type (Amex, Visa, Mastercard, etc...
|
|
227
|
+
card_type?: string;
|
|
228
|
+
// The last 4 digits of the card number
|
|
229
|
+
last4?: string;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export interface OrderCashlessPayment {
|
|
233
|
+
// The badge pay tender id
|
|
234
|
+
tender?: string;
|
|
235
|
+
// The badge pay payment id
|
|
236
|
+
id?: string;
|
|
237
|
+
// The total charged to the badge pay tender
|
|
238
|
+
total?: number;
|
|
239
|
+
// The badge pay tender name
|
|
240
|
+
name?: string;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface OrderPayment {
|
|
244
|
+
token?: string;
|
|
245
|
+
credit_card?: OrderCreditCard;
|
|
246
|
+
digital_wallet_pay?: string;
|
|
247
|
+
badge_pay?: OrderCashlessPayment;
|
|
248
|
+
stipend?: OrderCashlessPayment;
|
|
249
|
+
voucher?: OrderCashlessPayment;
|
|
250
|
+
coupon_voucher?: OrderCashlessPayment;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export interface OrderMealplan {
|
|
254
|
+
// mealplan
|
|
255
|
+
id?: string;
|
|
256
|
+
// tender
|
|
257
|
+
tender?: string;
|
|
258
|
+
name?: string;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface OrderMealSwipes {
|
|
262
|
+
// mealplan
|
|
263
|
+
id?: string;
|
|
264
|
+
// tender
|
|
265
|
+
tender?: string;
|
|
266
|
+
tender_name?: string;
|
|
267
|
+
swipes?: number;
|
|
268
|
+
total?: number;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export interface OrderIs {
|
|
124
272
|
accepted?: boolean;
|
|
125
273
|
in_progress?: boolean;
|
|
126
274
|
ready?: boolean;
|
|
@@ -133,78 +281,418 @@ export interface OrderIsStatus {
|
|
|
133
281
|
cancelled?: boolean;
|
|
134
282
|
}
|
|
135
283
|
|
|
136
|
-
export interface
|
|
284
|
+
export interface OrderLabel {
|
|
285
|
+
en?: string;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export interface OrderItemOption {
|
|
289
|
+
// option
|
|
290
|
+
id?: string;
|
|
291
|
+
// index
|
|
292
|
+
_index?: string;
|
|
293
|
+
meta?: Record<string, any>;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface OrderedItemOptionGroup {
|
|
297
|
+
label?: OrderLabel;
|
|
298
|
+
items?: OrderItemOption[];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export interface OrderItemWithIssue {
|
|
302
|
+
// item
|
|
303
|
+
id: string;
|
|
304
|
+
// index
|
|
305
|
+
_index: string;
|
|
306
|
+
_subtotal?: OrderMonetaryValue;
|
|
307
|
+
_promo?: OrderMonetaryValue;
|
|
308
|
+
reason?: string;
|
|
309
|
+
quantity?: number;
|
|
310
|
+
unit?: number;
|
|
311
|
+
price?: OrderMonetaryValue;
|
|
312
|
+
meta?: Record<string, any>;
|
|
313
|
+
options?: OrderedItemOptionGroup[];
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export interface OrderIssueMeta {
|
|
317
|
+
created_at?: string;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export interface OrderIssue {
|
|
321
|
+
// issue
|
|
322
|
+
id?: string;
|
|
323
|
+
// Array of Items with issues
|
|
324
|
+
items?: OrderItemWithIssue[];
|
|
325
|
+
// Optional additional explanation for issue: 5,10,15 for late issues, SOLD_OUT, MODIFICATION, DIETARY_RESTRICTION for see kitchen issues
|
|
326
|
+
reason?: string;
|
|
327
|
+
meta?: {
|
|
328
|
+
[index: string]: any;
|
|
329
|
+
} & OrderIssueMeta;
|
|
330
|
+
type?: string;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export interface ShoppingcartSalePrice {
|
|
334
|
+
active?: boolean;
|
|
137
335
|
amount?: number;
|
|
138
|
-
meals?: number;
|
|
139
336
|
}
|
|
140
337
|
|
|
141
|
-
export interface
|
|
338
|
+
export interface ShoppingcartMonetaryValue {
|
|
339
|
+
amount?: number;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export interface ShoppingcartLabel {
|
|
142
343
|
en?: string;
|
|
143
344
|
fr?: string;
|
|
144
345
|
}
|
|
145
346
|
|
|
146
|
-
export interface
|
|
347
|
+
export interface ShoppingcartItemMeta {
|
|
348
|
+
// menu id
|
|
349
|
+
menu?: string;
|
|
350
|
+
// brand id
|
|
351
|
+
brand?: string;
|
|
352
|
+
brand_label?: ShoppingcartLabel;
|
|
353
|
+
taxes?: string[];
|
|
354
|
+
tax: {
|
|
355
|
+
tax_tag_code?: string;
|
|
356
|
+
tax_rate?: number;
|
|
357
|
+
tax_amount?: number;
|
|
358
|
+
};
|
|
359
|
+
menu_tax_tags?: string[];
|
|
360
|
+
orderable?: boolean;
|
|
361
|
+
volante_id?: string;
|
|
362
|
+
barcodes?: string[];
|
|
363
|
+
plu?: string;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export interface ShoppingcartQuantityByWeight {
|
|
147
367
|
unit?: string;
|
|
148
368
|
value?: number;
|
|
149
369
|
}
|
|
150
370
|
|
|
151
|
-
export interface
|
|
152
|
-
|
|
153
|
-
|
|
371
|
+
export interface ShoppingcartItemModifierGroupMeta {
|
|
372
|
+
order_type?: 'selection' | 'option' | 'quantity';
|
|
373
|
+
taxes?: string[];
|
|
374
|
+
original_label?: ShoppingcartLabel;
|
|
375
|
+
surchage_limit_value?: number;
|
|
154
376
|
}
|
|
155
377
|
|
|
156
|
-
export interface
|
|
157
|
-
|
|
158
|
-
price?:
|
|
159
|
-
|
|
160
|
-
|
|
378
|
+
export interface ShoppingcartItemModifierSizing {
|
|
379
|
+
name?: string;
|
|
380
|
+
price?: number;
|
|
381
|
+
posid?: string;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export interface ShoppingcartItemModifierMeta {
|
|
385
|
+
sort_number?: number;
|
|
386
|
+
original_label?: ShoppingcartLabel;
|
|
387
|
+
taxes?: string[];
|
|
388
|
+
sizing?: ShoppingcartItemModifierSizing[];
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export interface ShoppingcartItemModifierIs {
|
|
392
|
+
disabled?: boolean;
|
|
393
|
+
incremental?: boolean;
|
|
394
|
+
surchage_limit?: boolean;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export interface ShoppingcartItemModifier {
|
|
398
|
+
// index
|
|
161
399
|
_index?: string;
|
|
400
|
+
meta?: {
|
|
401
|
+
[index: string]: any;
|
|
402
|
+
} & ShoppingcartItemModifierMeta;
|
|
403
|
+
amount_off_exclusions?: string[];
|
|
404
|
+
id?: string;
|
|
405
|
+
price?: ShoppingcartMonetaryValue;
|
|
406
|
+
quantity?: number;
|
|
407
|
+
label?: ShoppingcartLabel;
|
|
408
|
+
is?: ShoppingcartItemModifierIs;
|
|
162
409
|
}
|
|
163
410
|
|
|
164
|
-
export interface
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
411
|
+
export interface ShoppingcartItemModifierGroup {
|
|
412
|
+
meta?: {
|
|
413
|
+
[index: string]: any;
|
|
414
|
+
} & ShoppingcartItemModifierGroupMeta;
|
|
415
|
+
id?: string;
|
|
416
|
+
label?: ShoppingcartLabel;
|
|
417
|
+
items?: ShoppingcartItemModifier[];
|
|
418
|
+
is?: ShoppingcartItemModifierIs;
|
|
168
419
|
}
|
|
169
420
|
|
|
170
|
-
export interface
|
|
171
|
-
|
|
421
|
+
export interface ShoppingcartItemReportingCategory {
|
|
422
|
+
primary?: string;
|
|
423
|
+
secondary?: string;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export interface ShoppingcartItemReporting {
|
|
427
|
+
category?: ShoppingcartItemReportingCategory;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export interface OrderItemReview {
|
|
431
|
+
// review id
|
|
172
432
|
id: string;
|
|
173
|
-
// menu id
|
|
174
|
-
menu: string;
|
|
175
|
-
// item id
|
|
176
|
-
item: string;
|
|
177
433
|
// rating score
|
|
178
434
|
score: number;
|
|
179
435
|
// review comment
|
|
180
|
-
comment
|
|
436
|
+
comment?: string;
|
|
181
437
|
// review tags
|
|
182
|
-
reason
|
|
438
|
+
reason?: string[];
|
|
183
439
|
}
|
|
184
440
|
|
|
185
|
-
export interface
|
|
441
|
+
export interface Disputed {
|
|
442
|
+
reasons?: string[];
|
|
443
|
+
isSelected?: boolean;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export interface ShoppingcartItem {
|
|
447
|
+
// can be cdl item id or stringified timestamp
|
|
186
448
|
id: string;
|
|
187
|
-
|
|
449
|
+
// index based on cdl id or stringified timestamp
|
|
188
450
|
_index?: string;
|
|
451
|
+
sale_price?: ShoppingcartSalePrice;
|
|
452
|
+
_subtotal?: ShoppingcartMonetaryValue;
|
|
453
|
+
_promo?: ShoppingcartMonetaryValue;
|
|
454
|
+
_discount?: ShoppingcartMonetaryValue;
|
|
455
|
+
meta?: {
|
|
456
|
+
[index: string]: any;
|
|
457
|
+
} & ShoppingcartItemMeta;
|
|
458
|
+
// Details about discount like BOGO, LTO, Bundle etc.
|
|
459
|
+
item_discount?: Record<string, any>;
|
|
460
|
+
// user specified instructions for the item
|
|
461
|
+
special_instructions?: string;
|
|
462
|
+
amount_off_exclusions?: string[];
|
|
463
|
+
description?: ShoppingcartLabel;
|
|
189
464
|
quantity: number;
|
|
190
|
-
quantity_by_weight?:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
weighed_price?:
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
465
|
+
quantity_by_weight?: ShoppingcartQuantityByWeight;
|
|
466
|
+
unit?: number;
|
|
467
|
+
price?: ShoppingcartMonetaryValue;
|
|
468
|
+
weighed_price?: ShoppingcartMonetaryValue;
|
|
469
|
+
options?: ShoppingcartItemModifierGroup[];
|
|
470
|
+
added_on?: string;
|
|
471
|
+
meal_value?: number;
|
|
472
|
+
category?: ShoppingcartLabel;
|
|
473
|
+
menu_label?: ShoppingcartLabel;
|
|
474
|
+
tax_rate?: number;
|
|
475
|
+
label?: ShoppingcartLabel;
|
|
476
|
+
reporting?: ShoppingcartItemReporting;
|
|
477
|
+
review?: OrderItemReview;
|
|
478
|
+
disputed?: Disputed;
|
|
479
|
+
wasDisputed?: boolean;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export interface ShoppingcartDiscountIncentives {
|
|
483
|
+
id?: string;
|
|
484
|
+
program: {
|
|
485
|
+
code?: string;
|
|
486
|
+
};
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export interface ShoppingcartFPValidationData {
|
|
490
|
+
discountIncentives?: ShoppingcartDiscountIncentives[];
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export interface ShoppingcartPromoItem {
|
|
494
|
+
applied_discount_amount?: number;
|
|
495
|
+
amount?: number;
|
|
496
|
+
discount_amount?: number;
|
|
497
|
+
price?: number;
|
|
498
|
+
quantity?: number;
|
|
499
|
+
source_id?: string;
|
|
500
|
+
subtotal_amount?: number;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export interface ShoppingcartPromoOrder {
|
|
504
|
+
items_applied_discount_amount?: number;
|
|
505
|
+
amount?: number;
|
|
506
|
+
items_discount_amount?: number;
|
|
507
|
+
total_amount?: number;
|
|
508
|
+
total_applied_discount_amount?: number;
|
|
509
|
+
total_discount_amount?: number;
|
|
510
|
+
items?: ShoppingcartPromoItem[];
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export interface ShoppingcartPromoDetails {
|
|
514
|
+
provider?: 'fp' | 'voucherify';
|
|
515
|
+
provider_data?: ShoppingcartFPValidationData;
|
|
516
|
+
code?: string;
|
|
517
|
+
amount_off?: number;
|
|
518
|
+
percent_off?: number;
|
|
519
|
+
amount?: number;
|
|
520
|
+
app?: string;
|
|
521
|
+
discount?: Record<string, any>;
|
|
522
|
+
order?: ShoppingcartPromoOrder;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
export interface ShoppingcartPaymentMethodMealplan {
|
|
526
|
+
id?: string;
|
|
527
|
+
tender?: string;
|
|
528
|
+
total?: number;
|
|
529
|
+
type?: string;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export interface ShoppingcartPaymentMethodCreditCard {
|
|
533
|
+
card_type?: string;
|
|
534
|
+
last4?: string;
|
|
535
|
+
total?: number;
|
|
536
|
+
type?: string;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export interface ShoppingcartPaymentMethodDigitalWalletPay {
|
|
540
|
+
wallet_type?: string;
|
|
541
|
+
total?: number;
|
|
542
|
+
type?: string;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
export interface ShoppingcartPaymentMethodMealSwipes {
|
|
546
|
+
id?: string;
|
|
547
|
+
tender?: string;
|
|
548
|
+
tender_type?: string;
|
|
549
|
+
tender_name?: string;
|
|
550
|
+
swipes?: number;
|
|
551
|
+
rate?: number;
|
|
552
|
+
total?: number;
|
|
553
|
+
type?: string;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
export interface ShoppingcartPaymentMethodMealExchange {
|
|
557
|
+
id?: string;
|
|
558
|
+
tender?: string;
|
|
559
|
+
type?: string;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export interface ShppingcartPaymentMethodCashlessTender {
|
|
563
|
+
id?: string;
|
|
564
|
+
total?: number;
|
|
565
|
+
tender?: string;
|
|
197
566
|
name?: string;
|
|
198
|
-
|
|
567
|
+
type?: string;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export interface ShoppingcartPaymentMethod {
|
|
571
|
+
mealplan?: ShoppingcartPaymentMethodMealplan;
|
|
572
|
+
credit_card?: ShoppingcartPaymentMethodCreditCard;
|
|
573
|
+
digital_wallet_pay?: ShoppingcartPaymentMethodDigitalWalletPay;
|
|
574
|
+
meal_swipes?: ShoppingcartPaymentMethodMealSwipes;
|
|
575
|
+
meal_exchange?: ShoppingcartPaymentMethodMealExchange;
|
|
576
|
+
badge_pay?: ShppingcartPaymentMethodCashlessTender;
|
|
577
|
+
stipend?: ShppingcartPaymentMethodCashlessTender;
|
|
578
|
+
voucher?: ShppingcartPaymentMethodCashlessTender;
|
|
579
|
+
coupon_voucher?: ShppingcartPaymentMethodCashlessTender;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
export interface ShoppingcartTaxBreakdown {
|
|
583
|
+
taxable_amount?: number;
|
|
584
|
+
tax_collectable?: number;
|
|
585
|
+
combined_tax_rate?: number;
|
|
586
|
+
gst?: number;
|
|
587
|
+
pst?: number;
|
|
588
|
+
provider?: string;
|
|
199
589
|
}
|
|
200
590
|
|
|
201
|
-
export interface
|
|
591
|
+
export interface TaxItem {
|
|
592
|
+
// unique item identifier
|
|
202
593
|
id: string;
|
|
203
|
-
|
|
204
|
-
|
|
594
|
+
// indicates a tax rule for an item
|
|
595
|
+
taxTagCode: string;
|
|
596
|
+
// amount of an item
|
|
597
|
+
quantity: number;
|
|
598
|
+
// decimal price of an item
|
|
599
|
+
price: number;
|
|
600
|
+
// amount of tax charged on an item after funds are captured
|
|
601
|
+
taxedAmount?: number;
|
|
205
602
|
}
|
|
206
603
|
|
|
207
|
-
export interface
|
|
604
|
+
export interface TaxRefund {
|
|
605
|
+
// unique identifier of the refunded item
|
|
606
|
+
refundItemId: string;
|
|
607
|
+
// quantity amount of the item to be refunded
|
|
608
|
+
refundItemQuantity: number;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
export interface TaxLocationData {
|
|
612
|
+
// unique location identifier
|
|
613
|
+
id: string;
|
|
614
|
+
// country of transaction
|
|
615
|
+
country: string;
|
|
616
|
+
// state or province of transaction
|
|
617
|
+
stateOrProvince: string;
|
|
618
|
+
// city of transaction
|
|
619
|
+
city: string;
|
|
620
|
+
// postal code of transaction
|
|
621
|
+
postalCode: string;
|
|
622
|
+
// street address of transaction
|
|
623
|
+
streetAddress: string;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
export interface TaxRequest {
|
|
627
|
+
// a unique identifier representing the transaction
|
|
628
|
+
id: string;
|
|
629
|
+
// the app to associate the transaction with
|
|
630
|
+
appName: string;
|
|
631
|
+
// the order fulfillment type
|
|
632
|
+
transactionType: 'pickup' | 'delivery';
|
|
633
|
+
// numeric value of service fee
|
|
634
|
+
serviceFee?: number;
|
|
635
|
+
// numeric value of delivery fee
|
|
636
|
+
deliveryFee?: number;
|
|
637
|
+
// items to calculate tax on
|
|
638
|
+
items: TaxItem[];
|
|
639
|
+
// iso timstamp of transaction date
|
|
640
|
+
transactionDate?: string;
|
|
641
|
+
// an array of items to refund
|
|
642
|
+
refunds?: TaxRefund[];
|
|
643
|
+
locationData: TaxLocationData;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
export interface ShoppingcartTaxes {
|
|
647
|
+
breakdown?: ShoppingcartTaxBreakdown;
|
|
648
|
+
amount?: number;
|
|
649
|
+
rate?: number;
|
|
650
|
+
provider?: string;
|
|
651
|
+
quote_payload?: TaxRequest;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
export interface ShoppingcartTotal {
|
|
655
|
+
amount: number;
|
|
656
|
+
meals?: number;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
export interface ShoppingcartIs {
|
|
660
|
+
// Shoppingcart Type: delivery, pickup
|
|
661
|
+
type?: 'delivery' | 'pickup' | 'scan_and_go' | 'frictionless';
|
|
662
|
+
// If an order should be paid with meal exchange. If true, this will calculate meals total
|
|
663
|
+
mx_cart?: boolean;
|
|
664
|
+
// If a user's email or email domain is a match in a sites list of tax exempt emails or domains
|
|
665
|
+
email_tax_exempt?: boolean;
|
|
666
|
+
// Indicates to clients that a tax recalculation is required
|
|
667
|
+
tax_calculation_required?: boolean;
|
|
668
|
+
system365?: boolean;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
export interface CustomerOrderShoppingcartDTO {
|
|
672
|
+
// shoppingcart
|
|
673
|
+
id: string;
|
|
674
|
+
// location
|
|
675
|
+
location: string;
|
|
676
|
+
// menu
|
|
677
|
+
menu?: string;
|
|
678
|
+
// brand
|
|
679
|
+
brand?: string;
|
|
680
|
+
items?: ShoppingcartItem[];
|
|
681
|
+
sub_total?: ShoppingcartMonetaryValue;
|
|
682
|
+
promo?: ShoppingcartPromoDetails;
|
|
683
|
+
discount?: ShoppingcartPromoDetails;
|
|
684
|
+
payment_method?: ShoppingcartPaymentMethod;
|
|
685
|
+
taxes?: ShoppingcartTaxes;
|
|
686
|
+
total?: ShoppingcartTotal;
|
|
687
|
+
service_fee?: ShoppingcartMonetaryValue;
|
|
688
|
+
delivery_fee?: ShoppingcartMonetaryValue;
|
|
689
|
+
is?: ShoppingcartIs;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
export interface CustomerOrder {
|
|
693
|
+
meta?: {
|
|
694
|
+
[index: string]: any;
|
|
695
|
+
} & OrderMeta;
|
|
208
696
|
id?: string;
|
|
209
697
|
reorder_eligibility?:
|
|
210
698
|
| 'eligible'
|
|
@@ -221,20 +709,25 @@ export interface Order {
|
|
|
221
709
|
| 'modifiers_unavailable'
|
|
222
710
|
| 'modified_items'
|
|
223
711
|
| 'cancelled_order';
|
|
224
|
-
location_brand?:
|
|
712
|
+
location_brand?: CustomerOrderBrandDTO;
|
|
225
713
|
location?: string;
|
|
226
714
|
date?: OrderDate;
|
|
227
715
|
details?: OrderDetails;
|
|
228
716
|
pickup?: string;
|
|
229
717
|
requested_date?: string;
|
|
230
|
-
refunds?:
|
|
718
|
+
refunds?: OrderRefundItem[];
|
|
231
719
|
pickup_id?: string;
|
|
232
|
-
|
|
233
|
-
|
|
720
|
+
payment?: OrderPayment;
|
|
721
|
+
mealplan?: OrderMealplan;
|
|
722
|
+
meal_swipes?: OrderMealSwipes;
|
|
723
|
+
is?: OrderIs;
|
|
724
|
+
issue?: OrderIssue;
|
|
725
|
+
shoppingcart?: CustomerOrderShoppingcartDTO;
|
|
234
726
|
}
|
|
235
727
|
|
|
236
728
|
export interface GetCustomerOrdersResponseDTO {
|
|
237
|
-
orders
|
|
729
|
+
// customer orders
|
|
730
|
+
orders: CustomerOrder[];
|
|
238
731
|
}
|
|
239
732
|
|
|
240
733
|
export interface BadRequestErrorDTO {
|
|
@@ -243,26 +736,24 @@ export interface BadRequestErrorDTO {
|
|
|
243
736
|
data: Record<string, any>;
|
|
244
737
|
}
|
|
245
738
|
|
|
246
|
-
export interface
|
|
247
|
-
// menu id
|
|
248
|
-
menu: string;
|
|
249
|
-
// item id
|
|
250
|
-
item: string;
|
|
739
|
+
export interface PostReviewOrderItemRequest {
|
|
251
740
|
// rating score
|
|
252
741
|
score: number;
|
|
253
742
|
// review comment
|
|
254
|
-
comment
|
|
743
|
+
comment?: string;
|
|
255
744
|
// review tags
|
|
256
|
-
reason
|
|
745
|
+
reason?: string[];
|
|
746
|
+
menu: string;
|
|
747
|
+
item: string;
|
|
257
748
|
}
|
|
258
749
|
|
|
259
|
-
export interface
|
|
750
|
+
export interface PostReviewOrderItemsRequestDTO {
|
|
260
751
|
orderId: string;
|
|
261
|
-
reviews:
|
|
752
|
+
reviews: PostReviewOrderItemRequest[];
|
|
262
753
|
}
|
|
263
754
|
|
|
264
|
-
export interface
|
|
265
|
-
reviews:
|
|
755
|
+
export interface PostReviewOrderItemsResponseDTO {
|
|
756
|
+
reviews: OrderItemReview[];
|
|
266
757
|
}
|
|
267
758
|
|
|
268
759
|
// GET /consumer/v1/health-check
|
|
@@ -295,7 +786,12 @@ export interface GetPaymentListByBrandRequest
|
|
|
295
786
|
extends BaseRequest,
|
|
296
787
|
RequestQuery<GetPaymentListByBrandQuery> {}
|
|
297
788
|
|
|
298
|
-
// GET /consumer/customer-orders - Get customer orders
|
|
789
|
+
// GET /consumer/customer-orders/{userId} - Get customer orders
|
|
790
|
+
|
|
791
|
+
export interface GetCustomerOrdersPath {
|
|
792
|
+
// TODO: add parameter to swagger.json
|
|
793
|
+
userId: string;
|
|
794
|
+
}
|
|
299
795
|
|
|
300
796
|
export interface GetCustomerOrdersQuery {
|
|
301
797
|
// Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is the current time in milliseconds.
|
|
@@ -310,14 +806,15 @@ export type GetCustomerOrdersResponse = GetCustomerOrdersResponseDTO;
|
|
|
310
806
|
|
|
311
807
|
export interface GetCustomerOrdersRequest
|
|
312
808
|
extends BaseRequest,
|
|
313
|
-
RequestQuery<GetCustomerOrdersQuery
|
|
809
|
+
RequestQuery<GetCustomerOrdersQuery>,
|
|
810
|
+
GetCustomerOrdersPath {}
|
|
314
811
|
|
|
315
|
-
// POST /consumer/review/order
|
|
812
|
+
// POST /consumer/review/order-items - Submit reviews for order items
|
|
316
813
|
|
|
317
|
-
export type
|
|
814
|
+
export type PostReviewOrderItemsBody = PostReviewOrderItemsRequestDTO;
|
|
318
815
|
|
|
319
|
-
export type
|
|
816
|
+
export type PostReviewOrderItemsResponse = PostReviewOrderItemsResponseDTO;
|
|
320
817
|
|
|
321
|
-
export interface
|
|
322
|
-
body:
|
|
818
|
+
export interface PostReviewOrderItemsRequest extends BaseRequest {
|
|
819
|
+
body: PostReviewOrderItemsBody;
|
|
323
820
|
}
|