Files
web/types/hotel.ts
2024-09-04 09:44:03 +02:00

21 lines
595 B
TypeScript

import { z } from "zod"
import {
getAvailabilitySchema,
getHotelDataSchema,
roomSchema,
} from "@/server/routers/hotels/output"
export type HotelData = z.infer<typeof getHotelDataSchema>
export type Hotel = HotelData["data"]["attributes"]
export type HotelAddress = HotelData["data"]["attributes"]["address"]
export type HotelLocation = HotelData["data"]["attributes"]["location"]
type HotelRatings = HotelData["data"]["attributes"]["ratings"]
export type HotelTripAdvisor =
| NonNullable<HotelRatings>["tripAdvisor"]
| undefined
export type RoomData = z.infer<typeof roomSchema>