feat(SW-251): filter request

This commit is contained in:
Fredrik Thorsson
2024-09-04 15:57:32 +02:00
parent 3f6e2ca06e
commit 6089af764a
6 changed files with 28 additions and 35 deletions

View File

@@ -145,7 +145,7 @@ const hotelContentSchema = z.object({
restaurantsOverviewPageLinkText: z.string(),
restaurantsOverviewPageLink: z.string(),
restaurantsContentDescriptionShort: z.string(),
restaurantsContentDescriptionMedium: z.string(),
restaurantsContentDescriptionMedium: z.string().optional(),
}),
})
@@ -551,7 +551,6 @@ const rate = z.object({
})
export const getRatesSchema = z.array(rate)
export type Rate = z.infer<typeof rate>
const hotelFilterSchema = z.object({
@@ -566,7 +565,7 @@ const hotelFilterSchema = z.object({
ratings: ratingsSchema,
address: addressSchema,
location: locationSchema,
hotelContent: hotelContentSchema,
hotelContent: hotelContentSchema.optional(),
detailedFacilities: z.array(detailedFacilitySchema),
isActive: z.boolean(),
}),
@@ -580,3 +579,6 @@ const hotelFilterSchema = z.object({
export const getHotelFilterSchema = hotelFilterSchema
export type HotelFilter = z.infer<typeof hotelFilterSchema>
export type HotelId = HotelFilter["data"][number]["id"]
export type HotelFilters =
HotelFilter["data"][number]["attributes"]["detailedFacilities"]