@compassdigital/sdk.typescript 4.67.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 -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 +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/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/order.ts
CHANGED
|
@@ -1,392 +1,392 @@
|
|
|
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 CreateOrder {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
7
|
+
// brand
|
|
8
|
+
location_brand?: string;
|
|
9
|
+
// location
|
|
10
|
+
location?: string;
|
|
11
|
+
// shoppingcart
|
|
12
|
+
shoppingcart?: string;
|
|
13
|
+
payment?: {
|
|
14
|
+
token?: string;
|
|
15
|
+
credit_card?: CreditCard;
|
|
16
|
+
badge_pay?: CashlessPayment;
|
|
17
|
+
stipend?: CashlessPayment;
|
|
18
|
+
voucher?: CashlessPayment;
|
|
19
|
+
coupon_voucher?: CashlessPayment;
|
|
20
|
+
};
|
|
21
|
+
mealplan?: MealPlan;
|
|
22
|
+
// user
|
|
23
|
+
customer?: string;
|
|
24
|
+
is?: {
|
|
25
|
+
//@deprecated
|
|
26
|
+
accepted?: boolean;
|
|
27
|
+
in_progress?: boolean;
|
|
28
|
+
ready?: boolean;
|
|
29
|
+
};
|
|
30
|
+
meta?: {
|
|
31
|
+
// which ui the order was placed on
|
|
32
|
+
source?: 'web' | 'mobile';
|
|
33
|
+
// Override for meta.active for testing purposes
|
|
34
|
+
active_override?: boolean;
|
|
35
|
+
[index: string]: any;
|
|
36
|
+
};
|
|
37
|
+
//@deprecated
|
|
38
|
+
pickup?: string;
|
|
39
|
+
//@deprecated
|
|
40
|
+
pickup_name?: string;
|
|
41
|
+
requested_date?: string;
|
|
42
|
+
details?: {
|
|
43
|
+
name?: string;
|
|
44
|
+
contact_number?: string;
|
|
45
|
+
country_code?: string;
|
|
46
|
+
order_type?: string;
|
|
47
|
+
duration?: string;
|
|
48
|
+
destination?: string;
|
|
49
|
+
// Pickup or delivery instructions
|
|
50
|
+
instructions?: string;
|
|
51
|
+
};
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export interface Error {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
error?: string;
|
|
56
|
+
code?: number;
|
|
57
|
+
data?: Record<string, any>;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
export interface Issue {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
61
|
+
// issue
|
|
62
|
+
id?: string;
|
|
63
|
+
type?: string;
|
|
64
|
+
//@deprecated
|
|
65
|
+
item?: {
|
|
66
|
+
[index: string]: any;
|
|
67
|
+
};
|
|
68
|
+
// Array of Items with issues
|
|
69
|
+
items?: ItemsWithIssue[];
|
|
70
|
+
// Optional additional explanation for issue: 5,10,15 for late issues, SOLD_OUT, MODIFICATION, DIETARY_RESTRICTION for see kitchen issues
|
|
71
|
+
reason?: string;
|
|
72
|
+
meta?: {
|
|
73
|
+
created_at?: string;
|
|
74
|
+
[index: string]: any;
|
|
75
|
+
};
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export interface Order {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
79
|
+
// order
|
|
80
|
+
id?: string;
|
|
81
|
+
// brand
|
|
82
|
+
location_brand?: string;
|
|
83
|
+
// location
|
|
84
|
+
location?: string;
|
|
85
|
+
// shoppingcart
|
|
86
|
+
shoppingcart?: string;
|
|
87
|
+
payment?: {
|
|
88
|
+
// payment
|
|
89
|
+
token?: string;
|
|
90
|
+
credit_card?: CreditCard;
|
|
91
|
+
digital_wallet_pay?: string;
|
|
92
|
+
badge_pay?: CashlessPayment;
|
|
93
|
+
stipend?: CashlessPayment;
|
|
94
|
+
voucher?: CashlessPayment;
|
|
95
|
+
coupon_voucher?: CashlessPayment;
|
|
96
|
+
};
|
|
97
|
+
mealplan?: {
|
|
98
|
+
// mealplan
|
|
99
|
+
id?: string;
|
|
100
|
+
// tender
|
|
101
|
+
tender?: string;
|
|
102
|
+
name?: string;
|
|
103
|
+
};
|
|
104
|
+
meal_swipes?: {
|
|
105
|
+
// mealplan
|
|
106
|
+
id?: string;
|
|
107
|
+
// tender
|
|
108
|
+
tender?: string;
|
|
109
|
+
tender_name?: string;
|
|
110
|
+
swipes?: number;
|
|
111
|
+
total?: number;
|
|
112
|
+
};
|
|
113
|
+
meal_exchange?: MealPlan;
|
|
114
|
+
// user
|
|
115
|
+
customer?: string;
|
|
116
|
+
is?: {
|
|
117
|
+
//@deprecated
|
|
118
|
+
accepted?: boolean;
|
|
119
|
+
in_progress?: boolean;
|
|
120
|
+
ready?: boolean;
|
|
121
|
+
out_for_delivery?: boolean;
|
|
122
|
+
delivered?: boolean;
|
|
123
|
+
checkin_order?: boolean;
|
|
124
|
+
dining_hall_order?: boolean;
|
|
125
|
+
no_show?: boolean;
|
|
126
|
+
collected?: boolean;
|
|
127
|
+
};
|
|
128
|
+
date?: {
|
|
129
|
+
// Date order was accepted into our system and shown on kitchen apps
|
|
130
|
+
accepted?: string;
|
|
131
|
+
created?: string;
|
|
132
|
+
modified?: string;
|
|
133
|
+
// Date kitchen should start preparation ideally(not mandatory)
|
|
134
|
+
should_start?: string;
|
|
135
|
+
// Date kitchen should be half way preparation ideally(not mandatory)
|
|
136
|
+
completion_warning?: string;
|
|
137
|
+
// Date kitchen finished preparation
|
|
138
|
+
ready?: string;
|
|
139
|
+
// Date kitchen started preparation
|
|
140
|
+
started?: string;
|
|
141
|
+
// Date till which show orders as active
|
|
142
|
+
show_as_active_until?: string;
|
|
143
|
+
// For delivery orders - date customer did not pick the order
|
|
144
|
+
no_show?: string;
|
|
145
|
+
// For delivery orders - date customer completed the order collected and sent back robot
|
|
146
|
+
collected?: string;
|
|
147
|
+
// For delivery orders - date order was delivered to destination(not picked by user)
|
|
148
|
+
delivered?: string;
|
|
149
|
+
// For delivery orders - date order was picked up from station for delivery(out_for_delivery)
|
|
150
|
+
pickup?: string;
|
|
151
|
+
};
|
|
152
|
+
//@deprecated
|
|
153
|
+
pickup?: string;
|
|
154
|
+
//@deprecated
|
|
155
|
+
pickup_name?: string;
|
|
156
|
+
//@deprecated
|
|
157
|
+
pickup_id?: string;
|
|
158
|
+
requested_date?: string;
|
|
159
|
+
details?: {
|
|
160
|
+
name?: string;
|
|
161
|
+
display_id?: string;
|
|
162
|
+
contact_number?: string;
|
|
163
|
+
country_code?: string;
|
|
164
|
+
order_type?: string;
|
|
165
|
+
duration?: string;
|
|
166
|
+
destination?: string;
|
|
167
|
+
// Pickup or delivery instructions
|
|
168
|
+
instructions?: string;
|
|
169
|
+
};
|
|
170
|
+
meta?: {
|
|
171
|
+
// Check-in UUID for frictionless orders
|
|
172
|
+
checkin_uuid?: string;
|
|
173
|
+
refunds?: RefundTransaction[];
|
|
174
|
+
// which ui the order was placed on
|
|
175
|
+
source?: 'web' | 'mobile';
|
|
176
|
+
// details pertaining to the amount charged on the order
|
|
177
|
+
transaction?: {
|
|
178
|
+
// used in mx orders - cart totals in dollars and meal exchange value (meals)
|
|
179
|
+
mx_totals?: {
|
|
180
|
+
amount?: number;
|
|
181
|
+
meals?: number;
|
|
182
|
+
};
|
|
183
|
+
// the amount remaining on the transaction after refund - remaining amount available for refund
|
|
184
|
+
transaction_remainder_amount?: number;
|
|
185
|
+
[index: string]: any;
|
|
186
|
+
};
|
|
187
|
+
// Shoppingcart details
|
|
188
|
+
shoppingcart?: {
|
|
189
|
+
total?: {
|
|
190
|
+
amount?: number;
|
|
191
|
+
};
|
|
192
|
+
// Total of first cart on order. Carts can change after refunds, so this is original value
|
|
193
|
+
original_total?: {
|
|
194
|
+
amount?: number;
|
|
195
|
+
};
|
|
196
|
+
[index: string]: any;
|
|
197
|
+
};
|
|
198
|
+
// Indicate whether the order is active or inactive
|
|
199
|
+
active?: boolean;
|
|
200
|
+
// Override for meta.active for testing purposes
|
|
201
|
+
active_override?: boolean;
|
|
202
|
+
// Delivery details
|
|
203
|
+
delivery?: {
|
|
204
|
+
// provider
|
|
205
|
+
provider?: string;
|
|
206
|
+
tracker_url?: string;
|
|
207
|
+
loading_code?: string;
|
|
208
|
+
[index: string]: any;
|
|
209
|
+
};
|
|
210
|
+
// Discount details
|
|
211
|
+
discount?: {
|
|
212
|
+
app?: string;
|
|
213
|
+
code?: string;
|
|
214
|
+
[index: string]: any;
|
|
215
|
+
};
|
|
216
|
+
[index: string]: any;
|
|
217
|
+
};
|
|
218
|
+
issue?: Issue;
|
|
219
|
+
past_issues?: Issue[];
|
|
220
|
+
// Delivery user
|
|
221
|
+
runner?: string;
|
|
222
|
+
reorder_eligibility?:
|
|
223
|
+
| 'eligible'
|
|
224
|
+
| 'order_type_ineligible'
|
|
225
|
+
| 'location_ineligible'
|
|
226
|
+
| 'active_order'
|
|
227
|
+
| 'old_order'
|
|
228
|
+
| 'marketplace_order'
|
|
229
|
+
| 'duplicate_order'
|
|
230
|
+
| 'brand_unavailable'
|
|
231
|
+
| 'menu_unavailable'
|
|
232
|
+
| 'items_unavailable'
|
|
233
|
+
| 'refunded_order'
|
|
234
|
+
| 'modifiers_unavailable'
|
|
235
|
+
| 'modified_items';
|
|
236
|
+
refunds?: RefundItem[];
|
|
237
|
+
latest_refunds?: RefundItem[];
|
|
238
|
+
[index: string]: any;
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
export interface Refund {
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
refunds?: RefundItem[];
|
|
243
|
+
reason?: string;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
export interface RefundTransaction {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
247
|
+
// shoppingcart
|
|
248
|
+
original_shoppingcart?: string;
|
|
249
|
+
refund_date?: string;
|
|
250
|
+
// user
|
|
251
|
+
issued_by?: string;
|
|
252
|
+
amount?: number;
|
|
253
|
+
refund_amount?: number;
|
|
254
|
+
[index: string]: any;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
export interface RefundItem {
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
258
|
+
// Item ID
|
|
259
|
+
id?: string;
|
|
260
|
+
// unique index within cart
|
|
261
|
+
_index?: string;
|
|
262
|
+
// Quantity of the item
|
|
263
|
+
quantity?: number;
|
|
264
|
+
price?: {
|
|
265
|
+
// Price of the item
|
|
266
|
+
amount?: number;
|
|
267
|
+
};
|
|
268
|
+
// Reason for refund
|
|
269
|
+
reason?: string;
|
|
270
|
+
[index: string]: any;
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
export interface CreditCard {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
274
|
+
// The credit card type (Amex, Visa, Mastercard, etc...)
|
|
275
|
+
card_type?: string;
|
|
276
|
+
// The last 4 digits of the card number
|
|
277
|
+
last4?: string;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
export type BadgePay = CashlessPayment;
|
|
281
281
|
|
|
282
282
|
export interface CashlessPayment {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
283
|
+
// The badge pay tender id
|
|
284
|
+
tender?: string;
|
|
285
|
+
// The badge pay payment id
|
|
286
|
+
id?: string;
|
|
287
|
+
// The total charged to the badge pay tender
|
|
288
|
+
total?: number;
|
|
289
|
+
// The badge pay tender name
|
|
290
|
+
name?: string;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
export interface MealPlan {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
294
|
+
// mealplan
|
|
295
|
+
id?: string;
|
|
296
|
+
// tender
|
|
297
|
+
tender?: string;
|
|
298
|
+
name?: string;
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
export interface OrderIssue {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
302
|
+
// Type of issue
|
|
303
|
+
type?: string;
|
|
304
|
+
//@deprecated
|
|
305
|
+
item?: {
|
|
306
|
+
[index: string]: any;
|
|
307
|
+
};
|
|
308
|
+
// Array of Items with issues
|
|
309
|
+
items?: ItemsWithIssue[];
|
|
310
|
+
// Optional additional explanation for issue: 5,10,15 for late issues, SOLD_OUT, MODIFICATION, DIETARY_RESTRICTION for see kitchen issues
|
|
311
|
+
reason?: string;
|
|
312
|
+
// To include brand name into issue message if type SEE_KITCHEN
|
|
313
|
+
location_brand?: string;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
export interface OrderedItem {
|
|
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
|
-
|
|
317
|
+
// item
|
|
318
|
+
id: string;
|
|
319
|
+
// index
|
|
320
|
+
_index: string;
|
|
321
|
+
quantity?: number;
|
|
322
|
+
unit?: number;
|
|
323
|
+
price?: {
|
|
324
|
+
amount?: number;
|
|
325
|
+
};
|
|
326
|
+
// Subtotal of the item including all options
|
|
327
|
+
_subtotal?: {
|
|
328
|
+
amount?: number;
|
|
329
|
+
};
|
|
330
|
+
// Promo applied to this item
|
|
331
|
+
_promo?: {
|
|
332
|
+
amount?: number;
|
|
333
|
+
};
|
|
334
|
+
meta?: {
|
|
335
|
+
[index: string]: any;
|
|
336
|
+
};
|
|
337
|
+
options?: {
|
|
338
|
+
label?: {
|
|
339
|
+
en?: string;
|
|
340
|
+
};
|
|
341
|
+
items?: {
|
|
342
|
+
// option
|
|
343
|
+
id?: string;
|
|
344
|
+
// index
|
|
345
|
+
_index?: string;
|
|
346
|
+
meta?: Record<string, any>;
|
|
347
|
+
}[];
|
|
348
|
+
}[];
|
|
349
|
+
[index: string]: any;
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
export interface Orders {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
353
|
+
orders?: Order[];
|
|
354
|
+
lastKey?: string;
|
|
355
|
+
count?: number;
|
|
356
|
+
// url to query next set of data
|
|
357
|
+
links?: {
|
|
358
|
+
next?: string;
|
|
359
|
+
};
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
export interface ItemsWithIssue extends OrderedItem {
|
|
363
|
-
|
|
363
|
+
reason?: string;
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
export interface ActionResponse {
|
|
367
|
-
|
|
367
|
+
success?: boolean;
|
|
368
368
|
}
|
|
369
369
|
|
|
370
370
|
export interface SNSMessage {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
371
|
+
Type: string;
|
|
372
|
+
MessageId: string;
|
|
373
|
+
Token?: string;
|
|
374
|
+
TopicArn: string;
|
|
375
|
+
Message: string;
|
|
376
|
+
SubscribeURL?: string;
|
|
377
|
+
Timestamp: string;
|
|
378
|
+
SignatureVersion: string;
|
|
379
|
+
Signature: string;
|
|
380
|
+
SigningCertURL: string;
|
|
381
|
+
Subject?: string;
|
|
382
|
+
UnsubscribeURL?: string;
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
// POST /order - Create an Order
|
|
386
386
|
|
|
387
387
|
export interface PostOrderQuery {
|
|
388
|
-
|
|
389
|
-
|
|
388
|
+
// The language of the user ex en, fr
|
|
389
|
+
lang?: string;
|
|
390
390
|
}
|
|
391
391
|
|
|
392
392
|
export type PostOrderBody = CreateOrder;
|
|
@@ -394,19 +394,19 @@ export type PostOrderBody = CreateOrder;
|
|
|
394
394
|
export type PostOrderResponse = Order;
|
|
395
395
|
|
|
396
396
|
export interface PostOrderRequest extends BaseRequest, RequestQuery<PostOrderQuery> {
|
|
397
|
-
|
|
397
|
+
body: PostOrderBody;
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
// GET /order/{id} - Get an individual order
|
|
401
401
|
|
|
402
402
|
export interface GetOrderPath {
|
|
403
|
-
|
|
404
|
-
|
|
403
|
+
// The order ID
|
|
404
|
+
id: string;
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
export interface GetOrderQuery {
|
|
408
|
-
|
|
409
|
-
|
|
408
|
+
// Graphql query string
|
|
409
|
+
_query?: string;
|
|
410
410
|
}
|
|
411
411
|
|
|
412
412
|
export type GetOrderResponse = Order;
|
|
@@ -416,8 +416,8 @@ export interface GetOrderRequest extends BaseRequest, RequestQuery<GetOrderQuery
|
|
|
416
416
|
// PUT /order/{id} - Update an individual order
|
|
417
417
|
|
|
418
418
|
export interface PutOrderPath {
|
|
419
|
-
|
|
420
|
-
|
|
419
|
+
// The order ID
|
|
420
|
+
id: string;
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
export type PutOrderResponse = Order;
|
|
@@ -427,8 +427,8 @@ export interface PutOrderRequest extends BaseRequest, PutOrderPath {}
|
|
|
427
427
|
// PATCH /order/{id} - Update an existing order
|
|
428
428
|
|
|
429
429
|
export interface PatchOrderPath {
|
|
430
|
-
|
|
431
|
-
|
|
430
|
+
// The order ID
|
|
431
|
+
id: string;
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
export type PatchOrderBody = Order;
|
|
@@ -436,14 +436,14 @@ export type PatchOrderBody = Order;
|
|
|
436
436
|
export type PatchOrderResponse = Order;
|
|
437
437
|
|
|
438
438
|
export interface PatchOrderRequest extends BaseRequest, PatchOrderPath {
|
|
439
|
-
|
|
439
|
+
body: PatchOrderBody;
|
|
440
440
|
}
|
|
441
441
|
|
|
442
442
|
// POST /order/{id}/issue - Create an issue with an order
|
|
443
443
|
|
|
444
444
|
export interface PostOrderIssuePath {
|
|
445
|
-
|
|
446
|
-
|
|
445
|
+
// The order ID
|
|
446
|
+
id: string;
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
export type PostOrderIssueBody = OrderIssue;
|
|
@@ -451,14 +451,14 @@ export type PostOrderIssueBody = OrderIssue;
|
|
|
451
451
|
export type PostOrderIssueResponse = Issue;
|
|
452
452
|
|
|
453
453
|
export interface PostOrderIssueRequest extends BaseRequest, PostOrderIssuePath {
|
|
454
|
-
|
|
454
|
+
body: PostOrderIssueBody;
|
|
455
455
|
}
|
|
456
456
|
|
|
457
457
|
// PATCH /order/{id}/refund - Issue a refund on an existing order
|
|
458
458
|
|
|
459
459
|
export interface PatchOrderRefundPath {
|
|
460
|
-
|
|
461
|
-
|
|
460
|
+
// The order ID
|
|
461
|
+
id: string;
|
|
462
462
|
}
|
|
463
463
|
|
|
464
464
|
export type PatchOrderRefundBody = Refund;
|
|
@@ -466,202 +466,202 @@ export type PatchOrderRefundBody = Refund;
|
|
|
466
466
|
export type PatchOrderRefundResponse = Order;
|
|
467
467
|
|
|
468
468
|
export interface PatchOrderRefundRequest extends BaseRequest, PatchOrderRefundPath {
|
|
469
|
-
|
|
469
|
+
body: PatchOrderRefundBody;
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
// GET /order/customer/{id} - Get all orders for a Customer
|
|
473
473
|
|
|
474
474
|
export interface GetOrderCustomerOrdersPath {
|
|
475
|
-
|
|
476
|
-
|
|
475
|
+
// The user ID
|
|
476
|
+
id: string;
|
|
477
477
|
}
|
|
478
478
|
|
|
479
479
|
export interface GetOrderCustomerOrdersQuery {
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
480
|
+
// Sort the customers order by order created date, pickup date or requested date. Possible values: created, pickup. Default is created.
|
|
481
|
+
sort?: string;
|
|
482
|
+
//@deprecated
|
|
483
|
+
pickup_start?: number;
|
|
484
|
+
//@deprecated
|
|
485
|
+
pickup_end?: number;
|
|
486
|
+
// Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is 24 hours from the current time in milliseconds.
|
|
487
|
+
end?: number;
|
|
488
|
+
// 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.
|
|
489
|
+
start?: number;
|
|
490
|
+
// This is the key for which the query will be made. E.g if order_type equals 'delivery', the response will include the results based on delivery
|
|
491
|
+
order_type?: string;
|
|
492
|
+
// Filter orders by active status.
|
|
493
|
+
active?: boolean;
|
|
494
|
+
// Filter orders by eligible for reorder.
|
|
495
|
+
reorder_eligible?: boolean;
|
|
496
|
+
// Graphql query string
|
|
497
|
+
_query?: string;
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
export interface GetOrderCustomerOrdersResponse {
|
|
501
|
-
|
|
501
|
+
orders?: Order[];
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
export interface GetOrderCustomerOrdersRequest
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
505
|
+
extends BaseRequest,
|
|
506
|
+
RequestQuery<GetOrderCustomerOrdersQuery>,
|
|
507
|
+
GetOrderCustomerOrdersPath {}
|
|
508
508
|
|
|
509
509
|
// GET /order/customer/{id}/location/brand/{location_brand} - Get all orders for a Customer for a specific Location Brand
|
|
510
510
|
|
|
511
511
|
export interface GetOrderCustomerOrdersBrandPath {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
512
|
+
// The user ID
|
|
513
|
+
id: string;
|
|
514
|
+
// Brand id
|
|
515
|
+
location_brand: string;
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
export interface GetOrderCustomerOrdersBrandQuery {
|
|
519
|
-
|
|
520
|
-
|
|
519
|
+
// Graphql query string
|
|
520
|
+
_query?: string;
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
export type GetOrderCustomerOrdersBrandResponse = Orders;
|
|
524
524
|
|
|
525
525
|
export interface GetOrderCustomerOrdersBrandRequest
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
526
|
+
extends BaseRequest,
|
|
527
|
+
RequestQuery<GetOrderCustomerOrdersBrandQuery>,
|
|
528
|
+
GetOrderCustomerOrdersBrandPath {}
|
|
529
529
|
|
|
530
530
|
// GET /order/location/brand/{id} - Get all orders for a location Brand
|
|
531
531
|
|
|
532
532
|
export interface GetOrderLocationBrandPath {
|
|
533
|
-
|
|
534
|
-
|
|
533
|
+
// The location brand ID
|
|
534
|
+
id: string;
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
export interface GetOrderLocationBrandQuery {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
538
|
+
//@deprecated
|
|
539
|
+
pickup_start?: number;
|
|
540
|
+
//@deprecated
|
|
541
|
+
pickup_end?: number;
|
|
542
|
+
// Filter orders to just those with this ready state
|
|
543
|
+
ready?: boolean;
|
|
544
|
+
// Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is 24 hours from the current time in milliseconds.
|
|
545
|
+
end?: number;
|
|
546
|
+
// 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.
|
|
547
|
+
start?: number;
|
|
548
|
+
// This is the key for which the query will be made. E.g if order_type equals 'delivery', the response will include the results based on delivery
|
|
549
|
+
order_type?: string;
|
|
550
|
+
// number of orders per page
|
|
551
|
+
limit?: number;
|
|
552
|
+
// return orders with all status types
|
|
553
|
+
all_statuses?: boolean;
|
|
554
|
+
// Graphql query string
|
|
555
|
+
_query?: string;
|
|
556
556
|
}
|
|
557
557
|
|
|
558
558
|
export type GetOrderLocationBrandResponse = Orders;
|
|
559
559
|
|
|
560
560
|
export interface GetOrderLocationBrandRequest
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
561
|
+
extends BaseRequest,
|
|
562
|
+
RequestQuery<GetOrderLocationBrandQuery>,
|
|
563
|
+
GetOrderLocationBrandPath {}
|
|
564
564
|
|
|
565
565
|
// GET /order/location/{id} - Get all orders for a location
|
|
566
566
|
|
|
567
567
|
export interface GetOrderLocationOrdersPath {
|
|
568
|
-
|
|
569
|
-
|
|
568
|
+
// The location ID
|
|
569
|
+
id: string;
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
export interface GetOrderLocationOrdersQuery {
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
573
|
+
//@deprecated
|
|
574
|
+
pickup_start?: number;
|
|
575
|
+
//@deprecated
|
|
576
|
+
pickup_end?: number;
|
|
577
|
+
// Filter orders to just those with this ready state
|
|
578
|
+
ready?: boolean;
|
|
579
|
+
// Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is 24 hours from the current time in milliseconds.
|
|
580
|
+
end?: number;
|
|
581
|
+
// 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.
|
|
582
|
+
start?: number;
|
|
583
|
+
// This is the key for which the query will be made. E.g if order_type equals 'delivery', the response will include the results based on delivery
|
|
584
|
+
order_type?: string;
|
|
585
|
+
// List of brands you want orders for inside this location. Example: 616kLp3ADNUE2RO8qqzdto8avzyRrOhXRDW5,or2ayBJePqUP4ORXeeGgTw96vKle47IgemPk
|
|
586
|
+
brands?: string;
|
|
587
|
+
// Graphql query string
|
|
588
|
+
_query?: string;
|
|
589
589
|
}
|
|
590
590
|
|
|
591
591
|
export type GetOrderLocationOrdersResponse = Orders;
|
|
592
592
|
|
|
593
593
|
export interface GetOrderLocationOrdersRequest
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
594
|
+
extends BaseRequest,
|
|
595
|
+
RequestQuery<GetOrderLocationOrdersQuery>,
|
|
596
|
+
GetOrderLocationOrdersPath {}
|
|
597
597
|
|
|
598
598
|
// GET /order/location/group/{id} - Get all orders for a location group
|
|
599
599
|
|
|
600
600
|
export interface GetOrderGroupOrdersPath {
|
|
601
|
-
|
|
602
|
-
|
|
601
|
+
// Get orders by their associated group
|
|
602
|
+
id: string;
|
|
603
603
|
}
|
|
604
604
|
|
|
605
605
|
export interface GetOrderGroupOrdersQuery {
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
606
|
+
// Filter orders by their status.
|
|
607
|
+
status?: 'accepted' | 'in_progress' | 'ready' | 'out_for_delivery' | 'delivered';
|
|
608
|
+
// Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is all orders
|
|
609
|
+
start?: number;
|
|
610
|
+
// Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is the current time in milliseconds.
|
|
611
|
+
end?: number;
|
|
612
|
+
// Filter orders by their order type
|
|
613
|
+
order_type?: 'delivery' | 'pickup';
|
|
614
|
+
// Filter orders by brand ID. Only return orders that involve brand ID, either as the only brand, or as part of a market place order.
|
|
615
|
+
brand?: string;
|
|
616
|
+
// show additional hidden properties/entities
|
|
617
|
+
extended?: boolean;
|
|
618
|
+
// Graphql query string
|
|
619
|
+
_query?: string;
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
export interface GetOrderGroupOrdersResponse {
|
|
623
|
-
|
|
623
|
+
orders?: Order[];
|
|
624
624
|
}
|
|
625
625
|
|
|
626
626
|
export interface GetOrderGroupOrdersRequest
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
627
|
+
extends BaseRequest,
|
|
628
|
+
RequestQuery<GetOrderGroupOrdersQuery>,
|
|
629
|
+
GetOrderGroupOrdersPath {}
|
|
630
630
|
|
|
631
631
|
// GET /order/user/{id} - Get all delivery orders for a User related to the order in the details (Runner)
|
|
632
632
|
|
|
633
633
|
export interface GetOrderUserOrdersPath {
|
|
634
|
-
|
|
635
|
-
|
|
634
|
+
// Get orders by their associated group
|
|
635
|
+
id: string;
|
|
636
636
|
}
|
|
637
637
|
|
|
638
638
|
export interface GetOrderUserOrdersQuery {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
639
|
+
// Filter orders by their status.
|
|
640
|
+
status?: 'accepted' | 'in_progress' | 'ready' | 'out_for_delivery' | 'delivered';
|
|
641
|
+
// Filter orders by their requested date. Only return orders that have a date greater than or equal to the date. Default is all orders
|
|
642
|
+
start?: number;
|
|
643
|
+
// Filter orders by their requested date. Only return orders that have a date less than or equal to the date. Default is the current time in milliseconds.
|
|
644
|
+
end?: number;
|
|
645
|
+
// show additional hidden properties/entities
|
|
646
|
+
extended?: boolean;
|
|
647
|
+
// Graphql query string
|
|
648
|
+
_query?: string;
|
|
649
649
|
}
|
|
650
650
|
|
|
651
651
|
export interface GetOrderUserOrdersResponse {
|
|
652
|
-
|
|
652
|
+
orders?: Order[];
|
|
653
653
|
}
|
|
654
654
|
|
|
655
655
|
export interface GetOrderUserOrdersRequest
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
656
|
+
extends BaseRequest,
|
|
657
|
+
RequestQuery<GetOrderUserOrdersQuery>,
|
|
658
|
+
GetOrderUserOrdersPath {}
|
|
659
659
|
|
|
660
660
|
// PATCH /order/{id}/checkin - Accept an order by checking in
|
|
661
661
|
|
|
662
662
|
export interface PatchOrderCheckinPath {
|
|
663
|
-
|
|
664
|
-
|
|
663
|
+
// The order ID
|
|
664
|
+
id: string;
|
|
665
665
|
}
|
|
666
666
|
|
|
667
667
|
export type PatchOrderCheckinResponse = Order;
|
|
@@ -675,5 +675,5 @@ export type PostOrderApexSnsBody = SNSMessage;
|
|
|
675
675
|
export type PostOrderApexSnsResponse = ActionResponse;
|
|
676
676
|
|
|
677
677
|
export interface PostOrderApexSnsRequest extends BaseRequest {
|
|
678
|
-
|
|
678
|
+
body: PostOrderApexSnsBody;
|
|
679
679
|
}
|