Files
web/types/hotel.ts
Matilda Landström dda236aa82 Merged in feat/SW-1469-facility-cards (pull request #1393)
Feat(SW-1469): Add check if we should create facility cards

* fix(SW-1469): only create facility cards if supposed to


Approved-by: Erik Tiekstra
Approved-by: Fredrik Thorsson
2025-02-24 08:19:26 +00:00

74 lines
3.6 KiB
TypeScript

import type { z } from "zod"
import type { hotelSchema } from "@/server/routers/hotels/output"
import type {
extraPageSchema,
facilitySchema,
transformAdditionalData,
} from "@/server/routers/hotels/schemas/additionalData"
import type { citySchema } from "@/server/routers/hotels/schemas/city"
import type { attributesSchema } from "@/server/routers/hotels/schemas/hotel"
import type { addressSchema } from "@/server/routers/hotels/schemas/hotel/address"
import type { hotelContentSchema } from "@/server/routers/hotels/schemas/hotel/content"
import type { detailedFacilitiesSchema } from "@/server/routers/hotels/schemas/hotel/detailedFacility"
import type { checkinSchema } from "@/server/routers/hotels/schemas/hotel/facts"
import type { healthFacilitySchema } from "@/server/routers/hotels/schemas/hotel/healthFacilities"
import type { nearbyHotelsSchema } from "@/server/routers/hotels/schemas/hotel/include/nearbyHotels"
import type {
openingHoursDetailsSchema,
openingHoursSchema,
restaurantsSchema,
} from "@/server/routers/hotels/schemas/hotel/include/restaurants"
import type { transformRoomCategories } from "@/server/routers/hotels/schemas/hotel/include/roomCategories"
import type { locationSchema } from "@/server/routers/hotels/schemas/hotel/location"
import type { parkingSchema } from "@/server/routers/hotels/schemas/hotel/parking"
import type { pointOfInterestSchema } from "@/server/routers/hotels/schemas/hotel/poi"
import type { ratingsSchema } from "@/server/routers/hotels/schemas/hotel/rating"
import type { imageSchema } from "@/server/routers/hotels/schemas/image"
export type HotelData = z.output<typeof hotelSchema>
export type Amenities = z.output<typeof detailedFacilitiesSchema>
export type CheckInData = z.output<typeof checkinSchema>
type CitySchema = z.output<typeof citySchema>
export type City = Pick<CitySchema, "id" | "type"> & CitySchema["attributes"]
export type FacilityData = z.output<typeof facilitySchema>
export type Facility = FacilityData & { id: string }
export type ApiImage = z.output<typeof imageSchema>
export type HealthFacility = z.output<typeof healthFacilitySchema>
export type HealthFacilities = HealthFacility[]
export type Hotel = z.output<typeof attributesSchema>
export type HotelAddress = z.output<typeof addressSchema>
export type HotelContent = z.output<typeof hotelContentSchema>
export type HotelLocation = z.output<typeof locationSchema>
export type HotelRatings = z.output<typeof ratingsSchema>
type NearbyHotelsSchema = z.output<typeof nearbyHotelsSchema>
export type NearbyHotel = Pick<NearbyHotelsSchema, "id" | "type"> &
NearbyHotelsSchema["attributes"]
export type Parking = z.output<typeof parkingSchema>
export type PointOfInterest = z.output<typeof pointOfInterestSchema>
type RestaurantSchema = z.output<typeof restaurantsSchema>
export type Restaurant = Pick<RestaurantSchema, "id" | "type"> &
RestaurantSchema["attributes"]
export type RestaurantOpeningHours = z.output<typeof openingHoursSchema>
export type RestaurantOpeningHoursDay = z.output<
typeof openingHoursDetailsSchema
>
export type Room = ReturnType<typeof transformRoomCategories>
export type HotelMapContentProps = {
activePoi?: string | null
coordinates: { lat: number; lng: number }
onActivePoiChange?: (poiName: string | null) => void
pointsOfInterest: PointOfInterest[]
}
export type HotelTripAdvisor =
| NonNullable<HotelRatings>["tripAdvisor"]
| undefined
export type AdditionalData = ReturnType<typeof transformAdditionalData>
export type ExtraPageSchema = z.output<typeof extraPageSchema>
export type HotelDataWithUrl = HotelData & { url: string }