@compassdigital/sdk.typescript 3.40.0 → 3.41.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 +77 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +79 -3
- package/lib/index.js.map +1 -1
- package/lib/interface/mealplan.d.ts +7 -1
- package/lib/interface/mealplan.d.ts.map +1 -1
- package/lib/interface/menu.d.ts +103 -3
- package/lib/interface/menu.d.ts.map +1 -1
- package/lib/interface/partner.d.ts +0 -1
- package/lib/interface/partner.d.ts.map +1 -1
- package/lib/interface/shoppingcart.d.ts +124 -67
- package/lib/interface/shoppingcart.d.ts.map +1 -1
- package/package.json +10 -5
- package/pipeline.yml +13 -0
- package/src/index.ts +204 -9
- package/src/interface/mealplan.ts +12 -1
- package/src/interface/menu.ts +165 -5
- package/src/interface/partner.ts +0 -2
- package/src/interface/shoppingcart.ts +141 -72
|
@@ -5,6 +5,9 @@ import { RequestQuery, BaseRequest } from "./util";
|
|
|
5
5
|
export interface Error {
|
|
6
6
|
code?: number;
|
|
7
7
|
message?: string;
|
|
8
|
+
headers?: {
|
|
9
|
+
Location?: string;
|
|
10
|
+
};
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
export interface Tender {
|
|
@@ -142,13 +145,21 @@ export interface PostMealplanCallbackPath {
|
|
|
142
145
|
id: string;
|
|
143
146
|
}
|
|
144
147
|
|
|
148
|
+
export interface PostMealplanCallbackQuery {
|
|
149
|
+
// Determines whether the request originates from a web client or not
|
|
150
|
+
web?: boolean;
|
|
151
|
+
}
|
|
152
|
+
|
|
145
153
|
export interface PostMealplanCallbackResponse {
|
|
146
154
|
token?: string;
|
|
147
155
|
// DH 1.0 format for returning the token
|
|
148
156
|
cardNumber?: string;
|
|
149
157
|
}
|
|
150
158
|
|
|
151
|
-
export interface PostMealplanCallbackRequest
|
|
159
|
+
export interface PostMealplanCallbackRequest
|
|
160
|
+
extends BaseRequest,
|
|
161
|
+
RequestQuery<PostMealplanCallbackQuery>,
|
|
162
|
+
PostMealplanCallbackPath {}
|
|
152
163
|
|
|
153
164
|
// GET /mealplan/{id}/tender/{tender} - Check the user's tender balance
|
|
154
165
|
|
package/src/interface/menu.ts
CHANGED
|
@@ -2,6 +2,55 @@
|
|
|
2
2
|
|
|
3
3
|
import { RequestQuery, BaseRequest } from "./util";
|
|
4
4
|
|
|
5
|
+
export interface ModifiersListResponse {
|
|
6
|
+
meta?: Meta;
|
|
7
|
+
results?: Modifier[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ModifierGroupsListResponse {
|
|
11
|
+
meta?: Meta;
|
|
12
|
+
results?: ModifierGroup[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface Meta {
|
|
16
|
+
limit?: number;
|
|
17
|
+
page?: number;
|
|
18
|
+
sort_by?: string;
|
|
19
|
+
sort_order?: string;
|
|
20
|
+
search?: string;
|
|
21
|
+
total_results?: number;
|
|
22
|
+
total_pages?: number;
|
|
23
|
+
result_count?: number;
|
|
24
|
+
[index: string]: any;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Modifier {
|
|
28
|
+
id?: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
price?: number;
|
|
32
|
+
calories?: number;
|
|
33
|
+
posid?: string;
|
|
34
|
+
tax_tags?: string[];
|
|
35
|
+
barcode?: string;
|
|
36
|
+
is_active?: boolean;
|
|
37
|
+
is_in_stock?: boolean;
|
|
38
|
+
created_at?: string;
|
|
39
|
+
updated_at?: string;
|
|
40
|
+
deleted_at?: string;
|
|
41
|
+
[index: string]: any;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ModifierGroup {
|
|
45
|
+
id?: string;
|
|
46
|
+
name?: string;
|
|
47
|
+
label?: string;
|
|
48
|
+
created_at?: string;
|
|
49
|
+
updated_at?: string;
|
|
50
|
+
deleted_at?: string;
|
|
51
|
+
[index: string]: any;
|
|
52
|
+
}
|
|
53
|
+
|
|
5
54
|
export interface Menu {
|
|
6
55
|
// menu
|
|
7
56
|
id?: string;
|
|
@@ -299,20 +348,131 @@ export interface ZippedExcelExport {
|
|
|
299
348
|
format?: string;
|
|
300
349
|
}
|
|
301
350
|
|
|
302
|
-
// GET /menu/
|
|
351
|
+
// GET /menu/v2/modifiers
|
|
352
|
+
|
|
353
|
+
export interface GetMenuV2ModifiersQuery {
|
|
354
|
+
// Graphql query string
|
|
355
|
+
_query?: string;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
export type GetMenuV2ModifiersResponse = ModifiersListResponse;
|
|
359
|
+
|
|
360
|
+
export interface GetMenuV2ModifiersRequest
|
|
361
|
+
extends BaseRequest,
|
|
362
|
+
RequestQuery<GetMenuV2ModifiersQuery> {}
|
|
363
|
+
|
|
364
|
+
// GET /menu/v2/modifier/{id}
|
|
365
|
+
|
|
366
|
+
export interface GetMenuV2ModifierPath {
|
|
367
|
+
id: string;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export interface GetMenuV2ModifierQuery {
|
|
371
|
+
// Graphql query string
|
|
372
|
+
_query?: string;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
export type GetMenuV2ModifierResponse = Modifier;
|
|
376
|
+
|
|
377
|
+
export interface GetMenuV2ModifierRequest
|
|
378
|
+
extends BaseRequest,
|
|
379
|
+
RequestQuery<GetMenuV2ModifierQuery>,
|
|
380
|
+
GetMenuV2ModifierPath {}
|
|
381
|
+
|
|
382
|
+
// PATCH /menu/v2/modifier/{id}
|
|
383
|
+
|
|
384
|
+
export interface PatchMenuV2ModifierPath {
|
|
385
|
+
id: string;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
export type PatchMenuV2ModifierResponse = Modifier;
|
|
389
|
+
|
|
390
|
+
export interface PatchMenuV2ModifierRequest extends BaseRequest, PatchMenuV2ModifierPath {}
|
|
391
|
+
|
|
392
|
+
// POST /menu/v2/modifier
|
|
393
|
+
|
|
394
|
+
export type PostMenuV2ModifierResponse = Modifier;
|
|
395
|
+
|
|
396
|
+
export interface PostMenuV2ModifierRequest extends BaseRequest {}
|
|
397
|
+
|
|
398
|
+
// GET /menu/v2/modifier/count
|
|
399
|
+
|
|
400
|
+
export interface GetMenuV2ModifierCountQuery {
|
|
401
|
+
// Graphql query string
|
|
402
|
+
_query?: string;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export interface GetMenuV2ModifierCountResponse {
|
|
406
|
+
count?: number;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface GetMenuV2ModifierCountRequest
|
|
410
|
+
extends BaseRequest,
|
|
411
|
+
RequestQuery<GetMenuV2ModifierCountQuery> {}
|
|
412
|
+
|
|
413
|
+
// GET /menu/v2/modifier-groups
|
|
414
|
+
|
|
415
|
+
export interface GetMenuV2ModifierGroupsQuery {
|
|
416
|
+
// Graphql query string
|
|
417
|
+
_query?: string;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export type GetMenuV2ModifierGroupsResponse = ModifierGroupsListResponse;
|
|
421
|
+
|
|
422
|
+
export interface GetMenuV2ModifierGroupsRequest
|
|
423
|
+
extends BaseRequest,
|
|
424
|
+
RequestQuery<GetMenuV2ModifierGroupsQuery> {}
|
|
425
|
+
|
|
426
|
+
// POST /menu/v2/modifier-group
|
|
427
|
+
|
|
428
|
+
export type PostMenuV2ModifierGroupResponse = Modifier;
|
|
429
|
+
|
|
430
|
+
export interface PostMenuV2ModifierGroupRequest extends BaseRequest {}
|
|
431
|
+
|
|
432
|
+
// GET /menu/v2/modifier-group/{id}
|
|
433
|
+
|
|
434
|
+
export interface GetMenuV2ModifierGroupPath {
|
|
435
|
+
id: string;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export interface GetMenuV2ModifierGroupQuery {
|
|
439
|
+
// Graphql query string
|
|
440
|
+
_query?: string;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export type GetMenuV2ModifierGroupResponse = Modifier;
|
|
444
|
+
|
|
445
|
+
export interface GetMenuV2ModifierGroupRequest
|
|
446
|
+
extends BaseRequest,
|
|
447
|
+
RequestQuery<GetMenuV2ModifierGroupQuery>,
|
|
448
|
+
GetMenuV2ModifierGroupPath {}
|
|
449
|
+
|
|
450
|
+
// PATCH /menu/v2/modifier-group/{id}
|
|
451
|
+
|
|
452
|
+
export interface PatchMenuV2ModifierGroupPath {
|
|
453
|
+
id: string;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
export type PatchMenuV2ModifierGroupResponse = Modifier;
|
|
457
|
+
|
|
458
|
+
export interface PatchMenuV2ModifierGroupRequest
|
|
459
|
+
extends BaseRequest,
|
|
460
|
+
PatchMenuV2ModifierGroupPath {}
|
|
461
|
+
|
|
462
|
+
// GET /menu/v2/modifier-group/count
|
|
303
463
|
|
|
304
|
-
export interface
|
|
464
|
+
export interface GetMenuV2ModifierGroupCountQuery {
|
|
305
465
|
// Graphql query string
|
|
306
466
|
_query?: string;
|
|
307
467
|
}
|
|
308
468
|
|
|
309
|
-
export interface
|
|
469
|
+
export interface GetMenuV2ModifierGroupCountResponse {
|
|
310
470
|
count?: number;
|
|
311
471
|
}
|
|
312
472
|
|
|
313
|
-
export interface
|
|
473
|
+
export interface GetMenuV2ModifierGroupCountRequest
|
|
314
474
|
extends BaseRequest,
|
|
315
|
-
RequestQuery<
|
|
475
|
+
RequestQuery<GetMenuV2ModifierGroupCountQuery> {}
|
|
316
476
|
|
|
317
477
|
// GET /menu/client/{client_id} - Get menu client
|
|
318
478
|
|
package/src/interface/partner.ts
CHANGED
|
@@ -454,8 +454,6 @@ export interface WaitTime {
|
|
|
454
454
|
max: number;
|
|
455
455
|
// minimum wait time to the next time slot in minutes
|
|
456
456
|
min: number;
|
|
457
|
-
// the epoch timestamp of the next available ready time for a station
|
|
458
|
-
ready_time: number;
|
|
459
457
|
}
|
|
460
458
|
|
|
461
459
|
export interface Menu {
|
|
@@ -7,79 +7,134 @@ export interface Error {
|
|
|
7
7
|
code?: number;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export interface
|
|
11
|
-
|
|
10
|
+
export interface ItemsRequest {
|
|
11
|
+
items?: ItemRequest[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ItemRequest {
|
|
15
|
+
// item id
|
|
12
16
|
id: string;
|
|
13
|
-
|
|
17
|
+
quantity: Quantity;
|
|
18
|
+
options?: ModifierGroupRequest[];
|
|
14
19
|
_index?: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
meta?: {
|
|
21
|
+
brand?: string;
|
|
22
|
+
brand_label?: Label;
|
|
23
|
+
menu?: string;
|
|
24
|
+
[index: string]: any;
|
|
19
25
|
};
|
|
26
|
+
special_instructions?: string;
|
|
27
|
+
amount_off_exclusions?: string[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ItemResponse {
|
|
31
|
+
// can be cdl item id or stringified timestamp
|
|
32
|
+
id: string;
|
|
33
|
+
description?: Label;
|
|
34
|
+
// index based on cdl id or stringified timestamp
|
|
35
|
+
_index?: string;
|
|
36
|
+
quantity: Quantity;
|
|
37
|
+
unit?: number;
|
|
38
|
+
price?: Price;
|
|
20
39
|
// Final item price after LTO/Bundle/BOGO etc is applied on the item.
|
|
21
40
|
sale_price?: {
|
|
22
41
|
active?: boolean;
|
|
23
|
-
amount?:
|
|
42
|
+
amount?: MonetaryValue;
|
|
24
43
|
};
|
|
25
44
|
// Subtotal of the item including all options
|
|
26
45
|
_subtotal?: {
|
|
27
|
-
amount?:
|
|
46
|
+
amount?: MonetaryValue;
|
|
28
47
|
};
|
|
29
48
|
// Promo applied to this item
|
|
30
49
|
_promo?: {
|
|
31
|
-
amount?:
|
|
50
|
+
amount?: MonetaryValue;
|
|
51
|
+
};
|
|
52
|
+
// discount applied to this item
|
|
53
|
+
_discount?: {
|
|
54
|
+
amount?: MonetaryValue;
|
|
32
55
|
};
|
|
33
56
|
meta?: {
|
|
34
57
|
// menu id
|
|
35
58
|
menu?: string;
|
|
36
59
|
// brand id
|
|
37
60
|
brand?: string;
|
|
61
|
+
brand_label?: Label;
|
|
62
|
+
taxes?: string[];
|
|
63
|
+
menu_tax_tags?: string[];
|
|
64
|
+
orderable?: boolean;
|
|
65
|
+
volante_id?: string;
|
|
38
66
|
[index: string]: any;
|
|
39
67
|
};
|
|
40
|
-
options?:
|
|
41
|
-
id?: string;
|
|
42
|
-
label?: {
|
|
43
|
-
en?: string;
|
|
44
|
-
};
|
|
45
|
-
meta?: any;
|
|
46
|
-
items?: {
|
|
47
|
-
// option
|
|
48
|
-
id?: string;
|
|
49
|
-
label?: {
|
|
50
|
-
en?: string;
|
|
51
|
-
};
|
|
52
|
-
// index
|
|
53
|
-
_index?: string;
|
|
54
|
-
meta?: any;
|
|
55
|
-
quantity?: number;
|
|
56
|
-
amount_off_exclusions?: string[];
|
|
57
|
-
}[];
|
|
58
|
-
}[];
|
|
68
|
+
options?: ModifierGroupResponse[];
|
|
59
69
|
// Details about discount like BOGO, LTO, Bundle etc.
|
|
60
70
|
item_discount?: any;
|
|
61
71
|
// user specified instructions for the item
|
|
62
72
|
special_instructions?: string;
|
|
63
73
|
amount_off_exclusions?: string[];
|
|
64
74
|
added_on?: string;
|
|
65
|
-
|
|
75
|
+
meal_value?: IntegerValue;
|
|
76
|
+
category?: Label;
|
|
66
77
|
}
|
|
67
78
|
|
|
68
|
-
export interface
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
export interface ModifierGroupRequest {
|
|
80
|
+
label?: Label;
|
|
81
|
+
items?: ModifierRequest[];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface ModifierGroupResponse {
|
|
85
|
+
id?: string;
|
|
86
|
+
label?: Label;
|
|
87
|
+
meta?: {
|
|
88
|
+
taxes?: string[];
|
|
89
|
+
original_label?: Label;
|
|
90
|
+
[index: string]: any;
|
|
91
|
+
};
|
|
92
|
+
items?: ModifierResponse[];
|
|
93
|
+
is?: {
|
|
94
|
+
disabled?: boolean;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface ModifierRequest {
|
|
99
|
+
// option/modifier
|
|
100
|
+
id?: string;
|
|
101
|
+
label?: Label;
|
|
102
|
+
_index?: string;
|
|
103
|
+
quantity?: Quantity;
|
|
104
|
+
amount_off_exclusions?: string[];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface ModifierResponse {
|
|
108
|
+
// option/modifier
|
|
109
|
+
id?: string;
|
|
110
|
+
price?: Price;
|
|
111
|
+
quantity?: Quantity;
|
|
112
|
+
label?: Label;
|
|
113
|
+
// index
|
|
114
|
+
_index?: string;
|
|
115
|
+
meta?: {
|
|
116
|
+
sort_number?: number;
|
|
117
|
+
original_label?: Label;
|
|
118
|
+
taxes?: string[];
|
|
77
119
|
[index: string]: any;
|
|
78
120
|
};
|
|
121
|
+
amount_off_exclusions?: string[];
|
|
122
|
+
is?: {
|
|
123
|
+
disabled?: boolean;
|
|
124
|
+
};
|
|
79
125
|
}
|
|
80
126
|
|
|
81
|
-
export interface
|
|
82
|
-
|
|
127
|
+
export interface Taxes {
|
|
128
|
+
amount?: MonetaryValue;
|
|
129
|
+
rate?: MonetaryValue;
|
|
130
|
+
breakdown?: {
|
|
131
|
+
taxable_amount?: MonetaryValue;
|
|
132
|
+
tax_collectable?: MonetaryValue;
|
|
133
|
+
combined_tax_rate?: MonetaryValue;
|
|
134
|
+
gst?: MonetaryValue;
|
|
135
|
+
pst?: MonetaryValue;
|
|
136
|
+
[index: string]: any;
|
|
137
|
+
};
|
|
83
138
|
}
|
|
84
139
|
|
|
85
140
|
export interface Promo {
|
|
@@ -89,7 +144,7 @@ export interface Promo {
|
|
|
89
144
|
|
|
90
145
|
export interface BadgePay {
|
|
91
146
|
id?: string;
|
|
92
|
-
total?:
|
|
147
|
+
total?: MonetaryValue;
|
|
93
148
|
tender?: string;
|
|
94
149
|
name?: string;
|
|
95
150
|
}
|
|
@@ -99,26 +154,25 @@ export interface Payment {
|
|
|
99
154
|
mealplan?: {
|
|
100
155
|
id?: string;
|
|
101
156
|
tender?: string;
|
|
102
|
-
total?:
|
|
157
|
+
total?: MonetaryValue;
|
|
103
158
|
};
|
|
104
159
|
credit_card?: {
|
|
105
160
|
card_type?: string;
|
|
106
161
|
last4?: string;
|
|
107
|
-
total?:
|
|
162
|
+
total?: MonetaryValue;
|
|
108
163
|
};
|
|
109
164
|
digital_wallet_pay?: {
|
|
110
165
|
wallet_type?: string;
|
|
111
|
-
total?:
|
|
166
|
+
total?: MonetaryValue;
|
|
112
167
|
};
|
|
113
168
|
meal_swipes?: {
|
|
114
169
|
id?: string;
|
|
115
170
|
tender?: string;
|
|
116
171
|
tender_type?: string;
|
|
117
172
|
tender_name?: string;
|
|
118
|
-
swipes?:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
total?: number;
|
|
173
|
+
swipes?: MonetaryValue;
|
|
174
|
+
rate?: MonetaryValue;
|
|
175
|
+
total?: MonetaryValue;
|
|
122
176
|
};
|
|
123
177
|
meal_exchange?: {
|
|
124
178
|
id?: string;
|
|
@@ -174,23 +228,23 @@ export interface ShoppingCartResponse {
|
|
|
174
228
|
// brand
|
|
175
229
|
brand?: string;
|
|
176
230
|
date?: any;
|
|
177
|
-
items?:
|
|
231
|
+
items?: ItemResponse[];
|
|
178
232
|
sub_total?: {
|
|
179
|
-
amount?:
|
|
233
|
+
amount?: MonetaryValue;
|
|
180
234
|
};
|
|
181
235
|
promo?: {
|
|
182
236
|
code?: string;
|
|
183
|
-
amount_off?:
|
|
184
|
-
percent_off?:
|
|
185
|
-
amount?:
|
|
237
|
+
amount_off?: MonetaryValue;
|
|
238
|
+
percent_off?: MonetaryValue;
|
|
239
|
+
amount?: MonetaryValue;
|
|
186
240
|
app?: string;
|
|
187
241
|
};
|
|
188
242
|
//@deprecated
|
|
189
243
|
loyalty?: {
|
|
190
244
|
coupon?: {
|
|
191
245
|
code?: string;
|
|
192
|
-
amount_off?:
|
|
193
|
-
amount?:
|
|
246
|
+
amount_off?: MonetaryValue;
|
|
247
|
+
amount?: MonetaryValue;
|
|
194
248
|
name?: string;
|
|
195
249
|
};
|
|
196
250
|
// Points to be earned for this shopping cart total
|
|
@@ -198,34 +252,34 @@ export interface ShoppingCartResponse {
|
|
|
198
252
|
};
|
|
199
253
|
discount?: {
|
|
200
254
|
code?: string;
|
|
201
|
-
amount_off?:
|
|
202
|
-
percent_off?:
|
|
203
|
-
amount?:
|
|
255
|
+
amount_off?: MonetaryValue;
|
|
256
|
+
percent_off?: MonetaryValue;
|
|
257
|
+
amount?: MonetaryValue;
|
|
204
258
|
};
|
|
205
259
|
payment_method?: {
|
|
206
260
|
email?: string;
|
|
207
261
|
mealplan?: {
|
|
208
262
|
id?: string;
|
|
209
263
|
tender?: string;
|
|
210
|
-
total?:
|
|
264
|
+
total?: MonetaryValue;
|
|
211
265
|
};
|
|
212
266
|
credit_card?: {
|
|
213
267
|
card_type?: string;
|
|
214
268
|
last4?: string;
|
|
215
|
-
total?:
|
|
269
|
+
total?: MonetaryValue;
|
|
216
270
|
};
|
|
217
271
|
digital_wallet_pay?: {
|
|
218
272
|
wallet_type?: string;
|
|
219
|
-
total?:
|
|
273
|
+
total?: MonetaryValue;
|
|
220
274
|
};
|
|
221
275
|
meal_swipes?: {
|
|
222
276
|
id?: string;
|
|
223
277
|
tender?: string;
|
|
224
278
|
tender_type?: string;
|
|
225
279
|
tender_name?: string;
|
|
226
|
-
swipes?:
|
|
227
|
-
rate?:
|
|
228
|
-
total?:
|
|
280
|
+
swipes?: MonetaryValue;
|
|
281
|
+
rate?: MonetaryValue;
|
|
282
|
+
total?: MonetaryValue;
|
|
229
283
|
};
|
|
230
284
|
meal_exchange?: {
|
|
231
285
|
id?: string;
|
|
@@ -233,10 +287,10 @@ export interface ShoppingCartResponse {
|
|
|
233
287
|
};
|
|
234
288
|
badge_pay?: BadgePay;
|
|
235
289
|
};
|
|
236
|
-
taxes?:
|
|
290
|
+
taxes?: Taxes;
|
|
237
291
|
total?: {
|
|
238
|
-
amount?:
|
|
239
|
-
meals?:
|
|
292
|
+
amount?: MonetaryValue;
|
|
293
|
+
meals?: MonetaryValue;
|
|
240
294
|
};
|
|
241
295
|
exemptions?: {
|
|
242
296
|
tax?: boolean;
|
|
@@ -246,10 +300,10 @@ export interface ShoppingCartResponse {
|
|
|
246
300
|
id?: string;
|
|
247
301
|
};
|
|
248
302
|
service_fee?: {
|
|
249
|
-
amount?:
|
|
303
|
+
amount?: MonetaryValue;
|
|
250
304
|
};
|
|
251
305
|
delivery_fee?: {
|
|
252
|
-
amount?:
|
|
306
|
+
amount?: MonetaryValue;
|
|
253
307
|
};
|
|
254
308
|
is?: {
|
|
255
309
|
// Shoppingcart Type: delivery, pickup
|
|
@@ -270,6 +324,21 @@ export interface ShoppingCartResponse {
|
|
|
270
324
|
|
|
271
325
|
export type ShoppingCart = ShoppingCartResponse;
|
|
272
326
|
|
|
327
|
+
export interface Label {
|
|
328
|
+
en?: string;
|
|
329
|
+
fr?: string;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
export interface Price {
|
|
333
|
+
amount?: MonetaryValue;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export type MonetaryValue = number;
|
|
337
|
+
|
|
338
|
+
export type IntegerValue = number;
|
|
339
|
+
|
|
340
|
+
export type Quantity = IntegerValue;
|
|
341
|
+
|
|
273
342
|
// POST /shoppingcart/ - Create a new ShoppingCart
|
|
274
343
|
|
|
275
344
|
export type PostShoppingcartCartBody = ShoppingCartRequest;
|
|
@@ -287,7 +356,7 @@ export interface PutShoppingcartCartItemsPath {
|
|
|
287
356
|
id: string;
|
|
288
357
|
}
|
|
289
358
|
|
|
290
|
-
export type PutShoppingcartCartItemsBody =
|
|
359
|
+
export type PutShoppingcartCartItemsBody = ItemsRequest;
|
|
291
360
|
|
|
292
361
|
export type PutShoppingcartCartItemsResponse = ShoppingCartResponse;
|
|
293
362
|
|
|
@@ -302,7 +371,7 @@ export interface DeleteShoppingcartCartItemsPath {
|
|
|
302
371
|
id: string;
|
|
303
372
|
}
|
|
304
373
|
|
|
305
|
-
export type DeleteShoppingcartCartItemsBody =
|
|
374
|
+
export type DeleteShoppingcartCartItemsBody = ItemsRequest;
|
|
306
375
|
|
|
307
376
|
export type DeleteShoppingcartCartItemsResponse = ShoppingCartResponse;
|
|
308
377
|
|