@open-tender/types 0.1.4 → 0.1.6
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/dist/cjs/types/api/checkout.d.ts +195 -119
- package/dist/cjs/types/api/config.d.ts +22 -36
- package/dist/cjs/types/api/creditCards.d.ts +6 -6
- package/dist/cjs/types/api/customer/addresses.d.ts +10 -6
- package/dist/cjs/types/api/kds.d.ts +1 -1
- package/dist/cjs/types/api/menu.d.ts +16 -3
- package/dist/cjs/types/api/messages.d.ts +1 -1
- package/dist/cjs/types/api/order.d.ts +207 -446
- package/dist/cjs/types/api/order.js +17 -0
- package/dist/cjs/types/api/pos.d.ts +163 -0
- package/dist/cjs/types/api/pos.js +2 -0
- package/dist/cjs/types/global.d.ts +9 -2
- package/dist/cjs/types/request.d.ts +7 -4
- package/dist/esm/types/api/checkout.d.ts +195 -119
- package/dist/esm/types/api/config.d.ts +22 -36
- package/dist/esm/types/api/creditCards.d.ts +6 -6
- package/dist/esm/types/api/customer/addresses.d.ts +10 -6
- package/dist/esm/types/api/kds.d.ts +1 -1
- package/dist/esm/types/api/menu.d.ts +16 -3
- package/dist/esm/types/api/messages.d.ts +1 -1
- package/dist/esm/types/api/order.d.ts +207 -446
- package/dist/esm/types/api/order.js +12 -1
- package/dist/esm/types/api/pos.d.ts +163 -0
- package/dist/esm/types/api/pos.js +1 -0
- package/dist/esm/types/global.d.ts +9 -2
- package/dist/esm/types/request.d.ts +7 -4
- package/package.json +1 -1
|
@@ -1,136 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CardType,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { ISOStringOffset, RequestedAt, TimeHuman, TimezonePython } from '../datetimes';
|
|
2
|
+
import { CardType, CardTypeName, DiscountAuthType, DiscountType, Money, NegativeMoney, OrderStatus, OrderType, ServiceType, TenderType } from '../global';
|
|
3
|
+
import { CreditCard } from './creditCards';
|
|
4
|
+
import { Address } from './customer';
|
|
5
|
+
import { PrepStatus } from './kds';
|
|
6
6
|
import { NutritionalInfo } from './menu';
|
|
7
|
-
import { Cart } from './cart';
|
|
8
|
-
export interface OrderChannel {
|
|
9
|
-
ext_id?: string | null;
|
|
10
|
-
ext_name?: string | null;
|
|
11
|
-
type: ChannelType;
|
|
12
|
-
}
|
|
13
|
-
export interface OrderDetails {
|
|
14
|
-
cart_id: number | null;
|
|
15
|
-
eating_utensils: boolean;
|
|
16
|
-
notes: string | null;
|
|
17
|
-
notes_internal: string | null;
|
|
18
|
-
person_count: number | null;
|
|
19
|
-
serving_utensils: boolean;
|
|
20
|
-
tax_exempt_id: string | null;
|
|
21
|
-
device_type: string;
|
|
22
|
-
is_tax_exempt?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export interface OrderDiscount {
|
|
25
|
-
discount_id?: number;
|
|
26
|
-
amount: Money;
|
|
27
|
-
description?: string | null;
|
|
28
|
-
ext_id?: string | null;
|
|
29
|
-
id: number;
|
|
30
|
-
name: string;
|
|
31
|
-
is_optional?: boolean;
|
|
32
|
-
is_promo_code: boolean;
|
|
33
|
-
discount_type: 1 | 2 | 3 | 4;
|
|
34
|
-
}
|
|
35
|
-
export declare type OrderDiscounts = Array<OrderDiscount>;
|
|
36
|
-
export interface OrderFulfillment {
|
|
37
|
-
title?: string;
|
|
38
|
-
description?: string;
|
|
39
|
-
fields?: Array<ConfigFulfillmentField>;
|
|
40
|
-
acknowledged: boolean;
|
|
41
|
-
arrival_info: string | null;
|
|
42
|
-
has_arrived: boolean;
|
|
43
|
-
vehicle_color: string | null;
|
|
44
|
-
vehicle_id: string | null;
|
|
45
|
-
vehicle_type: string | null;
|
|
46
|
-
}
|
|
47
|
-
export interface OrderRevenueCenterAddress {
|
|
48
|
-
city: string;
|
|
49
|
-
cross_streets: string;
|
|
50
|
-
lat: number | null;
|
|
51
|
-
lng: number | null;
|
|
52
|
-
phone: string | null;
|
|
53
|
-
postal_code: string;
|
|
54
|
-
state: string;
|
|
55
|
-
street: string;
|
|
56
|
-
}
|
|
57
|
-
export interface OrderRevenueCenter {
|
|
58
|
-
address?: OrderRevenueCenterAddress;
|
|
59
|
-
is_outpost: boolean;
|
|
60
|
-
name: string;
|
|
61
|
-
revenue_center_id: number;
|
|
62
|
-
revenue_center_type?: string;
|
|
63
|
-
timezone?: TimezonePython;
|
|
64
|
-
distance?: number;
|
|
65
|
-
settings?: CustomerRevenueCenterSettings;
|
|
66
|
-
group_ordering?: RevenueCenterGroupOrdering;
|
|
67
|
-
wait_times?: {
|
|
68
|
-
[key in ServiceType]?: number;
|
|
69
|
-
};
|
|
70
|
-
order_maximum?: {
|
|
71
|
-
[key in ServiceType]: Money;
|
|
72
|
-
};
|
|
73
|
-
order_minimum?: {
|
|
74
|
-
[key in ServiceType]: Money;
|
|
75
|
-
};
|
|
76
|
-
first_times?: {
|
|
77
|
-
[key in ServiceType]?: FirstTime | null;
|
|
78
|
-
};
|
|
79
|
-
order_times?: RevenueCenterOrderTimes;
|
|
80
|
-
cutoff_time: TimeHuman | null;
|
|
81
|
-
days_ahead: number;
|
|
82
|
-
delivery_url: string;
|
|
83
|
-
delivery_zone: DeliveryZone;
|
|
84
|
-
description: string | null;
|
|
85
|
-
directions_url: string;
|
|
86
|
-
excluded_times: ExcludedTimes | null;
|
|
87
|
-
has_curbside: boolean;
|
|
88
|
-
holidays: {
|
|
89
|
-
[key: DateString]: {
|
|
90
|
-
[key in ServiceType]?: HolidayItem | null;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
hours: CustomerRevenueCenterHours;
|
|
94
|
-
is_new: boolean;
|
|
95
|
-
is_parent: boolean;
|
|
96
|
-
lead_time_in_hours: number | null;
|
|
97
|
-
menu_pdf_url: string | null;
|
|
98
|
-
service_types: Array<ServiceType>;
|
|
99
|
-
slug: string;
|
|
100
|
-
status: string;
|
|
101
|
-
tax_exempt_is_allowed: boolean;
|
|
102
|
-
time_ranges: {
|
|
103
|
-
[key in ServiceType]: number | null;
|
|
104
|
-
};
|
|
105
|
-
user: any;
|
|
106
|
-
valid_times: {
|
|
107
|
-
[key in ServiceType]?: {
|
|
108
|
-
[key in Weekday]?: ValidTimes;
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
inZone?: boolean;
|
|
112
|
-
priority?: number;
|
|
113
|
-
images?: OrderItemImages;
|
|
114
|
-
has_order_fulfillment?: boolean;
|
|
115
|
-
}
|
|
116
|
-
export interface OrderItemDiscount {
|
|
117
|
-
discount_id: number;
|
|
118
|
-
amount: NegativeMoney;
|
|
119
|
-
amount_total: NegativeMoney;
|
|
120
|
-
}
|
|
121
|
-
export declare type OrderItemDiscounts = Array<OrderItemDiscount>;
|
|
122
7
|
export interface OrderItemImage {
|
|
123
8
|
type: 'LARGE_IMAGE' | 'SMALL_IMAGE' | 'APP_IMAGE';
|
|
124
9
|
url: string | null;
|
|
125
10
|
}
|
|
126
11
|
export declare type OrderItemImages = OrderItemImage[];
|
|
127
|
-
export interface OrderItemTax {
|
|
128
|
-
tax_id: number;
|
|
129
|
-
name: string;
|
|
130
|
-
amount: NegativeMoney;
|
|
131
|
-
amount_total: NegativeMoney;
|
|
132
|
-
}
|
|
133
|
-
export declare type OrderItemTaxes = Array<OrderItemTax>;
|
|
134
12
|
export interface OrderItem {
|
|
135
13
|
allergens: string[];
|
|
136
14
|
description: string | null;
|
|
@@ -159,78 +37,129 @@ export interface OrderItemGroup {
|
|
|
159
37
|
}
|
|
160
38
|
export declare type OrderItemGroups = OrderItemGroup[];
|
|
161
39
|
export declare type OrderCart = OrderItem[];
|
|
162
|
-
export
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
40
|
+
export declare type OrderNotifications = 'ALL' | 'EMAIL' | 'NEW' | 'NONE' | 'SMS';
|
|
41
|
+
export interface OrderCustomerCreditCard {
|
|
42
|
+
card_type: CardType;
|
|
43
|
+
card_type_name: CardTypeName;
|
|
44
|
+
customer_card_id: number;
|
|
45
|
+
is_default: boolean;
|
|
46
|
+
last4: string;
|
|
47
|
+
masked: string;
|
|
167
48
|
}
|
|
168
|
-
export declare type
|
|
169
|
-
export interface
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
49
|
+
export declare type OrderCustomerCreditCards = OrderCustomerCreditCard[];
|
|
50
|
+
export interface OrderCustomerGiftCard {
|
|
51
|
+
balance: Money;
|
|
52
|
+
card_number: string;
|
|
53
|
+
expiration: ISOStringOffset | null;
|
|
54
|
+
orders: number;
|
|
55
|
+
updated_at: ISOStringOffset;
|
|
173
56
|
}
|
|
174
|
-
export declare type
|
|
175
|
-
export
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
cals: number | null;
|
|
179
|
-
description: string | null;
|
|
180
|
-
groups: DisplayItemGroups;
|
|
181
|
-
imageUrl: string | null;
|
|
182
|
-
id: number;
|
|
183
|
-
madeFor?: string | null;
|
|
184
|
-
name: string;
|
|
185
|
-
notes?: string | null;
|
|
186
|
-
nutritionalInfo: NutritionalInfo | null;
|
|
187
|
-
quantity: number;
|
|
188
|
-
price: Money;
|
|
189
|
-
shortDescription: string | null;
|
|
190
|
-
signature?: string;
|
|
191
|
-
tags: string[];
|
|
192
|
-
totalPrice: Money;
|
|
57
|
+
export declare type OrderCustomerGiftCards = OrderCustomerGiftCard[];
|
|
58
|
+
export interface OrderCustomerSso {
|
|
59
|
+
connected: boolean;
|
|
60
|
+
service: string;
|
|
193
61
|
}
|
|
194
|
-
export
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
62
|
+
export interface OrderCustomer {
|
|
63
|
+
accepts_marketing: boolean;
|
|
64
|
+
company: string | null;
|
|
65
|
+
credit_cards?: OrderCustomerCreditCards;
|
|
66
|
+
customer_id: number;
|
|
67
|
+
email: string;
|
|
68
|
+
first_name: string;
|
|
69
|
+
gift_cards?: OrderCustomerGiftCards;
|
|
70
|
+
is_guest: boolean;
|
|
71
|
+
is_verified: boolean;
|
|
72
|
+
last_name: string;
|
|
73
|
+
order_notifications: OrderNotifications;
|
|
74
|
+
phone: string;
|
|
75
|
+
sso?: OrderCustomerSso;
|
|
76
|
+
}
|
|
77
|
+
export interface OrderDineInGuest {
|
|
78
|
+
company: string | null;
|
|
79
|
+
email: string | null;
|
|
80
|
+
first_name: string;
|
|
81
|
+
is_guest: boolean;
|
|
82
|
+
last_name: string;
|
|
83
|
+
phone: string | null;
|
|
200
84
|
}
|
|
201
|
-
export declare
|
|
202
|
-
export interface
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
price_total: Money;
|
|
208
|
-
quantity: number;
|
|
209
|
-
quantity_total: number;
|
|
210
|
-
short_name: string;
|
|
85
|
+
export declare const isOrderCustomer: (customer: OrderCustomer | OrderDineInGuest) => customer is OrderCustomer;
|
|
86
|
+
export interface OrderDelivery {
|
|
87
|
+
delivery_id: string;
|
|
88
|
+
dispatched: boolean;
|
|
89
|
+
service: string;
|
|
90
|
+
tracking_url: string;
|
|
211
91
|
}
|
|
212
|
-
export interface
|
|
92
|
+
export interface OrderDetails {
|
|
93
|
+
cart_id: number | null;
|
|
94
|
+
eating_utensils: boolean;
|
|
95
|
+
notes: string | null;
|
|
96
|
+
notes_internal: string | null;
|
|
97
|
+
person_count: number | null;
|
|
98
|
+
serving_utensils: boolean;
|
|
99
|
+
tax_exempt_id: string | null;
|
|
100
|
+
}
|
|
101
|
+
export interface OrderDiscount {
|
|
102
|
+
amount: NegativeMoney;
|
|
103
|
+
auth_type: DiscountAuthType;
|
|
104
|
+
discount_type: DiscountType;
|
|
105
|
+
ext_id?: string | null;
|
|
213
106
|
id: number;
|
|
107
|
+
is_deal: boolean;
|
|
108
|
+
is_loyalty: boolean;
|
|
109
|
+
is_optional: boolean;
|
|
110
|
+
is_promo_code: boolean;
|
|
111
|
+
is_reward: boolean;
|
|
214
112
|
name: string;
|
|
215
|
-
|
|
216
|
-
|
|
113
|
+
per_order: number | null;
|
|
114
|
+
title: string | null;
|
|
217
115
|
}
|
|
218
|
-
export
|
|
219
|
-
|
|
116
|
+
export declare type OrderDiscounts = OrderDiscount[];
|
|
117
|
+
export interface OrderFulfillment {
|
|
118
|
+
arrival_info: string | null;
|
|
119
|
+
has_arrived: boolean;
|
|
120
|
+
vehicle_color: string | null;
|
|
121
|
+
vehicle_id: string | null;
|
|
122
|
+
vehicle_type: string | null;
|
|
123
|
+
}
|
|
124
|
+
export interface OrderGiftCard {
|
|
125
|
+
amount: Money;
|
|
126
|
+
card_number: string;
|
|
127
|
+
employee_id?: number;
|
|
220
128
|
id: number;
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
129
|
+
}
|
|
130
|
+
export declare type OrderGiftCards = OrderGiftCard[];
|
|
131
|
+
export interface OrderPrep {
|
|
132
|
+
completed_at: ISOStringOffset | null;
|
|
133
|
+
created_at: ISOStringOffset;
|
|
134
|
+
daily_id: string;
|
|
135
|
+
done_at: ISOStringOffset | null;
|
|
136
|
+
expected_at: ISOStringOffset | null;
|
|
137
|
+
fire_at: ISOStringOffset | null;
|
|
138
|
+
is_in_prep_queue: boolean;
|
|
139
|
+
prep_status: PrepStatus;
|
|
140
|
+
ready_at: ISOStringOffset | null;
|
|
141
|
+
requested_at: ISOStringOffset;
|
|
142
|
+
}
|
|
143
|
+
export interface OrderRating {
|
|
144
|
+
comments: string | null;
|
|
145
|
+
rating: number;
|
|
146
|
+
}
|
|
147
|
+
export interface OrderRevenueCenterAddress {
|
|
148
|
+
city: string;
|
|
149
|
+
lat: number;
|
|
150
|
+
lng: number;
|
|
151
|
+
phone: string | null;
|
|
152
|
+
postal_code: string;
|
|
153
|
+
state: string;
|
|
154
|
+
street: string;
|
|
155
|
+
}
|
|
156
|
+
export interface OrderRevenueCenter {
|
|
157
|
+
address: OrderRevenueCenterAddress;
|
|
158
|
+
has_order_fulfillment: boolean;
|
|
159
|
+
is_outpost: boolean;
|
|
224
160
|
name: string;
|
|
225
|
-
|
|
226
|
-
price: Money;
|
|
227
|
-
price_total: Money;
|
|
228
|
-
quantity: number;
|
|
229
|
-
quantity_total: number;
|
|
230
|
-
short_name: string;
|
|
231
|
-
shorthand: string | null;
|
|
161
|
+
revenue_center_id: number;
|
|
232
162
|
}
|
|
233
|
-
export declare type ModifiersMetadata = Array<ModifiersMetadataItem>;
|
|
234
163
|
export interface OrderShipment {
|
|
235
164
|
amount: Money;
|
|
236
165
|
api_shipment_id: string;
|
|
@@ -241,309 +170,141 @@ export interface OrderShipment {
|
|
|
241
170
|
shipment_id: number;
|
|
242
171
|
tracking_code: string;
|
|
243
172
|
}
|
|
244
|
-
export interface OrderSurchargeDiscount {
|
|
245
|
-
amount: NegativeMoney;
|
|
246
|
-
discount_id: number;
|
|
247
|
-
employee_id: number | null;
|
|
248
|
-
}
|
|
249
|
-
export interface OrderSurchargeTax {
|
|
250
|
-
tax_id: number;
|
|
251
|
-
name: string;
|
|
252
|
-
amount: NegativeMoney;
|
|
253
|
-
amount_total: NegativeMoney;
|
|
254
|
-
}
|
|
255
173
|
export interface OrderSurcharge {
|
|
256
174
|
amount: Money;
|
|
257
|
-
|
|
258
|
-
discounts: Array<OrderSurchargeDiscount>;
|
|
259
|
-
description?: string;
|
|
260
|
-
employee_id: number | null;
|
|
175
|
+
description: string | null;
|
|
261
176
|
id: number;
|
|
262
|
-
|
|
263
|
-
is_optional?: boolean;
|
|
264
|
-
is_taxed: boolean;
|
|
265
|
-
label?: string;
|
|
177
|
+
is_optional: boolean;
|
|
266
178
|
name: string;
|
|
267
|
-
percentage: Decimal | null;
|
|
268
|
-
surcharge_type: SurchargeType;
|
|
269
|
-
tax: Money;
|
|
270
|
-
taxes: Array<OrderSurchargeTax>;
|
|
271
179
|
}
|
|
272
|
-
export declare type OrderSurcharges =
|
|
180
|
+
export declare type OrderSurcharges = OrderSurcharge[];
|
|
273
181
|
export interface OrderTax {
|
|
274
182
|
amount: Money;
|
|
275
|
-
amount_total?: Money;
|
|
276
183
|
id: number;
|
|
277
|
-
|
|
278
|
-
is_optional?: boolean;
|
|
184
|
+
is_optional: boolean;
|
|
279
185
|
name: string;
|
|
280
|
-
tax_id?: number;
|
|
281
|
-
tax_type?: number;
|
|
282
186
|
}
|
|
283
|
-
export declare type OrderTaxes =
|
|
284
|
-
export interface
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
auth_id: string;
|
|
289
|
-
authcode: string;
|
|
290
|
-
batchid: string;
|
|
291
|
-
card_type: CardType;
|
|
292
|
-
charged_at: ISOStringOffset;
|
|
293
|
-
customer_card_id: number;
|
|
294
|
-
external_api_id: number;
|
|
295
|
-
last4: string;
|
|
296
|
-
masked: string;
|
|
297
|
-
merchant_id: string;
|
|
298
|
-
processor_id: string;
|
|
299
|
-
profileid: string;
|
|
300
|
-
retref: string;
|
|
301
|
-
token: string;
|
|
302
|
-
card_type_name?: string;
|
|
187
|
+
export declare type OrderTaxes = OrderTax;
|
|
188
|
+
export interface OrderTenderCreditCard {
|
|
189
|
+
amount: Money;
|
|
190
|
+
credit_card: CreditCard;
|
|
191
|
+
tender_type: TenderType;
|
|
303
192
|
}
|
|
304
193
|
export interface OrderTenderGiftCard {
|
|
305
|
-
|
|
194
|
+
amount: Money;
|
|
306
195
|
card_number: string;
|
|
307
|
-
|
|
196
|
+
tender_type: TenderType;
|
|
308
197
|
}
|
|
309
198
|
export interface OrderTenderHouseAccount {
|
|
310
|
-
house_account_id: number;
|
|
311
|
-
name: string;
|
|
312
|
-
pin: string;
|
|
313
|
-
}
|
|
314
|
-
export interface OrderTender {
|
|
315
199
|
amount: Money;
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
house_account?: OrderTenderHouseAccount;
|
|
321
|
-
is_replaced: boolean;
|
|
322
|
-
parent_tender_uuid?: string;
|
|
323
|
-
tender_index?: number;
|
|
324
|
-
tender_status: TenderStatus;
|
|
200
|
+
house_account: {
|
|
201
|
+
house_account_id: number;
|
|
202
|
+
name: string;
|
|
203
|
+
};
|
|
325
204
|
tender_type: TenderType;
|
|
326
|
-
tender_uuid: string;
|
|
327
|
-
card_number?: number;
|
|
328
|
-
name?: string;
|
|
329
|
-
customer_card_id?: number;
|
|
330
|
-
balance?: number;
|
|
331
|
-
house_account_id?: number;
|
|
332
|
-
}
|
|
333
|
-
export declare type OrderTenders = Array<OrderTender>;
|
|
334
|
-
export interface OrderTicket {
|
|
335
|
-
display_order?: number;
|
|
336
|
-
item_nos: number[];
|
|
337
|
-
item_type_id: number;
|
|
338
|
-
item_type_name: string;
|
|
339
|
-
ticket_no?: number;
|
|
340
|
-
ticket_status: PrepStatus;
|
|
341
205
|
}
|
|
342
|
-
export declare type
|
|
206
|
+
export declare type OrderTender = OrderTenderCreditCard | OrderTenderGiftCard | OrderTenderHouseAccount;
|
|
207
|
+
export declare type OrderTenders = OrderTender[];
|
|
208
|
+
export declare const isCreditTender: (tender: OrderTenderCreditCard | OrderTenderGiftCard | OrderTenderHouseAccount) => tender is OrderTenderCreditCard;
|
|
209
|
+
export declare const isGiftCardTender: (tender: OrderTenderCreditCard | OrderTenderGiftCard | OrderTenderHouseAccount) => tender is OrderTenderGiftCard;
|
|
210
|
+
export declare const isHouseAccountTender: (tender: OrderTenderCreditCard | OrderTenderGiftCard | OrderTenderHouseAccount) => tender is OrderTenderHouseAccount;
|
|
343
211
|
export interface OrderTotals {
|
|
344
|
-
amount_due?: Money;
|
|
345
212
|
discount: NegativeMoney;
|
|
346
213
|
gift_card: Money;
|
|
347
|
-
refund?: NegativeMoney;
|
|
348
|
-
refunds_total?: NegativeMoney;
|
|
349
214
|
shipping: Money;
|
|
350
215
|
subtotal: Money;
|
|
351
216
|
surcharge: Money;
|
|
352
217
|
tax: Money;
|
|
353
|
-
tenders_net?: Money;
|
|
354
|
-
tenders_total?: Money;
|
|
355
218
|
tip: Money;
|
|
356
219
|
total: Money;
|
|
357
220
|
}
|
|
358
|
-
export interface OrderDelivery {
|
|
359
|
-
delivery_id: string;
|
|
360
|
-
dispatched: boolean;
|
|
361
|
-
service: string;
|
|
362
|
-
tracking_url: string;
|
|
363
|
-
}
|
|
364
|
-
export interface OrderPrep {
|
|
365
|
-
completed_at: ISOStringOffset | null;
|
|
366
|
-
created_at: ISOStringOffset;
|
|
367
|
-
daily_id?: string;
|
|
368
|
-
done_at: ISOStringOffset | null;
|
|
369
|
-
expected_at: ISOStringOffset | null;
|
|
370
|
-
fire_at: ISOStringOffset | null;
|
|
371
|
-
is_in_prep_queue: boolean;
|
|
372
|
-
prep_status: PrepStatus;
|
|
373
|
-
ready_at: ISOStringOffset | null;
|
|
374
|
-
requested_at: ISOStringOffset;
|
|
375
|
-
}
|
|
376
|
-
export interface OrderRating {
|
|
377
|
-
comments?: string | null;
|
|
378
|
-
rating: number;
|
|
379
|
-
order_id: number;
|
|
380
|
-
}
|
|
381
221
|
export interface Order {
|
|
382
|
-
revenue_center_id?: number;
|
|
383
222
|
address: Address | null;
|
|
384
223
|
cart: OrderCart;
|
|
385
|
-
channel?: OrderChannel;
|
|
386
|
-
completed_at?: ISOStringOffset | null;
|
|
387
224
|
created_at: ISOStringOffset;
|
|
388
|
-
customer:
|
|
389
|
-
|
|
390
|
-
delivery?: OrderDelivery | null;
|
|
225
|
+
customer: OrderCustomer | OrderDineInGuest;
|
|
226
|
+
delivery: OrderDelivery | null;
|
|
391
227
|
details: OrderDetails | null;
|
|
392
|
-
discounts: OrderDiscounts
|
|
393
|
-
estimated_at
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
order_fulfillment
|
|
399
|
-
|
|
400
|
-
is_asap?: boolean;
|
|
401
|
-
is_editable?: boolean;
|
|
402
|
-
is_future?: boolean;
|
|
403
|
-
is_in_prep_queue: boolean;
|
|
404
|
-
made_for?: string;
|
|
405
|
-
modifiers_metadata?: ModifiersMetadata | null;
|
|
406
|
-
order_id?: number | null;
|
|
228
|
+
discounts: OrderDiscounts;
|
|
229
|
+
estimated_at: ISOStringOffset | null;
|
|
230
|
+
gift_cards: OrderGiftCards;
|
|
231
|
+
is_asap: boolean;
|
|
232
|
+
is_editable: boolean;
|
|
233
|
+
is_future: boolean;
|
|
234
|
+
order_fulfillment: OrderFulfillment | null;
|
|
235
|
+
order_id: number;
|
|
407
236
|
order_prep: OrderPrep | null;
|
|
408
237
|
order_type: OrderType;
|
|
409
|
-
rating
|
|
410
|
-
|
|
411
|
-
parent_receipt_uuid?: string | null;
|
|
412
|
-
pos_server_id?: number;
|
|
413
|
-
pos_terminal_id?: number;
|
|
414
|
-
prep_status: PrepStatus;
|
|
415
|
-
ready_at: ISOStringOffset | ISOString | null;
|
|
416
|
-
receipt_type: ReceiptType;
|
|
417
|
-
refunds?: Array<OrderTender>;
|
|
238
|
+
rating: OrderRating | null;
|
|
239
|
+
refunds?: OrderTenders;
|
|
418
240
|
requested_at: RequestedAt;
|
|
419
|
-
requested_time
|
|
241
|
+
requested_time: TimeHuman;
|
|
420
242
|
revenue_center: OrderRevenueCenter;
|
|
421
243
|
service_type: ServiceType;
|
|
422
|
-
shipment
|
|
244
|
+
shipment: OrderShipment | null;
|
|
423
245
|
status: OrderStatus;
|
|
424
|
-
surcharges: OrderSurcharges
|
|
425
|
-
taxes: OrderTaxes
|
|
426
|
-
tenders: OrderTenders
|
|
427
|
-
tickets?: OrderTickets;
|
|
246
|
+
surcharges: OrderSurcharges;
|
|
247
|
+
taxes: OrderTaxes;
|
|
248
|
+
tenders: OrderTenders;
|
|
428
249
|
timezone: TimezonePython;
|
|
429
250
|
totals: OrderTotals;
|
|
430
|
-
notes?: string;
|
|
431
|
-
prepType?: string | null;
|
|
432
|
-
revenueCenter?: OrderRevenueCenter;
|
|
433
|
-
serviceType?: ServiceType;
|
|
434
251
|
}
|
|
435
252
|
export declare type Orders = Order[];
|
|
436
|
-
export interface
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
parentOrderId?: string;
|
|
454
|
-
}
|
|
455
|
-
export interface FetchOrdersAPIArgs {
|
|
456
|
-
business_date?: DateString;
|
|
457
|
-
receipt_type?: ReceiptType | 'BOTH';
|
|
458
|
-
channel_type?: string;
|
|
459
|
-
prep_status?: string;
|
|
460
|
-
search?: string;
|
|
461
|
-
sort_by?: 'requested_at' | 'expected_at' | 'fire_at';
|
|
462
|
-
sort_direction?: 'ASC' | 'DESC';
|
|
463
|
-
parent_receipt_uuid?: string;
|
|
464
|
-
}
|
|
465
|
-
export interface OrderCounts {
|
|
466
|
-
current: Record<string, number> | null;
|
|
467
|
-
future: Record<string, number> | null;
|
|
468
|
-
qa: Record<string, number> | null;
|
|
469
|
-
Orders: number;
|
|
470
|
-
}
|
|
471
|
-
export interface OrdersAndCounts {
|
|
472
|
-
orders: OrdersKds;
|
|
473
|
-
counts: OrderCounts;
|
|
474
|
-
}
|
|
475
|
-
export interface OrderUpdate {
|
|
476
|
-
expected_at?: string;
|
|
477
|
-
prep_status?: PrepStatus;
|
|
478
|
-
}
|
|
479
|
-
export interface OrderBucket {
|
|
480
|
-
orders: OrdersKds;
|
|
481
|
-
start: Date;
|
|
482
|
-
end: Date;
|
|
483
|
-
}
|
|
484
|
-
export declare type OrderBuckets = Array<OrderBucket>;
|
|
485
|
-
export interface OrderTimes {
|
|
486
|
-
delayed: number;
|
|
487
|
-
requested: Date;
|
|
488
|
-
requestedTime: string;
|
|
489
|
-
expected: Date;
|
|
490
|
-
expectedDate: string;
|
|
491
|
-
expectedTime: string;
|
|
492
|
-
readyBy: Date;
|
|
493
|
-
readyTime: string;
|
|
494
|
-
dateStr: string;
|
|
495
|
-
status: string;
|
|
496
|
-
}
|
|
497
|
-
export interface TicketUpdate {
|
|
498
|
-
ticket_status: TicketStatus;
|
|
499
|
-
}
|
|
500
|
-
export interface TicketsUpdate {
|
|
501
|
-
ticket_status?: TicketStatus;
|
|
502
|
-
ticket_nos?: number[];
|
|
253
|
+
export interface DisplayItem {
|
|
254
|
+
allergens: string[];
|
|
255
|
+
cals: number | null;
|
|
256
|
+
description: string | null;
|
|
257
|
+
groups: DisplayItemGroups;
|
|
258
|
+
imageUrl: string | null;
|
|
259
|
+
id: number;
|
|
260
|
+
madeFor?: string | null;
|
|
261
|
+
name: string;
|
|
262
|
+
notes?: string | null;
|
|
263
|
+
nutritionalInfo: NutritionalInfo | null;
|
|
264
|
+
quantity: number;
|
|
265
|
+
price: Money;
|
|
266
|
+
shortDescription: string | null;
|
|
267
|
+
signature?: string;
|
|
268
|
+
tags: string[];
|
|
269
|
+
totalPrice: Money;
|
|
503
270
|
}
|
|
504
|
-
export declare type
|
|
505
|
-
export interface
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
ticket_status: TicketStatus;
|
|
511
|
-
items: OrderCart;
|
|
512
|
-
is_default: boolean;
|
|
513
|
-
is_grouped: boolean;
|
|
514
|
-
is_hidden_assembly: boolean;
|
|
515
|
-
is_hidden_qa: boolean;
|
|
516
|
-
print_on_completed: boolean;
|
|
271
|
+
export declare type DisplayItems = DisplayItem[];
|
|
272
|
+
export interface DisplayItemGroup {
|
|
273
|
+
id: number;
|
|
274
|
+
name: string;
|
|
275
|
+
options: DisplayItems;
|
|
276
|
+
short_name: string;
|
|
517
277
|
}
|
|
518
|
-
export declare type
|
|
519
|
-
export
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
278
|
+
export declare type DisplayItemGroups = DisplayItemGroup[];
|
|
279
|
+
export interface ModifiersMetadataOption {
|
|
280
|
+
id: number;
|
|
281
|
+
line_no: number;
|
|
282
|
+
name: string;
|
|
283
|
+
price: Money;
|
|
284
|
+
price_total: Money;
|
|
285
|
+
quantity: number;
|
|
286
|
+
quantity_total: number;
|
|
287
|
+
short_name: string;
|
|
525
288
|
}
|
|
526
|
-
export interface
|
|
527
|
-
|
|
528
|
-
|
|
289
|
+
export interface ModifiersMetadataGroup {
|
|
290
|
+
id: number;
|
|
291
|
+
name: string;
|
|
292
|
+
options: Array<ModifiersMetadataOption>;
|
|
293
|
+
short_name: string;
|
|
529
294
|
}
|
|
530
|
-
export interface
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
tenders: OrderTenders | null;
|
|
545
|
-
cartId: number | null;
|
|
546
|
-
deviceType: string | null;
|
|
547
|
-
prepType: string | null;
|
|
548
|
-
table: number | null;
|
|
295
|
+
export interface ModifiersMetadataItem {
|
|
296
|
+
groups: Array<ModifiersMetadataGroup>;
|
|
297
|
+
id: number;
|
|
298
|
+
item_no: number;
|
|
299
|
+
line_no: number;
|
|
300
|
+
made_for: string | null;
|
|
301
|
+
name: string;
|
|
302
|
+
notes: string | null;
|
|
303
|
+
price: Money;
|
|
304
|
+
price_total: Money;
|
|
305
|
+
quantity: number;
|
|
306
|
+
quantity_total: number;
|
|
307
|
+
short_name: string;
|
|
308
|
+
shorthand: string | null;
|
|
549
309
|
}
|
|
310
|
+
export declare type ModifiersMetadata = Array<ModifiersMetadataItem>;
|