feat(SW-251): set up filter route
This commit is contained in:
@@ -554,11 +554,29 @@ export const getRatesSchema = z.array(rate)
|
||||
|
||||
export type Rate = z.infer<typeof rate>
|
||||
|
||||
const hotelFilter = z.object({
|
||||
roomFacilities: z.array(z.string()),
|
||||
hotelFacilities: z.array(z.string()),
|
||||
hotelSurroundings: z.array(z.string()),
|
||||
const hotelFilterSchema = z.object({
|
||||
data: z.array(
|
||||
z.object({
|
||||
attributes: z.object({
|
||||
name: z.string(),
|
||||
operaId: z.string(),
|
||||
isPublished: z.boolean(),
|
||||
cityId: z.string(),
|
||||
cityName: z.string(),
|
||||
ratings: ratingsSchema,
|
||||
address: addressSchema,
|
||||
location: locationSchema,
|
||||
hotelContent: hotelContentSchema,
|
||||
detailedFacilities: z.array(detailedFacilitySchema),
|
||||
isActive: z.boolean(),
|
||||
}),
|
||||
id: z.string(),
|
||||
language: z.unknown(),
|
||||
hotelInformationSystemId: z.number(),
|
||||
type: z.string(),
|
||||
})
|
||||
),
|
||||
})
|
||||
|
||||
export const getFiltersSchema = hotelFilter
|
||||
export type HotelFilter = z.infer<typeof hotelFilter>
|
||||
export const getHotelFilterSchema = hotelFilterSchema
|
||||
export type HotelFilter = z.infer<typeof hotelFilterSchema>
|
||||
|
||||
Reference in New Issue
Block a user