fix: displayWebPage zod schema * fix: displayWebPage zod schema Approved-by: Michael Zetterberg Approved-by: Erik Tiekstra Approved-by: Fredrik Thorsson
32 lines
734 B
TypeScript
32 lines
734 B
TypeScript
import { z } from "zod"
|
|
|
|
import { attributesSchema } from "@/server/routers/hotels/schemas/hotel"
|
|
|
|
import { displayWebPageSchema } from "./additionalData/displayWebPage"
|
|
|
|
export const nearbyHotelsSchema = z.object({
|
|
attributes: z.lazy(() =>
|
|
z
|
|
.object({
|
|
displayWebPage: displayWebPageSchema,
|
|
})
|
|
.merge(
|
|
attributesSchema.pick({
|
|
address: true,
|
|
cityId: true,
|
|
cityName: true,
|
|
detailedFacilities: true,
|
|
hotelContent: true,
|
|
isActive: true,
|
|
isPublished: true,
|
|
location: true,
|
|
name: true,
|
|
operaId: true,
|
|
ratings: true,
|
|
})
|
|
)
|
|
),
|
|
id: z.string(),
|
|
type: z.literal("hotels"),
|
|
})
|