@feedmepos/mf-order-setting 0.0.91 → 0.0.92
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/{DisplaySystemView-n7Kqdw-h.js → DisplaySystemView-DZS7EVfk.js} +1 -1
- package/dist/{KioskDevicesView-Bz6seroM.js → KioskDevicesView-d2WLB0-w.js} +1 -1
- package/dist/{KioskDevicesView.vue_vue_type_script_setup_true_lang-I39sE8Pe.js → KioskDevicesView.vue_vue_type_script_setup_true_lang-rs-hNWUW.js} +3 -3
- package/dist/{KioskSettingView-Cajjh4Zm.js → KioskSettingView-DFE3_u5c.js} +3 -3
- package/dist/{KioskView-BPSbsMi5.js → KioskView-C3Pi3lWW.js} +5 -5
- package/dist/{OrderSettingsView-jPxZ3JDM.js → OrderSettingsView-Dxg9RjSd.js} +26999 -25299
- package/dist/{app-DIhv5ssA.js → app-BFlQtcsd.js} +3253 -3062
- package/dist/app.js +1 -1
- package/dist/common/order-platform/index.d.ts +20 -0
- package/dist/frontend/mf-order/src/api/reservation/index.d.ts +8 -0
- package/dist/frontend/mf-order/src/app.d.ts +84 -0
- package/dist/frontend/mf-order/src/main.d.ts +84 -0
- package/dist/frontend/mf-order/src/stores/order-setting/index.d.ts +3 -3
- package/dist/frontend/mf-order/src/stores/restaurant/index.d.ts +3 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/CopySettingsSheet.vue.d.ts +186 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/CustomTimePicker.vue.d.ts +11 -0
- package/dist/frontend/mf-order/src/views/order-settings/reservation/ReservationSetting.vue.d.ts +2 -0
- package/dist/frontend/mf-order/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index-vaSLX6r3.js → index-ByiTrmdq.js} +2 -2
- package/dist/{index-Clp_YRJ2.js → index-CaO7aaaT.js} +1 -1
- package/dist/{index-CmqNrkNl.js → index-s2kWGMtz.js} +1 -1
- package/dist/order.dto-C829lA69.js +41528 -0
- package/dist/package/entity/delivery/delivery.dto.d.ts +7 -0
- package/dist/package/entity/food-court/food-court.dto.d.ts +315 -264
- package/dist/package/entity/food-court/order-v2.do.d.ts +231 -0
- package/dist/package/entity/food-court/order-v2.do.spec.d.ts +1 -0
- package/dist/package/entity/incoming-order/incoming-order-to-bill.dto.d.ts +15 -6
- package/dist/package/entity/index.d.ts +7 -0
- package/dist/package/entity/index.frontend.d.ts +2 -0
- package/dist/package/entity/member/member.dto.d.ts +2 -2
- package/dist/package/entity/order/dine-in/dine-in.do.d.ts +44 -9
- package/dist/package/entity/order/dine-in/dine-in.dto.d.ts +17 -3
- package/dist/package/entity/order/menu/menu.dto.d.ts +33 -3
- package/dist/package/entity/order/order-item/order-item.dto.d.ts +18 -18
- package/dist/package/entity/order/order.do.d.ts +87 -12
- package/dist/package/entity/order/order.dto.d.ts +762 -358
- package/dist/package/entity/order/order.enum.d.ts +1 -1
- package/dist/package/entity/order-platform/foodpanda/foodpanda-order.dto.d.ts +7 -0
- package/dist/package/entity/order-platform/grabfood/grabfood-order.do.d.ts +7 -0
- package/dist/package/entity/order-platform/menu.dto.d.ts +10 -10
- package/dist/package/entity/order-platform/order-platform.dto.d.ts +92 -0
- package/dist/package/entity/order-platform/shopeefood/shopeefood-order.do.d.ts +7 -0
- package/dist/package/entity/order-platform/tng/tng-menu.do.d.ts +6 -6
- package/dist/package/entity/order-setting/order-setting.do.d.ts +866 -5
- package/dist/package/entity/order-setting/order-setting.dto.d.ts +10 -10
- package/dist/package/entity/order-setting/reservationV2/reservation.do.d.ts +1269 -0
- package/dist/package/entity/order-setting/sms/sms.do.d.ts +3 -3
- package/dist/package/entity/order-setting/sms/sms.dto.d.ts +3 -3
- package/dist/package/entity/queue/queue.dto.d.ts +175 -121
- package/dist/package/entity/reservation/reservation-pos.do.d.ts +222 -0
- package/dist/package/entity/reservation/reservation.do.d.ts +205 -0
- package/dist/package/entity/reservation/reservation.dto.d.ts +428 -0
- package/dist/package/entity/reservation/reservation.enum.d.ts +3 -0
- package/dist/package/entity/reservation/reservation.utils.d.ts +152 -0
- package/dist/package/entity/restaurant/restaurant.dto.d.ts +39 -24
- package/dist/package/entity/user/user.do.d.ts +2 -2
- package/dist/package/entity/websocket/websocket.dto.d.ts +161 -21
- package/dist/package/entity/websocket/websocket.enum.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/api/reservation/index.ts +25 -0
- package/src/assets/images/not-found.png +0 -0
- package/src/locales/en-US.json +21 -0
- package/src/locales/ja-JP.json +21 -0
- package/src/locales/th-TH.json +21 -0
- package/src/locales/zh-CN.json +21 -0
- package/src/views/order-settings/OrderSettingsView.vue +9 -2
- package/src/views/order-settings/delivery/delivery.spec.ts +21 -0
- package/src/views/order-settings/delivery/delivery.ts +2 -51
- package/src/views/order-settings/dine-in/DineInSetting.vue +11 -1
- package/src/views/order-settings/reservation/CopySettingsSheet.vue +256 -0
- package/src/views/order-settings/reservation/CustomTimePicker.vue +311 -0
- package/src/views/order-settings/reservation/ReservationSetting.vue +1549 -0
- package/vitest.config.ts +2 -1
- package/dist/order.dto-DV1qL3Q_.js +0 -40301
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const RestaurantReservationDto: z.ZodObject<{
|
|
3
|
+
_id: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
4
|
+
restaurantId: z.ZodEffects<z.ZodString, string, string>;
|
|
5
|
+
/**
|
|
6
|
+
* The capacity tier ID from the availability API. Ignored by the backend,
|
|
7
|
+
* which derives the tier from the range + pax.
|
|
8
|
+
*/
|
|
9
|
+
capacityTierId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
10
|
+
/** The range ID - the zone/area this booking belongs to */
|
|
11
|
+
rangeId: z.ZodString;
|
|
12
|
+
/** The exact start time returned by the availability API */
|
|
13
|
+
startDate: z.ZodEffects<z.ZodString, string, string>;
|
|
14
|
+
/** Ignored by the backend, which derives it from the range's booking duration */
|
|
15
|
+
endDate: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
16
|
+
pax: z.ZodNumber;
|
|
17
|
+
userId: z.ZodString;
|
|
18
|
+
userName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
19
|
+
userPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
20
|
+
userEmail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
21
|
+
customerRemarks: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
/** Guest preferences - customer's selections from range preferences */
|
|
23
|
+
guestPreferences: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
name: string;
|
|
28
|
+
value: string | string[];
|
|
29
|
+
}, {
|
|
30
|
+
name: string;
|
|
31
|
+
value: string | string[];
|
|
32
|
+
}>, "many">>>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
_id?: string | null | undefined;
|
|
35
|
+
userName?: string | null | undefined;
|
|
36
|
+
endDate?: string | null | undefined;
|
|
37
|
+
guestPreferences?: {
|
|
38
|
+
name: string;
|
|
39
|
+
value: string | string[];
|
|
40
|
+
}[] | null | undefined;
|
|
41
|
+
capacityTierId?: string | null | undefined;
|
|
42
|
+
userPhone?: string | null | undefined;
|
|
43
|
+
userEmail?: string | null | undefined;
|
|
44
|
+
customerRemarks?: string | null | undefined;
|
|
45
|
+
restaurantId: string;
|
|
46
|
+
pax: number;
|
|
47
|
+
userId: string;
|
|
48
|
+
startDate: string;
|
|
49
|
+
rangeId: string;
|
|
50
|
+
}, {
|
|
51
|
+
_id?: string | null | undefined;
|
|
52
|
+
userName?: string | null | undefined;
|
|
53
|
+
endDate?: string | null | undefined;
|
|
54
|
+
guestPreferences?: {
|
|
55
|
+
name: string;
|
|
56
|
+
value: string | string[];
|
|
57
|
+
}[] | null | undefined;
|
|
58
|
+
capacityTierId?: string | null | undefined;
|
|
59
|
+
userPhone?: string | null | undefined;
|
|
60
|
+
userEmail?: string | null | undefined;
|
|
61
|
+
customerRemarks?: string | null | undefined;
|
|
62
|
+
restaurantId: string;
|
|
63
|
+
pax: number;
|
|
64
|
+
userId: string;
|
|
65
|
+
startDate: string;
|
|
66
|
+
rangeId: string;
|
|
67
|
+
}>;
|
|
68
|
+
/**
|
|
69
|
+
* A guest preference as sent to the POS: the value is always an array (a
|
|
70
|
+
* text/radio answer is wrapped), because the Go entity can't decode the
|
|
71
|
+
* `string | string[]` union of FdoGuestPreferenceValue.
|
|
72
|
+
*/
|
|
73
|
+
export declare const ReservationGuestPreferencePOSDto: z.ZodObject<{
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
value: z.ZodArray<z.ZodString, "many">;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
name: string;
|
|
78
|
+
value: string[];
|
|
79
|
+
}, {
|
|
80
|
+
name: string;
|
|
81
|
+
value: string[];
|
|
82
|
+
}>;
|
|
83
|
+
export type ReservationGuestPreferencePOSDto = z.infer<typeof ReservationGuestPreferencePOSDto>;
|
|
84
|
+
export declare const RestaurantReservationPOSDto: z.ZodObject<{
|
|
85
|
+
_id: z.ZodEffects<z.ZodString, string, string>;
|
|
86
|
+
/** Reservation status */
|
|
87
|
+
status: z.ZodEnum<["DRAFT", "CONFIRMED", "CANCELLED", "SEATED", "NO_SHOW"]>;
|
|
88
|
+
/** Restaurant _id */
|
|
89
|
+
restaurant: z.ZodEffects<z.ZodString, string, string>;
|
|
90
|
+
/** The capacity tier ID - the actual inventory unit */
|
|
91
|
+
capacityTierId: z.ZodString;
|
|
92
|
+
/** The range ID - the zone/area (for reference) */
|
|
93
|
+
rangeId: z.ZodString;
|
|
94
|
+
startDate: z.ZodEffects<z.ZodString, string, string>;
|
|
95
|
+
endDate: z.ZodEffects<z.ZodString, string, string>;
|
|
96
|
+
/** Pax */
|
|
97
|
+
pax: z.ZodNumber;
|
|
98
|
+
userName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
99
|
+
/** User phone and email can be null if created by POS */
|
|
100
|
+
userPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
101
|
+
userEmail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
102
|
+
/** User _id that created the reservation, can be null if created by POS */
|
|
103
|
+
userId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
104
|
+
/** POS assigned slot number */
|
|
105
|
+
slotNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
106
|
+
/** POS table lock timestamp. Null means unlocked. */
|
|
107
|
+
slotLockedAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
108
|
+
/** Customer remarks */
|
|
109
|
+
customerRemarks: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
110
|
+
/** Guest preferences - customer's selections from range preferences */
|
|
111
|
+
guestPreferences: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
112
|
+
name: z.ZodString;
|
|
113
|
+
value: z.ZodArray<z.ZodString, "many">;
|
|
114
|
+
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
name: string;
|
|
116
|
+
value: string[];
|
|
117
|
+
}, {
|
|
118
|
+
name: string;
|
|
119
|
+
value: string[];
|
|
120
|
+
}>, "many">>>;
|
|
121
|
+
/** Reserved until timestamp */
|
|
122
|
+
reservedUntil: z.ZodEffects<z.ZodString, string, string>;
|
|
123
|
+
/** Associated order ID, set by Start Ordering */
|
|
124
|
+
orderId: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
125
|
+
/** Staff remarks thread, oldest first */
|
|
126
|
+
staffRemarks: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
127
|
+
text: z.ZodString;
|
|
128
|
+
authorName: z.ZodString;
|
|
129
|
+
createdAt: z.ZodEffects<z.ZodString, string, string>;
|
|
130
|
+
}, "strip", z.ZodTypeAny, {
|
|
131
|
+
text: string;
|
|
132
|
+
createdAt: string;
|
|
133
|
+
authorName: string;
|
|
134
|
+
}, {
|
|
135
|
+
text: string;
|
|
136
|
+
createdAt: string;
|
|
137
|
+
authorName: string;
|
|
138
|
+
}>, "many">>>;
|
|
139
|
+
createdAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
140
|
+
createdBy: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
141
|
+
confirmedAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
142
|
+
confirmedBy: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
143
|
+
seatedAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
144
|
+
seatedBy: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
145
|
+
cancelledAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
146
|
+
cancelledBy: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
147
|
+
noShowAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
148
|
+
noShowBy: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
149
|
+
}, "strip", z.ZodTypeAny, {
|
|
150
|
+
orderId?: string | null | undefined;
|
|
151
|
+
createdAt?: string | null | undefined;
|
|
152
|
+
createdBy?: string | null | undefined;
|
|
153
|
+
userId?: string | null | undefined;
|
|
154
|
+
userName?: string | null | undefined;
|
|
155
|
+
guestPreferences?: {
|
|
156
|
+
name: string;
|
|
157
|
+
value: string[];
|
|
158
|
+
}[] | null | undefined;
|
|
159
|
+
userPhone?: string | null | undefined;
|
|
160
|
+
userEmail?: string | null | undefined;
|
|
161
|
+
slotNumber?: string | null | undefined;
|
|
162
|
+
slotLockedAt?: string | null | undefined;
|
|
163
|
+
customerRemarks?: string | null | undefined;
|
|
164
|
+
staffRemarks?: {
|
|
165
|
+
text: string;
|
|
166
|
+
createdAt: string;
|
|
167
|
+
authorName: string;
|
|
168
|
+
}[] | null | undefined;
|
|
169
|
+
confirmedAt?: string | null | undefined;
|
|
170
|
+
confirmedBy?: string | null | undefined;
|
|
171
|
+
seatedAt?: string | null | undefined;
|
|
172
|
+
seatedBy?: string | null | undefined;
|
|
173
|
+
cancelledAt?: string | null | undefined;
|
|
174
|
+
cancelledBy?: string | null | undefined;
|
|
175
|
+
noShowAt?: string | null | undefined;
|
|
176
|
+
noShowBy?: string | null | undefined;
|
|
177
|
+
status: "CANCELLED" | "DRAFT" | "CONFIRMED" | "SEATED" | "NO_SHOW";
|
|
178
|
+
restaurant: string;
|
|
179
|
+
_id: string;
|
|
180
|
+
pax: number;
|
|
181
|
+
startDate: string;
|
|
182
|
+
endDate: string;
|
|
183
|
+
reservedUntil: string;
|
|
184
|
+
capacityTierId: string;
|
|
185
|
+
rangeId: string;
|
|
186
|
+
}, {
|
|
187
|
+
orderId?: string | null | undefined;
|
|
188
|
+
createdAt?: string | null | undefined;
|
|
189
|
+
createdBy?: string | null | undefined;
|
|
190
|
+
userId?: string | null | undefined;
|
|
191
|
+
userName?: string | null | undefined;
|
|
192
|
+
guestPreferences?: {
|
|
193
|
+
name: string;
|
|
194
|
+
value: string[];
|
|
195
|
+
}[] | null | undefined;
|
|
196
|
+
userPhone?: string | null | undefined;
|
|
197
|
+
userEmail?: string | null | undefined;
|
|
198
|
+
slotNumber?: string | null | undefined;
|
|
199
|
+
slotLockedAt?: string | null | undefined;
|
|
200
|
+
customerRemarks?: string | null | undefined;
|
|
201
|
+
staffRemarks?: {
|
|
202
|
+
text: string;
|
|
203
|
+
createdAt: string;
|
|
204
|
+
authorName: string;
|
|
205
|
+
}[] | null | undefined;
|
|
206
|
+
confirmedAt?: string | null | undefined;
|
|
207
|
+
confirmedBy?: string | null | undefined;
|
|
208
|
+
seatedAt?: string | null | undefined;
|
|
209
|
+
seatedBy?: string | null | undefined;
|
|
210
|
+
cancelledAt?: string | null | undefined;
|
|
211
|
+
cancelledBy?: string | null | undefined;
|
|
212
|
+
noShowAt?: string | null | undefined;
|
|
213
|
+
noShowBy?: string | null | undefined;
|
|
214
|
+
status: "CANCELLED" | "DRAFT" | "CONFIRMED" | "SEATED" | "NO_SHOW";
|
|
215
|
+
restaurant: string;
|
|
216
|
+
_id: string;
|
|
217
|
+
pax: number;
|
|
218
|
+
startDate: string;
|
|
219
|
+
endDate: string;
|
|
220
|
+
reservedUntil: string;
|
|
221
|
+
capacityTierId: string;
|
|
222
|
+
rangeId: string;
|
|
223
|
+
}>;
|
|
224
|
+
export type RestaurantReservationDto = z.infer<typeof RestaurantReservationDto>;
|
|
225
|
+
export type RestaurantReservationPOSDto = z.infer<typeof RestaurantReservationPOSDto>;
|
|
226
|
+
/**
|
|
227
|
+
* DTO for editing a reservation from POS. Status, order, user, remarks and the
|
|
228
|
+
* `…By` fields are not editable here: status changes go through the action
|
|
229
|
+
* routes (cancel / no-show / order), remarks through `POST /:id/remarks`.
|
|
230
|
+
* Changing pax, range or start re-derives the tier and end time on the server.
|
|
231
|
+
*/
|
|
232
|
+
export declare const UpdateReservationPOSDto: z.ZodObject<{
|
|
233
|
+
pax: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
/** Optional: Update the range ID if changing time slot */
|
|
235
|
+
rangeId: z.ZodOptional<z.ZodString>;
|
|
236
|
+
/** Optional: Update the start time (a slot from the availability API) */
|
|
237
|
+
startDate: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
238
|
+
userName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
239
|
+
userPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
240
|
+
userEmail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
241
|
+
slotNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
242
|
+
slotLockedAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
243
|
+
customerRemarks: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
244
|
+
/** Guest preferences - customer's selections from range preferences */
|
|
245
|
+
guestPreferences: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
246
|
+
name: z.ZodString;
|
|
247
|
+
value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
248
|
+
}, "strip", z.ZodTypeAny, {
|
|
249
|
+
name: string;
|
|
250
|
+
value: string | string[];
|
|
251
|
+
}, {
|
|
252
|
+
name: string;
|
|
253
|
+
value: string | string[];
|
|
254
|
+
}>, "many">>>;
|
|
255
|
+
}, "strip", z.ZodTypeAny, {
|
|
256
|
+
pax?: number | undefined;
|
|
257
|
+
userName?: string | null | undefined;
|
|
258
|
+
startDate?: string | undefined;
|
|
259
|
+
guestPreferences?: {
|
|
260
|
+
name: string;
|
|
261
|
+
value: string | string[];
|
|
262
|
+
}[] | null | undefined;
|
|
263
|
+
rangeId?: string | undefined;
|
|
264
|
+
userPhone?: string | null | undefined;
|
|
265
|
+
userEmail?: string | null | undefined;
|
|
266
|
+
slotNumber?: string | null | undefined;
|
|
267
|
+
slotLockedAt?: string | null | undefined;
|
|
268
|
+
customerRemarks?: string | null | undefined;
|
|
269
|
+
}, {
|
|
270
|
+
pax?: number | undefined;
|
|
271
|
+
userName?: string | null | undefined;
|
|
272
|
+
startDate?: string | undefined;
|
|
273
|
+
guestPreferences?: {
|
|
274
|
+
name: string;
|
|
275
|
+
value: string | string[];
|
|
276
|
+
}[] | null | undefined;
|
|
277
|
+
rangeId?: string | undefined;
|
|
278
|
+
userPhone?: string | null | undefined;
|
|
279
|
+
userEmail?: string | null | undefined;
|
|
280
|
+
slotNumber?: string | null | undefined;
|
|
281
|
+
slotLockedAt?: string | null | undefined;
|
|
282
|
+
customerRemarks?: string | null | undefined;
|
|
283
|
+
}>;
|
|
284
|
+
export type UpdateReservationPOSDto = z.infer<typeof UpdateReservationPOSDto>;
|
|
285
|
+
/** DTO for creating a reservation from POS. Tier and end time are server-derived. */
|
|
286
|
+
export declare const CreateReservationPOSDto: z.ZodObject<{
|
|
287
|
+
rangeId: z.ZodString;
|
|
288
|
+
/** A slot start from `GET /pos/reservation/availability` */
|
|
289
|
+
startDate: z.ZodEffects<z.ZodString, string, string>;
|
|
290
|
+
pax: z.ZodNumber;
|
|
291
|
+
/** Logged-in POS employee name, recorded as createdBy/confirmedBy */
|
|
292
|
+
createdBy: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
293
|
+
userName: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
294
|
+
userPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
295
|
+
userEmail: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
296
|
+
customerRemarks: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
297
|
+
slotNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
298
|
+
slotLockedAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
299
|
+
/** Guest preferences - customer's selections from range preferences */
|
|
300
|
+
guestPreferences: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
301
|
+
name: z.ZodString;
|
|
302
|
+
value: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
303
|
+
}, "strip", z.ZodTypeAny, {
|
|
304
|
+
name: string;
|
|
305
|
+
value: string | string[];
|
|
306
|
+
}, {
|
|
307
|
+
name: string;
|
|
308
|
+
value: string | string[];
|
|
309
|
+
}>, "many">>>;
|
|
310
|
+
}, "strip", z.ZodTypeAny, {
|
|
311
|
+
createdBy?: string | null | undefined;
|
|
312
|
+
userName?: string | null | undefined;
|
|
313
|
+
guestPreferences?: {
|
|
314
|
+
name: string;
|
|
315
|
+
value: string | string[];
|
|
316
|
+
}[] | null | undefined;
|
|
317
|
+
userPhone?: string | null | undefined;
|
|
318
|
+
userEmail?: string | null | undefined;
|
|
319
|
+
slotNumber?: string | null | undefined;
|
|
320
|
+
slotLockedAt?: string | null | undefined;
|
|
321
|
+
customerRemarks?: string | null | undefined;
|
|
322
|
+
pax: number;
|
|
323
|
+
startDate: string;
|
|
324
|
+
rangeId: string;
|
|
325
|
+
}, {
|
|
326
|
+
createdBy?: string | null | undefined;
|
|
327
|
+
userName?: string | null | undefined;
|
|
328
|
+
guestPreferences?: {
|
|
329
|
+
name: string;
|
|
330
|
+
value: string | string[];
|
|
331
|
+
}[] | null | undefined;
|
|
332
|
+
userPhone?: string | null | undefined;
|
|
333
|
+
userEmail?: string | null | undefined;
|
|
334
|
+
slotNumber?: string | null | undefined;
|
|
335
|
+
slotLockedAt?: string | null | undefined;
|
|
336
|
+
customerRemarks?: string | null | undefined;
|
|
337
|
+
pax: number;
|
|
338
|
+
startDate: string;
|
|
339
|
+
rangeId: string;
|
|
340
|
+
}>;
|
|
341
|
+
export type CreateReservationPOSDto = z.infer<typeof CreateReservationPOSDto>;
|
|
342
|
+
/** Body of the POS status actions (cancel, no-show, start ordering, seat confirm). */
|
|
343
|
+
export declare const ReservationPOSActionDto: z.ZodObject<{
|
|
344
|
+
/** Logged-in POS employee name, recorded on the matching `…By` field */
|
|
345
|
+
by: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
346
|
+
}, "strip", z.ZodTypeAny, {
|
|
347
|
+
by?: string | null | undefined;
|
|
348
|
+
}, {
|
|
349
|
+
by?: string | null | undefined;
|
|
350
|
+
}>;
|
|
351
|
+
export type ReservationPOSActionDto = z.infer<typeof ReservationPOSActionDto>;
|
|
352
|
+
/** Body of `POST /pos/reservation/:id/remarks`. */
|
|
353
|
+
export declare const CreateReservationRemarkPOSDto: z.ZodObject<{
|
|
354
|
+
text: z.ZodString;
|
|
355
|
+
/** Logged-in POS employee name */
|
|
356
|
+
authorName: z.ZodString;
|
|
357
|
+
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
text: string;
|
|
359
|
+
authorName: string;
|
|
360
|
+
}, {
|
|
361
|
+
text: string;
|
|
362
|
+
authorName: string;
|
|
363
|
+
}>;
|
|
364
|
+
export type CreateReservationRemarkPOSDto = z.infer<typeof CreateReservationRemarkPOSDto>;
|
|
365
|
+
export declare const ReservationAvailabilitySlotDto: z.ZodObject<{
|
|
366
|
+
status: z.ZodEnum<["AVAILABLE", "FULL"]>;
|
|
367
|
+
/** The capacity tier ID - the actual inventory unit to book */
|
|
368
|
+
capacityTierId: z.ZodOptional<z.ZodString>;
|
|
369
|
+
/** The range ID - the zone/area this slot belongs to */
|
|
370
|
+
rangeId: z.ZodOptional<z.ZodString>;
|
|
371
|
+
/** The exact ISO start time the frontend should send back to create the booking */
|
|
372
|
+
isoStart: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
373
|
+
/** The exact ISO end time (Calculated: start + duration) */
|
|
374
|
+
isoEnd: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
375
|
+
/** Helpful metadata for the UI (e.g., "120 mins") */
|
|
376
|
+
durationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
377
|
+
/** The name of the range (e.g., "VIP Room") - useful for debugging or UI labels */
|
|
378
|
+
label: z.ZodOptional<z.ZodString>;
|
|
379
|
+
}, "strip", z.ZodTypeAny, {
|
|
380
|
+
label?: string | undefined;
|
|
381
|
+
capacityTierId?: string | undefined;
|
|
382
|
+
rangeId?: string | undefined;
|
|
383
|
+
isoStart?: string | undefined;
|
|
384
|
+
isoEnd?: string | undefined;
|
|
385
|
+
durationMinutes?: number | undefined;
|
|
386
|
+
status: "AVAILABLE" | "FULL";
|
|
387
|
+
}, {
|
|
388
|
+
label?: string | undefined;
|
|
389
|
+
capacityTierId?: string | undefined;
|
|
390
|
+
rangeId?: string | undefined;
|
|
391
|
+
isoStart?: string | undefined;
|
|
392
|
+
isoEnd?: string | undefined;
|
|
393
|
+
durationMinutes?: number | undefined;
|
|
394
|
+
status: "AVAILABLE" | "FULL";
|
|
395
|
+
}>;
|
|
396
|
+
export type ReservationAvailabilitySlotDto = z.infer<typeof ReservationAvailabilitySlotDto>;
|
|
397
|
+
export declare const ReservationAvailabilityResponseDto: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
398
|
+
status: z.ZodEnum<["AVAILABLE", "FULL"]>;
|
|
399
|
+
/** The capacity tier ID - the actual inventory unit to book */
|
|
400
|
+
capacityTierId: z.ZodOptional<z.ZodString>;
|
|
401
|
+
/** The range ID - the zone/area this slot belongs to */
|
|
402
|
+
rangeId: z.ZodOptional<z.ZodString>;
|
|
403
|
+
/** The exact ISO start time the frontend should send back to create the booking */
|
|
404
|
+
isoStart: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
405
|
+
/** The exact ISO end time (Calculated: start + duration) */
|
|
406
|
+
isoEnd: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
407
|
+
/** Helpful metadata for the UI (e.g., "120 mins") */
|
|
408
|
+
durationMinutes: z.ZodOptional<z.ZodNumber>;
|
|
409
|
+
/** The name of the range (e.g., "VIP Room") - useful for debugging or UI labels */
|
|
410
|
+
label: z.ZodOptional<z.ZodString>;
|
|
411
|
+
}, "strip", z.ZodTypeAny, {
|
|
412
|
+
label?: string | undefined;
|
|
413
|
+
capacityTierId?: string | undefined;
|
|
414
|
+
rangeId?: string | undefined;
|
|
415
|
+
isoStart?: string | undefined;
|
|
416
|
+
isoEnd?: string | undefined;
|
|
417
|
+
durationMinutes?: number | undefined;
|
|
418
|
+
status: "AVAILABLE" | "FULL";
|
|
419
|
+
}, {
|
|
420
|
+
label?: string | undefined;
|
|
421
|
+
capacityTierId?: string | undefined;
|
|
422
|
+
rangeId?: string | undefined;
|
|
423
|
+
isoStart?: string | undefined;
|
|
424
|
+
isoEnd?: string | undefined;
|
|
425
|
+
durationMinutes?: number | undefined;
|
|
426
|
+
status: "AVAILABLE" | "FULL";
|
|
427
|
+
}>>;
|
|
428
|
+
export type ReservationAvailabilityResponseDto = z.infer<typeof ReservationAvailabilityResponseDto>;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Duration unit type for lead time and booking duration
|
|
3
|
+
*/
|
|
4
|
+
export type DurationUnit = 'minute' | 'hour' | 'day';
|
|
5
|
+
/**
|
|
6
|
+
* Duration object with value and unit
|
|
7
|
+
*/
|
|
8
|
+
export interface Duration {
|
|
9
|
+
value: number;
|
|
10
|
+
unit: DurationUnit;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Time range with start and end in HH:mm format
|
|
14
|
+
*/
|
|
15
|
+
export interface TimeRange {
|
|
16
|
+
start: string;
|
|
17
|
+
end: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Operating hours for a day
|
|
21
|
+
*/
|
|
22
|
+
export interface DayOperatingHours {
|
|
23
|
+
enable: boolean;
|
|
24
|
+
hours: TimeRange[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Time slot with availability status
|
|
28
|
+
*/
|
|
29
|
+
export interface TimeSlot {
|
|
30
|
+
time: string;
|
|
31
|
+
available: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Converts a duration to minutes for comparison
|
|
35
|
+
* @param duration - Duration object with value and unit
|
|
36
|
+
* @returns Total minutes
|
|
37
|
+
*/
|
|
38
|
+
export declare function convertDurationToMinutes(duration: Duration): number;
|
|
39
|
+
/**
|
|
40
|
+
* Validates that maxLeadDuration > minLeadDuration
|
|
41
|
+
* @param minLead - Minimum lead time duration
|
|
42
|
+
* @param maxLead - Maximum lead time duration
|
|
43
|
+
* @returns True if valid, false otherwise
|
|
44
|
+
*/
|
|
45
|
+
export declare function validateLeadDuration(minLead: Duration, maxLead: Duration): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Checks if two time ranges overlap
|
|
48
|
+
* @param range1 - First time range
|
|
49
|
+
* @param range2 - Second time range
|
|
50
|
+
* @returns True if ranges overlap, false otherwise
|
|
51
|
+
*/
|
|
52
|
+
export declare function validateTimeRangeOverlap(range1: TimeRange, range2: TimeRange): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Validates that a time range spans a positive duration.
|
|
55
|
+
* @param timeRange - Time range to validate
|
|
56
|
+
* @returns True if valid, false otherwise
|
|
57
|
+
*/
|
|
58
|
+
export declare function validateSameDayTimeRange(timeRange: TimeRange): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Generates time slots for a given time window based on slot interval and booking duration
|
|
61
|
+
*
|
|
62
|
+
* IMPORTANT: This function ensures that bookings fit within operating hours.
|
|
63
|
+
* A slot is only generated if: slotStart + bookingDuration <= windowEnd
|
|
64
|
+
*
|
|
65
|
+
* Example: If window is 17:00-22:00, slotInterval=30min, bookingDuration=90min:
|
|
66
|
+
* - 17:00 ✓ (ends at 18:30)
|
|
67
|
+
* - 17:30 ✓ (ends at 19:00)
|
|
68
|
+
* - ...
|
|
69
|
+
* - 20:30 ✓ (ends at 22:00)
|
|
70
|
+
* - 21:00 ✗ (would end at 22:30, exceeds window)
|
|
71
|
+
*
|
|
72
|
+
* @param windowStart - Start time of the window in HH:mm format
|
|
73
|
+
* @param windowEnd - End time of the window in HH:mm format
|
|
74
|
+
* @param slotInterval - Interval between slots in minutes (e.g., 30)
|
|
75
|
+
* @param bookingDuration - Duration of each booking in minutes (e.g., 60)
|
|
76
|
+
* @returns Array of time slots in HH:mm format
|
|
77
|
+
*/
|
|
78
|
+
export declare function generateTimeSlots(windowStart: string, windowEnd: string, slotInterval: number, bookingDuration: number): string[];
|
|
79
|
+
/**
|
|
80
|
+
* Generates all time slots for a day based on operating hours configuration
|
|
81
|
+
* @param operatingHours - Operating hours configuration for the day
|
|
82
|
+
* @param slotInterval - Interval between slots in minutes
|
|
83
|
+
* @param bookingDuration - Duration of each booking in minutes
|
|
84
|
+
* @returns Array of all available time slots in HH:mm format
|
|
85
|
+
*/
|
|
86
|
+
export declare function generateDayTimeSlots(operatingHours: DayOperatingHours, slotInterval: number, bookingDuration: number): string[];
|
|
87
|
+
/**
|
|
88
|
+
* Categorizes time slots into morning, afternoon, and evening
|
|
89
|
+
* @param slots - Array of time slots in HH:mm format
|
|
90
|
+
* @returns Object with categorized slots
|
|
91
|
+
*/
|
|
92
|
+
export declare function categorizeTimeSlots(slots: string[]): {
|
|
93
|
+
morning: string[];
|
|
94
|
+
afternoon: string[];
|
|
95
|
+
evening: string[];
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Categorizes time slots with status into morning, afternoon, and evening
|
|
99
|
+
* @param slots - Array of time slots with availability status
|
|
100
|
+
* @returns Object with categorized slots
|
|
101
|
+
*/
|
|
102
|
+
export declare function categorizeTimeSlotsWithStatus(slots: TimeSlot[]): {
|
|
103
|
+
morning: TimeSlot[];
|
|
104
|
+
afternoon: TimeSlot[];
|
|
105
|
+
evening: TimeSlot[];
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Checks if a time slot falls within any of the operating hour windows
|
|
109
|
+
* @param slotTime - Time in HH:mm format
|
|
110
|
+
* @param operatingHours - Operating hours configuration
|
|
111
|
+
* @returns True if slot is within operating hours, false otherwise
|
|
112
|
+
*/
|
|
113
|
+
export declare function isSlotWithinOperatingHours(slotTime: string, operatingHours: TimeRange[]): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Generates all time slots for the entire day (00:00 - 23:59) with availability status
|
|
116
|
+
*
|
|
117
|
+
* This function generates slots for the full 24-hour period, marking each slot as:
|
|
118
|
+
* - available: true = within operating hours AND booking fits
|
|
119
|
+
* - available: false = outside operating hours OR booking doesn't fit
|
|
120
|
+
*
|
|
121
|
+
* Example: Operating hours 09:00-12:00, 15:00-21:00, slotInterval=30min, bookingDuration=60min
|
|
122
|
+
* - 08:30 ✗ (unavailable - before operating hours)
|
|
123
|
+
* - 09:00 ✓ (available)
|
|
124
|
+
* - 09:30 ✓ (available)
|
|
125
|
+
* - ...
|
|
126
|
+
* - 11:00 ✓ (available - ends at 12:00)
|
|
127
|
+
* - 11:30 ✗ (unavailable - booking would extend to 12:30, beyond window)
|
|
128
|
+
* - 12:00 ✗ (unavailable - outside operating hours)
|
|
129
|
+
* - ...
|
|
130
|
+
* - 14:30 ✗ (unavailable - outside operating hours)
|
|
131
|
+
* - 15:00 ✓ (available)
|
|
132
|
+
*
|
|
133
|
+
* @param operatingHours - Operating hours configuration for the day
|
|
134
|
+
* @param slotInterval - Interval between slots in minutes
|
|
135
|
+
* @param bookingDuration - Duration of each booking in minutes
|
|
136
|
+
* @param startTime - Start time for slot generation (default: '00:00')
|
|
137
|
+
* @param endTime - End time for slot generation (default: '23:59')
|
|
138
|
+
* @returns Array of all time slots with availability status
|
|
139
|
+
*/
|
|
140
|
+
export declare function generateFullDayTimeSlots(operatingHours: DayOperatingHours, slotInterval: number, bookingDuration: number, startTime?: string, endTime?: string): TimeSlot[];
|
|
141
|
+
/**
|
|
142
|
+
* Generates day time slots with availability status (only for operating hours range)
|
|
143
|
+
*
|
|
144
|
+
* This generates slots only within the min/max operating hours range, not full 24h.
|
|
145
|
+
* Useful for compact displays that don't need to show very early/late unavailable slots.
|
|
146
|
+
*
|
|
147
|
+
* @param operatingHours - Operating hours configuration for the day
|
|
148
|
+
* @param slotInterval - Interval between slots in minutes
|
|
149
|
+
* @param bookingDuration - Duration of each booking in minutes
|
|
150
|
+
* @returns Array of time slots with availability status
|
|
151
|
+
*/
|
|
152
|
+
export declare function generateDayTimeSlotsWithStatus(operatingHours: DayOperatingHours, slotInterval: number, bookingDuration: number): TimeSlot[];
|