feat: SW-65 Working on booking widget wrapper component

This commit is contained in:
Hrishikesh Vaipurkar
2024-07-25 16:04:35 +02:00
parent 9796ff29c5
commit 2afab6a33d
6 changed files with 175 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import { z } from "zod"
export const bookingWidgetSchema = z.object({
search: z.object({
stayType: z.string(),
stayValue: z.string(),
}),
nights: z.object({
fromDate: z.date().default(new Date()),
toDate: z.date().default(new Date(new Date().setDate(+1))),
}),
bookingCode: z.object({
value: z.string(),
}),
redemption: z.boolean().default(false),
voucher: z.boolean().default(false),
rooms: z.array(
z.object({
Adults: z.number().default(1),
Child: z.number().default(0),
})
),
})
export type BookingWidgetSchema = z.infer<typeof bookingWidgetSchema>