Files
web/types/hotel.ts
2024-10-11 12:15:11 +02:00

59 lines
1.7 KiB
TypeScript

import { z } from "zod"
import {
facilitySchema,
getHotelDataSchema,
parkingSchema,
pointOfInterestSchema,
} from "@/server/routers/hotels/output"
import { roomSchema } from "@/server/routers/hotels/schemas/room"
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"]
export type Amenities = HotelData["data"]["attributes"]["detailedFacilities"]
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 enum PointOfInterestCategoryNameEnum {
AIRPORT = "Airport",
AMUSEMENT_PARK = "Amusement park",
BUS_TERMINAL = "Bus terminal",
FAIR = "Fair",
HOSPITAL = "Hospital",
HOTEL = "Hotel",
MARKETING_CITY = "Marketing city",
MUSEUM = "Museum",
NEARBY_COMPANIES = "Nearby companies",
PARKING_GARAGE = "Parking / Garage",
RESTAURANT = "Restaurant",
SHOPPING = "Shopping",
SPORTS = "Sports",
THEATRE = "Theatre",
TOURIST = "Tourist",
TRANSPORTATIONS = "Transportations",
ZOO = "Zoo",
}
export enum PointOfInterestGroupEnum {
PUBLIC_TRANSPORT = "Public transport",
ATTRACTIONS = "Attractions",
BUSINESS = "Business",
LOCATION = "Location",
PARKING = "Parking",
SHOPPING_DINING = "Shopping & Dining",
}
export type ParkingData = z.infer<typeof parkingSchema>
export type Facility = z.infer<typeof facilitySchema> & { id: string }