Files
web/types/hotel.ts
Matilda Landström 577a4ca35e Merged in feat/SW-1333-hotel-endpoint (pull request #1206)
Feat(SW-133): Add additionalData endpoint

Approved-by: Erik Tiekstra
Approved-by: Fredrik Thorsson
2025-01-27 11:39:13 +00:00

64 lines
2.1 KiB
TypeScript

import type { z } from "zod"
import type {
checkinSchema,
getHotelDataSchema,
parkingSchema,
pointOfInterestSchema,
} from "@/server/routers/hotels/output"
import type {
additionalDataSchema,
facilitySchema,
} from "@/server/routers/hotels/schemas/additionalData"
import type { imageSchema } from "@/server/routers/hotels/schemas/image"
import type {
restaurantOpeningHoursSchema,
restaurantSchema,
} from "@/server/routers/hotels/schemas/restaurants"
import type { roomSchema } from "@/server/routers/hotels/schemas/room"
export type HotelData = z.output<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"]
export type HealthFacilities =
HotelData["data"]["attributes"]["healthFacilities"]
type HotelRatings = HotelData["data"]["attributes"]["ratings"]
export type HotelTripAdvisor =
| NonNullable<HotelRatings>["tripAdvisor"]
| undefined
export type RoomData = z.infer<typeof roomSchema>
export type RestaurantData = z.output<typeof restaurantSchema>
export type RestaurantOpeningHours = z.output<
typeof restaurantOpeningHoursSchema
>
export type GalleryImage = z.infer<typeof imageSchema>
export type CheckInData = z.infer<typeof checkinSchema>
export type AdditionalData = z.infer<typeof additionalDataSchema>
export type PointOfInterest = z.output<typeof pointOfInterestSchema>
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 }
export type HotelMapContentProps = {
coordinates: { lat: number; lng: number }
pointsOfInterest: PointOfInterest[]
onActivePoiChange?: (poiName: string | null) => void
activePoi?: string | null
}