Merged in feat/sw-2862-move-booking-router-to-trpc-package (pull request #2421)

feat(SW-2861): Move booking router to trpc package

* Use direct imports from trpc package

* Add lint-staged config to trpc

* Move lang enum to common

* Restructure trpc package folder structure

* WIP first step

* update internal imports in trpc

* Fix most errors in scandic-web

Just 100 left...

* Move Props type out of trpc

* Fix CategorizedFilters types

* Move more schemas in hotel router

* Fix deps

* fix getNonContentstackUrls

* Fix import error

* Fix entry error handling

* Fix generateMetadata metrics

* Fix alertType enum

* Fix duplicated types

* lint:fix

* Merge branch 'master' into feat/sw-2863-move-contentstack-router-to-trpc-package

* Fix broken imports

* Move booking router to trpc package

* Move partners router to trpc package

* Move autocomplete router to trpc package

* Move booking router to trpc package

* Merge branch 'master' into feat/sw-2862-move-booking-router-to-trpc-package


Approved-by: Linus Flood
This commit is contained in:
Anton Gunnarsson
2025-06-26 13:21:16 +00:00
parent ded9e1278f
commit e572d9e7e9
69 changed files with 179 additions and 178 deletions

View File

@@ -1,4 +1,4 @@
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
import type { BookingConfirmation } from "@scandic-hotels/trpc/types/bookingConfirmation"
export interface ManageBookingProps
extends Pick<BookingConfirmation, "booking"> {}

View File

@@ -1,8 +1,8 @@
import type { Room } from "@scandic-hotels/trpc/types/hotel"
import type {
BookingConfirmation,
BookingConfirmationSchema,
} from "@/types/trpc/routers/booking/confirmation"
} from "@scandic-hotels/trpc/types/bookingConfirmation"
import type { Room } from "@scandic-hotels/trpc/types/hotel"
export interface BookingConfirmationProps {
refId: string

View File

@@ -1,7 +1,6 @@
import type { BookingConfirmation } from "@scandic-hotels/trpc/types/bookingConfirmation"
import type { MutableRefObject } from "react"
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
export interface BookingConfirmationHeaderProps
extends Pick<BookingConfirmation, "booking" | "hotel"> {
mainRef: MutableRefObject<HTMLElement | null>

View File

@@ -1,4 +1,4 @@
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
import type { BookingConfirmation } from "@scandic-hotels/trpc/types/bookingConfirmation"
export interface BookingConfirmationHotelDetailsProps {
hotel: BookingConfirmation["hotel"]

View File

@@ -1,3 +1,3 @@
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
import type { BookingConfirmation } from "@scandic-hotels/trpc/types/bookingConfirmation"
export interface PromosProps extends Pick<BookingConfirmation, "booking"> {}

View File

@@ -1,5 +1,5 @@
import type { BookingConfirmation } from "@scandic-hotels/trpc/types/bookingConfirmation"
import type { Room } from "@scandic-hotels/trpc/types/hotel"
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
export interface BookingConfirmationRoomsProps
extends Pick<BookingConfirmation, "booking"> {

View File

@@ -1,4 +1,4 @@
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
import type { BookingConfirmation } from "@scandic-hotels/trpc/types/bookingConfirmation"
export interface RoomProps {
booking: BookingConfirmation["booking"]

View File

@@ -1,5 +1,6 @@
import type { BookingConfirmation } from "@scandic-hotels/trpc/types/bookingConfirmation"
import type { Room } from "@scandic-hotels/trpc/types/hotel"
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
import type { Ancillaries } from "../../myPages/myStay/ancillaries"
export interface SpecificationProps {

View File

@@ -3,7 +3,6 @@ import type { VariantProps } from "class-variance-authority"
import type { PropGetters } from "downshift"
import type { dialogVariants } from "@/components/Forms/BookingWidget/FormContent/Search/SearchList/Dialog/variants"
// import type { AutoCompleteLocation } from "@/server/routers/autocomplete/schema"
export interface SearchProps {
handlePressEnter: () => void

View File

@@ -1,11 +1,10 @@
import type { CurrencyEnum } from "@scandic-hotels/common/constants/currency"
import type { ChildBedTypeEnum } from "@scandic-hotels/trpc/enums/childBedTypeEnum"
import type { RoomCategories } from "@scandic-hotels/trpc/types/hotel"
import type {
BookingConfirmation,
PackageSchema,
} from "../trpc/routers/booking/confirmation"
} from "@scandic-hotels/trpc/types/bookingConfirmation"
import type { RoomCategories } from "@scandic-hotels/trpc/types/hotel"
export interface ChildBedPreference {
quantity: number

View File

@@ -1,3 +1,4 @@
import type { BookingConfirmation } from "@scandic-hotels/trpc/types/bookingConfirmation"
import type { Child } from "@scandic-hotels/trpc/types/child"
import type {
Hotel,
@@ -12,7 +13,6 @@ import type { BedTypeSchema } from "@/types/components/hotelReservation/enterDet
import type { RoomPrice } from "@/types/components/hotelReservation/enterDetails/details"
import type { PriceTypeEnum } from "@/types/components/hotelReservation/myStay/myStay"
import type { Packages } from "@/types/components/myPages/myStay/ancillaries"
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
export type Room = Omit<
BookingConfirmation["booking"],

View File

@@ -1,21 +0,0 @@
import type { HotelData, Room } from "@scandic-hotels/trpc/types/hotel"
import type { z } from "zod"
import type {
bookingConfirmationSchema,
packageSchema,
} from "@/server/routers/booking/output"
export interface BookingConfirmationSchema
extends z.output<typeof bookingConfirmationSchema> {}
export interface PackageSchema extends z.output<typeof packageSchema> {}
export interface BookingConfirmation extends HotelData {
booking: BookingConfirmationSchema
room:
| (Room & {
bedType: Room["roomTypes"][number]
})
| null
}