From f79ff9b570b224c2f275e41152c96cf52ac647f4 Mon Sep 17 00:00:00 2001 From: Anton Gunnarsson Date: Thu, 22 Jan 2026 12:34:07 +0000 Subject: [PATCH] Merged in chore/cleanup-unused (pull request #3461) chore: Cleanup unused vars, exports, types * Cleanup some unused exports * Remove more * Readd CampaignPageIncludedHotelsRef * Add alias comment to procedure exports * Remove unused exports Approved-by: Linus Flood --- apps/partner-sas/components/IntlProvider.tsx | 26 --------- .../components/LanguageSwitcher/index.tsx | 2 +- apps/partner-sas/i18n/Provider.tsx | 6 +- apps/partner-sas/server/errors/next.ts | 28 ---------- apps/partner-sas/server/utils.ts | 54 +----------------- apps/partner-sas/types/params.ts | 2 +- .../scripts/generateRedirectFile/paths.ts | 4 -- .../Points/PointsToSpendCard/utils.ts | 2 +- .../HotelSubpage/HtmlContent/utils.ts | 1 - apps/scandic-web/components/Footer/index.tsx | 2 +- .../components/Header/TopLink/index.tsx | 9 ++- .../HotelReservation/MyStay/accessBooking.ts | 6 -- .../MyPages/ProfilingConsent/README.md | 1 - apps/scandic-web/constants/routes/webviews.ts | 2 +- apps/scandic-web/constants/webHrefs.ts | 9 --- apps/scandic-web/hooks/useAncillaries.ts | 2 +- apps/scandic-web/i18n/Provider.tsx | 2 +- apps/scandic-web/services/warmup/index.ts | 2 +- .../scandic-web/services/warmup/warmupKeys.ts | 2 +- .../stores/destination-page-cities-map.ts | 2 +- .../components/maps/destinationMarkers.ts | 1 - .../types/components/myPages/membership.ts | 4 -- .../components/myPages/myStay/ancillaries.ts | 6 -- .../types/components/myPages/user.ts | 5 -- apps/scandic-web/types/params.ts | 29 ---------- apps/scandic-web/types/sitemap.ts | 9 +-- apps/scandic-web/utils/profilingConsent.ts | 7 +-- apps/scandic-web/utils/sitemap.ts | 2 +- apps/scandic-web/utils/tracking/index.ts | 5 +- apps/scandic-web/utils/webviews.ts | 2 +- .../EnterDetails/Payment/helpers.ts | 4 +- .../types/components/selectRate/selectRate.ts | 29 +--------- packages/common/dataCache/Cache.ts | 6 +- .../common/dataCache/cacheOrGetOptions.ts | 2 +- packages/common/package.json | 1 - .../lib/components/ChipButton/variants.ts | 12 ---- .../lib/components/ChipStatic/variants.ts | 2 +- .../lib/components/Form/Country/country.ts | 3 - .../lib/components/Form/Date/date.ts | 1 - .../components/Form/FormTextArea/index.tsx | 3 - .../lib/components/ImageCounter/variants.ts | 2 +- .../components/JsonToHtml/types/rte/attrs.ts | 44 +-------------- .../components/JsonToHtml/types/rte/enums.ts | 12 ---- .../components/JsonToHtml/types/rte/node.ts | 31 +--------- .../lib/components/JsonToHtml/utils.tsx | 11 ++-- .../Lightbox/Gallery/useThumbNail.ts | 4 +- .../InteractiveMap/PoiMapMarkers/index.tsx | 2 +- .../lib/components/Radio/variants.ts | 2 +- .../RateCard/Modal/motionVariants.ts | 13 ----- .../lib/components/RateCard/variants.ts | 2 +- .../lib/components/TextLink/variants.ts | 5 -- .../Fragments/Blocks/Accordion.graphql.ts | 56 +++++++++---------- .../Fragments/Blocks/HotelListing.graphql.ts | 2 +- .../Fragments/Blocks/VideoCard.graphql.ts | 8 +-- .../Sidebar/JoinLoyaltyContact.graphql.ts | 2 +- packages/trpc/lib/procedures.ts | 2 + 56 files changed, 84 insertions(+), 411 deletions(-) delete mode 100644 apps/partner-sas/components/IntlProvider.tsx diff --git a/apps/partner-sas/components/IntlProvider.tsx b/apps/partner-sas/components/IntlProvider.tsx deleted file mode 100644 index f4e6d2d76..000000000 --- a/apps/partner-sas/components/IntlProvider.tsx +++ /dev/null @@ -1,26 +0,0 @@ -"use client" - -import { type IntlConfig, IntlProvider } from "react-intl" - -import type { Lang } from "@scandic-hotels/common/constants/language" - -export type ClientIntlProviderProps = React.PropsWithChildren< - Pick & { locale: Lang } -> - -export default function ClientIntlProvider({ - children, - locale, - defaultLocale, - messages, -}: ClientIntlProviderProps) { - return ( - - {children} - - ) -} diff --git a/apps/partner-sas/components/LanguageSwitcher/index.tsx b/apps/partner-sas/components/LanguageSwitcher/index.tsx index 71ce795a4..ea3f50580 100644 --- a/apps/partner-sas/components/LanguageSwitcher/index.tsx +++ b/apps/partner-sas/components/LanguageSwitcher/index.tsx @@ -30,7 +30,7 @@ type LanguageSwitcherProps = { type?: "footer" | "header" } -export function replaceUrlPart(currentPath: string, newPart: string): string { +function replaceUrlPart(currentPath: string, newPart: string): string { const pathSegments = currentPath.split("/").filter((segment) => segment) const newPathSegments = newPart diff --git a/apps/partner-sas/i18n/Provider.tsx b/apps/partner-sas/i18n/Provider.tsx index 16b1ccb83..31e3d5621 100644 --- a/apps/partner-sas/i18n/Provider.tsx +++ b/apps/partner-sas/i18n/Provider.tsx @@ -1,11 +1,13 @@ "use client" -import { IntlProvider } from "react-intl" +import { type IntlConfig, IntlProvider } from "react-intl" import { Lang } from "@scandic-hotels/common/constants/language" import { logger } from "@scandic-hotels/common/logger" -import type { ClientIntlProviderProps } from "@/components/IntlProvider" +type ClientIntlProviderProps = React.PropsWithChildren< + Pick & { locale: Lang } +> const logged: Record = {} diff --git a/apps/partner-sas/server/errors/next.ts b/apps/partner-sas/server/errors/next.ts index 53b52ed1b..c10d0bff6 100644 --- a/apps/partner-sas/server/errors/next.ts +++ b/apps/partner-sas/server/errors/next.ts @@ -28,20 +28,6 @@ export function badRequest(cause?: unknown) { ) } -export function notFound(cause?: unknown) { - const resInit = { - status: 404, - statusText: "Not found", - } - - return NextResponse.json( - { - cause, - }, - resInit - ) -} - export function internalServerError(cause?: unknown) { const resInit = { status: 500, @@ -56,20 +42,6 @@ export function internalServerError(cause?: unknown) { ) } -export function serviceUnavailable(cause?: unknown) { - const resInit = { - status: 503, - statusText: "Service Unavailable", - } - - return NextResponse.json( - { - cause, - }, - resInit - ) -} - export function response(data: T, status: number, statusText: string) { return NextResponse.json(data, { status, diff --git a/apps/partner-sas/server/utils.ts b/apps/partner-sas/server/utils.ts index c1ceac4e3..f4212a47f 100644 --- a/apps/partner-sas/server/utils.ts +++ b/apps/partner-sas/server/utils.ts @@ -1,8 +1,6 @@ -import { NextRequest } from "next/server" - -import { logger } from "@scandic-hotels/common/logger" - import { env } from "@/env/server" + +import type { NextRequest } from "next/server" /** * Use this function when you want to create URLs that are public facing, for * example for redirects or redirectTo query parameters. @@ -44,51 +42,3 @@ export function getPublicURL(request: NextRequest) { } return request.nextUrl.origin } - -/** - * Use this function when you want to create URLs that are internal (behind Akamai), - * for example for rewrites. Mainly used for middleware wrapped in auth(). - * The auth() function overrides the origin of the incoming request. It sets it - * to the origin of AUTH_URL/NEXTAUTH_URL. This means we cannot use the augmented - * request from auth() for rewrites, as those will point to auth url origin - * (in front of Akamai) and not the origin of the incoming request (behind Akamai). - * This results in rewrites going over the internet instead of going through the - * internal routing at Netlify. - * For dedicated environments (test, stage and production) we are behind Akamai. - * For those we have set a value for AUTH_URL/NEXTAUTH_URL, they point to the - * PUBLIC_URL. For rewrites we need the internal origin inside Netlify. - * In middleware.ts we copy the incoming origin to a header 'x-sh-origin'. We try - * and use that first, if not present we assume the internal origin is the value - * of the host header, as that is what Netlify used for routing to this deployment. - * @param request The incoming request. - * @returns NextURL The internal request, in Netlify behind Akamai. - */ -export function getInternalNextURL(request: NextRequest) { - const { href, origin } = request.nextUrl - - const originHeader = request.headers.get("x-sh-origin") - if (originHeader) { - logger.debug(`[internalNextUrl] using x-sh-origin header`, { - origin, - originHeader, - newOrigin: href.replace(origin, originHeader), - }) - return new NextRequest(href.replace(origin, originHeader), request).nextUrl - } - - const hostHeader = request.headers.get("host") - if (hostHeader) { - const inputHostOrigin = `${request.nextUrl.protocol}//${hostHeader}` - logger.debug(`[internalNextUrl] using host header`, { - origin, - hostHeader, - hostOrigin: inputHostOrigin, - newOrigin: href.replace(origin, inputHostOrigin), - }) - const { origin: hostOrigin } = new URL(inputHostOrigin) - return new NextRequest(href.replace(origin, hostOrigin), request).nextUrl - } - - logger.debug(`[internalNextUrl] falling back to incoming request`) - return request.nextUrl -} diff --git a/apps/partner-sas/types/params.ts b/apps/partner-sas/types/params.ts index dafa9af91..82f5f357b 100644 --- a/apps/partner-sas/types/params.ts +++ b/apps/partner-sas/types/params.ts @@ -14,6 +14,6 @@ export type LangParams = { lang: Lang } -export type LayoutArgs

= P extends undefined ? {} : Params

+type LayoutArgs

= P extends undefined ? {} : Params

export type PageArgs

= LayoutArgs

& SearchParams diff --git a/apps/scandic-redirect/scripts/generateRedirectFile/paths.ts b/apps/scandic-redirect/scripts/generateRedirectFile/paths.ts index c9fcad5e1..f59d8c611 100644 --- a/apps/scandic-redirect/scripts/generateRedirectFile/paths.ts +++ b/apps/scandic-redirect/scripts/generateRedirectFile/paths.ts @@ -5,10 +5,6 @@ export function csvFilePath(lang: Lang) { return `${import.meta.dirname}/../data/csv/${lang}.csv` } -export function jsonFilePath(lang: Lang) { - return `${import.meta.dirname}/../data/json/${lang}.json` -} - export function outputFilepath(lang: Lang) { return path.resolve( import.meta.dirname, diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Points/PointsToSpendCard/utils.ts b/apps/scandic-web/components/Blocks/DynamicContent/Points/PointsToSpendCard/utils.ts index c35c8aecb..152c14ff5 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Points/PointsToSpendCard/utils.ts +++ b/apps/scandic-web/components/Blocks/DynamicContent/Points/PointsToSpendCard/utils.ts @@ -2,7 +2,7 @@ import { dt } from "@scandic-hotels/common/dt" import type { IntlShape } from "react-intl" -export const DAYS_UNTIL_EXPIRY_WARNING = 30 +const DAYS_UNTIL_EXPIRY_WARNING = 30 /** * Get expiry label for points based on the expiry date. diff --git a/apps/scandic-web/components/ContentType/HotelSubpage/HtmlContent/utils.ts b/apps/scandic-web/components/ContentType/HotelSubpage/HtmlContent/utils.ts index 507ab1480..1e8821cd4 100644 --- a/apps/scandic-web/components/ContentType/HotelSubpage/HtmlContent/utils.ts +++ b/apps/scandic-web/components/ContentType/HotelSubpage/HtmlContent/utils.ts @@ -11,7 +11,6 @@ export enum NodeNames { table = "table", tbody = "tbody", td = "td", - text = "text", th = "th", tr = "tr", ul = "ul", diff --git a/apps/scandic-web/components/Footer/index.tsx b/apps/scandic-web/components/Footer/index.tsx index 8a7c0eaa5..c4667c09d 100644 --- a/apps/scandic-web/components/Footer/index.tsx +++ b/apps/scandic-web/components/Footer/index.tsx @@ -5,7 +5,7 @@ import FooterNavigation from "./Navigation" import styles from "./footer.module.css" -export function preload() { +function preload() { void getFooter() } diff --git a/apps/scandic-web/components/Header/TopLink/index.tsx b/apps/scandic-web/components/Header/TopLink/index.tsx index a5fa45c58..1059d00aa 100644 --- a/apps/scandic-web/components/Header/TopLink/index.tsx +++ b/apps/scandic-web/components/Header/TopLink/index.tsx @@ -7,11 +7,10 @@ import styles from "./topLink.module.css" import type { Header } from "@scandic-hotels/trpc/types/header" import type { ComponentProps } from "react" -export interface TopLinkProps - extends Omit< - ComponentProps, - "href" | "iconName" | "children" - > { +interface TopLinkProps extends Omit< + ComponentProps, + "href" | "iconName" | "children" +> { isLoggedIn: boolean topLink: Header["header"]["topLink"] iconSize?: number diff --git a/apps/scandic-web/components/HotelReservation/MyStay/accessBooking.ts b/apps/scandic-web/components/HotelReservation/MyStay/accessBooking.ts index 94136c6b9..7ad9f7d7e 100644 --- a/apps/scandic-web/components/HotelReservation/MyStay/accessBooking.ts +++ b/apps/scandic-web/components/HotelReservation/MyStay/accessBooking.ts @@ -7,7 +7,6 @@ export { ACCESS_GRANTED, accessBooking as default, ERROR_BAD_REQUEST, - ERROR_FORBIDDEN, ERROR_NOT_FOUND, ERROR_UNAUTHORIZED, } @@ -66,11 +65,6 @@ const ERROR_UNAUTHORIZED = { status: 401, } as const -const ERROR_FORBIDDEN = { - code: "FORBIDDEN", - status: 403, -} as const - const ERROR_NOT_FOUND = { code: "NOT_FOUND", status: 404, diff --git a/apps/scandic-web/components/MyPages/ProfilingConsent/README.md b/apps/scandic-web/components/MyPages/ProfilingConsent/README.md index afc1ee2b6..4b7dcefce 100644 --- a/apps/scandic-web/components/MyPages/ProfilingConsent/README.md +++ b/apps/scandic-web/components/MyPages/ProfilingConsent/README.md @@ -96,7 +96,6 @@ Located at `utils/profilingConsent.ts`: - `storageKey(memberKey)` — Generate storage key - `readDismissed(memberKey)` — Check if modal was dismissed - `setDismissed(memberKey)` — Mark modal as dismissed -- `clearDismissed(memberKey)` — Clear dismissal flag - `profilingConsentOpenEvent` — CustomEvent name for opening modal - `requestOpen()` — Dispatch event to open modal diff --git a/apps/scandic-web/constants/routes/webviews.ts b/apps/scandic-web/constants/routes/webviews.ts index 67a0ceab7..999b7cc2d 100644 --- a/apps/scandic-web/constants/routes/webviews.ts +++ b/apps/scandic-web/constants/routes/webviews.ts @@ -7,7 +7,7 @@ const myPages = { sv: "/sv/webview/scandic-friends/mina-sidor", } -export const overview = { +const overview = { da: `${myPages.da}/oversigt`, de: `${myPages.de}/uberblick`, en: `${myPages.en}/overview`, diff --git a/apps/scandic-web/constants/webHrefs.ts b/apps/scandic-web/constants/webHrefs.ts index 8d96735fc..59e34c44a 100644 --- a/apps/scandic-web/constants/webHrefs.ts +++ b/apps/scandic-web/constants/webHrefs.ts @@ -38,15 +38,6 @@ export const partners: LangRoute = { sv: `/${Lang.sv}/scandic-friends/partners`, } -export const spendPoints: LangRoute = { - da: `/${Lang.da}/scandic-friends/brug-point`, - de: `/${Lang.de}/scandic-friends/ausgeben`, - en: `/${Lang.en}/scandic-friends/spend-points`, - fi: `/${Lang.fi}/scandic-friends/hyodynna`, - no: `/${Lang.no}/scandic-friends/bruk-poeng`, - sv: `/${Lang.sv}/scandic-friends/anvand-poang`, -} - export const offers: LangRoute = { da: `/${Lang.da}/tilbud`, de: `/${Lang.de}/angebote`, diff --git a/apps/scandic-web/hooks/useAncillaries.ts b/apps/scandic-web/hooks/useAncillaries.ts index 80bf0db3a..6239f01c6 100644 --- a/apps/scandic-web/hooks/useAncillaries.ts +++ b/apps/scandic-web/hooks/useAncillaries.ts @@ -152,7 +152,7 @@ function filterPoints(ancillaries: Ancillaries, user: User | null) { }) } -export function generateUniqueAncillaries( +function generateUniqueAncillaries( ancillaries: Ancillaries ): Ancillary["ancillaryContent"] { const uniqueAncillaries = new Map( diff --git a/apps/scandic-web/i18n/Provider.tsx b/apps/scandic-web/i18n/Provider.tsx index 221ca0a46..87d74a1c2 100644 --- a/apps/scandic-web/i18n/Provider.tsx +++ b/apps/scandic-web/i18n/Provider.tsx @@ -7,7 +7,7 @@ import { logger } from "@scandic-hotels/common/logger" const logged: Record = {} -export type ClientIntlProviderProps = React.PropsWithChildren< +type ClientIntlProviderProps = React.PropsWithChildren< Pick & { locale: Lang } > diff --git a/apps/scandic-web/services/warmup/index.ts b/apps/scandic-web/services/warmup/index.ts index 0ccc1dccd..094f72891 100644 --- a/apps/scandic-web/services/warmup/index.ts +++ b/apps/scandic-web/services/warmup/index.ts @@ -20,7 +20,7 @@ type FailedWarmup = { export type WarmupResult = BaseWarmup | FailedWarmup -export const warmupFunctions: Record = { +const warmupFunctions: Record = { countries_en: warmupCountry(Lang.en), countries_da: warmupCountry(Lang.da), countries_de: warmupCountry(Lang.de), diff --git a/apps/scandic-web/services/warmup/warmupKeys.ts b/apps/scandic-web/services/warmup/warmupKeys.ts index 58e5d5973..79305a321 100644 --- a/apps/scandic-web/services/warmup/warmupKeys.ts +++ b/apps/scandic-web/services/warmup/warmupKeys.ts @@ -5,7 +5,7 @@ const langs = Object.keys(Lang) as Lang[] /* * Keys for warmup functions, the order of the keys is the order in which they will be executed */ -export const warmupKeys = [ +const warmupKeys = [ ...langs.map((lang) => `countries_${lang}` as const), "hotelsByCountry", ...langs.map((lang) => `hotelData_${lang}` as const), diff --git a/apps/scandic-web/stores/destination-page-cities-map.ts b/apps/scandic-web/stores/destination-page-cities-map.ts index 77f747263..cac8d9fad 100644 --- a/apps/scandic-web/stores/destination-page-cities-map.ts +++ b/apps/scandic-web/stores/destination-page-cities-map.ts @@ -1,6 +1,6 @@ import { create } from "zustand" -export type SelectedMarker = { +type SelectedMarker = { cityId: string location: { lat: number; lng: number } } | null diff --git a/apps/scandic-web/types/components/maps/destinationMarkers.ts b/apps/scandic-web/types/components/maps/destinationMarkers.ts index 8dc3ffb71..f3563041f 100644 --- a/apps/scandic-web/types/components/maps/destinationMarkers.ts +++ b/apps/scandic-web/types/components/maps/destinationMarkers.ts @@ -30,7 +30,6 @@ export interface CityMarker { } export type CityMarkerProperties = Omit -export type CitiesClusterMarkerProperties = CityMarkerProperties[] export type CityMarkerGeojson = FeatureCollection export type CityMarkerFeature = CityMarkerGeojson["features"][number] diff --git a/apps/scandic-web/types/components/myPages/membership.ts b/apps/scandic-web/types/components/myPages/membership.ts index 71b2faf3b..36f9a2e63 100644 --- a/apps/scandic-web/types/components/myPages/membership.ts +++ b/apps/scandic-web/types/components/myPages/membership.ts @@ -6,7 +6,3 @@ export type MembershipLevelIconProps = { level: MembershipLevel rows?: 1 | 2 } & LevelProps - -export type CopyButtonProps = { - membershipNumber: string -} diff --git a/apps/scandic-web/types/components/myPages/myStay/ancillaries.ts b/apps/scandic-web/types/components/myPages/myStay/ancillaries.ts index e22408aa6..06892366c 100644 --- a/apps/scandic-web/types/components/myPages/myStay/ancillaries.ts +++ b/apps/scandic-web/types/components/myPages/myStay/ancillaries.ts @@ -66,9 +66,3 @@ export interface StepsProps { savedCreditCards: CreditCard[] | null error: AncillaryErrorMessage | null } - -export interface ActionButtonsProps { - isPriceDetailsOpen: boolean - togglePriceDetails: () => void - isSubmitting: boolean -} diff --git a/apps/scandic-web/types/components/myPages/user.ts b/apps/scandic-web/types/components/myPages/user.ts index 63eaa267f..964a5367a 100644 --- a/apps/scandic-web/types/components/myPages/user.ts +++ b/apps/scandic-web/types/components/myPages/user.ts @@ -1,8 +1,3 @@ import type { userQueryRouter } from "@scandic-hotels/trpc/routers/user/query" -import type { User } from "@scandic-hotels/trpc/types/user" export type UserQueryRouter = typeof userQueryRouter - -export interface UserProps { - user: User -} diff --git a/apps/scandic-web/types/params.ts b/apps/scandic-web/types/params.ts index 678849333..e89edf265 100644 --- a/apps/scandic-web/types/params.ts +++ b/apps/scandic-web/types/params.ts @@ -1,34 +1,5 @@ import type { Lang } from "@scandic-hotels/common/constants/language" -import type { PageContentTypeEnum } from "@scandic-hotels/trpc/enums/contentType" - -export type NextSearchParams = { [key: string]: string | string[] | undefined } - -export type SearchParams = { - searchParams: Promise -} export type LangParams = { lang: Lang } - -export type StatusParams = { - status: number -} - -export type ContentTypeParams = { - contentType: - | PageContentTypeEnum.loyaltyPage - | PageContentTypeEnum.campaignOverviewPage - | PageContentTypeEnum.campaignPage - | PageContentTypeEnum.contentPage - | PageContentTypeEnum.hotelPage - | PageContentTypeEnum.collectionPage - | PageContentTypeEnum.destinationOverviewPage - | PageContentTypeEnum.destinationCountryPage - | PageContentTypeEnum.destinationCityPage - | PageContentTypeEnum.startPage -} - -export type UIDParams = { - uid: string -} diff --git a/apps/scandic-web/types/sitemap.ts b/apps/scandic-web/types/sitemap.ts index 85e8449de..ddc0c9e5e 100644 --- a/apps/scandic-web/types/sitemap.ts +++ b/apps/scandic-web/types/sitemap.ts @@ -1,7 +1,7 @@ import type { Lang } from "@scandic-hotels/common/constants/language" import type { SyncResult } from "contentstack" -export type ChangeFrequency = +type ChangeFrequency = | "always" | "hourly" | "daily" @@ -10,7 +10,7 @@ export type ChangeFrequency = | "yearly" | "never" -export interface SitemapEntry { +interface SitemapEntry { url: string lastModified: string changeFrequency: ChangeFrequency @@ -62,8 +62,3 @@ export interface SyncItem { export interface SyncResponse extends Omit { items: SyncItem[] } - -export type SyncItemsByUid = { - mainEntry: SyncItem - alternates: SyncItem[] -} diff --git a/apps/scandic-web/utils/profilingConsent.ts b/apps/scandic-web/utils/profilingConsent.ts index 5b03037db..e06d3b4d1 100644 --- a/apps/scandic-web/utils/profilingConsent.ts +++ b/apps/scandic-web/utils/profilingConsent.ts @@ -1,6 +1,6 @@ export const profilingConsentOpenEvent = "profiling-consent:open" -export const storageKey = (memberKey: string) => +const storageKey = (memberKey: string) => `profiling-consent:dismissed:${memberKey}` export function readDismissed(memberKey: string): boolean { @@ -13,11 +13,6 @@ export function setDismissed(memberKey: string): void { localStorage.setItem(storageKey(memberKey), "1") } -export function clearDismissed(memberKey: string): void { - if (!memberKey || typeof window === "undefined") return - localStorage.removeItem(storageKey(memberKey)) -} - export function requestOpen(): void { if (typeof window === "undefined") return window.dispatchEvent(new CustomEvent(profilingConsentOpenEvent)) diff --git a/apps/scandic-web/utils/sitemap.ts b/apps/scandic-web/utils/sitemap.ts index 5b2ec08c0..7f6ee3cf1 100644 --- a/apps/scandic-web/utils/sitemap.ts +++ b/apps/scandic-web/utils/sitemap.ts @@ -64,7 +64,7 @@ export async function getLastUpdated() { return await store().get(lastUpdatedKey) } -export async function getSitemapData() { +async function getSitemapData() { const sitemapData: SitemapData | null = await store().get(sitemapDataKey, { type: "json", }) diff --git a/apps/scandic-web/utils/tracking/index.ts b/apps/scandic-web/utils/tracking/index.ts index 5722a392d..5af7d6612 100644 --- a/apps/scandic-web/utils/tracking/index.ts +++ b/apps/scandic-web/utils/tracking/index.ts @@ -11,7 +11,4 @@ export { trackSocialMediaClick, } from "@scandic-hotels/tracking/navigation" export { trackPageViewStart } from "@scandic-hotels/tracking/pageview" -export { - trackPaymentEvent, - trackUpdatePaymentMethod, -} from "@scandic-hotels/tracking/payment" +export { trackUpdatePaymentMethod } from "@scandic-hotels/tracking/payment" diff --git a/apps/scandic-web/utils/webviews.ts b/apps/scandic-web/utils/webviews.ts index 3a8b1bf74..e0fc25781 100644 --- a/apps/scandic-web/utils/webviews.ts +++ b/apps/scandic-web/utils/webviews.ts @@ -6,7 +6,7 @@ import { webviews } from "@/constants/routes/webviews" import type { Lang } from "@scandic-hotels/common/constants/language" -export async function webviewSearchParams() { +async function webviewSearchParams() { const searchParams = new URLSearchParams() const headersList = await headers() const loginType = headersList.get("loginType") diff --git a/packages/booking-flow/lib/components/EnterDetails/Payment/helpers.ts b/packages/booking-flow/lib/components/EnterDetails/Payment/helpers.ts index 55f214443..bf780c570 100644 --- a/packages/booking-flow/lib/components/EnterDetails/Payment/helpers.ts +++ b/packages/booking-flow/lib/components/EnterDetails/Payment/helpers.ts @@ -9,7 +9,7 @@ import type { CreditCard } from "@scandic-hotels/trpc/types/user" import type { RedemptionType } from "../../../bookingFlowConfig/bookingFlowConfig" import type { RoomState } from "../../../stores/enter-details/types" -export function isPaymentMethodEnum(value: string): value is PaymentMethodEnum { +function isPaymentMethodEnum(value: string): value is PaymentMethodEnum { return Object.values(PaymentMethodEnum).includes(value) } @@ -53,7 +53,7 @@ export function calculateTotalRoomPrice( } } -export const paymentInfoStorageName = "payment-info-storage" +const paymentInfoStorageName = "payment-info-storage" type PaymentInfoSessionData = { paymentMethod: string diff --git a/packages/booking-flow/lib/types/components/selectRate/selectRate.ts b/packages/booking-flow/lib/types/components/selectRate/selectRate.ts index 9d9ae1e38..f5bfa63fd 100644 --- a/packages/booking-flow/lib/types/components/selectRate/selectRate.ts +++ b/packages/booking-flow/lib/types/components/selectRate/selectRate.ts @@ -1,10 +1,5 @@ -import type { RateEnum } from "@scandic-hotels/common/constants/rate" import type { Child } from "@scandic-hotels/trpc/types/child" -import type { PackageEnum, Packages } from "@scandic-hotels/trpc/types/packages" -import type { - Product, - RoomConfiguration, -} from "@scandic-hotels/trpc/types/roomAvailability" +import type { PackageEnum } from "@scandic-hotels/trpc/types/packages" import type { BookingSearchType } from "../../../misc/searchType" @@ -27,25 +22,3 @@ export type SelectRateBooking = { searchType?: BookingSearchType toDate: string } - -export type Rate = { - features: RoomConfiguration["features"] - packages: NonNullable - priceName?: string - priceTerm?: string - product: Product - rate: RateEnum - roomRates?: { - rate: Rate - roomIndex: number - }[] - roomType: RoomConfiguration["roomType"] - roomTypeCode: RoomConfiguration["roomTypeCode"] -} - -export type RateCode = { - publicRateCode: string - roomTypeCode: string - name: string - paymentTerm: string -} diff --git a/packages/common/dataCache/Cache.ts b/packages/common/dataCache/Cache.ts index 2c68a0349..e991857d2 100644 --- a/packages/common/dataCache/Cache.ts +++ b/packages/common/dataCache/Cache.ts @@ -3,7 +3,7 @@ import type { CacheOrGetOptions } from "./cacheOrGetOptions" const ONE_HOUR_IN_SECONDS = 3_600 as const const ONE_DAY_IN_SECONDS = 86_400 as const -export const namedCacheTimeMap: Record = { +const namedCacheTimeMap: Record = { "no cache": 0, "1m": 60, "5m": 300, @@ -16,7 +16,7 @@ export const namedCacheTimeMap: Record = { max: ONE_DAY_IN_SECONDS * 30, } as const -export const namedCacheTimes = [ +const _namedCacheTimes = [ "no cache", "1m", "5m", @@ -29,7 +29,7 @@ export const namedCacheTimes = [ "max", ] as const -export type NamedCacheTimes = (typeof namedCacheTimes)[number] +type NamedCacheTimes = (typeof _namedCacheTimes)[number] /** * Retrieves the cache time in seconds based on the given cache time. diff --git a/packages/common/dataCache/cacheOrGetOptions.ts b/packages/common/dataCache/cacheOrGetOptions.ts index 0ce4cdc51..f5871faa7 100644 --- a/packages/common/dataCache/cacheOrGetOptions.ts +++ b/packages/common/dataCache/cacheOrGetOptions.ts @@ -10,7 +10,7 @@ export type CacheOrGetOptions = { includeGitHashInKey?: boolean } -export function defaultCacheOrGetOptions( +function defaultCacheOrGetOptions( opts: CacheOrGetOptions = {} ): CacheOrGetOptions { return { diff --git a/packages/common/package.json b/packages/common/package.json index d602a2bb5..f73481eee 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -30,7 +30,6 @@ "./constants/rateType": "./constants/rateType.ts", "./constants/routes/*": "./constants/routes/*.ts", "./constants/sessionKeys": "./constants/sessionKeys.ts", - "./constants/sidepeekContent": "./constants/sidepeekContent.ts", "./constants/signatureHotels": "./constants/signatureHotels.ts", "./constants/transactionType": "./constants/transactionType.ts", "./dataCache": "./dataCache/index.ts", diff --git a/packages/design-system/lib/components/ChipButton/variants.ts b/packages/design-system/lib/components/ChipButton/variants.ts index 4544ec819..b2743cc54 100644 --- a/packages/design-system/lib/components/ChipButton/variants.ts +++ b/packages/design-system/lib/components/ChipButton/variants.ts @@ -1,6 +1,5 @@ import { cva } from "class-variance-authority" -import { deepmerge } from "deepmerge-ts" import styles from "./chip-button.module.css" import { config as typographyConfig } from "../Typography/variants" @@ -106,14 +105,3 @@ export const config = { } export const variants = cva(styles.chip, config) - -const chipConfig = { - variants: { - ...config.variants, - }, - defaultVariants: config.defaultVariants, -} as const - -export function withChipButton(config: T) { - return deepmerge(chipConfig, config) -} diff --git a/packages/design-system/lib/components/ChipStatic/variants.ts b/packages/design-system/lib/components/ChipStatic/variants.ts index 2ede64c09..8384af390 100644 --- a/packages/design-system/lib/components/ChipStatic/variants.ts +++ b/packages/design-system/lib/components/ChipStatic/variants.ts @@ -2,7 +2,7 @@ import { cva } from "class-variance-authority" import styles from "./chip-static.module.css" -export const config = { +const config = { variants: { color: { Subtle: styles["color-subtle"], diff --git a/packages/design-system/lib/components/Form/Country/country.ts b/packages/design-system/lib/components/Form/Country/country.ts index 2b73d156c..175e58eab 100644 --- a/packages/design-system/lib/components/Form/Country/country.ts +++ b/packages/design-system/lib/components/Form/Country/country.ts @@ -16,6 +16,3 @@ export type CountryProps = { disabled?: boolean registerOptions?: RegisterOptions } - -export type CountryPortalContainer = HTMLDivElement | undefined -export type CountryPortalContainerArgs = HTMLDivElement | null diff --git a/packages/design-system/lib/components/Form/Date/date.ts b/packages/design-system/lib/components/Form/Date/date.ts index 65a4e520b..0ab6264be 100644 --- a/packages/design-system/lib/components/Form/Date/date.ts +++ b/packages/design-system/lib/components/Form/Date/date.ts @@ -2,7 +2,6 @@ import { Lang } from "@scandic-hotels/common/constants/language" import type { RegisterOptions } from "react-hook-form" export const enum DateName { - date = "date", day = "day", month = "month", year = "year", diff --git a/packages/design-system/lib/components/Form/FormTextArea/index.tsx b/packages/design-system/lib/components/Form/FormTextArea/index.tsx index 75fd6dc36..591318cf8 100644 --- a/packages/design-system/lib/components/Form/FormTextArea/index.tsx +++ b/packages/design-system/lib/components/Form/FormTextArea/index.tsx @@ -96,6 +96,3 @@ export const FormTextArea = forwardRef( ) FormTextArea.displayName = "FormTextArea" - -// Default export for backwards compatibility -export default FormTextArea diff --git a/packages/design-system/lib/components/ImageCounter/variants.ts b/packages/design-system/lib/components/ImageCounter/variants.ts index 270507d05..2e1f2cebb 100644 --- a/packages/design-system/lib/components/ImageCounter/variants.ts +++ b/packages/design-system/lib/components/ImageCounter/variants.ts @@ -2,7 +2,7 @@ import { cva } from "class-variance-authority" import styles from "./imageCounter.module.css" -export const config = { +const config = { variants: { size: { Large: styles.large, diff --git a/packages/design-system/lib/components/JsonToHtml/types/rte/attrs.ts b/packages/design-system/lib/components/JsonToHtml/types/rte/attrs.ts index c0e1514e4..ce8389e49 100644 --- a/packages/design-system/lib/components/JsonToHtml/types/rte/attrs.ts +++ b/packages/design-system/lib/components/JsonToHtml/types/rte/attrs.ts @@ -1,6 +1,4 @@ -import type { Lang } from "@scandic-hotels/common/constants/language" - -import type { EmbedTypesEnum, RTEItemType, RTEItemTypeEnum } from "./enums" +import type { RTEItemType } from "./enums" export interface Attributes { [key: string]: unknown @@ -9,47 +7,7 @@ export interface Attributes { style?: { [key: string]: unknown } | undefined } -export interface RTEAssetAttrs extends Attributes { - alt: string - "asset-alt": string - "asset-link": string - "asset-name": string - "asset-type": "image/png" | "image/jpg" | "image/jpeg" - "asset-uid": string - "display-type": EmbedTypesEnum.display - "content-type-uid": "sys_assets" - inline: false - type: RTEItemTypeEnum.asset -} - export interface RTEAnchorAttrs extends Attributes { target: string url: string } - -export interface RTELinkAttrs extends Attributes { - "display-type": EmbedTypesEnum.link - "class-name": string - "content-type-uid": string - "entry-uid": string - locale: Lang - href: string - target: HTMLAnchorElement["target"] - type: RTEItemTypeEnum.entry -} - -export interface RTEImageVaultAttrs extends Attributes { - height: string - // style: string[] - width: string - id: number - title: string - url: string - dimensions: { - width: number - height: number - aspectRatio: number - } - meta: { alt: string | undefined | null; caption: string | undefined | null } - focalPoint: { x: number; y: number } -} diff --git a/packages/design-system/lib/components/JsonToHtml/types/rte/enums.ts b/packages/design-system/lib/components/JsonToHtml/types/rte/enums.ts index e4eaea493..a6306d9d1 100644 --- a/packages/design-system/lib/components/JsonToHtml/types/rte/enums.ts +++ b/packages/design-system/lib/components/JsonToHtml/types/rte/enums.ts @@ -1,13 +1,3 @@ -export enum EmbedTypesEnum { - block = "block", - display = "display", - download = "download", - inline = "inline", - link = "link", -} - -export type EmbedTypes = keyof typeof EmbedTypesEnum - /** Copied from https://github.com/contentstack/contentstack-utils-javascript/blob/master/src/nodes/node-type.ts */ export enum RTETypeEnum { a = "a", @@ -45,8 +35,6 @@ export enum RTETypeEnum { fragment = "fragment", } -export type RTEType = keyof typeof RTETypeEnum - export enum RTEItemTypeEnum { asset = "asset", entry = "entry", diff --git a/packages/design-system/lib/components/JsonToHtml/types/rte/node.ts b/packages/design-system/lib/components/JsonToHtml/types/rte/node.ts index c73b01b21..bbfd52fb9 100644 --- a/packages/design-system/lib/components/JsonToHtml/types/rte/node.ts +++ b/packages/design-system/lib/components/JsonToHtml/types/rte/node.ts @@ -5,12 +5,7 @@ import { ImageVaultAssetResponse, } from "@scandic-hotels/common/utils/imageVault" import type { EmbedByUid } from "../../JsonToHtml" -import type { - Attributes, - RTEAnchorAttrs, - RTEAssetAttrs, - RTELinkAttrs, -} from "./attrs" +import type { Attributes, RTEAnchorAttrs } from "./attrs" import type { RTETypeEnum } from "./enums" import type { RenderOptions } from "./option" @@ -21,26 +16,11 @@ export interface RTEDefaultNode { uid: string } -export interface RTELinkNode { - attrs: Attributes - children: RTENode[] - type: RTETypeEnum - uid: string -} - -export interface RTEReferenceAssetNode extends RTEDefaultNode { - attrs: RTEAssetAttrs -} - -export interface RTEAnchorNode extends RTEDefaultNode { +interface RTEAnchorNode extends RTEDefaultNode { attrs: RTEAnchorAttrs type: RTETypeEnum.a } -export interface RTEReferenceLinkNode extends RTEDefaultNode { - attrs: RTELinkAttrs -} - export interface RTEImageVaultNode extends RTEDefaultNode { attrs: Attributes & (DeprecatedImageVaultAssetResponse | ImageVaultAssetResponse) @@ -73,7 +53,7 @@ export type RTERegularNode = RTEDefaultNode | RTEAnchorNode | RTEImageVaultNode export type RTEImageNode = RTEDefaultNode | RTEImageVaultNode -export type RTEReferenceNode = RTEAnchorNode +type RTEReferenceNode = RTEAnchorNode export type RTENode = RTERegularNode | RTEReferenceNode | RTETextNode @@ -83,11 +63,6 @@ export type RTERenderMark = ( id?: string ) => JSX.Element -export interface RTEDocument extends RTEDefaultNode { - type: RTETypeEnum.doc - _version: number -} - export type RTERenderOptionComponent = ( node: RTERegularNode, embeds: EmbedByUid, diff --git a/packages/design-system/lib/components/JsonToHtml/utils.tsx b/packages/design-system/lib/components/JsonToHtml/utils.tsx index 2983f106f..c32afbe3e 100644 --- a/packages/design-system/lib/components/JsonToHtml/utils.tsx +++ b/packages/design-system/lib/components/JsonToHtml/utils.tsx @@ -18,7 +18,7 @@ import { } from "./types/rte/node" import type { RenderOptions } from "./types/rte/option" -export function groupEmbedsByUid(embedsArray: Node[]) { +function groupEmbedsByUid(embedsArray: Node[]) { const embedsByUid = embedsArray.reduce((acc, embed) => { if ("system" in embed.node && embed.node.system?.uid) { acc[embed.node.system.uid] = embed @@ -29,7 +29,7 @@ export function groupEmbedsByUid(embedsArray: Node[]) { return embedsByUid } -export function nodeChildrenToHtml( +function nodeChildrenToHtml( nodes: RTENode[], embeds: EmbedByUid, fullRenderOptions: RenderOptions @@ -51,10 +51,7 @@ export function nodeChildrenToHtml( .filter(Boolean) } -export function textNodeToHtml( - node: RTETextNode, - fullRenderOptions: RenderOptions -) { +function textNodeToHtml(node: RTETextNode, fullRenderOptions: RenderOptions) { let text = <>{node.text} if (node.classname || node.id) { @@ -116,7 +113,7 @@ export function extractAvailableListClassNames(className?: string) { .map((item) => styles[item] || item) } -export function nodeToHtml( +function nodeToHtml( node: RTENode, embeds: EmbedByUid, fullRenderOptions: RenderOptions diff --git a/packages/design-system/lib/components/Lightbox/Gallery/useThumbNail.ts b/packages/design-system/lib/components/Lightbox/Gallery/useThumbNail.ts index b1001e2be..5a140104d 100644 --- a/packages/design-system/lib/components/Lightbox/Gallery/useThumbNail.ts +++ b/packages/design-system/lib/components/Lightbox/Gallery/useThumbNail.ts @@ -3,8 +3,8 @@ import { useMemo } from "react" import { LightboxImage } from ".." -export const THUMBNAIL_WINDOW = 5 -export const THUMBNAIL_OFFSET = Math.ceil(THUMBNAIL_WINDOW / 2) +const THUMBNAIL_WINDOW = 5 +const THUMBNAIL_OFFSET = Math.ceil(THUMBNAIL_WINDOW / 2) interface useThumbnailProps { images: LightboxImage[] diff --git a/packages/design-system/lib/components/Map/InteractiveMap/PoiMapMarkers/index.tsx b/packages/design-system/lib/components/Map/InteractiveMap/PoiMapMarkers/index.tsx index 361130dbd..664f49254 100644 --- a/packages/design-system/lib/components/Map/InteractiveMap/PoiMapMarkers/index.tsx +++ b/packages/design-system/lib/components/Map/InteractiveMap/PoiMapMarkers/index.tsx @@ -12,7 +12,7 @@ import { PoiMarker } from "../../Markers/PoiMarker" import styles from "./poiMapMarkers.module.css" import { MarkerInfo, PointOfInterest } from "../../types" -export type PoiMapMarkersProps = { +type PoiMapMarkersProps = { activePoi?: string | null coordinates: { lat: number; lng: number } onActivePoiChange?: (poiName: string | null) => void diff --git a/packages/design-system/lib/components/Radio/variants.ts b/packages/design-system/lib/components/Radio/variants.ts index 2c7141285..cc9401f2e 100644 --- a/packages/design-system/lib/components/Radio/variants.ts +++ b/packages/design-system/lib/components/Radio/variants.ts @@ -2,7 +2,7 @@ import { cva } from "class-variance-authority" import styles from "./radio.module.css" -export const config = { +const config = { variants: { color: { Burgundy: styles["color-burgundy"], diff --git a/packages/design-system/lib/components/RateCard/Modal/motionVariants.ts b/packages/design-system/lib/components/RateCard/Modal/motionVariants.ts index 97b2e0c0f..744f587f0 100644 --- a/packages/design-system/lib/components/RateCard/Modal/motionVariants.ts +++ b/packages/design-system/lib/components/RateCard/Modal/motionVariants.ts @@ -21,16 +21,3 @@ export const slideInOut = { transition: { duration: 0.4, ease: "easeInOut" }, }, } as const - -export const slideFromTop = { - hidden: { - opacity: 0, - y: -32, - transition: { duration: 0.4, ease: "easeInOut" }, - }, - visible: { - opacity: 1, - y: 0, - transition: { duration: 0.4, ease: "easeInOut" }, - }, -} as const diff --git a/packages/design-system/lib/components/RateCard/variants.ts b/packages/design-system/lib/components/RateCard/variants.ts index b2da80eec..109c1a9a7 100644 --- a/packages/design-system/lib/components/RateCard/variants.ts +++ b/packages/design-system/lib/components/RateCard/variants.ts @@ -2,7 +2,7 @@ import { cva } from "class-variance-authority" import styles from "./rate-card.module.css" -export const config = { +const config = { variants: { variant: { Regular: styles["variant-regular"], diff --git a/packages/design-system/lib/components/TextLink/variants.ts b/packages/design-system/lib/components/TextLink/variants.ts index d1b385897..58b0234b2 100644 --- a/packages/design-system/lib/components/TextLink/variants.ts +++ b/packages/design-system/lib/components/TextLink/variants.ts @@ -5,7 +5,6 @@ import { withTypography, } from "../Typography/variants" -import { deepmerge } from "deepmerge-ts" import styles from "./textLink.module.css" export const config = { @@ -33,7 +32,3 @@ const textLinkConfig = { } as const export const variants = cva(styles.textLink, withTypography(textLinkConfig)) - -export function withTextLink(config: T) { - return deepmerge(textLinkConfig, config) -} diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/Accordion.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/Accordion.graphql.ts index b028baa96..b51dbce6e 100644 --- a/packages/trpc/lib/graphql/Fragments/Blocks/Accordion.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Blocks/Accordion.graphql.ts @@ -118,7 +118,7 @@ export const GlobalAccordionBlock = gql` ${PromoCampaignPageLink} ` -export const GlobalAccordion_AccountPage = gql` +const GlobalAccordion_AccountPage = gql` fragment GlobalAccordion_AccountPage on AccountPageContentAccordionBlockAccordionsGlobalAccordion { __typename global_accordion { @@ -134,7 +134,7 @@ export const GlobalAccordion_AccountPage = gql` ${AccordionBlock} ` -export const SpecificAccordion_AccountPage = gql` +const SpecificAccordion_AccountPage = gql` fragment SpecificAccordion_AccountPage on AccountPageContentAccordionBlockAccordionsSpecificAccordion { __typename specific_accordion { @@ -196,7 +196,7 @@ export const Accordion_AccountPage = gql` ${SpecificAccordion_AccountPage} ` -export const GlobalAccordion_AccountPageRefs = gql` +const GlobalAccordion_AccountPageRefs = gql` fragment GlobalAccordion_AccountPageRefs on AccountPageContentAccordionBlockAccordionsGlobalAccordion { global_accordion { global_accordionConnection { @@ -211,7 +211,7 @@ export const GlobalAccordion_AccountPageRefs = gql` ${AccordionBlockRefs} ` -export const SpecificAccordion_AccountPageRefs = gql` +const SpecificAccordion_AccountPageRefs = gql` fragment SpecificAccordion_AccountPageRefs on AccountPageContentAccordionBlockAccordionsSpecificAccordion { specific_accordion { questions { @@ -266,7 +266,7 @@ export const Accordion_AccountPageRefs = gql` ${SpecificAccordion_AccountPageRefs} ` -export const GlobalAccordion_ContentPage = gql` +const GlobalAccordion_ContentPage = gql` fragment GlobalAccordion_ContentPage on ContentPageBlocksAccordionBlockAccordionsGlobalAccordion { __typename global_accordion { @@ -282,7 +282,7 @@ export const GlobalAccordion_ContentPage = gql` ${AccordionBlock} ` -export const SpecificAccordion_ContentPage = gql` +const SpecificAccordion_ContentPage = gql` fragment SpecificAccordion_ContentPage on ContentPageBlocksAccordionBlockAccordionsSpecificAccordion { __typename specific_accordion { @@ -345,7 +345,7 @@ export const Accordion_ContentPage = gql` ${SpecificAccordion_ContentPage} ` -export const GlobalAccordion_ContentPageRefs = gql` +const GlobalAccordion_ContentPageRefs = gql` fragment GlobalAccordion_ContentPageRefs on ContentPageBlocksAccordionBlockAccordionsGlobalAccordion { global_accordion { global_accordionConnection { @@ -361,7 +361,7 @@ export const GlobalAccordion_ContentPageRefs = gql` ${AccordionBlockRefs} ` -export const SpecificAccordion_ContentPageRefs = gql` +const SpecificAccordion_ContentPageRefs = gql` fragment SpecificAccordion_ContentPageRefs on ContentPageBlocksAccordionBlockAccordionsSpecificAccordion { specific_accordion { questions { @@ -404,7 +404,7 @@ export const SpecificAccordion_ContentPageRefs = gql` ${PromoCampaignPageRef} ` -export const GlobalAccordion_DestinationCityPage = gql` +const GlobalAccordion_DestinationCityPage = gql` fragment GlobalAccordion_DestinationCityPage on DestinationCityPageBlocksAccordionBlockAccordionsGlobalAccordion { __typename global_accordion { @@ -420,7 +420,7 @@ export const GlobalAccordion_DestinationCityPage = gql` ${AccordionBlock} ` -export const SpecificAccordion_DestinationCityPage = gql` +const SpecificAccordion_DestinationCityPage = gql` fragment SpecificAccordion_DestinationCityPage on DestinationCityPageBlocksAccordionBlockAccordionsSpecificAccordion { __typename specific_accordion { @@ -467,7 +467,7 @@ export const SpecificAccordion_DestinationCityPage = gql` ${PromoCampaignPageLink} ` -export const GlobalAccordion_DestinationCityPageRefs = gql` +const GlobalAccordion_DestinationCityPageRefs = gql` fragment GlobalAccordion_DestinationCityPageRefs on DestinationCityPageBlocksAccordionBlockAccordionsGlobalAccordion { global_accordion { global_accordionConnection { @@ -496,7 +496,7 @@ export const Accordion_ContentPageRefs = gql` ${SpecificAccordion_ContentPageRefs} ` -export const SpecificAccordion_DestinationCityPageRefs = gql` +const SpecificAccordion_DestinationCityPageRefs = gql` fragment SpecificAccordion_DestinationCityPageRefs on DestinationCityPageBlocksAccordionBlockAccordionsSpecificAccordion { specific_accordion { questions { @@ -551,7 +551,7 @@ export const Accordion_DestinationCityPageRefs = gql` ${SpecificAccordion_DestinationCityPageRefs} ` -export const GlobalAccordion_DestinationCountryPage = gql` +const GlobalAccordion_DestinationCountryPage = gql` fragment GlobalAccordion_DestinationCountryPage on DestinationCountryPageBlocksAccordionBlockAccordionsGlobalAccordion { __typename global_accordion { @@ -567,7 +567,7 @@ export const GlobalAccordion_DestinationCountryPage = gql` ${AccordionBlock} ` -export const SpecificAccordion_DestinationCountryPage = gql` +const SpecificAccordion_DestinationCountryPage = gql` fragment SpecificAccordion_DestinationCountryPage on DestinationCountryPageBlocksAccordionBlockAccordionsSpecificAccordion { __typename specific_accordion { @@ -630,7 +630,7 @@ export const Accordion_DestinationCountryPage = gql` ${SpecificAccordion_DestinationCountryPage} ` -export const GlobalAccordion_DestinationCountryPageRefs = gql` +const GlobalAccordion_DestinationCountryPageRefs = gql` fragment GlobalAccordion_DestinationCountryPageRefs on DestinationCountryPageBlocksAccordionBlockAccordionsGlobalAccordion { global_accordion { global_accordionConnection { @@ -645,7 +645,7 @@ export const GlobalAccordion_DestinationCountryPageRefs = gql` ${AccordionBlockRefs} ` -export const SpecificAccordion_DestinationCountryPageRefs = gql` +const SpecificAccordion_DestinationCountryPageRefs = gql` fragment SpecificAccordion_DestinationCountryPageRefs on DestinationCountryPageBlocksAccordionBlockAccordionsSpecificAccordion { specific_accordion { questions { @@ -701,7 +701,7 @@ export const Accordion_DestinationCountryPageRefs = gql` ${SpecificAccordion_DestinationCountryPageRefs} ` -export const GlobalAccordion_CampaignPage = gql` +const GlobalAccordion_CampaignPage = gql` fragment GlobalAccordion_CampaignPage on CampaignPageBlocksAccordionBlockAccordionsGlobalAccordion { __typename global_accordion { @@ -717,7 +717,7 @@ export const GlobalAccordion_CampaignPage = gql` ${AccordionBlock} ` -export const SpecificAccordion_CampaignPage = gql` +const SpecificAccordion_CampaignPage = gql` fragment SpecificAccordion_CampaignPage on CampaignPageBlocksAccordionBlockAccordionsSpecificAccordion { __typename specific_accordion { @@ -779,7 +779,7 @@ export const Accordion_CampaignPage = gql` ${SpecificAccordion_CampaignPage} ` -export const GlobalAccordion_CampaignPageRefs = gql` +const GlobalAccordion_CampaignPageRefs = gql` fragment GlobalAccordion_CampaignPageRefs on CampaignPageBlocksAccordionBlockAccordionsGlobalAccordion { global_accordion { global_accordionConnection { @@ -794,7 +794,7 @@ export const GlobalAccordion_CampaignPageRefs = gql` ${AccordionBlockRefs} ` -export const SpecificAccordion_CampaignPageRefs = gql` +const SpecificAccordion_CampaignPageRefs = gql` fragment SpecificAccordion_CampaignPageRefs on CampaignPageBlocksAccordionBlockAccordionsSpecificAccordion { specific_accordion { questions { @@ -849,7 +849,7 @@ export const Accordion_CampaignPageRefs = gql` ${SpecificAccordion_CampaignPageRefs} ` -export const GlobalAccordion_DestinationFilterBlocks = gql` +const GlobalAccordion_DestinationFilterBlocks = gql` fragment GlobalAccordion_DestinationFilterBlocks on DestinationFilterBlocksAccordionBlockAccordionsGlobalAccordion { __typename global_accordion { @@ -865,7 +865,7 @@ export const GlobalAccordion_DestinationFilterBlocks = gql` ${AccordionBlock} ` -export const SpecificAccordion_DestinationFilterBlocks = gql` +const SpecificAccordion_DestinationFilterBlocks = gql` fragment SpecificAccordion_DestinationFilterBlocks on DestinationFilterBlocksAccordionBlockAccordionsSpecificAccordion { __typename specific_accordion { @@ -927,7 +927,7 @@ export const Accordion_DestinationFilterBlocks = gql` ${SpecificAccordion_DestinationFilterBlocks} ` -export const GlobalAccordion_DestinationFilterBlocksRefs = gql` +const GlobalAccordion_DestinationFilterBlocksRefs = gql` fragment GlobalAccordion_DestinationFilterBlocksRefs on DestinationFilterBlocksAccordionBlockAccordionsGlobalAccordion { global_accordion { global_accordionConnection { @@ -942,7 +942,7 @@ export const GlobalAccordion_DestinationFilterBlocksRefs = gql` ${AccordionBlockRefs} ` -export const SpecificAccordion_DestinationFilterBlocksRefs = gql` +const SpecificAccordion_DestinationFilterBlocksRefs = gql` fragment SpecificAccordion_DestinationFilterBlocksRefs on DestinationFilterBlocksAccordionBlockAccordionsSpecificAccordion { specific_accordion { questions { @@ -997,7 +997,7 @@ export const Accordion_DestinationFilterBlocksRefs = gql` ${SpecificAccordion_DestinationFilterBlocksRefs} ` -export const GlobalAccordion_PromoCampaignPage = gql` +const GlobalAccordion_PromoCampaignPage = gql` fragment GlobalAccordion_PromoCampaignPage on PromoCampaignPageBlocksAccordionBlockAccordionsGlobalAccordion { __typename global_accordion { @@ -1013,7 +1013,7 @@ export const GlobalAccordion_PromoCampaignPage = gql` ${AccordionBlock} ` -export const SpecificAccordion_PromoCampaignPage = gql` +const SpecificAccordion_PromoCampaignPage = gql` fragment SpecificAccordion_PromoCampaignPage on PromoCampaignPageBlocksAccordionBlockAccordionsSpecificAccordion { __typename specific_accordion { @@ -1074,7 +1074,7 @@ export const Accordion_PromoCampaignPage = gql` ${SpecificAccordion_PromoCampaignPage} ` -export const GlobalAccordion_PromoCampaignPageRefs = gql` +const GlobalAccordion_PromoCampaignPageRefs = gql` fragment GlobalAccordion_PromoCampaignPageRefs on PromoCampaignPageBlocksAccordionBlockAccordionsGlobalAccordion { global_accordion { global_accordionConnection { @@ -1089,7 +1089,7 @@ export const GlobalAccordion_PromoCampaignPageRefs = gql` ${AccordionBlockRefs} ` -export const SpecificAccordion_PromoCampaignPageRefs = gql` +const SpecificAccordion_PromoCampaignPageRefs = gql` fragment SpecificAccordion_PromoCampaignPageRefs on PromoCampaignPageBlocksAccordionBlockAccordionsSpecificAccordion { specific_accordion { questions { diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/HotelListing.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/HotelListing.graphql.ts index 010b56f84..195d151ba 100644 --- a/packages/trpc/lib/graphql/Fragments/Blocks/HotelListing.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Blocks/HotelListing.graphql.ts @@ -1,6 +1,6 @@ import { gql } from "graphql-tag" -export const HotelListing = gql` +const HotelListing = gql` fragment HotelListing on HotelListing { heading location_filter { diff --git a/packages/trpc/lib/graphql/Fragments/Blocks/VideoCard.graphql.ts b/packages/trpc/lib/graphql/Fragments/Blocks/VideoCard.graphql.ts index 0987e8d5b..fc4e9ab86 100644 --- a/packages/trpc/lib/graphql/Fragments/Blocks/VideoCard.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Blocks/VideoCard.graphql.ts @@ -3,7 +3,7 @@ import { gql } from "graphql-tag" import { System } from "../System.graphql" import { Video, VideoRef } from "../Video.graphql" -export const VideoQuoteCard = gql` +const VideoQuoteCard = gql` fragment VideoQuoteCard on VideoQuoteCard { video { ...Video @@ -16,7 +16,7 @@ export const VideoQuoteCard = gql` ${Video} ` -export const VideoTextCard = gql` +const VideoTextCard = gql` fragment VideoTextCard on VideoTextCard { video { ...Video @@ -85,7 +85,7 @@ export const VideoCard_StartPage = gql` ${VideoTextCard} ` -export const VideoQuoteCardRef = gql` +const VideoQuoteCardRef = gql` fragment VideoQuoteCardRef on VideoQuoteCard { video { ...VideoRef @@ -98,7 +98,7 @@ export const VideoQuoteCardRef = gql` ${System} ` -export const VideoTextCardRef = gql` +const VideoTextCardRef = gql` fragment VideoTextCardRef on VideoTextCard { video { ...VideoRef diff --git a/packages/trpc/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql.ts b/packages/trpc/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql.ts index ea33ef7d6..1c5ca14de 100644 --- a/packages/trpc/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql.ts +++ b/packages/trpc/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql.ts @@ -25,7 +25,7 @@ import { StartPageLink } from "../PageLink/StartPageLink.graphql" import { PromoCampaignPageRef } from "../PromoCampaignPage/Ref.graphql" import { StartPageRef } from "../StartPage/Ref.graphql" -export const ContactFields = gql` +const ContactFields = gql` fragment ContactFields on ContactFields { display_text contact_field diff --git a/packages/trpc/lib/procedures.ts b/packages/trpc/lib/procedures.ts index 17764d7d7..afe072e7a 100644 --- a/packages/trpc/lib/procedures.ts +++ b/packages/trpc/lib/procedures.ts @@ -18,6 +18,7 @@ export const baseProcedure = procedure .use(durationMiddleware) .use(sentryMiddleware) +/** @alias */ export const publicProcedure = baseProcedure export const languageProcedure = baseProcedure.use(async function (opts) { @@ -53,6 +54,7 @@ export const languageProcedure = baseProcedure.use(async function (opts) { }) }) +/** @alias */ export const contentstackBaseProcedure = languageProcedure export const contentstackExtendedProcedureUID = contentstackBaseProcedure.use(