Feat/SW-711 update children params * feat(SW-711): add new child params for availability * feat(SW-711): fix children schema * feat(SW-711): fix optional values * feat(SW-711): add children as parameter iff not undefined * feat(SW-711): add bedType enum * feat(SW-711): remove optional number type * feat(SW-711): fix wrong slash * feat(SW-711): remove optional Approved-by: Hrishikesh Vaipurkar
46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
import { z } from "zod"
|
|
|
|
export const getHotelInputSchema = z.object({
|
|
include: z
|
|
.array(z.enum(["RoomCategories", "NearbyHotels", "Restaurants", "City"]))
|
|
.optional(),
|
|
})
|
|
|
|
export const getHotelsAvailabilityInputSchema = z.object({
|
|
cityId: z.string(),
|
|
roomStayStartDate: z.string(),
|
|
roomStayEndDate: z.string(),
|
|
adults: z.number(),
|
|
children: z.string().optional(),
|
|
promotionCode: z.string().optional().default(""),
|
|
reservationProfileType: z.string().optional().default(""),
|
|
attachedProfileId: z.string().optional().default(""),
|
|
})
|
|
|
|
export const getRoomsAvailabilityInputSchema = z.object({
|
|
hotelId: z.number(),
|
|
roomStayStartDate: z.string(),
|
|
roomStayEndDate: z.string(),
|
|
adults: z.number(),
|
|
children: z.string().optional(),
|
|
promotionCode: z.string().optional(),
|
|
reservationProfileType: z.string().optional().default(""),
|
|
attachedProfileId: z.string().optional().default(""),
|
|
})
|
|
|
|
export const getRatesInputSchema = z.object({
|
|
hotelId: z.string(),
|
|
})
|
|
|
|
export const getlHotelDataInputSchema = z.object({
|
|
hotelId: z.string(),
|
|
language: z.string(),
|
|
include: z
|
|
.array(z.enum(["RoomCategories", "NearbyHotels", "Restaurants", "City"]))
|
|
.optional(),
|
|
})
|
|
|
|
export const getBreakfastPackageInput = z.object({
|
|
hotelId: z.string().min(1, { message: "hotelId is required" }),
|
|
})
|