Files
web/types/hotel.ts
2024-09-18 15:22:31 +02:00

24 lines
731 B
TypeScript

import { z } from "zod"
import {
getHotelDataSchema,
pointOfInterestSchema,
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>
export type PointOfInterest = z.output<typeof pointOfInterestSchema>
export type PointOfInterestCategory = PointOfInterest["category"]