@compassdigital/sdk.typescript 4.66.0 → 4.68.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 -85
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +503 -530
- 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 +5 -3
- 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/manifest.json +0 -4
- package/package.json +2 -2
- package/src/index.ts +10395 -10464
- 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
|
@@ -1,434 +1,434 @@
|
|
|
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 ItemsRequest {
|
|
13
|
-
|
|
13
|
+
items?: ItemRequest[];
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export interface ItemRequest {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
// item id
|
|
18
|
+
id: string;
|
|
19
|
+
quantity: Quantity;
|
|
20
|
+
options?: ModifierGroupRequest[];
|
|
21
|
+
_index?: string;
|
|
22
|
+
meta?: {
|
|
23
|
+
brand?: string;
|
|
24
|
+
brand_label?: Label;
|
|
25
|
+
menu?: string;
|
|
26
|
+
barcodes?: string[];
|
|
27
|
+
plu?: string;
|
|
28
|
+
[index: string]: any;
|
|
29
|
+
};
|
|
30
|
+
special_instructions?: string;
|
|
31
|
+
amount_off_exclusions?: AmountOffExclusion[];
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export interface ItemResponse {
|
|
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
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
35
|
+
// can be cdl item id or stringified timestamp
|
|
36
|
+
id: string;
|
|
37
|
+
description?: Label;
|
|
38
|
+
// index based on cdl id or stringified timestamp
|
|
39
|
+
_index?: string;
|
|
40
|
+
quantity: Quantity;
|
|
41
|
+
unit?: number;
|
|
42
|
+
price?: Price;
|
|
43
|
+
// Final item price after LTO/Bundle/BOGO etc is applied on the item.
|
|
44
|
+
sale_price?: {
|
|
45
|
+
active?: boolean;
|
|
46
|
+
amount?: MonetaryValue;
|
|
47
|
+
};
|
|
48
|
+
// Subtotal of the item including all options
|
|
49
|
+
_subtotal?: {
|
|
50
|
+
amount?: MonetaryValue;
|
|
51
|
+
};
|
|
52
|
+
// Promo applied to this item
|
|
53
|
+
_promo?: {
|
|
54
|
+
amount?: MonetaryValue;
|
|
55
|
+
};
|
|
56
|
+
// discount applied to this item
|
|
57
|
+
_discount?: {
|
|
58
|
+
amount?: MonetaryValue;
|
|
59
|
+
};
|
|
60
|
+
meta?: {
|
|
61
|
+
// menu id
|
|
62
|
+
menu?: string;
|
|
63
|
+
// brand id
|
|
64
|
+
brand?: string;
|
|
65
|
+
brand_label?: Label;
|
|
66
|
+
taxes?: string[];
|
|
67
|
+
tax?: {
|
|
68
|
+
tax_tag_code?: string;
|
|
69
|
+
tax_rate?: number;
|
|
70
|
+
tax_amount?: number;
|
|
71
|
+
};
|
|
72
|
+
menu_tax_tags?: string[];
|
|
73
|
+
orderable?: boolean;
|
|
74
|
+
volante_id?: string;
|
|
75
|
+
barcodes?: string[];
|
|
76
|
+
plu?: string;
|
|
77
|
+
[index: string]: any;
|
|
78
|
+
};
|
|
79
|
+
options?: ModifierGroupResponse[];
|
|
80
|
+
// Details about discount like BOGO, LTO, Bundle etc.
|
|
81
|
+
item_discount?: Record<string, any>;
|
|
82
|
+
// user specified instructions for the item
|
|
83
|
+
special_instructions?: string;
|
|
84
|
+
amount_off_exclusions?: AmountOffExclusion[];
|
|
85
|
+
added_on?: string;
|
|
86
|
+
meal_value?: IntegerValue;
|
|
87
|
+
category?: Label;
|
|
88
|
+
menu_label?: Label;
|
|
89
|
+
tax_rate?: MonetaryValue;
|
|
90
|
+
label?: Label;
|
|
91
|
+
reporting?: {
|
|
92
|
+
category?: {
|
|
93
|
+
primary?: string;
|
|
94
|
+
secondary?: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
export interface ModifierGroupRequest {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
label?: Label;
|
|
101
|
+
id?: string;
|
|
102
|
+
items?: ModifierRequest[];
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
export interface ModifierGroupResponse {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
106
|
+
id?: string;
|
|
107
|
+
label?: Label;
|
|
108
|
+
meta?: {
|
|
109
|
+
taxes?: string[];
|
|
110
|
+
original_label?: Label;
|
|
111
|
+
[index: string]: any;
|
|
112
|
+
};
|
|
113
|
+
items?: ModifierResponse[];
|
|
114
|
+
is?: {
|
|
115
|
+
disabled?: boolean;
|
|
116
|
+
};
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
export interface ModifierRequest {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
// option/modifier
|
|
121
|
+
id?: string;
|
|
122
|
+
label?: Label;
|
|
123
|
+
_index?: string;
|
|
124
|
+
quantity?: Quantity;
|
|
125
|
+
amount_off_exclusions?: AmountOffExclusion[];
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
export interface ModifierResponse {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
129
|
+
// option/modifier
|
|
130
|
+
id?: string;
|
|
131
|
+
price?: Price;
|
|
132
|
+
quantity?: Quantity;
|
|
133
|
+
label?: Label;
|
|
134
|
+
// index
|
|
135
|
+
_index?: string;
|
|
136
|
+
meta?: {
|
|
137
|
+
sort_number?: number;
|
|
138
|
+
original_label?: Label;
|
|
139
|
+
taxes?: string[];
|
|
140
|
+
[index: string]: any;
|
|
141
|
+
};
|
|
142
|
+
amount_off_exclusions?: AmountOffExclusion[];
|
|
143
|
+
is?: {
|
|
144
|
+
disabled?: boolean;
|
|
145
|
+
};
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
export interface Taxes {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
149
|
+
amount?: MonetaryValue;
|
|
150
|
+
rate?: MonetaryValue;
|
|
151
|
+
breakdown?: {
|
|
152
|
+
taxable_amount?: MonetaryValue;
|
|
153
|
+
tax_collectable?: MonetaryValue;
|
|
154
|
+
combined_tax_rate?: MonetaryValue;
|
|
155
|
+
gst?: MonetaryValue;
|
|
156
|
+
pst?: MonetaryValue;
|
|
157
|
+
[index: string]: any;
|
|
158
|
+
};
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
export interface Promo {
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
code?: string;
|
|
163
|
+
email?: string;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
export type BadgePay = CashlessTender;
|
|
167
167
|
|
|
168
168
|
export interface CashlessTender {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
id?: string;
|
|
170
|
+
total?: MonetaryValue;
|
|
171
|
+
tender?: string;
|
|
172
|
+
name?: string;
|
|
173
|
+
type?: PaymentType;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
export interface Mealplan {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
id?: string;
|
|
178
|
+
tender?: string;
|
|
179
|
+
total?: MonetaryValue;
|
|
180
|
+
type?: PaymentType;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
export interface CreditCard {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
card_type?: string;
|
|
185
|
+
last4?: string;
|
|
186
|
+
total?: MonetaryValue;
|
|
187
|
+
type?: PaymentType;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
export interface DigitalWalletPay {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
191
|
+
wallet_type?: string;
|
|
192
|
+
total?: MonetaryValue;
|
|
193
|
+
type?: PaymentType;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
export interface MealSwipes {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
197
|
+
id?: string;
|
|
198
|
+
tender?: string;
|
|
199
|
+
tender_type?: string;
|
|
200
|
+
tender_name?: string;
|
|
201
|
+
swipes?: MonetaryValue;
|
|
202
|
+
rate?: MonetaryValue;
|
|
203
|
+
total?: MonetaryValue;
|
|
204
|
+
type?: PaymentType;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
export interface MealExchange {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
id?: string;
|
|
209
|
+
tender?: string;
|
|
210
|
+
type?: PaymentType;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
export interface Payment {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
214
|
+
email?: string;
|
|
215
|
+
mealplan?: Mealplan;
|
|
216
|
+
credit_card?: CreditCard;
|
|
217
|
+
digital_wallet_pay?: DigitalWalletPay;
|
|
218
|
+
meal_swipes?: MealSwipes;
|
|
219
|
+
meal_exchange?: MealExchange;
|
|
220
|
+
badge_pay?: CashlessTender;
|
|
221
|
+
stipend?: CashlessTender;
|
|
222
|
+
voucher?: CashlessTender;
|
|
223
|
+
coupon_voucher?: CashlessTender;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
export interface MenuID {
|
|
227
|
-
|
|
227
|
+
menu?: string;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
export interface ShoppingCarts {
|
|
231
|
-
|
|
231
|
+
shoppingcarts?: ShoppingCartResponse[];
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
export interface OrderId {
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
// order
|
|
236
|
+
id?: string;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
export interface ShoppingCartRequest {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
240
|
+
// location
|
|
241
|
+
location?: string;
|
|
242
|
+
// menu
|
|
243
|
+
menu?: string;
|
|
244
|
+
// brand
|
|
245
|
+
brand?: string;
|
|
246
|
+
is?: {
|
|
247
|
+
// Shoppingcart Type: delivery, pickup
|
|
248
|
+
type?: 'delivery' | 'pickup' | 'scan_and_go' | 'frictionless';
|
|
249
|
+
// If an order should be paid with meal exchange. If true, this will calculate meals total.
|
|
250
|
+
mx_cart?: boolean;
|
|
251
|
+
// If a user's email domain is a match in a sites list of tax exempt domains
|
|
252
|
+
email_tax_exempt?: boolean;
|
|
253
|
+
// Indicates to clients that a tax recalculation is required
|
|
254
|
+
tax_calculation_required?: boolean;
|
|
255
|
+
// Indicates that the shopping cart is a system 365 shopping cart
|
|
256
|
+
system365?: boolean;
|
|
257
|
+
};
|
|
258
|
+
meta?: {
|
|
259
|
+
// Raw request from any vendor integrated with CDL
|
|
260
|
+
vendor?: Record<string, any>;
|
|
261
|
+
[index: string]: any;
|
|
262
|
+
};
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
export interface ShoppingCartResponse {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
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
|
-
|
|
266
|
+
// shoppingcart
|
|
267
|
+
id?: string;
|
|
268
|
+
// location
|
|
269
|
+
location?: string;
|
|
270
|
+
// menu
|
|
271
|
+
menu?: string;
|
|
272
|
+
// brand
|
|
273
|
+
brand?: string;
|
|
274
|
+
date?: Record<string, any>;
|
|
275
|
+
items?: ItemResponse[];
|
|
276
|
+
sub_total?: {
|
|
277
|
+
amount?: MonetaryValue;
|
|
278
|
+
};
|
|
279
|
+
promo?: {
|
|
280
|
+
code?: string;
|
|
281
|
+
provider?: 'fp' | 'voucherify';
|
|
282
|
+
amount_off?: MonetaryValue;
|
|
283
|
+
percent_off?: MonetaryValue;
|
|
284
|
+
amount?: MonetaryValue;
|
|
285
|
+
app?: string;
|
|
286
|
+
discount?: Record<string, any>;
|
|
287
|
+
provider_data?: FPValidationData;
|
|
288
|
+
order?: PromoOrder;
|
|
289
|
+
};
|
|
290
|
+
//@deprecated
|
|
291
|
+
loyalty?: {
|
|
292
|
+
coupon?: {
|
|
293
|
+
code?: string;
|
|
294
|
+
amount_off?: MonetaryValue;
|
|
295
|
+
amount?: MonetaryValue;
|
|
296
|
+
name?: string;
|
|
297
|
+
};
|
|
298
|
+
// Points to be earned for this shopping cart total
|
|
299
|
+
order_loyalty_points?: boolean;
|
|
300
|
+
};
|
|
301
|
+
discount?: {
|
|
302
|
+
code?: string;
|
|
303
|
+
provider?: 'fp' | 'voucherify';
|
|
304
|
+
amount_off?: MonetaryValue;
|
|
305
|
+
percent_off?: MonetaryValue;
|
|
306
|
+
amount?: MonetaryValue;
|
|
307
|
+
discount?: Record<string, any>;
|
|
308
|
+
provider_data?: FPValidationData;
|
|
309
|
+
};
|
|
310
|
+
payment_method?: {
|
|
311
|
+
mealplan?: Mealplan;
|
|
312
|
+
credit_card?: CreditCard;
|
|
313
|
+
digital_wallet_pay?: DigitalWalletPay;
|
|
314
|
+
meal_swipes?: MealSwipes;
|
|
315
|
+
meal_exchange?: MealExchange;
|
|
316
|
+
badge_pay?: CashlessTender;
|
|
317
|
+
stipend?: CashlessTender;
|
|
318
|
+
voucher?: CashlessTender;
|
|
319
|
+
coupon_voucher?: CashlessTender;
|
|
320
|
+
};
|
|
321
|
+
taxes?: Taxes;
|
|
322
|
+
total?: {
|
|
323
|
+
amount?: MonetaryValue;
|
|
324
|
+
meals?: MonetaryValue;
|
|
325
|
+
};
|
|
326
|
+
exemptions?: {
|
|
327
|
+
tax?: boolean;
|
|
328
|
+
};
|
|
329
|
+
order?: {
|
|
330
|
+
// order
|
|
331
|
+
id?: string;
|
|
332
|
+
};
|
|
333
|
+
service_fee?: {
|
|
334
|
+
amount?: MonetaryValue;
|
|
335
|
+
};
|
|
336
|
+
delivery_fee?: {
|
|
337
|
+
amount?: MonetaryValue;
|
|
338
|
+
};
|
|
339
|
+
is?: {
|
|
340
|
+
// Shoppingcart Type: delivery, pickup
|
|
341
|
+
type?: 'delivery' | 'pickup' | 'scan_and_go' | 'frictionless';
|
|
342
|
+
// If an order should be paid with meal exchange. If true, this will calculate meals total.
|
|
343
|
+
mx_cart?: boolean;
|
|
344
|
+
// If a user's email or email domain is a match in a sites list of tax exempt emails or domains
|
|
345
|
+
email_tax_exempt?: boolean;
|
|
346
|
+
// Indicates to clients that a tax recalculation is required
|
|
347
|
+
tax_calculation_required?: boolean;
|
|
348
|
+
// Indicates that the shopping cart is a system 365 shopping cart
|
|
349
|
+
system365?: boolean;
|
|
350
|
+
};
|
|
351
|
+
meta?: {
|
|
352
|
+
// Raw request from any vendor integrated with CDL
|
|
353
|
+
vendor?: Record<string, any>;
|
|
354
|
+
drain_order_type?: DrainOrderType;
|
|
355
|
+
[index: string]: any;
|
|
356
|
+
};
|
|
357
357
|
}
|
|
358
358
|
|
|
359
359
|
export type ShoppingCart = ShoppingCartResponse;
|
|
360
360
|
|
|
361
361
|
export interface PaymentMethods {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
362
|
+
mealplan: {
|
|
363
|
+
tenders: Tender[];
|
|
364
|
+
};
|
|
365
|
+
cashless: {
|
|
366
|
+
tenders: {
|
|
367
|
+
balance?: MonetaryValue;
|
|
368
|
+
id: string;
|
|
369
|
+
// name associated with badgepay tender, stored in site public config
|
|
370
|
+
name?: string;
|
|
371
|
+
is: {
|
|
372
|
+
eligible: boolean;
|
|
373
|
+
};
|
|
374
|
+
}[];
|
|
375
|
+
};
|
|
376
|
+
credit_cards: {
|
|
377
|
+
data: {
|
|
378
|
+
billing_address?: {
|
|
379
|
+
postal_code?: string;
|
|
380
|
+
};
|
|
381
|
+
card_type?: string;
|
|
382
|
+
expiry?: {
|
|
383
|
+
month?: number;
|
|
384
|
+
year?: number;
|
|
385
|
+
};
|
|
386
|
+
is: {
|
|
387
|
+
eligible: boolean;
|
|
388
|
+
preferred?: boolean;
|
|
389
|
+
};
|
|
390
|
+
masked_card_number?: string;
|
|
391
|
+
name_on_card?: string;
|
|
392
|
+
nickname?: string;
|
|
393
|
+
token: string;
|
|
394
|
+
token_expiration_date?: string;
|
|
395
|
+
}[];
|
|
396
|
+
};
|
|
397
|
+
digital_wallet_pay: {
|
|
398
|
+
applewallet: {
|
|
399
|
+
is: {
|
|
400
|
+
eligible: boolean;
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
googlewallet: {
|
|
404
|
+
is: {
|
|
405
|
+
eligible: boolean;
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
export interface Tender {
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
412
|
+
id: string;
|
|
413
|
+
name?: string;
|
|
414
|
+
balance?: MonetaryValue;
|
|
415
|
+
type: 'declining_balance' | 'meal_equivalent' | 'meal_exchange';
|
|
416
|
+
is: {
|
|
417
|
+
eligible: boolean;
|
|
418
|
+
validated?: boolean;
|
|
419
|
+
};
|
|
420
|
+
currency?: string;
|
|
421
|
+
// tender
|
|
422
|
+
tender_number?: string;
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
export interface Label {
|
|
426
|
-
|
|
427
|
-
|
|
426
|
+
en?: string;
|
|
427
|
+
fr?: string;
|
|
428
428
|
}
|
|
429
429
|
|
|
430
430
|
export interface Price {
|
|
431
|
-
|
|
431
|
+
amount?: MonetaryValue;
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
export type MonetaryValue = number;
|
|
@@ -440,41 +440,41 @@ export type Quantity = number;
|
|
|
440
440
|
export type PaymentType = string;
|
|
441
441
|
|
|
442
442
|
export interface FPValidationData {
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
443
|
+
discountIncentives?: {
|
|
444
|
+
id?: string;
|
|
445
|
+
program?: {
|
|
446
|
+
code?: string;
|
|
447
|
+
};
|
|
448
|
+
[index: string]: any;
|
|
449
|
+
}[];
|
|
450
|
+
[index: string]: any;
|
|
451
451
|
}
|
|
452
452
|
|
|
453
|
-
export type AmountOffExclusion =
|
|
453
|
+
export type AmountOffExclusion = 'discount' | 'promo';
|
|
454
454
|
|
|
455
455
|
export interface PromoOrder {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
456
|
+
items_applied_discount_amount?: number;
|
|
457
|
+
amount?: number;
|
|
458
|
+
items_discount_amount?: number;
|
|
459
|
+
total_amount?: number;
|
|
460
|
+
total_applied_discount_amount?: number;
|
|
461
|
+
total_discount_amount?: number;
|
|
462
|
+
items?: PromoItem[];
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
export interface PromoItem {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
466
|
+
applied_discount_amount?: number;
|
|
467
|
+
amount?: number;
|
|
468
|
+
discount_amount?: number;
|
|
469
|
+
price?: number;
|
|
470
|
+
quantity?: number;
|
|
471
|
+
source_id?: string;
|
|
472
|
+
subtotal_amount?: number;
|
|
473
473
|
}
|
|
474
474
|
|
|
475
475
|
export interface DrainOrderType {
|
|
476
|
-
|
|
477
|
-
|
|
476
|
+
taxable?: boolean;
|
|
477
|
+
tax_exempt?: boolean;
|
|
478
478
|
}
|
|
479
479
|
|
|
480
480
|
// POST /shoppingcart - Create a new ShoppingCart
|
|
@@ -484,14 +484,14 @@ export type PostShoppingcartCartBody = ShoppingCartRequest;
|
|
|
484
484
|
export type PostShoppingcartCartResponse = ShoppingCartResponse;
|
|
485
485
|
|
|
486
486
|
export interface PostShoppingcartCartRequest extends BaseRequest {
|
|
487
|
-
|
|
487
|
+
body: PostShoppingcartCartBody;
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
// PUT /shoppingcart/{id} - Put a menu item into a ShoppingCart
|
|
491
491
|
|
|
492
492
|
export interface PutShoppingcartCartItemsPath {
|
|
493
|
-
|
|
494
|
-
|
|
493
|
+
// Shopping cart ID
|
|
494
|
+
id: string;
|
|
495
495
|
}
|
|
496
496
|
|
|
497
497
|
export type PutShoppingcartCartItemsBody = ItemsRequest;
|
|
@@ -499,14 +499,14 @@ export type PutShoppingcartCartItemsBody = ItemsRequest;
|
|
|
499
499
|
export type PutShoppingcartCartItemsResponse = ShoppingCartResponse;
|
|
500
500
|
|
|
501
501
|
export interface PutShoppingcartCartItemsRequest extends BaseRequest, PutShoppingcartCartItemsPath {
|
|
502
|
-
|
|
502
|
+
body: PutShoppingcartCartItemsBody;
|
|
503
503
|
}
|
|
504
504
|
|
|
505
505
|
// DELETE /shoppingcart/{id} - Delete a menu item from a ShoppingCart
|
|
506
506
|
|
|
507
507
|
export interface DeleteShoppingcartCartItemsPath {
|
|
508
|
-
|
|
509
|
-
|
|
508
|
+
// Shopping cart ID
|
|
509
|
+
id: string;
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
export type DeleteShoppingcartCartItemsBody = ItemsRequest;
|
|
@@ -514,35 +514,35 @@ export type DeleteShoppingcartCartItemsBody = ItemsRequest;
|
|
|
514
514
|
export type DeleteShoppingcartCartItemsResponse = ShoppingCartResponse;
|
|
515
515
|
|
|
516
516
|
export interface DeleteShoppingcartCartItemsRequest
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
517
|
+
extends BaseRequest,
|
|
518
|
+
DeleteShoppingcartCartItemsPath {
|
|
519
|
+
body: DeleteShoppingcartCartItemsBody;
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
// GET /shoppingcart/{id} - Get an individual ShoppingCart
|
|
523
523
|
|
|
524
524
|
export interface GetShoppingcartCartPath {
|
|
525
|
-
|
|
526
|
-
|
|
525
|
+
// Shopping cart ID
|
|
526
|
+
id: string;
|
|
527
527
|
}
|
|
528
528
|
|
|
529
529
|
export interface GetShoppingcartCartQuery {
|
|
530
|
-
|
|
531
|
-
|
|
530
|
+
// Graphql query string
|
|
531
|
+
_query?: string;
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
export type GetShoppingcartCartResponse = ShoppingCartResponse;
|
|
535
535
|
|
|
536
536
|
export interface GetShoppingcartCartRequest
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
537
|
+
extends BaseRequest,
|
|
538
|
+
RequestQuery<GetShoppingcartCartQuery>,
|
|
539
|
+
GetShoppingcartCartPath {}
|
|
540
540
|
|
|
541
541
|
// PATCH /shoppingcart/{id} - Update a ShoppingCart
|
|
542
542
|
|
|
543
543
|
export interface PatchShoppingcartCartPath {
|
|
544
|
-
|
|
545
|
-
|
|
544
|
+
// Shopping cart ID
|
|
545
|
+
id: string;
|
|
546
546
|
}
|
|
547
547
|
|
|
548
548
|
export type PatchShoppingcartCartBody = ShoppingCartResponse;
|
|
@@ -550,14 +550,14 @@ export type PatchShoppingcartCartBody = ShoppingCartResponse;
|
|
|
550
550
|
export type PatchShoppingcartCartResponse = ShoppingCartResponse;
|
|
551
551
|
|
|
552
552
|
export interface PatchShoppingcartCartRequest extends BaseRequest, PatchShoppingcartCartPath {
|
|
553
|
-
|
|
553
|
+
body: PatchShoppingcartCartBody;
|
|
554
554
|
}
|
|
555
555
|
|
|
556
556
|
// PUT /shoppingcart/{id}/promo - Put a promo in a ShoppingCart
|
|
557
557
|
|
|
558
558
|
export interface PutShoppingcartCartPromoPath {
|
|
559
|
-
|
|
560
|
-
|
|
559
|
+
// Shopping cart ID
|
|
560
|
+
id: string;
|
|
561
561
|
}
|
|
562
562
|
|
|
563
563
|
export type PutShoppingcartCartPromoBody = Promo;
|
|
@@ -565,27 +565,27 @@ export type PutShoppingcartCartPromoBody = Promo;
|
|
|
565
565
|
export type PutShoppingcartCartPromoResponse = ShoppingCartResponse;
|
|
566
566
|
|
|
567
567
|
export interface PutShoppingcartCartPromoRequest extends BaseRequest, PutShoppingcartCartPromoPath {
|
|
568
|
-
|
|
568
|
+
body: PutShoppingcartCartPromoBody;
|
|
569
569
|
}
|
|
570
570
|
|
|
571
571
|
// DELETE /shoppingcart/{id}/promo - Delete the promo in a ShoppingCart
|
|
572
572
|
|
|
573
573
|
export interface DeleteShoppingcartCartPromoPath {
|
|
574
|
-
|
|
575
|
-
|
|
574
|
+
// Shopping cart ID
|
|
575
|
+
id: string;
|
|
576
576
|
}
|
|
577
577
|
|
|
578
578
|
export type DeleteShoppingcartCartPromoResponse = ShoppingCartResponse;
|
|
579
579
|
|
|
580
580
|
export interface DeleteShoppingcartCartPromoRequest
|
|
581
|
-
|
|
582
|
-
|
|
581
|
+
extends BaseRequest,
|
|
582
|
+
DeleteShoppingcartCartPromoPath {}
|
|
583
583
|
|
|
584
584
|
// PUT /shoppingcart/{id}/paymentmethod - Change payment method used in shopping cart
|
|
585
585
|
|
|
586
586
|
export interface PutShoppingcartCartPaymentPath {
|
|
587
|
-
|
|
588
|
-
|
|
587
|
+
// Shopping cart ID
|
|
588
|
+
id: string;
|
|
589
589
|
}
|
|
590
590
|
|
|
591
591
|
export type PutShoppingcartCartPaymentBody = Payment;
|
|
@@ -593,35 +593,35 @@ export type PutShoppingcartCartPaymentBody = Payment;
|
|
|
593
593
|
export type PutShoppingcartCartPaymentResponse = ShoppingCartResponse;
|
|
594
594
|
|
|
595
595
|
export interface PutShoppingcartCartPaymentRequest
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
596
|
+
extends BaseRequest,
|
|
597
|
+
PutShoppingcartCartPaymentPath {
|
|
598
|
+
body: PutShoppingcartCartPaymentBody;
|
|
599
599
|
}
|
|
600
600
|
|
|
601
601
|
// GET /shoppingcart/{id}/paymentmethods - Get a list of payment methods for cart
|
|
602
602
|
|
|
603
603
|
export interface GetShoppingcartPaymentMethodsPath {
|
|
604
|
-
|
|
605
|
-
|
|
604
|
+
// Shopping cart ID
|
|
605
|
+
id: string;
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
export interface GetShoppingcartPaymentMethodsQuery {
|
|
609
|
-
|
|
610
|
-
|
|
609
|
+
// Graphql query string
|
|
610
|
+
_query?: string;
|
|
611
611
|
}
|
|
612
612
|
|
|
613
613
|
export type GetShoppingcartPaymentMethodsResponse = PaymentMethods;
|
|
614
614
|
|
|
615
615
|
export interface GetShoppingcartPaymentMethodsRequest
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
616
|
+
extends BaseRequest,
|
|
617
|
+
RequestQuery<GetShoppingcartPaymentMethodsQuery>,
|
|
618
|
+
GetShoppingcartPaymentMethodsPath {}
|
|
619
619
|
|
|
620
620
|
// PUT /shoppingcart/{id}/order - Store information about the order created with this shopping cart
|
|
621
621
|
|
|
622
622
|
export interface PutShoppingcartCartOrderPath {
|
|
623
|
-
|
|
624
|
-
|
|
623
|
+
// Shopping cart ID
|
|
624
|
+
id: string;
|
|
625
625
|
}
|
|
626
626
|
|
|
627
627
|
export type PutShoppingcartCartOrderBody = OrderId;
|
|
@@ -629,42 +629,42 @@ export type PutShoppingcartCartOrderBody = OrderId;
|
|
|
629
629
|
export type PutShoppingcartCartOrderResponse = ShoppingCartResponse;
|
|
630
630
|
|
|
631
631
|
export interface PutShoppingcartCartOrderRequest extends BaseRequest, PutShoppingcartCartOrderPath {
|
|
632
|
-
|
|
632
|
+
body: PutShoppingcartCartOrderBody;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
// POST /shoppingcart/{id}/clone - Create a shopping cart from existing shopping cart
|
|
636
636
|
|
|
637
637
|
export interface PostShoppingcartCloneCartPath {
|
|
638
|
-
|
|
639
|
-
|
|
638
|
+
// Shopping cart ID
|
|
639
|
+
id: string;
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
export interface PostShoppingcartCloneCartQuery {
|
|
643
|
-
|
|
644
|
-
|
|
643
|
+
// If set to true then all validations will be skipped, requires global write permission
|
|
644
|
+
skip_validation?: boolean;
|
|
645
645
|
}
|
|
646
646
|
|
|
647
647
|
export interface PostShoppingcartCloneCartBody {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
648
|
+
menu?: string;
|
|
649
|
+
order_type?: string;
|
|
650
|
+
// Array of item indexes that should be cloned
|
|
651
|
+
items_to_clone?: string[];
|
|
652
652
|
}
|
|
653
653
|
|
|
654
654
|
export type PostShoppingcartCloneCartResponse = ShoppingCartResponse;
|
|
655
655
|
|
|
656
656
|
export interface PostShoppingcartCloneCartRequest
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
657
|
+
extends BaseRequest,
|
|
658
|
+
RequestQuery<PostShoppingcartCloneCartQuery>,
|
|
659
|
+
PostShoppingcartCloneCartPath {
|
|
660
|
+
body: PostShoppingcartCloneCartBody;
|
|
661
661
|
}
|
|
662
662
|
|
|
663
663
|
// PUT /shoppingcart/{id}/checkout - handle ui checkout flow and call taxjar for full tax breakdown
|
|
664
664
|
|
|
665
665
|
export interface PutShoppingcartCheckoutPath {
|
|
666
|
-
|
|
667
|
-
|
|
666
|
+
// Shopping cart ID
|
|
667
|
+
id: string;
|
|
668
668
|
}
|
|
669
669
|
|
|
670
670
|
export type PutShoppingcartCheckoutResponse = ShoppingCartResponse;
|
|
@@ -674,11 +674,11 @@ export interface PutShoppingcartCheckoutRequest extends BaseRequest, PutShopping
|
|
|
674
674
|
// POST /shoppingcart/bulk - Get multiple ShoppingCarts
|
|
675
675
|
|
|
676
676
|
export interface PostShoppingcartBulkBody {
|
|
677
|
-
|
|
677
|
+
ids: string[];
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
export type PostShoppingcartBulkResponse = ShoppingCarts;
|
|
681
681
|
|
|
682
682
|
export interface PostShoppingcartBulkRequest extends BaseRequest {
|
|
683
|
-
|
|
683
|
+
body: PostShoppingcartBulkBody;
|
|
684
684
|
}
|