feat: SW-65 Working on booking widget wrapper component
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user