feat: update getHotel to use real hotel api endpoint, support for service tokens, type modifications
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { getHotelDataSchema,RoomSchema } from "@/server/routers/hotels/output"
|
||||
import { getHotelDataSchema, 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 =
|
||||
HotelData["data"]["attributes"]["ratings"]["tripAdvisor"]
|
||||
| NonNullable<HotelRatings>["tripAdvisor"]
|
||||
| undefined
|
||||
|
||||
export type RoomData = z.infer<typeof RoomSchema>
|
||||
|
||||
Reference in New Issue
Block a user