Merged in feat/sw-2861-move-autocomplete-router-to-trpc-package (pull request #2417)
feat(SW-2861): Move autocomplete router to trpc package * Apply lint rules * 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 * Merge branch 'master' into feat/sw-2861-move-autocomplete-router-to-trpc-package Approved-by: Linus Flood
This commit is contained in:
@@ -2,6 +2,24 @@ import { Lang } from "@scandic-hotels/common/constants/language"
|
||||
import { getCacheClient } from "@scandic-hotels/common/dataCache"
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import { createCounter } from "@scandic-hotels/common/telemetry"
|
||||
|
||||
import { env } from "../../../env/server"
|
||||
import { router } from "../.."
|
||||
import * as api from "../../api"
|
||||
import { REDEMPTION } from "../../constants/booking"
|
||||
import { BreakfastPackageEnum } from "../../enums/breakfast"
|
||||
import { RateEnum } from "../../enums/rate"
|
||||
import { RateTypeEnum } from "../../enums/rateType"
|
||||
import { AvailabilityEnum } from "../../enums/selectHotel"
|
||||
import { badRequestError, unauthorizedError } from "../../errors"
|
||||
import {
|
||||
contentStackBaseWithServiceProcedure,
|
||||
publicProcedure,
|
||||
safeProtectedServiceProcedure,
|
||||
serviceProcedure,
|
||||
} from "../../procedures"
|
||||
import { getCityPageUrls } from "../../routers/contentstack/destinationCityPage/utils"
|
||||
import { getHotelPageUrls } from "../../routers/contentstack/hotelPage/utils"
|
||||
import {
|
||||
ancillaryPackageInputSchema,
|
||||
breakfastPackageInputSchema,
|
||||
@@ -23,46 +41,30 @@ import {
|
||||
roomPackagesInputSchema,
|
||||
selectRateRoomAvailabilityInputSchema,
|
||||
selectRateRoomsAvailabilityInputSchema,
|
||||
} from "@scandic-hotels/trpc/routers/hotels/input"
|
||||
} from "../../routers/hotels/input"
|
||||
import {
|
||||
ancillaryPackagesSchema,
|
||||
breakfastPackagesSchema,
|
||||
getNearbyHotelIdsSchema,
|
||||
} from "@scandic-hotels/trpc/routers/hotels/output"
|
||||
import { additionalDataSchema } from "@scandic-hotels/trpc/routers/hotels/schemas/hotel/include/additionalData"
|
||||
|
||||
import { env } from "../../../env/server"
|
||||
import { router } from "../.."
|
||||
import * as api from "../../api"
|
||||
import { REDEMPTION } from "../../constants/booking"
|
||||
import { BreakfastPackageEnum } from "../../enums/breakfast"
|
||||
import { RateEnum } from "../../enums/rate"
|
||||
import { RateTypeEnum } from "../../enums/rateType"
|
||||
import { AvailabilityEnum } from "../../enums/selectHotel"
|
||||
import { badRequestError, unauthorizedError } from "../../errors"
|
||||
import {
|
||||
contentStackBaseWithServiceProcedure,
|
||||
publicProcedure,
|
||||
safeProtectedServiceProcedure,
|
||||
serviceProcedure,
|
||||
} from "../../procedures"
|
||||
import { getCityPageUrls } from "../../routers/contentstack/destinationCityPage/utils"
|
||||
import { getHotelPageUrls } from "../../routers/contentstack/hotelPage/utils"
|
||||
} from "../../routers/hotels/output"
|
||||
import { additionalDataSchema } from "../../routers/hotels/schemas/hotel/include/additionalData"
|
||||
import { toApiLang } from "../../utils"
|
||||
import { getVerifiedUser } from "../user/utils"
|
||||
import { meetingRoomsSchema } from "./schemas/meetingRoom"
|
||||
import {
|
||||
getBedTypes,
|
||||
getCitiesByCountry,
|
||||
getCountries,
|
||||
getHotel,
|
||||
getHotelIdsByCityId,
|
||||
getHotelIdsByCityIdentifier,
|
||||
getHotelIdsByCountry,
|
||||
getHotelsAvailabilityByCity,
|
||||
getHotelsAvailabilityByHotelIds,
|
||||
getHotelsByHotelIds,
|
||||
getLocations,
|
||||
} from "./utils"
|
||||
import {
|
||||
getBedTypes,
|
||||
getHotelsAvailabilityByCity,
|
||||
getHotelsAvailabilityByHotelIds,
|
||||
getPackages,
|
||||
getRoomsAvailability,
|
||||
getSelectedRoomAvailability,
|
||||
|
||||
Reference in New Issue
Block a user