Merge branch 'develop'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { CardsGrid } from "@/types/trpc/routers/contentstack/blocks"
|
||||
import type { CardsGrid } from "@/types/trpc/routers/contentstack/blocks"
|
||||
|
||||
export interface CardsGridProps extends Pick<CardsGrid, "cards_grid"> {
|
||||
firstItem?: boolean
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
import type { Block as AccountPageBlock } from "@/types/trpc/routers/contentstack/accountPage"
|
||||
import type { Block as CollectionPageBlock } from "@/types/trpc/routers/contentstack/collectionPage"
|
||||
import type { Block as ContentPageBlock } from "@/types/trpc/routers/contentstack/contentPage"
|
||||
import type { Block as LoyaltyPageBlock } from "@/types/trpc/routers/contentstack/loyaltyPage"
|
||||
|
||||
export type Blocks = AccountPageBlock | ContentPageBlock | LoyaltyPageBlock
|
||||
export type Blocks =
|
||||
| AccountPageBlock
|
||||
| CollectionPageBlock
|
||||
| ContentPageBlock
|
||||
| LoyaltyPageBlock
|
||||
|
||||
export interface BlocksProps {
|
||||
blocks: Blocks[]
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { detailsSchema } from "@/components/HotelReservation/EnterDetails/Details/schema"
|
||||
|
||||
import type { SafeUser } from "@/types/user"
|
||||
|
||||
export type DetailsSchema = z.output<typeof detailsSchema>
|
||||
|
||||
export interface DetailsProps {
|
||||
user: SafeUser
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
export enum StepEnum {
|
||||
selectBed = "select-bed",
|
||||
breakfast = "breakfast",
|
||||
details = "details",
|
||||
payment = "payment",
|
||||
}
|
||||
@@ -14,7 +14,6 @@ export interface BookingWidgetFormProps {
|
||||
export interface BookingWidgetFormContentProps {
|
||||
locations: Locations
|
||||
formId: string
|
||||
formState: FormState<BookingWidgetSchema>
|
||||
}
|
||||
|
||||
export enum ActionType {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import type { Coordinates } from "@/types/components/maps/coordinates"
|
||||
import type { PointOfInterest } from "@/types/hotel"
|
||||
|
||||
export interface MapWithCardWrapperProps {
|
||||
coordinates: Coordinates
|
||||
hotelName: string
|
||||
topThreePois: PointOfInterest[]
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
import type { RoomData } from "@/types/hotel"
|
||||
|
||||
export interface RoomCardProps {
|
||||
id: string
|
||||
images: RoomData["images"]
|
||||
title: string
|
||||
subtitle: string
|
||||
badgeTextTransKey: string | null
|
||||
hotelId: string
|
||||
room: RoomData
|
||||
}
|
||||
|
||||
export type RoomsProps = {
|
||||
hotelId: string
|
||||
rooms: RoomData[]
|
||||
}
|
||||
|
||||
+12
@@ -2,4 +2,16 @@ import { z } from "zod"
|
||||
|
||||
import { bedTypeSchema } from "@/components/HotelReservation/EnterDetails/BedType/schema"
|
||||
|
||||
export type BedType = {
|
||||
description: string
|
||||
size: {
|
||||
min: number
|
||||
max: number
|
||||
}
|
||||
value: string
|
||||
}
|
||||
export type BedTypeProps = {
|
||||
bedTypes: BedType[]
|
||||
}
|
||||
|
||||
export interface BedTypeSchema extends z.output<typeof bedTypeSchema> {}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { BedTypeEnum } from "../../bookingWidget/enums"
|
||||
|
||||
interface Child {
|
||||
bed: BedTypeEnum
|
||||
age: number
|
||||
}
|
||||
|
||||
interface Room {
|
||||
adults: number
|
||||
roomtype?: string
|
||||
ratecode?: string
|
||||
child?: Child[]
|
||||
}
|
||||
export interface BookingData {
|
||||
hotel: string
|
||||
fromDate: string
|
||||
toDate: string
|
||||
room: Room[]
|
||||
}
|
||||
|
||||
type Price = {
|
||||
price?: string
|
||||
currency?: string
|
||||
}
|
||||
|
||||
export type RoomsData = {
|
||||
roomType: string
|
||||
localPrice: Price
|
||||
euroPrice: Price
|
||||
adults: number
|
||||
children?: Child[]
|
||||
cancellationText: string
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { guestDetailsSchema } from "@/components/HotelReservation/EnterDetails/Details/schema"
|
||||
|
||||
import type { SafeUser } from "@/types/user"
|
||||
|
||||
export type DetailsSchema = z.output<typeof guestDetailsSchema>
|
||||
|
||||
export interface DetailsProps {
|
||||
user: SafeUser
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export enum StepEnum {
|
||||
selectBed = "select-bed",
|
||||
breakfast = "breakfast",
|
||||
details = "details",
|
||||
payment = "payment",
|
||||
}
|
||||
|
||||
export const StepStoreKeys: Record<StepEnum, "bedType" | "breakfast" | null> = {
|
||||
"select-bed": "bedType",
|
||||
breakfast: "breakfast",
|
||||
details: null,
|
||||
payment: null,
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import { StepEnum } from "./step"
|
||||
|
||||
export type EnterDetailsProviderProps = { step: StepEnum; isMember: boolean }
|
||||
@@ -0,0 +1,8 @@
|
||||
import { SidePeekEnum } from "@/types/components/hotelReservation/sidePeek"
|
||||
import { Hotel } from "@/types/hotel"
|
||||
|
||||
export type HotelSidePeekProps = {
|
||||
hotel: Hotel
|
||||
activeSidePeek: SidePeekEnum
|
||||
close: () => void
|
||||
}
|
||||
@@ -12,4 +12,5 @@ export interface SelectHotelMapProps {
|
||||
coordinates: Coordinates
|
||||
pointsOfInterest: PointOfInterest[]
|
||||
mapId: string
|
||||
isModal: boolean
|
||||
}
|
||||
|
||||
@@ -5,12 +5,6 @@ export enum AvailabilityEnum {
|
||||
NotAvailable = "NotAvailable",
|
||||
}
|
||||
|
||||
export interface DetailedAmenity {
|
||||
name: string
|
||||
heading: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export interface ReadMoreProps {
|
||||
label: string
|
||||
hotelId: string
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import {
|
||||
priceSchema,
|
||||
Product,
|
||||
productTypePriceSchema,
|
||||
RoomConfiguration,
|
||||
} from "@/server/routers/hotels/output"
|
||||
|
||||
import { RoomPackage } from "./roomFilter"
|
||||
import { Rate } from "./selectRate"
|
||||
|
||||
type ProductPrice = z.output<typeof productTypePriceSchema>
|
||||
export type RoomPriceSchema = z.output<typeof priceSchema>
|
||||
|
||||
export type FlexibilityOptionProps = {
|
||||
product: Product | undefined
|
||||
@@ -19,10 +22,12 @@ export type FlexibilityOptionProps = {
|
||||
roomType: RoomConfiguration["roomType"]
|
||||
roomTypeCode: RoomConfiguration["roomTypeCode"]
|
||||
features: RoomConfiguration["features"]
|
||||
petRoomPackage: RoomPackage | undefined
|
||||
handleSelectRate: (rate: Rate) => void
|
||||
}
|
||||
|
||||
export interface PriceListProps {
|
||||
publicPrice?: ProductPrice | Record<string, never>
|
||||
memberPrice?: ProductPrice | Record<string, never>
|
||||
petRoomPackage?: RoomPackage | undefined
|
||||
}
|
||||
|
||||
@@ -1,15 +1,35 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import {
|
||||
RateDefinition,
|
||||
RoomConfiguration,
|
||||
} from "@/server/routers/hotels/output"
|
||||
import { packagePriceSchema } from "@/server/routers/hotels/schemas/packages"
|
||||
|
||||
import { RoomPriceSchema } from "./flexibilityOption"
|
||||
import { Rate } from "./selectRate"
|
||||
|
||||
import { RoomData } from "@/types/hotel"
|
||||
import type { RoomData } from "@/types/hotel"
|
||||
import type { RoomPackageCodes, RoomPackageData } from "./roomFilter"
|
||||
|
||||
export type RoomCardProps = {
|
||||
hotelId: string
|
||||
roomConfiguration: RoomConfiguration
|
||||
rateDefinitions: RateDefinition[]
|
||||
roomCategories: RoomData[]
|
||||
selectedPackages: RoomPackageCodes[]
|
||||
packages: RoomPackageData
|
||||
handleSelectRate: (rate: Rate) => void
|
||||
}
|
||||
|
||||
type RoomPackagePriceSchema = z.output<typeof packagePriceSchema>
|
||||
|
||||
export type CalculatePricesPerNightProps = {
|
||||
publicLocalPrice: RoomPriceSchema
|
||||
memberLocalPrice: RoomPriceSchema
|
||||
publicRequestedPrice?: RoomPriceSchema
|
||||
memberRequestedPrice?: RoomPriceSchema
|
||||
petRoomLocalPrice?: RoomPackagePriceSchema
|
||||
petRoomRequestedPrice?: RoomPackagePriceSchema
|
||||
nights: number
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { getRoomPackagesSchema } from "@/server/routers/hotels/schemas/packages"
|
||||
import {
|
||||
getRoomPackagesSchema,
|
||||
packagesSchema,
|
||||
} from "@/server/routers/hotels/schemas/packages"
|
||||
|
||||
export enum RoomPackageCodeEnum {
|
||||
PET_ROOM = "PETR",
|
||||
@@ -17,3 +20,5 @@ export interface RoomPackageData
|
||||
extends z.output<typeof getRoomPackagesSchema> {}
|
||||
|
||||
export type RoomPackageCodes = RoomPackageData[number]["code"]
|
||||
|
||||
export type RoomPackage = z.output<typeof packagesSchema>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import type { RoomData } from "@/types/hotel"
|
||||
import type { SafeUser } from "@/types/user"
|
||||
import type { RoomsAvailability } from "@/server/routers/hotels/output"
|
||||
import type { RoomPackageData } from "./roomFilter"
|
||||
import type { RoomPackageCodes, RoomPackageData } from "./roomFilter"
|
||||
|
||||
export interface RoomSelectionProps {
|
||||
roomsAvailability: RoomsAvailability
|
||||
roomCategories: RoomData[]
|
||||
user: SafeUser
|
||||
packages: RoomPackageData
|
||||
selectedPackages: RoomPackageCodes[]
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import { RoomConfiguration } from "@/server/routers/hotels/output"
|
||||
|
||||
import { RoomData } from "@/types/hotel"
|
||||
|
||||
export type RoomSidePeekProps = {
|
||||
roomConfiguration: RoomConfiguration
|
||||
selectedRoom?: RoomData
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { StepEnum } from "../../enterDetails/step"
|
||||
import { StepEnum } from "../enterDetails/step"
|
||||
|
||||
export interface SectionAccordionProps {
|
||||
header: string
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
import { Product, RoomConfiguration } from "@/server/routers/hotels/output"
|
||||
|
||||
import { BedTypeEnum } from "../../bookingWidget/enums"
|
||||
|
||||
export interface Child {
|
||||
bed: string
|
||||
bed: BedTypeEnum
|
||||
age: number
|
||||
}
|
||||
|
||||
interface Room {
|
||||
adults: number
|
||||
roomcode?: string
|
||||
ratecode?: string
|
||||
roomtype: string
|
||||
ratecode: string
|
||||
counterratecode?: string
|
||||
child?: Child[]
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -2,6 +2,7 @@ import { Hotel } from "@/types/hotel"
|
||||
|
||||
export enum SidePeekEnum {
|
||||
hotelDetails = "hotel-detail-side-peek",
|
||||
roomDetails = "room-detail-side-peek",
|
||||
}
|
||||
|
||||
export type SidePeekProps = {
|
||||
@@ -0,0 +1,4 @@
|
||||
export type ToggleSidePeekProps = {
|
||||
hotelId: string
|
||||
roomTypeCode: string
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { SidePeekEnum } from "../hotelReservation/sidePeek"
|
||||
|
||||
import type { RoomData } from "@/types/hotel"
|
||||
|
||||
export type RoomSidePeekProps = {
|
||||
room: RoomData
|
||||
activeSidePeek: SidePeekEnum | null
|
||||
close: () => void
|
||||
}
|
||||
@@ -6,6 +6,7 @@ export enum TrackingChannelEnum {
|
||||
"scandic-friends" = "scandic-friends",
|
||||
"static-content-page" = "static-content-page",
|
||||
"hotelreservation" = "hotelreservation",
|
||||
"collection-page" = "collection-page",
|
||||
}
|
||||
|
||||
export type TrackingChannel = keyof typeof TrackingChannelEnum
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
export namespace CollectionPageEnum {
|
||||
export namespace ContentStack {
|
||||
export const enum blocks {
|
||||
CardsGrid = "CollectionPageBlocksCardsGrid",
|
||||
Shortcuts = "CollectionPageBlocksShortcuts",
|
||||
UspGrid = "CollectionPageBlocksUspGrid",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
export namespace ContentEnum {
|
||||
export const enum blocks {
|
||||
AccountPage = "AccountPage",
|
||||
CollectionPage = "CollectionPage",
|
||||
ContentPage = "ContentPage",
|
||||
HotelPage = "HotelPage",
|
||||
ImageContainer = "ImageContainer",
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
export enum scriptedCardThemeEnum {
|
||||
one = "one",
|
||||
two = "two",
|
||||
three = "three",
|
||||
primaryDim = "primaryDim",
|
||||
primaryDark = "primaryDark",
|
||||
primaryInverted = "primaryInverted",
|
||||
primaryStrong = "primaryStrong",
|
||||
}
|
||||
+5
-1
@@ -17,7 +17,11 @@ export type StatusParams = {
|
||||
}
|
||||
|
||||
export type ContentTypeParams = {
|
||||
contentType: "loyalty-page" | "content-page" | "hotel-page"
|
||||
contentType:
|
||||
| "loyalty-page"
|
||||
| "content-page"
|
||||
| "hotel-page"
|
||||
| "collection-page"
|
||||
}
|
||||
|
||||
export type ContentTypeWebviewParams = {
|
||||
|
||||
@@ -2,6 +2,7 @@ export enum ContentTypeEnum {
|
||||
accountPage = "account_page",
|
||||
loyaltyPage = "loyalty_page",
|
||||
hotelPage = "hotel_page",
|
||||
collectionPage = "collection_page",
|
||||
contentPage = "content_page",
|
||||
currentBlocksPage = "current_blocks_page",
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ const entryResolveSchema = z.object({
|
||||
|
||||
export const validateEntryResolveSchema = z.object({
|
||||
all_account_page: entryResolveSchema,
|
||||
all_collection_page: entryResolveSchema,
|
||||
all_content_page: entryResolveSchema,
|
||||
all_loyalty_page: entryResolveSchema,
|
||||
all_current_blocks_page: entryResolveSchema,
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { getBreakfastPackageInputSchema } from "@/server/routers/hotels/input"
|
||||
|
||||
export interface BreackfastPackagesInput
|
||||
extends z.input<typeof getBreakfastPackageInputSchema> {}
|
||||
@@ -3,5 +3,6 @@ export enum PageTypeEnum {
|
||||
loyaltyPage = "loyalty-page",
|
||||
hotelPage = "hotel-page",
|
||||
contentPage = "content-page",
|
||||
collectionPage = "collection-page",
|
||||
currentBlocksPage = "current-blocks-page",
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import {
|
||||
blocksSchema,
|
||||
collectionPageRefsSchema,
|
||||
collectionPageSchema,
|
||||
} from "@/server/routers/contentstack/collectionPage/output"
|
||||
|
||||
export interface GetCollectionPageRefsSchema
|
||||
extends z.input<typeof collectionPageRefsSchema> {}
|
||||
|
||||
export interface CollectionPageRefs
|
||||
extends z.output<typeof collectionPageRefsSchema> {}
|
||||
|
||||
export interface GetCollectionPageSchema
|
||||
extends z.input<typeof collectionPageSchema> {}
|
||||
|
||||
export interface CollectionPage extends z.output<typeof collectionPageSchema> {}
|
||||
|
||||
export type Block = z.output<typeof blocksSchema>
|
||||
@@ -11,5 +11,15 @@ export type GetSiteConfigRefData = z.infer<typeof siteConfigRefSchema>
|
||||
export type GetSiteConfigData = z.input<typeof siteConfigSchema>
|
||||
export type SiteConfig = z.output<typeof siteConfigSchema>
|
||||
|
||||
export type Alert = z.output<typeof alertSchema>
|
||||
export type SidepeekContent = Alert["sidepeekContent"]
|
||||
export type AlertOutput = z.output<typeof alertSchema>
|
||||
export type SidepeekContent = AlertOutput["sidepeekContent"]
|
||||
|
||||
export type AlertPhoneContact = {
|
||||
displayText: string
|
||||
phoneNumber?: string
|
||||
footnote?: string | null
|
||||
}
|
||||
|
||||
export type Alert = Omit<AlertOutput, "phoneContact"> & {
|
||||
phoneContact: AlertPhoneContact | null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user