@open-tender/types 0.0.136 → 0.1.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/dist/cjs/types/api/announcements.d.ts +4 -3
- package/dist/cjs/types/api/cart.d.ts +44 -68
- package/dist/cjs/types/api/checkout.d.ts +12 -3
- package/dist/cjs/types/api/customer/groupOrders.d.ts +17 -20
- package/dist/cjs/types/api/favorite.d.ts +6 -92
- package/dist/cjs/types/api/menu.d.ts +43 -88
- package/dist/cjs/types/api/order.d.ts +73 -47
- package/dist/esm/types/api/announcements.d.ts +4 -3
- package/dist/esm/types/api/cart.d.ts +44 -68
- package/dist/esm/types/api/checkout.d.ts +12 -3
- package/dist/esm/types/api/customer/groupOrders.d.ts +17 -20
- package/dist/esm/types/api/favorite.d.ts +6 -92
- package/dist/esm/types/api/menu.d.ts +43 -88
- package/dist/esm/types/api/order.d.ts +73 -47
- package/package.json +1 -1
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { RequestedAt } from '../datetimes';
|
|
2
2
|
import { Decimal, Money, ServiceType, TaxTypeInt, Temperature } from '../global';
|
|
3
|
-
import { CartItemGroups } from './cart';
|
|
4
|
-
import { Favorite } from './favorite';
|
|
5
|
-
import { OrderItemImages } from './order';
|
|
6
3
|
export interface NutritionalInfo {
|
|
7
4
|
calories: number;
|
|
8
5
|
cholesterol: number;
|
|
@@ -16,6 +13,18 @@ export interface NutritionalInfo {
|
|
|
16
13
|
total_fat: number;
|
|
17
14
|
trans_fat: number;
|
|
18
15
|
}
|
|
16
|
+
export interface NutritionalInfoCalcs extends Record<string, number> {
|
|
17
|
+
calories: number;
|
|
18
|
+
cholesterol: number;
|
|
19
|
+
dietary_fiber: number;
|
|
20
|
+
protein: number;
|
|
21
|
+
saturated_fat: number;
|
|
22
|
+
sodium: number;
|
|
23
|
+
sugars: number;
|
|
24
|
+
total_carbs: number;
|
|
25
|
+
total_fat: number;
|
|
26
|
+
trans_fat: number;
|
|
27
|
+
}
|
|
19
28
|
export declare type NutritionalInfoWithEmpty = NutritionalInfo | Record<string, never> | null;
|
|
20
29
|
export interface MenuItemSize {
|
|
21
30
|
name: string;
|
|
@@ -34,120 +43,66 @@ export interface MenuItemGroup {
|
|
|
34
43
|
description: string | null;
|
|
35
44
|
id: number;
|
|
36
45
|
included_options: number;
|
|
46
|
+
is_pizza: boolean;
|
|
37
47
|
is_size: boolean;
|
|
38
|
-
is_upsell: boolean;
|
|
39
48
|
large_image_url: string | null;
|
|
40
49
|
max_options: number;
|
|
41
50
|
menu_position: number;
|
|
42
51
|
min_options: number;
|
|
43
52
|
name: string;
|
|
44
|
-
option_items:
|
|
53
|
+
option_items: OptionItem[];
|
|
54
|
+
pos_display_color: string | null;
|
|
45
55
|
short_name: string;
|
|
46
56
|
slug: string;
|
|
47
57
|
small_image_url: string | null;
|
|
48
58
|
}
|
|
49
|
-
export declare type MenuItemGroups =
|
|
50
|
-
export interface
|
|
51
|
-
|
|
52
|
-
allergens: string | string[];
|
|
59
|
+
export declare type MenuItemGroups = MenuItemGroup[];
|
|
60
|
+
export interface MenuItem {
|
|
61
|
+
allergens: string | null;
|
|
53
62
|
app_image_url: string | null;
|
|
54
|
-
|
|
55
|
-
delivery_days: number | null;
|
|
63
|
+
calories: number | null;
|
|
56
64
|
description: string | null;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
id?: number;
|
|
65
|
+
dimensions: number[] | null;
|
|
66
|
+
featured_position: number | null;
|
|
67
|
+
id: number;
|
|
61
68
|
increment: number;
|
|
62
69
|
ingredients: string | null;
|
|
63
70
|
is_alcohol: boolean;
|
|
64
71
|
item_id: number;
|
|
65
72
|
large_image_url: string | null;
|
|
66
|
-
length: string | null;
|
|
67
73
|
max_quantity: number;
|
|
68
74
|
menu_position: number;
|
|
69
75
|
min_quantity: number;
|
|
70
|
-
name
|
|
76
|
+
name: string;
|
|
71
77
|
nutritional_info: NutritionalInfo | null;
|
|
78
|
+
option_groups: MenuItemGroups;
|
|
72
79
|
plu: string | null;
|
|
73
80
|
points: number | null;
|
|
81
|
+
pos_display_color: string | null;
|
|
74
82
|
price: Money | string;
|
|
75
83
|
sales_tax_override: Decimal | null;
|
|
76
|
-
|
|
77
|
-
short_description?: string | null;
|
|
84
|
+
short_description: string | null;
|
|
78
85
|
short_name: string;
|
|
79
86
|
shorthand: string | null;
|
|
87
|
+
similar_items: number[];
|
|
80
88
|
slug: string;
|
|
81
89
|
small_image_url: string | null;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
tag_classes: string;
|
|
85
|
-
tags: string | string[];
|
|
90
|
+
suspend_until: number | null;
|
|
91
|
+
tags: string | null;
|
|
86
92
|
taxes: MenuItemTaxes;
|
|
87
93
|
temperature: Temperature;
|
|
88
|
-
|
|
89
|
-
width: string | null;
|
|
90
|
-
}
|
|
91
|
-
export interface OptionItem extends Item {
|
|
92
|
-
group_id: number;
|
|
93
|
-
opt_is_default: 1 | 0;
|
|
94
|
-
serving_size: string | null;
|
|
94
|
+
upsell_items: number[];
|
|
95
95
|
}
|
|
96
|
-
export interface
|
|
97
|
-
|
|
98
|
-
category_id: number;
|
|
99
|
-
category_name: string;
|
|
100
|
-
display_options: number;
|
|
101
|
-
has_upsell: boolean;
|
|
102
|
-
option_groups: MenuItemGroups;
|
|
103
|
-
similar_items: number[] | null;
|
|
104
|
-
sizes: MenuItemSizes | null;
|
|
105
|
-
upsell_items: number[] | null;
|
|
106
|
-
use_options_wizard: 1 | 0;
|
|
107
|
-
favorite?: Partial<Favorite>;
|
|
108
|
-
upsellItems: number[];
|
|
109
|
-
index?: number;
|
|
110
|
-
id?: number;
|
|
111
|
-
name?: string;
|
|
112
|
-
shortName?: string;
|
|
113
|
-
cart_guest_id?: number | null;
|
|
114
|
-
category: string | null;
|
|
115
|
-
customer_id?: number | null;
|
|
116
|
-
description: string | null;
|
|
117
|
-
imageUrl: string | null;
|
|
118
|
-
slug: string;
|
|
119
|
-
allergens: string[];
|
|
120
|
-
tags: string[];
|
|
121
|
-
ingredients: string | null;
|
|
122
|
-
madeFor?: string | null;
|
|
123
|
-
notes?: string | null;
|
|
124
|
-
nutritionalInfo: NutritionalInfo | null;
|
|
125
|
-
cals: number | null;
|
|
126
|
-
groups: CartItemGroups;
|
|
127
|
-
quantity: number;
|
|
128
|
-
price: string;
|
|
129
|
-
increment: number;
|
|
130
|
-
max: number;
|
|
131
|
-
min: number;
|
|
132
|
-
points: any;
|
|
133
|
-
similarItems: number[];
|
|
134
|
-
totalPrice: number;
|
|
135
|
-
totalPoints: number | null;
|
|
136
|
-
totalCals: number | null;
|
|
137
|
-
item_no?: number;
|
|
138
|
-
nutritional_info: NutritionalInfo | null;
|
|
139
|
-
price_total?: number;
|
|
140
|
-
favorite_id?: number;
|
|
141
|
-
images?: OrderItemImages;
|
|
142
|
-
short_description?: string | null;
|
|
143
|
-
shortDescription?: string;
|
|
144
|
-
made_for?: string;
|
|
145
|
-
signature?: string;
|
|
146
|
-
isDefault?: boolean | number;
|
|
147
|
-
isSoldOut?: boolean;
|
|
96
|
+
export interface OptionItem extends MenuItem {
|
|
97
|
+
opt_is_default: boolean;
|
|
148
98
|
}
|
|
149
|
-
export declare type MenuItems =
|
|
99
|
+
export declare type MenuItems = MenuItem[];
|
|
150
100
|
export declare type MenuCategoryAppearance = 'small' | 'medium' | 'large';
|
|
101
|
+
export interface MenuCategoryPos {
|
|
102
|
+
section_id: number | null;
|
|
103
|
+
color: string | null;
|
|
104
|
+
order: number | null;
|
|
105
|
+
}
|
|
151
106
|
export interface MenuCategory {
|
|
152
107
|
app_image_url: string | null;
|
|
153
108
|
appearance: MenuCategoryAppearance;
|
|
@@ -156,17 +111,17 @@ export interface MenuCategory {
|
|
|
156
111
|
id: number;
|
|
157
112
|
items: MenuItems;
|
|
158
113
|
large_image_url: string | null;
|
|
114
|
+
menu_name: string;
|
|
115
|
+
menu_name_id: number;
|
|
116
|
+
menu_position: number;
|
|
159
117
|
name: string;
|
|
160
|
-
|
|
161
|
-
pos_display_order: number;
|
|
162
|
-
pos_section_id: number;
|
|
163
|
-
position: number;
|
|
118
|
+
pos: MenuCategoryPos | null;
|
|
164
119
|
revenue_center_id: number | null;
|
|
165
120
|
short_name: string;
|
|
166
121
|
slug: string;
|
|
167
122
|
small_image_url: string | null;
|
|
168
123
|
}
|
|
169
|
-
export declare type MenuCategories =
|
|
124
|
+
export declare type MenuCategories = MenuCategory[];
|
|
170
125
|
export interface Menu {
|
|
171
126
|
menu: MenuCategories;
|
|
172
127
|
service_type: ServiceType;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { DateString, ISOString, ISOStringOffset, RequestedAt, TimeHuman, TimezonePython } from '../datetimes';
|
|
2
|
-
import { CardType, ChannelType, Decimal, Money, NegativeMoney, OrderStatus, OrderType, ReceiptType, ServiceType, SurchargeType,
|
|
3
|
-
import { Address, Customer,
|
|
2
|
+
import { CardType, ChannelType, Decimal, Money, NegativeMoney, OrderStatus, OrderType, ReceiptType, ServiceType, SurchargeType, TenderStatus, TenderType, Weekday } from '../global';
|
|
3
|
+
import { Address, Customer, CustomerGiftCards, CustomerRevenueCenterHours, CustomerRevenueCenterSettings, DeliveryZone, ExcludedTimes, FirstTime, HolidayItem, LoyaltyPoints, RevenueCenterGroupOrdering, RevenueCenterOrderTimes, ValidTimes } from './customer';
|
|
4
4
|
import { PrepStatus, TicketStatus } from './kds';
|
|
5
5
|
import { ConfigFulfillmentField } from './config';
|
|
6
|
+
import { NutritionalInfo } from './menu';
|
|
7
|
+
import { Cart } from './cart';
|
|
6
8
|
export interface OrderChannel {
|
|
7
9
|
ext_id?: string | null;
|
|
8
10
|
ext_name?: string | null;
|
|
@@ -118,10 +120,10 @@ export interface OrderItemDiscount {
|
|
|
118
120
|
}
|
|
119
121
|
export declare type OrderItemDiscounts = Array<OrderItemDiscount>;
|
|
120
122
|
export interface OrderItemImage {
|
|
121
|
-
type: 'LARGE_IMAGE' | 'SMALL_IMAGE' | 'APP_IMAGE'
|
|
123
|
+
type: 'LARGE_IMAGE' | 'SMALL_IMAGE' | 'APP_IMAGE';
|
|
122
124
|
url: string | null;
|
|
123
125
|
}
|
|
124
|
-
export declare type OrderItemImages =
|
|
126
|
+
export declare type OrderItemImages = OrderItemImage[];
|
|
125
127
|
export interface OrderItemTax {
|
|
126
128
|
tax_id: number;
|
|
127
129
|
name: string;
|
|
@@ -129,54 +131,74 @@ export interface OrderItemTax {
|
|
|
129
131
|
amount_total: NegativeMoney;
|
|
130
132
|
}
|
|
131
133
|
export declare type OrderItemTaxes = Array<OrderItemTax>;
|
|
132
|
-
export declare type OrderGroupOptions = Array<OrderItem>;
|
|
133
|
-
export interface OrderGroup {
|
|
134
|
-
id?: number;
|
|
135
|
-
inc?: number;
|
|
136
|
-
is_size?: boolean;
|
|
137
|
-
max?: number;
|
|
138
|
-
min?: number;
|
|
139
|
-
name: string;
|
|
140
|
-
options: OrderGroupOptions;
|
|
141
|
-
short_name?: string;
|
|
142
|
-
}
|
|
143
|
-
export declare type OrderGroups = Array<OrderGroup>;
|
|
144
134
|
export interface OrderItem {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
discount?: Money;
|
|
149
|
-
discount_total?: Money;
|
|
150
|
-
discounts?: OrderItemDiscounts;
|
|
151
|
-
groups?: OrderGroups;
|
|
135
|
+
allergens: string[];
|
|
136
|
+
description: string | null;
|
|
137
|
+
groups: OrderItemGroups;
|
|
152
138
|
id: number;
|
|
153
139
|
images: OrderItemImages;
|
|
154
140
|
ingredients: string | null;
|
|
155
|
-
|
|
156
|
-
line_no?: number;
|
|
157
|
-
made_for?: string;
|
|
141
|
+
made_for?: string | null;
|
|
158
142
|
name: string;
|
|
159
|
-
notes?: string;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
price
|
|
163
|
-
price_quantity?: number;
|
|
143
|
+
notes?: string | null;
|
|
144
|
+
nutritional_info: NutritionalInfo | null;
|
|
145
|
+
points?: number | null;
|
|
146
|
+
price: Money;
|
|
164
147
|
price_total: Money;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
148
|
+
quantity: number;
|
|
149
|
+
short_description: string | null;
|
|
150
|
+
tags: string[];
|
|
151
|
+
temperature: 'Hot' | 'Cold';
|
|
152
|
+
}
|
|
153
|
+
export declare type OrderItemOptions = OrderItem[];
|
|
154
|
+
export interface OrderItemGroup {
|
|
155
|
+
id: number;
|
|
156
|
+
name: string;
|
|
157
|
+
options: OrderItemOptions;
|
|
158
|
+
short_name: string;
|
|
159
|
+
}
|
|
160
|
+
export declare type OrderItemGroups = OrderItemGroup[];
|
|
161
|
+
export declare type OrderCart = OrderItem[];
|
|
162
|
+
export interface PosOrderItemGroup {
|
|
163
|
+
id: number;
|
|
164
|
+
name: string;
|
|
165
|
+
options: PosOrderItemOptions;
|
|
170
166
|
short_name: string;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
export declare type
|
|
167
|
+
}
|
|
168
|
+
export declare type PosOrderItemGroups = PosOrderItemGroup[];
|
|
169
|
+
export interface PosOrderItem extends Omit<OrderItem, 'groups'> {
|
|
170
|
+
item_no: number;
|
|
171
|
+
line_no: number;
|
|
172
|
+
groups: PosOrderItemGroups;
|
|
173
|
+
}
|
|
174
|
+
export declare type PosOrderItemOptions = PosOrderItem[];
|
|
175
|
+
export declare type PosOrderCart = PosOrderItem[];
|
|
176
|
+
export interface DisplayItem {
|
|
177
|
+
allergens: string[];
|
|
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;
|
|
193
|
+
}
|
|
194
|
+
export declare type DisplayItems = DisplayItem[];
|
|
195
|
+
export interface DisplayItemGroup {
|
|
196
|
+
id: number;
|
|
197
|
+
name: string;
|
|
198
|
+
options: DisplayItems;
|
|
199
|
+
short_name: string;
|
|
200
|
+
}
|
|
201
|
+
export declare type DisplayItemGroups = DisplayItemGroup[];
|
|
180
202
|
export interface ModifiersMetadataOption {
|
|
181
203
|
id: number;
|
|
182
204
|
line_no: number;
|
|
@@ -410,7 +432,10 @@ export interface Order {
|
|
|
410
432
|
revenueCenter?: OrderRevenueCenter;
|
|
411
433
|
serviceType?: ServiceType;
|
|
412
434
|
}
|
|
413
|
-
export declare type Orders =
|
|
435
|
+
export declare type Orders = Order[];
|
|
436
|
+
export interface OrderPos extends Omit<Order, 'cart'> {
|
|
437
|
+
cart: PosOrderCart;
|
|
438
|
+
}
|
|
414
439
|
export interface OrderKds extends Omit<Order, 'fire_at' | 'tickets' | 'expected_at'> {
|
|
415
440
|
expected_at: ISOStringOffset;
|
|
416
441
|
fire_at: ISOStringOffset;
|
|
@@ -490,6 +515,7 @@ export interface Ticket {
|
|
|
490
515
|
is_hidden_qa: boolean;
|
|
491
516
|
print_on_completed: boolean;
|
|
492
517
|
}
|
|
518
|
+
export declare type Tickets = Ticket[];
|
|
493
519
|
export declare type TicketGroup = Ticket[];
|
|
494
520
|
export declare type TicketGroups = TicketGroup[];
|
|
495
521
|
export interface OrderKdsStatus {
|
|
@@ -506,7 +532,7 @@ export interface UnpreparedOrderData {
|
|
|
506
532
|
revenueCenterId: number | null;
|
|
507
533
|
serviceType: ServiceType | null;
|
|
508
534
|
requestedAt: string | null;
|
|
509
|
-
cart:
|
|
535
|
+
cart: Cart | null;
|
|
510
536
|
customer: Customer;
|
|
511
537
|
address: Address | null;
|
|
512
538
|
details: OrderDetails | null;
|
package/package.json
CHANGED