diff --git a/lib/graphql/Fragments/Alert.graphql b/lib/graphql/Fragments/Alert.graphql index e31cc4495..fc8062b0f 100644 --- a/lib/graphql/Fragments/Alert.graphql +++ b/lib/graphql/Fragments/Alert.graphql @@ -1,14 +1,22 @@ #import "./PageLink/AccountPageLink.graphql" +#import "./PageLink/CollectionPageLink.graphql" #import "./PageLink/ContentPageLink.graphql" +#import "./PageLink/DestinationCityPageLink.graphql" +#import "./PageLink/DestinationCountryPageLink.graphql" +#import "./PageLink/DestinationOverviewPageLink.graphql" #import "./PageLink/HotelPageLink.graphql" #import "./PageLink/LoyaltyPageLink.graphql" -#import "./PageLink/CollectionPageLink.graphql" +#import "./PageLink/StartPageLink.graphql" #import "./AccountPage/Ref.graphql" +#import "./CollectionPage/Ref.graphql" #import "./ContentPage/Ref.graphql" +#import "./DestinationCityPage/Ref.graphql" +#import "./DestinationCountryPage/Ref.graphql" +#import "./DestinationOverviewPage/Ref.graphql" #import "./HotelPage/Ref.graphql" #import "./LoyaltyPage/Ref.graphql" -#import "./CollectionPage/Ref.graphql" +#import "./StartPage/Ref.graphql" fragment Alert on Alert { type @@ -27,10 +35,14 @@ fragment Alert on Alert { node { __typename ...AccountPageLink + ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink - ...CollectionPageLink + ...StartPageLink } } } @@ -47,10 +59,14 @@ fragment Alert on Alert { node { __typename ...AccountPageLink + ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink - ...CollectionPageLink + ...StartPageLink } } } @@ -66,10 +82,14 @@ fragment AlertRef on Alert { node { __typename ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef + ...StartPageRef } } } @@ -81,10 +101,14 @@ fragment AlertRef on Alert { node { __typename ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/Blocks/Accordion.graphql b/lib/graphql/Fragments/Blocks/Accordion.graphql index 678d44355..aba5dc5e4 100644 --- a/lib/graphql/Fragments/Blocks/Accordion.graphql +++ b/lib/graphql/Fragments/Blocks/Accordion.graphql @@ -1,12 +1,22 @@ #import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" #import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" #import "../PageLink/HotelPageLink.graphql" #import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" #import "../AccountPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" #import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" #import "../HotelPage/Ref.graphql" #import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" #import "./Refs/Accordion.graphql" @@ -22,10 +32,14 @@ fragment AccordionBlock on Accordion { node { __typename ...AccountPageLink + ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink - ...CollectionPageLink + ...StartPageLink } } } @@ -44,10 +58,14 @@ fragment GlobalAccordionBlock on GlobalAccordion { node { __typename ...AccountPageLink + ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink - ...CollectionPageLink + ...StartPageLink } } } @@ -92,10 +110,14 @@ fragment SpecificAccordion on ContentPageBlocksAccordionBlockAccordionsSpecificA node { __typename ...AccountPageLink + ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink - ...CollectionPageLink + ...StartPageLink } } } @@ -135,10 +157,14 @@ fragment SpecificAccordionRefs on ContentPageBlocksAccordionBlockAccordionsSpeci node { __typename ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/Blocks/Card.graphql b/lib/graphql/Fragments/Blocks/Card.graphql index bf4538038..e616481ec 100644 --- a/lib/graphql/Fragments/Blocks/Card.graphql +++ b/lib/graphql/Fragments/Blocks/Card.graphql @@ -1,10 +1,14 @@ #import "../System.graphql" #import "../PageLink/AccountPageLink.graphql" -#import "../PageLink/ContentPageLink.graphql" -#import "../PageLink/LoyaltyPageLink.graphql" -#import "../PageLink/HotelPageLink.graphql" #import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" fragment CardBlock on Card { background_image @@ -27,10 +31,14 @@ fragment CardBlock on Card { node { __typename ...AccountPageLink - ...ContentPageLink - ...LoyaltyPageLink - ...HotelPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -48,10 +56,14 @@ fragment CardBlock on Card { node { __typename ...AccountPageLink - ...ContentPageLink - ...LoyaltyPageLink - ...HotelPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } diff --git a/lib/graphql/Fragments/Blocks/Content.graphql b/lib/graphql/Fragments/Blocks/Content.graphql index e8c917c3b..9c62f9425 100644 --- a/lib/graphql/Fragments/Blocks/Content.graphql +++ b/lib/graphql/Fragments/Blocks/Content.graphql @@ -1,17 +1,25 @@ #import "../Image.graphql" #import "../ImageContainer.graphql" -#import "../AccountPage/Ref.graphql" -#import "../ContentPage/Ref.graphql" -#import "../HotelPage/Ref.graphql" -#import "../LoyaltyPage/Ref.graphql" -#import "../CollectionPage/Ref.graphql" - #import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" #import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" #import "../PageLink/HotelPageLink.graphql" #import "../PageLink/LoyaltyPageLink.graphql" -#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" fragment Content_ContentPage on ContentPageBlocksContent { content { @@ -20,12 +28,16 @@ fragment Content_ContentPage on ContentPageBlocksContent { edges { node { __typename + ...ImageContainer ...AccountPageLink - ...ContentPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink - ...ImageContainer + ...StartPageLink } } } @@ -42,11 +54,14 @@ fragment Content_ContentPageRefs on ContentPageBlocksContent { node { __typename ...AccountPageRef - ...ContentPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...ImageContainerRef + ...StartPageRef } } } @@ -62,13 +77,17 @@ fragment Content_LoyaltyPage on LoyaltyPageBlocksContent { edges { node { __typename - ...AccountPageLink - ...ContentPageLink ...Image ...ImageContainer - ...LoyaltyPageLink + ...AccountPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -84,11 +103,14 @@ fragment Content_LoyaltyPageRefs on LoyaltyPageBlocksContent { node { __typename ...AccountPageRef - ...ContentPageRef - ...ImageContainerRef - ...LoyaltyPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/Blocks/DynamicContent.graphql b/lib/graphql/Fragments/Blocks/DynamicContent.graphql index 7b3f721b4..141daa3f9 100644 --- a/lib/graphql/Fragments/Blocks/DynamicContent.graphql +++ b/lib/graphql/Fragments/Blocks/DynamicContent.graphql @@ -1,14 +1,22 @@ -#import "../AccountPage/Ref.graphql" -#import "../ContentPage/Ref.graphql" -#import "../HotelPage/Ref.graphql" -#import "../LoyaltyPage/Ref.graphql" -#import "../CollectionPage/Ref.graphql" - #import "../PageLink/AccountPageLink.graphql" -#import "../PageLink/ContentPageLink.graphql" #import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" #import "../PageLink/HotelPageLink.graphql" #import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" fragment DynamicContent_AccountPage on AccountPageContentDynamicContent { dynamic_content { @@ -22,10 +30,14 @@ fragment DynamicContent_AccountPage on AccountPageContentDynamicContent { node { __typename ...AccountPageLink - ...LoyaltyPageLink - ...ContentPageLink - ...HotelPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -41,10 +53,14 @@ fragment DynamicContent_AccountPageRefs on AccountPageContentDynamicContent { node { __typename ...AccountPageRef - ...LoyaltyPageRef - ...ContentPageRef - ...HotelPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } @@ -64,10 +80,14 @@ fragment DynamicContent_CollectionPage on CollectionPageBlocksDynamicContent { node { __typename ...AccountPageLink - ...ContentPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink + ...StartPageLink } } } @@ -82,11 +102,15 @@ fragment DynamicContent_CollectionPageRefs on CollectionPageBlocksDynamicContent edges { node { __typename - ...ContentPageRef - ...HotelPageRef - ...LoyaltyPageRef ...AccountPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } @@ -106,10 +130,14 @@ fragment DynamicContent_ContentPage on ContentPageBlocksDynamicContent { node { __typename ...AccountPageLink - ...ContentPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink + ...StartPageLink } } } @@ -124,11 +152,15 @@ fragment DynamicContent_ContentPageRefs on ContentPageBlocksDynamicContent { edges { node { __typename - ...ContentPageRef - ...HotelPageRef - ...LoyaltyPageRef ...AccountPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } @@ -147,11 +179,15 @@ fragment DynamicContent_LoyaltyPage on LoyaltyPageBlocksDynamicContent { edges { node { __typename - ...ContentPageLink - ...LoyaltyPageLink ...AccountPageLink - ...HotelPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -166,11 +202,15 @@ fragment DynamicContent_LoyaltyPageRefs on LoyaltyPageBlocksDynamicContent { edges { node { __typename - ...ContentPageRef - ...LoyaltyPageRef ...AccountPageRef - ...HotelPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/Blocks/LoyaltyCard.graphql b/lib/graphql/Fragments/Blocks/LoyaltyCard.graphql index 1e39b93d4..33024aece 100644 --- a/lib/graphql/Fragments/Blocks/LoyaltyCard.graphql +++ b/lib/graphql/Fragments/Blocks/LoyaltyCard.graphql @@ -1,10 +1,14 @@ #import "../System.graphql" #import "../PageLink/AccountPageLink.graphql" -#import "../PageLink/ContentPageLink.graphql" -#import "../PageLink/LoyaltyPageLink.graphql" -#import "../PageLink/HotelPageLink.graphql" #import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" fragment LoyaltyCardBlock on LoyaltyCard { body_text @@ -23,11 +27,15 @@ fragment LoyaltyCardBlock on LoyaltyCard { edges { node { __typename - ...LoyaltyPageLink - ...ContentPageLink ...AccountPageLink - ...HotelPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } diff --git a/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql b/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql index d125d77ed..595965586 100644 --- a/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql +++ b/lib/graphql/Fragments/Blocks/Refs/Accordion.graphql @@ -1,8 +1,12 @@ #import "../../AccountPage/Ref.graphql" +#import "../../CollectionPage/Ref.graphql" #import "../../ContentPage/Ref.graphql" +#import "../../DestinationCityPage/Ref.graphql" +#import "../../DestinationCountryPage/Ref.graphql" +#import "../../DestinationOverviewPage/Ref.graphql" #import "../../HotelPage/Ref.graphql" #import "../../LoyaltyPage/Ref.graphql" -#import "../../CollectionPage/Ref.graphql" +#import "../../StartPage/Ref.graphql" fragment AccordionBlockRefs on Accordion { questions { @@ -12,10 +16,14 @@ fragment AccordionBlockRefs on Accordion { node { __typename ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef + ...StartPageRef } } } @@ -31,10 +39,14 @@ fragment GlobalAccordionBlockRefs on GlobalAccordion { node { __typename ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/Blocks/Refs/Card.graphql b/lib/graphql/Fragments/Blocks/Refs/Card.graphql index e19052c8c..55042684a 100644 --- a/lib/graphql/Fragments/Blocks/Refs/Card.graphql +++ b/lib/graphql/Fragments/Blocks/Refs/Card.graphql @@ -1,8 +1,12 @@ #import "../../AccountPage/Ref.graphql" -#import "../../ContentPage/Ref.graphql" -#import "../../LoyaltyPage/Ref.graphql" #import "../../CollectionPage/Ref.graphql" +#import "../../ContentPage/Ref.graphql" +#import "../../DestinationCityPage/Ref.graphql" +#import "../../DestinationCountryPage/Ref.graphql" +#import "../../DestinationOverviewPage/Ref.graphql" #import "../../HotelPage/Ref.graphql" +#import "../../LoyaltyPage/Ref.graphql" +#import "../../StartPage/Ref.graphql" fragment CardBlockRef on Card { secondary_button { @@ -11,10 +15,14 @@ fragment CardBlockRef on Card { node { __typename ...AccountPageRef - ...ContentPageRef - ...LoyaltyPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } @@ -25,10 +33,14 @@ fragment CardBlockRef on Card { node { __typename ...AccountPageRef - ...ContentPageRef - ...LoyaltyPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/Blocks/Refs/LoyaltyCard.graphql b/lib/graphql/Fragments/Blocks/Refs/LoyaltyCard.graphql index 38255a6a6..0c1aaddf8 100644 --- a/lib/graphql/Fragments/Blocks/Refs/LoyaltyCard.graphql +++ b/lib/graphql/Fragments/Blocks/Refs/LoyaltyCard.graphql @@ -1,8 +1,12 @@ #import "../../AccountPage/Ref.graphql" -#import "../../ContentPage/Ref.graphql" -#import "../../LoyaltyPage/Ref.graphql" -#import "../../HotelPage/Ref.graphql" #import "../../CollectionPage/Ref.graphql" +#import "../../ContentPage/Ref.graphql" +#import "../../DestinationCityPage/Ref.graphql" +#import "../../DestinationCountryPage/Ref.graphql" +#import "../../DestinationOverviewPage/Ref.graphql" +#import "../../HotelPage/Ref.graphql" +#import "../../LoyaltyPage/Ref.graphql" +#import "../../StartPage/Ref.graphql" fragment LoyaltyCardBlockRef on LoyaltyCard { link { @@ -10,11 +14,15 @@ fragment LoyaltyCardBlockRef on LoyaltyCard { edges { node { __typename - ...LoyaltyPageRef - ...ContentPageRef ...AccountPageRef - ...HotelPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/Blocks/Refs/TeaserCard.graphql b/lib/graphql/Fragments/Blocks/Refs/TeaserCard.graphql index b6abf8875..3004ca5da 100644 --- a/lib/graphql/Fragments/Blocks/Refs/TeaserCard.graphql +++ b/lib/graphql/Fragments/Blocks/Refs/TeaserCard.graphql @@ -1,8 +1,12 @@ #import "../../AccountPage/Ref.graphql" -#import "../../ContentPage/Ref.graphql" -#import "../../LoyaltyPage/Ref.graphql" -#import "../../HotelPage/Ref.graphql" #import "../../CollectionPage/Ref.graphql" +#import "../../ContentPage/Ref.graphql" +#import "../../DestinationCityPage/Ref.graphql" +#import "../../DestinationCountryPage/Ref.graphql" +#import "../../DestinationOverviewPage/Ref.graphql" +#import "../../HotelPage/Ref.graphql" +#import "../../LoyaltyPage/Ref.graphql" +#import "../../StartPage/Ref.graphql" fragment TeaserCardBlockRef on TeaserCard { secondary_button { @@ -11,10 +15,14 @@ fragment TeaserCardBlockRef on TeaserCard { node { __typename ...AccountPageRef - ...ContentPageRef - ...LoyaltyPageRef - ...HotelPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } @@ -25,10 +33,14 @@ fragment TeaserCardBlockRef on TeaserCard { node { __typename ...AccountPageRef - ...ContentPageRef - ...LoyaltyPageRef - ...HotelPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } @@ -40,10 +52,14 @@ fragment TeaserCardBlockRef on TeaserCard { node { __typename ...AccountPageRef - ...ContentPageRef - ...LoyaltyPageRef - ...HotelPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } @@ -53,11 +69,15 @@ fragment TeaserCardBlockRef on TeaserCard { edges { node { __typename - ...ContentPageRef - ...LoyaltyPageRef - ...HotelPageRef - ...CollectionPageRef ...AccountPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } @@ -67,11 +87,15 @@ fragment TeaserCardBlockRef on TeaserCard { edges { node { __typename - ...ContentPageRef - ...LoyaltyPageRef - ...HotelPageRef - ...CollectionPageRef ...AccountPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/Blocks/Shortcuts.graphql b/lib/graphql/Fragments/Blocks/Shortcuts.graphql index c44a8d990..d10f94177 100644 --- a/lib/graphql/Fragments/Blocks/Shortcuts.graphql +++ b/lib/graphql/Fragments/Blocks/Shortcuts.graphql @@ -1,14 +1,22 @@ -#import "../AccountPage/Ref.graphql" -#import "../CollectionPage/Ref.graphql" -#import "../ContentPage/Ref.graphql" -#import "../LoyaltyPage/Ref.graphql" -#import "../HotelPage/Ref.graphql" - #import "../PageLink/AccountPageLink.graphql" #import "../PageLink/CollectionPageLink.graphql" #import "../PageLink/ContentPageLink.graphql" -#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" #import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" fragment Shortcuts on Shortcuts { subtitle: preamble @@ -22,10 +30,14 @@ fragment Shortcuts on Shortcuts { node { __typename ...AccountPageLink - ...ContentPageLink - ...LoyaltyPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -63,10 +75,14 @@ fragment ShortcutsRefs on Shortcuts { node { __typename ...AccountPageRef - ...ContentPageRef - ...LoyaltyPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/Blocks/TeaserCard.graphql b/lib/graphql/Fragments/Blocks/TeaserCard.graphql index 7857d6d52..6d24ee28f 100644 --- a/lib/graphql/Fragments/Blocks/TeaserCard.graphql +++ b/lib/graphql/Fragments/Blocks/TeaserCard.graphql @@ -1,10 +1,14 @@ #import "../System.graphql" #import "../PageLink/AccountPageLink.graphql" -#import "../PageLink/ContentPageLink.graphql" #import "../PageLink/CollectionPageLink.graphql" -#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" #import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" fragment TeaserCardBlock on TeaserCard { heading @@ -26,11 +30,15 @@ fragment TeaserCardBlock on TeaserCard { edges { node { __typename - ...LoyaltyPageLink - ...ContentPageLink ...AccountPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -47,11 +55,15 @@ fragment TeaserCardBlock on TeaserCard { edges { node { __typename - ...LoyaltyPageLink - ...ContentPageLink - ...CollectionPageLink ...AccountPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -67,10 +79,14 @@ fragment TeaserCardBlock on TeaserCard { node { __typename ...AccountPageLink - ...ContentPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink + ...StartPageLink } } } @@ -90,10 +106,14 @@ fragment TeaserCardBlock on TeaserCard { node { __typename ...AccountPageLink - ...LoyaltyPageLink - ...ContentPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -112,10 +132,14 @@ fragment TeaserCardBlock on TeaserCard { node { __typename ...AccountPageLink - ...LoyaltyPageLink - ...ContentPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } diff --git a/lib/graphql/Fragments/Blocks/TextCols.graphql b/lib/graphql/Fragments/Blocks/TextCols.graphql index 3752e95e3..b1d385efd 100644 --- a/lib/graphql/Fragments/Blocks/TextCols.graphql +++ b/lib/graphql/Fragments/Blocks/TextCols.graphql @@ -1,14 +1,22 @@ -#import "../ContentPage/Ref.graphql" -#import "../HotelPage/Ref.graphql" -#import "../LoyaltyPage/Ref.graphql" -#import "../CollectionPage/Ref.graphql" -#import "../AccountPage/Ref.graphql" - +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" #import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" #import "../PageLink/HotelPageLink.graphql" #import "../PageLink/LoyaltyPageLink.graphql" -#import "../PageLink/CollectionPageLink.graphql" -#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" fragment TextCols_ContentPage on ContentPageBlocksTextCols { text_cols { @@ -20,11 +28,15 @@ fragment TextCols_ContentPage on ContentPageBlocksTextCols { edges { node { __typename + ...AccountPageLink + ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink - ...CollectionPageLink - ...AccountPageLink + ...StartPageLink } } } @@ -43,11 +55,15 @@ fragment TextCols_ContentPageRef on ContentPageBlocksTextCols { edges { node { __typename + ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef - ...AccountPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/Blocks/UspGrid.graphql b/lib/graphql/Fragments/Blocks/UspGrid.graphql index 9313ae34c..fb47a0556 100644 --- a/lib/graphql/Fragments/Blocks/UspGrid.graphql +++ b/lib/graphql/Fragments/Blocks/UspGrid.graphql @@ -1,14 +1,22 @@ #import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" #import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" #import "../PageLink/HotelPageLink.graphql" #import "../PageLink/LoyaltyPageLink.graphql" -#import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" #import "../AccountPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" #import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" #import "../HotelPage/Ref.graphql" #import "../LoyaltyPage/Ref.graphql" -#import "../CollectionPage/Ref.graphql" +#import "../StartPage/Ref.graphql" fragment UspGrid_ContentPage on ContentPageBlocksUspGrid { __typename @@ -27,10 +35,14 @@ fragment UspGrid_ContentPage on ContentPageBlocksUspGrid { node { __typename ...AccountPageLink + ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink - ...CollectionPageLink + ...StartPageLink } } } @@ -57,10 +69,14 @@ fragment UspGrid_ContentPageRefs on ContentPageBlocksUspGrid { node { __typename ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef + ...StartPageRef } } } @@ -90,10 +106,14 @@ fragment UspGrid_CollectionPage on CollectionPageBlocksUspGrid { node { __typename ...AccountPageLink + ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink - ...CollectionPageLink + ...StartPageLink } } } @@ -120,10 +140,14 @@ fragment UspGrid_CollectionPageRefs on CollectionPageBlocksUspGrid { node { __typename ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/CollectionPage/NavigationLinks.graphql b/lib/graphql/Fragments/CollectionPage/NavigationLinks.graphql index ade4cda1d..596781cce 100644 --- a/lib/graphql/Fragments/CollectionPage/NavigationLinks.graphql +++ b/lib/graphql/Fragments/CollectionPage/NavigationLinks.graphql @@ -1,8 +1,22 @@ +#import "../PageLink/AccountPageLink.graphql" #import "../PageLink/CollectionPageLink.graphql" #import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" #import "../PageLink/HotelPageLink.graphql" #import "../PageLink/LoyaltyPageLink.graphql" -#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" fragment NavigationLinks_CollectionPage on CollectionPageHeader { navigation_links { @@ -11,11 +25,15 @@ fragment NavigationLinks_CollectionPage on CollectionPageHeader { edges { node { __typename - ...HotelPageLink + ...AccountPageLink ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink ...LoyaltyPageLink - ...AccountPageLink + ...StartPageLink } } } @@ -28,11 +46,15 @@ fragment NavigationLinksRef_CollectionPage on CollectionPageHeader { edges { node { __typename + ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef - ...AccountPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/ContentPage/NavigationLinks.graphql b/lib/graphql/Fragments/ContentPage/NavigationLinks.graphql index ed4b72836..d91a22d27 100644 --- a/lib/graphql/Fragments/ContentPage/NavigationLinks.graphql +++ b/lib/graphql/Fragments/ContentPage/NavigationLinks.graphql @@ -1,14 +1,22 @@ +#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/CollectionPageLink.graphql" #import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" #import "../PageLink/HotelPageLink.graphql" #import "../PageLink/LoyaltyPageLink.graphql" -#import "../PageLink/CollectionPageLink.graphql" -#import "../PageLink/AccountPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" -#import "../ContentPage/Ref.graphql" +#import "../AccountPage/Ref.graphql" #import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" #import "../HotelPage/Ref.graphql" #import "../LoyaltyPage/Ref.graphql" -#import "../AccountPage/Ref.graphql" +#import "../StartPage/Ref.graphql" fragment NavigationLinks_ContentPage on ContentPageHeader { navigation_links { @@ -17,11 +25,15 @@ fragment NavigationLinks_ContentPage on ContentPageHeader { edges { node { __typename - ...HotelPageLink - ...ContentPageLink - ...LoyaltyPageLink - ...CollectionPageLink ...AccountPageLink + ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -34,11 +46,15 @@ fragment NavigationLinksRef_ContentPage on ContentPageHeader { edges { node { __typename + ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef - ...AccountPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/DestinationOverviewPage/Ref.graphql b/lib/graphql/Fragments/DestinationOverviewPage/Ref.graphql new file mode 100644 index 000000000..0b93b06fb --- /dev/null +++ b/lib/graphql/Fragments/DestinationOverviewPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment DestinationOverviewPageRef on DestinationOverviewPage { + system { + ...System + } +} diff --git a/lib/graphql/Fragments/PageLink/DestinationCityPageLink.graphql b/lib/graphql/Fragments/PageLink/DestinationCityPageLink.graphql new file mode 100644 index 000000000..092328afa --- /dev/null +++ b/lib/graphql/Fragments/PageLink/DestinationCityPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment DestinationCityPageLink on DestinationCityPage { + title + url + system { + ...System + } +} diff --git a/lib/graphql/Fragments/PageLink/DestinationCountryPageLink.graphql b/lib/graphql/Fragments/PageLink/DestinationCountryPageLink.graphql new file mode 100644 index 000000000..ef36d64bb --- /dev/null +++ b/lib/graphql/Fragments/PageLink/DestinationCountryPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment DestinationCountryPageLink on DestinationCountryPage { + title + url + system { + ...System + } +} diff --git a/lib/graphql/Fragments/PageLink/DestinationOverviewPageLink.graphql b/lib/graphql/Fragments/PageLink/DestinationOverviewPageLink.graphql new file mode 100644 index 000000000..d0a3bba20 --- /dev/null +++ b/lib/graphql/Fragments/PageLink/DestinationOverviewPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment DestinationOverviewPageLink on DestinationOverviewPage { + title + url + system { + ...System + } +} diff --git a/lib/graphql/Fragments/PageLink/StartPageLink.graphql b/lib/graphql/Fragments/PageLink/StartPageLink.graphql new file mode 100644 index 000000000..bf1c29f0d --- /dev/null +++ b/lib/graphql/Fragments/PageLink/StartPageLink.graphql @@ -0,0 +1,9 @@ +#import "../System.graphql" + +fragment StartPageLink on StartPage { + title + url + system { + ...System + } +} diff --git a/lib/graphql/Fragments/Sidebar/Content.graphql b/lib/graphql/Fragments/Sidebar/Content.graphql index 8c3637163..a2fe10478 100644 --- a/lib/graphql/Fragments/Sidebar/Content.graphql +++ b/lib/graphql/Fragments/Sidebar/Content.graphql @@ -1,17 +1,25 @@ #import "../Image.graphql" #import "../ImageContainer.graphql" -#import "../ContentPage/Ref.graphql" -#import "../LoyaltyPage/Ref.graphql" -#import "../CollectionPage/Ref.graphql" -#import "../HotelPage/Ref.graphql" -#import "../AccountPage/Ref.graphql" - -#import "../PageLink/ContentPageLink.graphql" -#import "../PageLink/LoyaltyPageLink.graphql" #import "../PageLink/AccountPageLink.graphql" #import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" #import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" fragment ContentSidebar_ContentPage on ContentPageSidebarContent { content { @@ -24,10 +32,14 @@ fragment ContentSidebar_ContentPage on ContentPageSidebarContent { ...Image ...ImageContainer ...AccountPageLink - ...ContentPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink + ...StartPageLink } } } @@ -44,10 +56,14 @@ fragment ContentSidebar_ContentPageRefs on ContentPageSidebarContent { __typename ...ImageContainerRef ...AccountPageRef - ...ContentPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef + ...StartPageRef } } } @@ -66,10 +82,14 @@ fragment ContentSidebar_LoyaltyPage on LoyaltyPageSidebarContent { ...Image ...ImageContainer ...AccountPageLink - ...ContentPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink + ...StartPageLink } } } @@ -84,12 +104,16 @@ fragment ContentSidebar_LoyaltyPageRefs on LoyaltyPageSidebarContent { edges { node { __typename - ...ContentPageRef ...ImageContainerRef - ...LoyaltyPageRef - ...CollectionPageRef - ...HotelPageRef ...AccountPageRef + ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql b/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql index a45fec0e5..3cf8ec462 100644 --- a/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql +++ b/lib/graphql/Fragments/Sidebar/JoinLoyaltyContact.graphql @@ -1,14 +1,22 @@ -#import "../AccountPage/Ref.graphql" -#import "../ContentPage/Ref.graphql" -#import "../LoyaltyPage/Ref.graphql" -#import "../HotelPage/Ref.graphql" -#import "../CollectionPage/Ref.graphql" - #import "../PageLink/AccountPageLink.graphql" -#import "../PageLink/ContentPageLink.graphql" -#import "../PageLink/LoyaltyPageLink.graphql" -#import "../PageLink/HotelPageLink.graphql" #import "../PageLink/CollectionPageLink.graphql" +#import "../PageLink/ContentPageLink.graphql" +#import "../PageLink/DestinationCityPageLink.graphql" +#import "../PageLink/DestinationCountryPageLink.graphql" +#import "../PageLink/DestinationOverviewPageLink.graphql" +#import "../PageLink/HotelPageLink.graphql" +#import "../PageLink/LoyaltyPageLink.graphql" +#import "../PageLink/StartPageLink.graphql" + +#import "../AccountPage/Ref.graphql" +#import "../CollectionPage/Ref.graphql" +#import "../ContentPage/Ref.graphql" +#import "../DestinationCityPage/Ref.graphql" +#import "../DestinationCountryPage/Ref.graphql" +#import "../DestinationOverviewPage/Ref.graphql" +#import "../HotelPage/Ref.graphql" +#import "../LoyaltyPage/Ref.graphql" +#import "../StartPage/Ref.graphql" fragment ContactFields on ContactFields { display_text @@ -32,10 +40,14 @@ fragment JoinLoyaltyContactSidebar_ContentPage on ContentPageSidebarJoinLoyaltyC node { __typename ...AccountPageLink - ...ContentPageLink - ...LoyaltyPageLink - ...HotelPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -59,10 +71,14 @@ fragment JoinLoyaltyContactSidebar_ContentPageRefs on ContentPageSidebarJoinLoya node { __typename ...AccountPageRef - ...ContentPageRef - ...LoyaltyPageRef - ...HotelPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } @@ -86,10 +102,14 @@ fragment JoinLoyaltyContactSidebar_LoyaltyPage on LoyaltyPageSidebarJoinLoyaltyC node { __typename ...AccountPageLink - ...ContentPageLink - ...LoyaltyPageLink - ...HotelPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -113,10 +133,14 @@ fragment JoinLoyaltyContactSidebar_LoyaltyPageRefs on LoyaltyPageSidebarJoinLoya node { __typename ...AccountPageRef - ...ContentPageRef - ...LoyaltyPageRef - ...HotelPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Fragments/StartPage/Ref.graphql b/lib/graphql/Fragments/StartPage/Ref.graphql new file mode 100644 index 000000000..29c980264 --- /dev/null +++ b/lib/graphql/Fragments/StartPage/Ref.graphql @@ -0,0 +1,7 @@ +#import "../System.graphql" + +fragment StartPageRef on StartPage { + system { + ...System + } +} diff --git a/lib/graphql/Query/AccountPage/Navigation.graphql b/lib/graphql/Query/AccountPage/Navigation.graphql index 17ef35d3e..dd3949a7d 100644 --- a/lib/graphql/Query/AccountPage/Navigation.graphql +++ b/lib/graphql/Query/AccountPage/Navigation.graphql @@ -1,15 +1,25 @@ -#import "../../Fragments/PageLink/AccountPageLink.graphql" -#import "../../Fragments/PageLink/ContentPageLink.graphql" -#import "../../Fragments/PageLink/LoyaltyPageLink.graphql" -#import "../../Fragments/PageLink/CollectionPageLink.graphql" -#import "../../Fragments/PageLink/HotelPageLink.graphql" -#import "../../Fragments/AccountPage/Ref.graphql" -#import "../../Fragments/ContentPage/Ref.graphql" -#import "../../Fragments/LoyaltyPage/Ref.graphql" -#import "../../Fragments/HotelPage/Ref.graphql" -#import "../../Fragments/CollectionPage/Ref.graphql" #import "../../Fragments/System.graphql" +#import "../../Fragments/PageLink/AccountPageLink.graphql" +#import "../../Fragments/PageLink/CollectionPageLink.graphql" +#import "../../Fragments/PageLink/ContentPageLink.graphql" +#import "../../Fragments/PageLink/DestinationCityPageLink.graphql" +#import "../../Fragments/PageLink/DestinationCountryPageLink.graphql" +#import "../../Fragments/PageLink/DestinationOverviewPageLink.graphql" +#import "../../Fragments/PageLink/HotelPageLink.graphql" +#import "../../Fragments/PageLink/LoyaltyPageLink.graphql" +#import "../../Fragments/PageLink/StartPageLink.graphql" + +#import "../../Fragments/AccountPage/Ref.graphql" +#import "../../Fragments/CollectionPage/Ref.graphql" +#import "../../Fragments/ContentPage/Ref.graphql" +#import "../../Fragments/DestinationCityPage/Ref.graphql" +#import "../../Fragments/DestinationCountryPage/Ref.graphql" +#import "../../Fragments/DestinationOverviewPage/Ref.graphql" +#import "../../Fragments/HotelPage/Ref.graphql" +#import "../../Fragments/LoyaltyPage/Ref.graphql" +#import "../../Fragments/StartPage/Ref.graphql" + query GetNavigationMyPages($locale: String!) { all_navigation_my_pages(locale: $locale, limit: 1) { items { @@ -22,10 +32,14 @@ query GetNavigationMyPages($locale: String!) { node { __typename ...AccountPageLink - ...ContentPageLink - ...LoyaltyPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -46,10 +60,14 @@ query GetNavigationMyPagesRefs($locale: String!) { node { __typename ...AccountPageRef - ...ContentPageRef - ...LoyaltyPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql b/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql index 373064e17..fe5c9bd62 100644 --- a/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql +++ b/lib/graphql/Query/DestinationCityPage/DestinationCityPage.graphql @@ -1,16 +1,24 @@ #import "../../Fragments/System.graphql" -#import "../../Fragments/PageLink/ContentPageLink.graphql" -#import "../../Fragments/PageLink/LoyaltyPageLink.graphql" + #import "../../Fragments/PageLink/AccountPageLink.graphql" #import "../../Fragments/PageLink/CollectionPageLink.graphql" +#import "../../Fragments/PageLink/ContentPageLink.graphql" +#import "../../Fragments/PageLink/DestinationCityPageLink.graphql" +#import "../../Fragments/PageLink/DestinationCountryPageLink.graphql" +#import "../../Fragments/PageLink/DestinationOverviewPageLink.graphql" #import "../../Fragments/PageLink/HotelPageLink.graphql" +#import "../../Fragments/PageLink/LoyaltyPageLink.graphql" +#import "../../Fragments/PageLink/StartPageLink.graphql" #import "../../Fragments/AccountPage/Ref.graphql" -#import "../../Fragments/ContentPage/Ref.graphql" -#import "../../Fragments/LoyaltyPage/Ref.graphql" -#import "../../Fragments/HotelPage/Ref.graphql" #import "../../Fragments/CollectionPage/Ref.graphql" +#import "../../Fragments/ContentPage/Ref.graphql" +#import "../../Fragments/DestinationCityPage/Ref.graphql" #import "../../Fragments/DestinationCountryPage/Ref.graphql" +#import "../../Fragments/DestinationOverviewPage/Ref.graphql" +#import "../../Fragments/HotelPage/Ref.graphql" +#import "../../Fragments/LoyaltyPage/Ref.graphql" +#import "../../Fragments/StartPage/Ref.graphql" query GetDestinationCityPage($locale: String!, $uid: String!) { destination_city_page(uid: $uid, locale: $locale) { @@ -54,10 +62,14 @@ query GetDestinationCityPage($locale: String!, $uid: String!) { node { __typename ...AccountPageLink - ...ContentPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink + ...StartPageLink } } } @@ -94,10 +106,14 @@ query GetDestinationCityPageRefs($locale: String!, $uid: String!) { node { __typename ...AccountPageRef - ...ContentPageRef - ...LoyaltyPageRef - ...HotelPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql b/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql index ecf7a5c48..3e93bd03a 100644 --- a/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql +++ b/lib/graphql/Query/DestinationCountryPage/DestinationCountryPage.graphql @@ -1,15 +1,24 @@ #import "../../Fragments/System.graphql" -#import "../../Fragments/PageLink/ContentPageLink.graphql" -#import "../../Fragments/PageLink/LoyaltyPageLink.graphql" + #import "../../Fragments/PageLink/AccountPageLink.graphql" #import "../../Fragments/PageLink/CollectionPageLink.graphql" +#import "../../Fragments/PageLink/ContentPageLink.graphql" +#import "../../Fragments/PageLink/DestinationCityPageLink.graphql" +#import "../../Fragments/PageLink/DestinationCountryPageLink.graphql" +#import "../../Fragments/PageLink/DestinationOverviewPageLink.graphql" #import "../../Fragments/PageLink/HotelPageLink.graphql" +#import "../../Fragments/PageLink/LoyaltyPageLink.graphql" +#import "../../Fragments/PageLink/StartPageLink.graphql" #import "../../Fragments/AccountPage/Ref.graphql" -#import "../../Fragments/ContentPage/Ref.graphql" -#import "../../Fragments/LoyaltyPage/Ref.graphql" -#import "../../Fragments/HotelPage/Ref.graphql" #import "../../Fragments/CollectionPage/Ref.graphql" +#import "../../Fragments/ContentPage/Ref.graphql" +#import "../../Fragments/DestinationCityPage/Ref.graphql" +#import "../../Fragments/DestinationCountryPage/Ref.graphql" +#import "../../Fragments/DestinationOverviewPage/Ref.graphql" +#import "../../Fragments/HotelPage/Ref.graphql" +#import "../../Fragments/LoyaltyPage/Ref.graphql" +#import "../../Fragments/StartPage/Ref.graphql" query GetDestinationCountryPage($locale: String!, $uid: String!) { destination_country_page(uid: $uid, locale: $locale) { @@ -35,10 +44,14 @@ query GetDestinationCountryPage($locale: String!, $uid: String!) { node { __typename ...AccountPageLink - ...ContentPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink + ...StartPageLink } } } @@ -65,10 +78,14 @@ query GetDestinationCountryPageRefs($locale: String!, $uid: String!) { node { __typename ...AccountPageRef - ...ContentPageRef - ...LoyaltyPageRef - ...HotelPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Query/Footer.graphql b/lib/graphql/Query/Footer.graphql index 81ce2b9dd..ec07b9da9 100644 --- a/lib/graphql/Query/Footer.graphql +++ b/lib/graphql/Query/Footer.graphql @@ -1,16 +1,24 @@ #import "../Fragments/System.graphql" #import "../Fragments/PageLink/AccountPageLink.graphql" +#import "../Fragments/PageLink/CollectionPageLink.graphql" #import "../Fragments/PageLink/ContentPageLink.graphql" +#import "../Fragments/PageLink/DestinationCityPageLink.graphql" +#import "../Fragments/PageLink/DestinationCountryPageLink.graphql" +#import "../Fragments/PageLink/DestinationOverviewPageLink.graphql" #import "../Fragments/PageLink/HotelPageLink.graphql" #import "../Fragments/PageLink/LoyaltyPageLink.graphql" -#import "../Fragments/PageLink/CollectionPageLink.graphql" +#import "../Fragments/PageLink/StartPageLink.graphql" #import "../Fragments/AccountPage/Ref.graphql" +#import "../Fragments/CollectionPage/Ref.graphql" #import "../Fragments/ContentPage/Ref.graphql" +#import "../Fragments/DestinationCityPage/Ref.graphql" +#import "../Fragments/DestinationCountryPage/Ref.graphql" +#import "../Fragments/DestinationOverviewPage/Ref.graphql" #import "../Fragments/HotelPage/Ref.graphql" #import "../Fragments/LoyaltyPage/Ref.graphql" -#import "../Fragments/CollectionPage/Ref.graphql" +#import "../Fragments/StartPage/Ref.graphql" #import "../Fragments/Footer/AppDownloads.graphql" #import "../Fragments/Footer/SocialMedia.graphql" @@ -28,11 +36,15 @@ query GetFooter($locale: String!) { pageConnection { edges { node { - ...ContentPageLink - ...HotelPageLink - ...LoyaltyPageLink ...AccountPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -45,11 +57,15 @@ query GetFooter($locale: String!) { pageConnection { edges { node { - ...ContentPageLink - ...HotelPageLink - ...LoyaltyPageLink ...AccountPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -69,11 +85,15 @@ query GetFooter($locale: String!) { pageConnection { edges { node { - ...ContentPageLink - ...HotelPageLink - ...LoyaltyPageLink ...AccountPageLink ...CollectionPageLink + ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink + ...HotelPageLink + ...LoyaltyPageLink + ...StartPageLink } } } @@ -91,11 +111,15 @@ query GetFooterRef($locale: String!) { pageConnection { edges { node { - ...ContentPageRef - ...HotelPageRef - ...LoyaltyPageRef ...AccountPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } @@ -105,11 +129,15 @@ query GetFooterRef($locale: String!) { pageConnection { edges { node { - ...ContentPageRef - ...HotelPageRef - ...LoyaltyPageRef ...AccountPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } @@ -119,11 +147,15 @@ query GetFooterRef($locale: String!) { pageConnection { edges { node { - ...ContentPageRef - ...HotelPageRef - ...LoyaltyPageRef ...AccountPageRef ...CollectionPageRef + ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef + ...HotelPageRef + ...LoyaltyPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Query/Header.graphql b/lib/graphql/Query/Header.graphql index 814fa294f..98b7fc732 100644 --- a/lib/graphql/Query/Header.graphql +++ b/lib/graphql/Query/Header.graphql @@ -1,18 +1,27 @@ #import "../Fragments/System.graphql" +#import "../Fragments/Blocks/Card.graphql" +#import "../Fragments/Blocks/Refs/Card.graphql" + #import "../Fragments/PageLink/AccountPageLink.graphql" #import "../Fragments/PageLink/CollectionPageLink.graphql" #import "../Fragments/PageLink/ContentPageLink.graphql" +#import "../Fragments/PageLink/DestinationCityPageLink.graphql" +#import "../Fragments/PageLink/DestinationCountryPageLink.graphql" +#import "../Fragments/PageLink/DestinationOverviewPageLink.graphql" #import "../Fragments/PageLink/HotelPageLink.graphql" #import "../Fragments/PageLink/LoyaltyPageLink.graphql" -#import "../Fragments/Blocks/Card.graphql" +#import "../Fragments/PageLink/StartPageLink.graphql" -#import "../Fragments/Blocks/Refs/Card.graphql" #import "../Fragments/AccountPage/Ref.graphql" #import "../Fragments/CollectionPage/Ref.graphql" #import "../Fragments/ContentPage/Ref.graphql" +#import "../Fragments/DestinationCityPage/Ref.graphql" +#import "../Fragments/DestinationCountryPage/Ref.graphql" +#import "../Fragments/DestinationOverviewPage/Ref.graphql" #import "../Fragments/HotelPage/Ref.graphql" #import "../Fragments/LoyaltyPage/Ref.graphql" +#import "../Fragments/StartPage/Ref.graphql" query GetHeader($locale: String!) { all_header(limit: 1, locale: $locale) { @@ -28,8 +37,12 @@ query GetHeader($locale: String!) { ...AccountPageLink ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink + ...StartPageLink } } } @@ -44,8 +57,12 @@ query GetHeader($locale: String!) { ...AccountPageLink ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink + ...StartPageLink } } } @@ -57,11 +74,15 @@ query GetHeader($locale: String!) { edges { node { __typename + ...AccountPageLink + ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink - ...CollectionPageLink - ...AccountPageLink + ...StartPageLink } } } @@ -71,11 +92,15 @@ query GetHeader($locale: String!) { edges { node { __typename + ...AccountPageLink + ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink - ...CollectionPageLink - ...AccountPageLink + ...StartPageLink } } } @@ -88,11 +113,15 @@ query GetHeader($locale: String!) { edges { node { __typename + ...AccountPageLink + ...CollectionPageLink ...ContentPageLink + ...DestinationCityPageLink + ...DestinationCountryPageLink + ...DestinationOverviewPageLink ...HotelPageLink ...LoyaltyPageLink - ...CollectionPageLink - ...AccountPageLink + ...StartPageLink } } } @@ -123,8 +152,12 @@ query GetHeaderRef($locale: String!) { ...AccountPageRef ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef + ...StartPageRef } } } @@ -137,8 +170,12 @@ query GetHeaderRef($locale: String!) { ...AccountPageRef ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef + ...StartPageRef } } } @@ -149,11 +186,15 @@ query GetHeaderRef($locale: String!) { edges { node { __typename + ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef - ...AccountPageRef + ...StartPageRef } } } @@ -162,11 +203,15 @@ query GetHeaderRef($locale: String!) { edges { node { __typename + ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef - ...AccountPageRef + ...StartPageRef } } } @@ -177,11 +222,15 @@ query GetHeaderRef($locale: String!) { edges { node { __typename + ...AccountPageRef + ...CollectionPageRef ...ContentPageRef + ...DestinationCityPageRef + ...DestinationCountryPageRef + ...DestinationOverviewPageRef ...HotelPageRef ...LoyaltyPageRef - ...CollectionPageRef - ...AccountPageRef + ...StartPageRef } } } diff --git a/lib/graphql/Query/HotelPage/HotelPage.graphql b/lib/graphql/Query/HotelPage/HotelPage.graphql index 6e383a247..331aa260e 100644 --- a/lib/graphql/Query/HotelPage/HotelPage.graphql +++ b/lib/graphql/Query/HotelPage/HotelPage.graphql @@ -1,14 +1,7 @@ -#import "../../Fragments/PageLink/AccountPageLink.graphql" #import "../../Fragments/PageLink/CollectionPageLink.graphql" #import "../../Fragments/PageLink/ContentPageLink.graphql" -#import "../../Fragments/PageLink/HotelPageLink.graphql" -#import "../../Fragments/PageLink/LoyaltyPageLink.graphql" -#import "../../Fragments/PageLink/CollectionPageLink.graphql" #import "../../Fragments/AccountPage/Ref.graphql" -#import "../../Fragments/ContentPage/Ref.graphql" -#import "../../Fragments/HotelPage/Ref.graphql" -#import "../../Fragments/LoyaltyPage/Ref.graphql" #import "../../Fragments/CollectionPage/Ref.graphql" #import "../../Fragments/Blocks/Accordion.graphql" diff --git a/server/routers/contentstack/base/output.ts b/server/routers/contentstack/base/output.ts index 0eda295b6..990a0c762 100644 --- a/server/routers/contentstack/base/output.ts +++ b/server/routers/contentstack/base/output.ts @@ -8,7 +8,12 @@ import { transformCardBlock, transformCardBlockRefs, } from "@/server/routers/contentstack/schemas/blocks/cardsGrid" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" +import { + linkRefsUnionSchema, + linkUnionSchema, + transformPageLink, + transformPageLinkRef, +} from "@/server/routers/contentstack/schemas/pageLinks" import { removeMultipleSlashes } from "@/utils/url" @@ -455,14 +460,6 @@ export const validateFooterRefConfigSchema = z.object({ * New Header Validation */ -const linkRefsUnionSchema = z.discriminatedUnion("__typename", [ - pageLinks.contentPageRefSchema, - pageLinks.hotelPageRefSchema, - pageLinks.loyaltyPageRefSchema, - pageLinks.accountPageRefSchema, - pageLinks.collectionPageRefSchema, -]) - const linkRefsSchema = z .object({ linkConnection: z.object({ @@ -475,7 +472,7 @@ const linkRefsSchema = z }) .transform((data) => { if (data.linkConnection.edges.length) { - const link = pageLinks.transformRef(data.linkConnection.edges[0].node) + const link = transformPageLinkRef(data.linkConnection.edges[0].node) if (link) { return { link, @@ -554,14 +551,6 @@ export const headerRefsSchema = z } }) -const linkUnionSchema = z.discriminatedUnion("__typename", [ - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.hotelPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, -]) - const linkSchema = z .object({ linkConnection: z.object({ @@ -576,7 +565,7 @@ const linkSchema = z if (data.linkConnection.edges.length) { const linkNode = data.linkConnection.edges[0].node if (linkNode) { - const link = pageLinks.transform(linkNode) + const link = transformPageLink(linkNode) if (link) { return { link, @@ -729,21 +718,13 @@ export const alertSchema = z embedded_itemsConnection: z.object({ edges: z.array( z.object({ - node: z - .discriminatedUnion("__typename", [ - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.hotelPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, - ]) - .transform((data) => { - const link = pageLinks.transform(data) - if (link) { - return link - } - return data - }), + node: linkUnionSchema.transform((data) => { + const link = transformPageLink(data) + if (link) { + return link + } + return data + }), }) ), }), @@ -834,13 +815,7 @@ const sidepeekContentRefSchema = z.object({ embedded_itemsConnection: z.object({ edges: z.array( z.object({ - node: z.discriminatedUnion("__typename", [ - pageLinks.accountPageRefSchema, - pageLinks.contentPageRefSchema, - pageLinks.hotelPageRefSchema, - pageLinks.loyaltyPageRefSchema, - pageLinks.collectionPageRefSchema, - ]), + node: linkRefsUnionSchema, }) ), }), diff --git a/server/routers/contentstack/destinationCityPage/output.ts b/server/routers/contentstack/destinationCityPage/output.ts index 56b42102f..6c2137ae8 100644 --- a/server/routers/contentstack/destinationCityPage/output.ts +++ b/server/routers/contentstack/destinationCityPage/output.ts @@ -1,8 +1,12 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" - import { tempImageVaultAssetSchema } from "../schemas/imageVault" +import { + destinationCountryPageRefSchema, + linkRefsUnionSchema, + linkUnionSchema, + transformPageLink, +} from "../schemas/pageLinks" import { systemSchema } from "../schemas/system" import type { ImageVaultAsset } from "@/types/components/imageVault" @@ -92,21 +96,13 @@ export const destinationCityPageSchema = z embedded_itemsConnection: z.object({ edges: z.array( z.object({ - node: z - .discriminatedUnion("__typename", [ - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.hotelPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, - ]) - .transform((data) => { - const link = pageLinks.transform(data) - if (link) { - return link - } - return data - }), + node: linkUnionSchema.transform((data) => { + const link = transformPageLink(data) + if (link) { + return link + } + return data + }), }) ), }), @@ -153,7 +149,7 @@ export const destinationCityPageRefsSchema = z.object({ countryConnection: z.object({ edges: z.array( z.object({ - node: pageLinks.destinationCountryPageRefSchema, + node: destinationCountryPageRefSchema, }) ), }), @@ -163,13 +159,7 @@ export const destinationCityPageRefsSchema = z.object({ embedded_itemsConnection: z.object({ edges: z.array( z.object({ - node: z.discriminatedUnion("__typename", [ - pageLinks.accountPageRefSchema, - pageLinks.contentPageRefSchema, - pageLinks.hotelPageRefSchema, - pageLinks.loyaltyPageRefSchema, - pageLinks.collectionPageRefSchema, - ]), + node: linkRefsUnionSchema, }) ), }), diff --git a/server/routers/contentstack/destinationCountryPage/output.ts b/server/routers/contentstack/destinationCountryPage/output.ts index 04261d78a..08a77d650 100644 --- a/server/routers/contentstack/destinationCountryPage/output.ts +++ b/server/routers/contentstack/destinationCountryPage/output.ts @@ -1,8 +1,11 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" - import { tempImageVaultAssetSchema } from "../schemas/imageVault" +import { + linkRefsUnionSchema, + linkUnionSchema, + transformPageLink, +} from "../schemas/pageLinks" import { systemSchema } from "../schemas/system" import type { ImageVaultAsset } from "@/types/components/imageVault" @@ -42,21 +45,13 @@ export const destinationCountryPageSchema = z embedded_itemsConnection: z.object({ edges: z.array( z.object({ - node: z - .discriminatedUnion("__typename", [ - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.hotelPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, - ]) - .transform((data) => { - const link = pageLinks.transform(data) - if (link) { - return link - } - return data - }), + node: linkUnionSchema.transform((data) => { + const link = transformPageLink(data) + if (link) { + return link + } + return data + }), }) ), }), @@ -103,13 +98,7 @@ export const destinationCountryPageRefsSchema = z.object({ embedded_itemsConnection: z.object({ edges: z.array( z.object({ - node: z.discriminatedUnion("__typename", [ - pageLinks.accountPageRefSchema, - pageLinks.contentPageRefSchema, - pageLinks.hotelPageRefSchema, - pageLinks.loyaltyPageRefSchema, - pageLinks.collectionPageRefSchema, - ]), + node: linkRefsUnionSchema, }) ), }), diff --git a/server/routers/contentstack/myPages/navigation/output.ts b/server/routers/contentstack/myPages/navigation/output.ts index 2f817c77b..f4ab428d7 100644 --- a/server/routers/contentstack/myPages/navigation/output.ts +++ b/server/routers/contentstack/myPages/navigation/output.ts @@ -1,20 +1,14 @@ import { z } from "zod" import { Lang } from "@/constants/languages" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" +import { linkRefsUnionSchema, linkUnionSchema } from "../../schemas/pageLinks" import { systemSchema } from "../../schemas/system" const pageConnection = z.object({ edges: z.array( z.object({ - node: z.discriminatedUnion("__typename", [ - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, - pageLinks.hotelPageSchema, - ]), + node: linkUnionSchema, }) ), }) @@ -22,13 +16,7 @@ const pageConnection = z.object({ const pageConnectionRefs = z.object({ edges: z.array( z.object({ - node: z.discriminatedUnion("__typename", [ - pageLinks.accountPageRefSchema, - pageLinks.contentPageRefSchema, - pageLinks.loyaltyPageRefSchema, - pageLinks.collectionPageRefSchema, - pageLinks.hotelPageRefSchema, - ]), + node: linkRefsUnionSchema, }) ), }) diff --git a/server/routers/contentstack/schemas/blocks/accordion.ts b/server/routers/contentstack/schemas/blocks/accordion.ts index 0e4c77268..4bd944477 100644 --- a/server/routers/contentstack/schemas/blocks/accordion.ts +++ b/server/routers/contentstack/schemas/blocks/accordion.ts @@ -1,6 +1,10 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" +import { + linkRefsUnionSchema, + linkUnionSchema, + transformPageLink, +} from "../pageLinks" import { BlocksEnums } from "@/types/enums/blocks" @@ -12,21 +16,13 @@ export const accordionItemsSchema = z.array( embedded_itemsConnection: z.object({ edges: z.array( z.object({ - node: z - .discriminatedUnion("__typename", [ - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.hotelPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, - ]) - .transform((data) => { - const link = pageLinks.transform(data) - if (link) { - return link - } - return data - }), + node: linkUnionSchema.transform((data) => { + const link = transformPageLink(data) + if (link) { + return link + } + return data + }), }) ), }), @@ -97,14 +93,6 @@ export const accordionSchema = z.object({ }), }) -const actualRefs = z.discriminatedUnion("__typename", [ - pageLinks.accountPageRefSchema, - pageLinks.contentPageRefSchema, - pageLinks.hotelPageRefSchema, - pageLinks.loyaltyPageRefSchema, - pageLinks.collectionPageRefSchema, -]) - export const globalAccordionConnectionRefs = z.object({ edges: z.array( z.object({ @@ -115,7 +103,7 @@ export const globalAccordionConnectionRefs = z.object({ embedded_itemsConnection: z.object({ edges: z.array( z.object({ - node: actualRefs, + node: linkRefsUnionSchema, }) ), }), @@ -134,7 +122,7 @@ export const specificAccordionConnectionRefs = z.object({ embedded_itemsConnection: z.object({ edges: z.array( z.object({ - node: actualRefs, + node: linkRefsUnionSchema, }) ), }), diff --git a/server/routers/contentstack/schemas/blocks/activitiesCard.ts b/server/routers/contentstack/schemas/blocks/activitiesCard.ts index 9c1f42a51..f88cfca6e 100644 --- a/server/routers/contentstack/schemas/blocks/activitiesCard.ts +++ b/server/routers/contentstack/schemas/blocks/activitiesCard.ts @@ -1,10 +1,9 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" - import { removeMultipleSlashes } from "@/utils/url" import { tempImageVaultAssetSchema } from "../imageVault" +import { contentPageRefSchema, contentPageSchema } from "../pageLinks" import { HotelPageEnum } from "@/types/enums/hotelPage" @@ -26,7 +25,7 @@ export const activitiesCardSchema = z.object({ edges: z.array( z.object({ node: z.discriminatedUnion("__typename", [ - pageLinks.contentPageSchema.extend({ + contentPageSchema.extend({ header: z.object({ preamble: z.string(), }), @@ -69,9 +68,7 @@ export const activitiesCardRefSchema = z.object({ hotel_page_activities_content_pageConnection: z.object({ edges: z.array( z.object({ - node: z.discriminatedUnion("__typename", [ - pageLinks.contentPageRefSchema, - ]), + node: z.discriminatedUnion("__typename", [contentPageRefSchema]), }) ), }), diff --git a/server/routers/contentstack/schemas/blocks/cardsGrid.ts b/server/routers/contentstack/schemas/blocks/cardsGrid.ts index 8afc38ccf..44c22c06e 100644 --- a/server/routers/contentstack/schemas/blocks/cardsGrid.ts +++ b/server/routers/contentstack/schemas/blocks/cardsGrid.ts @@ -1,8 +1,18 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" - import { tempImageVaultAssetSchema } from "../imageVault" +import { + accountPageSchema, + collectionPageSchema, + contentPageSchema, + destinationCityPageSchema, + destinationCountryPageSchema, + destinationOverviewPageSchema, + hotelPageSchema, + loyaltyPageSchema, + startPageSchema, + transformPageLink, +} from "../pageLinks" import { systemSchema } from "../system" import { buttonSchema } from "./utils/buttonLinkSchema" import { linkConnectionRefsSchema } from "./utils/linkConnection" @@ -71,14 +81,18 @@ export const teaserCardBlockSchema = z.object({ .discriminatedUnion("__typename", [ imageContainerSchema, imageSchema, - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.hotelPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, + accountPageSchema, + collectionPageSchema, + contentPageSchema, + destinationCityPageSchema, + destinationCountryPageSchema, + destinationOverviewPageSchema, + hotelPageSchema, + loyaltyPageSchema, + startPageSchema, ]) .transform((data) => { - const link = pageLinks.transform(data) + const link = transformPageLink(data) if (link) { return link } diff --git a/server/routers/contentstack/schemas/blocks/content.ts b/server/routers/contentstack/schemas/blocks/content.ts index 53de24634..1ee078b35 100644 --- a/server/routers/contentstack/schemas/blocks/content.ts +++ b/server/routers/contentstack/schemas/blocks/content.ts @@ -1,7 +1,17 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" - +import { + accountPageSchema, + collectionPageSchema, + contentPageSchema, + destinationCityPageSchema, + destinationCountryPageSchema, + destinationOverviewPageSchema, + hotelPageSchema, + loyaltyPageSchema, + startPageSchema, + transformPageLink, +} from "../pageLinks" import { imageRefsSchema, imageSchema } from "./image" import { imageContainerRefsSchema, @@ -27,14 +37,18 @@ export const contentSchema = z.object({ .discriminatedUnion("__typename", [ imageContainerSchema, imageSchema, - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.hotelPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, + accountPageSchema, + collectionPageSchema, + contentPageSchema, + destinationCityPageSchema, + destinationCountryPageSchema, + destinationOverviewPageSchema, + hotelPageSchema, + loyaltyPageSchema, + startPageSchema, ]) .transform((data) => { - const link = pageLinks.transform(data) + const link = transformPageLink(data) if (link) { return link } @@ -60,11 +74,15 @@ export const contentRefsSchema = z.object({ node: z.discriminatedUnion("__typename", [ imageRefsSchema, imageContainerRefsSchema, - pageLinks.accountPageRefSchema, - pageLinks.contentPageRefSchema, - pageLinks.hotelPageRefSchema, - pageLinks.loyaltyPageRefSchema, - pageLinks.collectionPageRefSchema, + accountPageSchema, + collectionPageSchema, + contentPageSchema, + destinationCityPageSchema, + destinationCountryPageSchema, + destinationOverviewPageSchema, + hotelPageSchema, + loyaltyPageSchema, + startPageSchema, ]), }) ), diff --git a/server/routers/contentstack/schemas/blocks/contentEmbeds.ts b/server/routers/contentstack/schemas/blocks/contentEmbeds.ts index 22643a352..eed8f4765 100644 --- a/server/routers/contentstack/schemas/blocks/contentEmbeds.ts +++ b/server/routers/contentstack/schemas/blocks/contentEmbeds.ts @@ -1,7 +1,17 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" - +import { + accountPageSchema, + collectionPageSchema, + contentPageSchema, + destinationCityPageSchema, + destinationCountryPageSchema, + destinationOverviewPageSchema, + hotelPageSchema, + loyaltyPageSchema, + startPageSchema, + transformPageLink, +} from "../pageLinks" import { imageSchema } from "./image" import { imageContainerSchema } from "./imageContainer" @@ -9,14 +19,18 @@ export const contentEmbedsSchema = z .discriminatedUnion("__typename", [ imageContainerSchema, imageSchema, - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.hotelPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, + accountPageSchema, + collectionPageSchema, + contentPageSchema, + destinationCityPageSchema, + destinationCountryPageSchema, + destinationOverviewPageSchema, + hotelPageSchema, + loyaltyPageSchema, + startPageSchema, ]) .transform((data) => { - const link = pageLinks.transform(data) + const link = transformPageLink(data) if (link) { return link } diff --git a/server/routers/contentstack/schemas/blocks/dynamicContent.ts b/server/routers/contentstack/schemas/blocks/dynamicContent.ts index 812fd6f57..2781ded90 100644 --- a/server/routers/contentstack/schemas/blocks/dynamicContent.ts +++ b/server/routers/contentstack/schemas/blocks/dynamicContent.ts @@ -1,6 +1,10 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" +import { + linkRefsUnionSchema, + linkUnionSchema, + transformPageLink, +} from "../pageLinks" import { BlocksEnums } from "@/types/enums/blocks" import { DynamicContentEnum } from "@/types/enums/dynamicContent" @@ -20,21 +24,13 @@ export const dynamicContentSchema = z.object({ linkConnection: z.object({ edges: z.array( z.object({ - node: z - .discriminatedUnion("__typename", [ - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.hotelPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, - ]) - .transform((data) => { - const link = pageLinks.transform(data) - if (link) { - return link - } - return data - }), + node: linkUnionSchema.transform((data) => { + const link = transformPageLink(data) + if (link) { + return link + } + return data + }), }) ), }), @@ -60,13 +56,7 @@ export const dynamicContentRefsSchema = z.object({ linkConnection: z.object({ edges: z.array( z.object({ - node: z.discriminatedUnion("__typename", [ - pageLinks.accountPageRefSchema, - pageLinks.contentPageRefSchema, - pageLinks.hotelPageRefSchema, - pageLinks.loyaltyPageRefSchema, - pageLinks.collectionPageRefSchema, - ]), + node: linkRefsUnionSchema, }) ), }), diff --git a/server/routers/contentstack/schemas/blocks/shortcuts.ts b/server/routers/contentstack/schemas/blocks/shortcuts.ts index 0026bb4bc..534532bc4 100644 --- a/server/routers/contentstack/schemas/blocks/shortcuts.ts +++ b/server/routers/contentstack/schemas/blocks/shortcuts.ts @@ -1,6 +1,10 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" +import { + linkRefsUnionSchema, + linkUnionSchema, + transformPageLink, +} from "../pageLinks" import { BlocksEnums } from "@/types/enums/blocks" @@ -18,21 +22,13 @@ export const shortcutsBlockSchema = z.object({ linkConnection: z.object({ edges: z.array( z.object({ - node: z - .discriminatedUnion("__typename", [ - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, - pageLinks.hotelPageSchema, - ]) - .transform((data) => { - const link = pageLinks.transform(data) - if (link) { - return link - } - return data - }), + node: linkUnionSchema.transform((data) => { + const link = transformPageLink(data) + if (link) { + return link + } + return data + }), }) ), }), @@ -77,13 +73,7 @@ export const shortcutsRefsSchema = z.object({ linkConnection: z.object({ edges: z.array( z.object({ - node: z.discriminatedUnion("__typename", [ - pageLinks.accountPageRefSchema, - pageLinks.contentPageRefSchema, - pageLinks.loyaltyPageRefSchema, - pageLinks.collectionPageRefSchema, - pageLinks.hotelPageRefSchema, - ]), + node: linkRefsUnionSchema, }) ), }), diff --git a/server/routers/contentstack/schemas/blocks/spaPage.ts b/server/routers/contentstack/schemas/blocks/spaPage.ts index f353bd736..974586be4 100644 --- a/server/routers/contentstack/schemas/blocks/spaPage.ts +++ b/server/routers/contentstack/schemas/blocks/spaPage.ts @@ -1,9 +1,9 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" - import { removeMultipleSlashes } from "@/utils/url" +import { collectionPageRefSchema, contentPageRefSchema } from "../pageLinks" + import { HotelPageEnum } from "@/types/enums/hotelPage" export const spaPageSchema = z.object({ @@ -55,8 +55,8 @@ export const spaPageRefSchema = z.object({ edges: z.array( z.object({ node: z.discriminatedUnion("__typename", [ - pageLinks.contentPageRefSchema, - pageLinks.collectionPageRefSchema, + contentPageRefSchema, + collectionPageRefSchema, ]), }) ), diff --git a/server/routers/contentstack/schemas/blocks/textCols.ts b/server/routers/contentstack/schemas/blocks/textCols.ts index 0bad1549f..0964a96ba 100644 --- a/server/routers/contentstack/schemas/blocks/textCols.ts +++ b/server/routers/contentstack/schemas/blocks/textCols.ts @@ -1,7 +1,10 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" - +import { + linkRefsUnionSchema, + linkUnionSchema, + transformPageLink, +} from "../pageLinks" import { imageRefsSchema, imageSchema } from "./image" import { BlocksEnums } from "@/types/enums/blocks" @@ -24,14 +27,10 @@ export const textColsSchema = z.object({ node: z .discriminatedUnion("__typename", [ imageSchema, - pageLinks.contentPageSchema, - pageLinks.hotelPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, - pageLinks.accountPageSchema, + ...linkUnionSchema.options, ]) .transform((data) => { - const link = pageLinks.transform(data) + const link = transformPageLink(data) if (link) { return link } @@ -46,14 +45,8 @@ export const textColsSchema = z.object({ }), }) -const actualRefs = z.discriminatedUnion("__typename", [ - pageLinks.contentPageRefSchema, - pageLinks.hotelPageRefSchema, - pageLinks.loyaltyPageRefSchema, -]) - type Refs = { - node: z.TypeOf + node: z.TypeOf } export const textColsRefsSchema = z.object({ @@ -67,7 +60,7 @@ export const textColsRefsSchema = z.object({ z.object({ node: z.discriminatedUnion("__typename", [ imageRefsSchema, - ...actualRefs.options, + ...linkRefsUnionSchema.options, ]), }) ), diff --git a/server/routers/contentstack/schemas/blocks/uspGrid.ts b/server/routers/contentstack/schemas/blocks/uspGrid.ts index cc8acb0d1..5e3b59536 100644 --- a/server/routers/contentstack/schemas/blocks/uspGrid.ts +++ b/server/routers/contentstack/schemas/blocks/uspGrid.ts @@ -1,6 +1,10 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" +import { + linkRefsUnionSchema, + linkUnionSchema, + transformPageLink, +} from "../pageLinks" import { BlocksEnums } from "@/types/enums/blocks" import { UspGridEnum } from "@/types/enums/uspGrid" @@ -12,21 +16,13 @@ const uspCardSchema = z.object({ embedded_itemsConnection: z.object({ edges: z.array( z.object({ - node: z - .discriminatedUnion("__typename", [ - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.hotelPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, - ]) - .transform((data) => { - const link = pageLinks.transform(data) - if (link) { - return link - } - return data - }), + node: linkUnionSchema.transform((data) => { + const link = transformPageLink(data) + if (link) { + return link + } + return data + }), }) ), }), @@ -59,13 +55,6 @@ export const uspGridSchema = z.object({ }), }) -const actualRefs = z.discriminatedUnion("__typename", [ - pageLinks.accountPageRefSchema, - pageLinks.contentPageRefSchema, - pageLinks.hotelPageRefSchema, - pageLinks.loyaltyPageRefSchema, -]) - export const uspGridRefsSchema = z.object({ usp_grid: z .object({ @@ -79,7 +68,7 @@ export const uspGridRefsSchema = z.object({ embedded_itemsConnection: z.object({ edges: z.array( z.object({ - node: actualRefs, + node: linkRefsUnionSchema, }) ), }), diff --git a/server/routers/contentstack/schemas/blocks/utils/buttonLinkSchema.ts b/server/routers/contentstack/schemas/blocks/utils/buttonLinkSchema.ts index 61f77f3a4..e27b0d0e6 100644 --- a/server/routers/contentstack/schemas/blocks/utils/buttonLinkSchema.ts +++ b/server/routers/contentstack/schemas/blocks/utils/buttonLinkSchema.ts @@ -1,6 +1,6 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" +import { linkUnionSchema, transformPageLink } from "../../pageLinks" export const buttonSchema = z .object({ @@ -16,21 +16,13 @@ export const buttonSchema = z linkConnection: z.object({ edges: z.array( z.object({ - node: z - .discriminatedUnion("__typename", [ - pageLinks.accountPageSchema, - pageLinks.contentPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.hotelPageSchema, - pageLinks.collectionPageSchema, - ]) - .transform((data) => { - const link = pageLinks.transform(data) - if (link) { - return link - } - return data - }), + node: linkUnionSchema.transform((data) => { + const link = transformPageLink(data) + if (link) { + return link + } + return data + }), }) ), }), diff --git a/server/routers/contentstack/schemas/blocks/utils/linkConnection.ts b/server/routers/contentstack/schemas/blocks/utils/linkConnection.ts index 738d06688..2a4e7b618 100644 --- a/server/routers/contentstack/schemas/blocks/utils/linkConnection.ts +++ b/server/routers/contentstack/schemas/blocks/utils/linkConnection.ts @@ -1,19 +1,13 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" +import { linkRefsUnionSchema } from "../../pageLinks" export const linkConnectionRefsSchema = z .object({ linkConnection: z.object({ edges: z.array( z.object({ - node: z.discriminatedUnion("__typename", [ - pageLinks.accountPageRefSchema, - pageLinks.contentPageRefSchema, - pageLinks.loyaltyPageRefSchema, - pageLinks.collectionPageRefSchema, - pageLinks.hotelPageRefSchema, - ]), + node: linkRefsUnionSchema, }) ), }), diff --git a/server/routers/contentstack/schemas/linkConnection.ts b/server/routers/contentstack/schemas/linkConnection.ts index ea6ee3649..d234ad59c 100644 --- a/server/routers/contentstack/schemas/linkConnection.ts +++ b/server/routers/contentstack/schemas/linkConnection.ts @@ -1,15 +1,11 @@ import { z } from "zod" -import { discriminatedUnion } from "@/lib/discriminatedUnion" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" - -const linkUnionSchema = z.discriminatedUnion("__typename", [ - pageLinks.contentPageSchema, - pageLinks.collectionPageSchema, - pageLinks.hotelPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.accountPageSchema, -]) +import { + linkRefsUnionSchema, + linkUnionSchema, + transformPageLink, + transformPageLinkRef, +} from "./pageLinks" const titleSchema = z.object({ title: z.string().optional().default(""), @@ -20,7 +16,7 @@ export const linkConnectionSchema = z linkConnection: z.object({ edges: z.array( z.object({ - node: discriminatedUnion(linkUnionSchema.options), + node: linkUnionSchema, }) ), }), @@ -29,7 +25,7 @@ export const linkConnectionSchema = z if (data.linkConnection.edges.length) { const linkNode = data.linkConnection.edges[0].node if (linkNode) { - const link = pageLinks.transform(linkNode) + const link = transformPageLink(linkNode) if (link) { return { link, @@ -48,20 +44,12 @@ export const linkAndTitleSchema = z.intersection( titleSchema ) -const linkRefsUnionSchema = z.discriminatedUnion("__typename", [ - pageLinks.contentPageRefSchema, - pageLinks.hotelPageRefSchema, - pageLinks.loyaltyPageRefSchema, - pageLinks.accountPageRefSchema, - pageLinks.collectionPageRefSchema, -]) - export const linkConnectionRefs = z .object({ linkConnection: z.object({ edges: z.array( z.object({ - node: discriminatedUnion(linkRefsUnionSchema.options), + node: linkRefsUnionSchema, }) ), }), @@ -70,7 +58,7 @@ export const linkConnectionRefs = z if (data.linkConnection.edges.length) { const linkNode = data.linkConnection.edges[0].node if (linkNode) { - const link = pageLinks.transformRef(linkNode) + const link = transformPageLinkRef(linkNode) if (link) { return { link, diff --git a/server/routers/contentstack/schemas/pageLinks.ts b/server/routers/contentstack/schemas/pageLinks.ts index 2cab74ebe..d364c4a56 100644 --- a/server/routers/contentstack/schemas/pageLinks.ts +++ b/server/routers/contentstack/schemas/pageLinks.ts @@ -74,6 +74,12 @@ export const destinationCountryPageRefSchema = z.object({ system: systemSchema, }) +export const destinationOverviewPageSchema = z + .object({ + __typename: z.literal(ContentEnum.blocks.DestinationOverviewPage), + }) + .merge(pageLinkSchema) + export const destinationOverviewPageRefSchema = z.object({ __typename: z.literal(ContentEnum.blocks.DestinationOverviewPage), system: systemSchema, @@ -101,19 +107,50 @@ export const loyaltyPageRefSchema = z.object({ system: systemSchema, }) +export const startPageSchema = z + .object({ + __typename: z.literal(ContentEnum.blocks.StartPage), + }) + .merge(pageLinkSchema) + +export const startPageRefSchema = z.object({ + __typename: z.literal(ContentEnum.blocks.StartPage), + system: systemSchema, +}) + +export const linkUnionSchema = z.discriminatedUnion("__typename", [ + accountPageSchema, + collectionPageSchema, + contentPageSchema, + destinationCityPageSchema, + destinationCountryPageSchema, + destinationOverviewPageSchema, + hotelPageSchema, + loyaltyPageSchema, + startPageSchema, +]) + type Data = | z.output - | z.output | z.output + | z.output + | z.output + | z.output + | z.output | z.output | z.output + | z.output | Object -export function transform(data: Data) { +export function transformPageLink(data: Data) { if (data && "__typename" in data) { switch (data.__typename) { case ContentEnum.blocks.AccountPage: case ContentEnum.blocks.HotelPage: + case ContentEnum.blocks.DestinationCityPage: + case ContentEnum.blocks.DestinationCountryPage: + case ContentEnum.blocks.DestinationOverviewPage: + case ContentEnum.blocks.StartPage: return { __typename: data.__typename, system: data.system, @@ -139,15 +176,31 @@ export function transform(data: Data) { } } +export const linkRefsUnionSchema = z.discriminatedUnion("__typename", [ + contentPageRefSchema, + hotelPageRefSchema, + loyaltyPageRefSchema, + accountPageRefSchema, + collectionPageRefSchema, + destinationCityPageRefSchema, + destinationCountryPageRefSchema, + destinationOverviewPageRefSchema, + startPageRefSchema, +]) + type RefData = | z.output | z.output | z.output | z.output | z.output + | z.output + | z.output + | z.output + | z.output | Object -export function transformRef(data: RefData) { +export function transformPageLinkRef(data: RefData) { if (data && "__typename" in data) { switch (data.__typename) { case ContentEnum.blocks.AccountPage: @@ -155,6 +208,10 @@ export function transformRef(data: RefData) { case ContentEnum.blocks.CollectionPage: case ContentEnum.blocks.HotelPage: case ContentEnum.blocks.LoyaltyPage: + case ContentEnum.blocks.DestinationCityPage: + case ContentEnum.blocks.DestinationCountryPage: + case ContentEnum.blocks.DestinationOverviewPage: + case ContentEnum.blocks.StartPage: return data.system } } diff --git a/server/routers/contentstack/schemas/sidebar/content.ts b/server/routers/contentstack/schemas/sidebar/content.ts index 2f84243d9..186c9bc27 100644 --- a/server/routers/contentstack/schemas/sidebar/content.ts +++ b/server/routers/contentstack/schemas/sidebar/content.ts @@ -1,12 +1,15 @@ import { z } from "zod" -import * as pageLinks from "@/server/routers/contentstack/schemas/pageLinks" - import { imageRefsSchema, imageSchema } from "../blocks/image" import { imageContainerRefsSchema, imageContainerSchema, } from "../blocks/imageContainer" +import { + linkRefsUnionSchema, + linkUnionSchema, + transformPageLink, +} from "../pageLinks" import { ContentEnum } from "@/types/enums/content" import { SidebarEnums } from "@/types/enums/sidebar" @@ -27,14 +30,10 @@ export const contentSchema = z.object({ .discriminatedUnion("__typename", [ imageContainerSchema, imageSchema, - pageLinks.contentPageSchema, - pageLinks.loyaltyPageSchema, - pageLinks.collectionPageSchema, - pageLinks.hotelPageSchema, - pageLinks.accountPageSchema, + ...linkUnionSchema.options, ]) .transform((data) => { - const link = pageLinks.transform(data) + const link = transformPageLink(data) if (link) { return link } @@ -55,11 +54,7 @@ export const contentSchema = z.object({ const actualRefs = z.discriminatedUnion("__typename", [ imageContainerRefsSchema, - pageLinks.contentPageRefSchema, - pageLinks.loyaltyPageRefSchema, - pageLinks.collectionPageRefSchema, - pageLinks.hotelPageRefSchema, - pageLinks.accountPageRefSchema, + ...linkRefsUnionSchema.options, ]) type Ref = typeof actualRefs._type diff --git a/types/enums/content.ts b/types/enums/content.ts index fbf69cae3..d08489d22 100644 --- a/types/enums/content.ts +++ b/types/enums/content.ts @@ -9,6 +9,7 @@ export namespace ContentEnum { HotelPage = "HotelPage", ImageContainer = "ImageContainer", LoyaltyPage = "LoyaltyPage", + StartPage = "StartPage", SysAsset = "SysAsset", } } diff --git a/types/requests/utils/pageLink.ts b/types/requests/utils/pageLink.ts index a389d313c..48a876529 100644 --- a/types/requests/utils/pageLink.ts +++ b/types/requests/utils/pageLink.ts @@ -1,10 +1,9 @@ -import { z } from "zod" +import type { z } from "zod" -import { +import type { extendedPageLinkSchema, pageLinkSchema, } from "@/server/routers/contentstack/schemas/pageLinks" - import type { EmbedEnum } from "./embeds" import type { TypenameInterface } from "./typename"