Feat/SW-1521 image gallery lightbox * feat(SW-1453): added city listing component * feat(SW-1521): added more generic types to ImageGallery and Lightbox components * feat(SW-1521): added lightbox functionality for top images * feat(SW-1521): added support for setting activeIndex on open inside Lightbox Approved-by: Fredrik Thorsson Approved-by: Chuma Mcphoy (We Ahead)
71 lines
3.5 KiB
TypeScript
71 lines
3.5 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 Facility = z.output<typeof facilitySchema> & { 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>
|