Merge branch 'master' into feature/tracking

This commit is contained in:
Linus Flood
2024-11-18 12:20:13 +01:00
240 changed files with 5429 additions and 2717 deletions

View File

@@ -151,8 +151,10 @@ export namespace endpoints {
export const invalidateSessions = `${base.path.profile}/${version}/${base.enitity.Profile}/invalidateSessions`
export const membership = `${base.path.profile}/${version}/${base.enitity.Profile}/membership`
export const profile = `${base.path.profile}/${version}/${base.enitity.Profile}`
export const reward = `${base.path.profile}/${version}/${base.enitity.Profile}/reward`
export const subscriberId = `${base.path.profile}/${version}/${base.enitity.Profile}/SubscriberId`
// TODO: Remove once new endpoints are out in production.
export const reward = `${base.path.profile}/${version}/${base.enitity.Profile}/reward`
export const tierRewards = `${base.path.profile}/${version}/${base.enitity.Profile}/tierRewards`
export function deleteProfile(profileId: string) {
@@ -172,9 +174,10 @@ export namespace endpoints {
}
export namespace Reward {
export const allTiers = `${base.path.profile}/${version}/${base.enitity.Reward}/AllTiers`
export const allTiers = `${base.path.profile}/${version}/${base.enitity.Reward}/allTiers`
export const reward = `${base.path.profile}/${version}/${base.enitity.Reward}`
export const unwrap = `${base.path.profile}/${version}/${base.enitity.Reward}/Unwrap`
export const redeem = `${base.path.profile}/${version}/${base.enitity.Reward}/redeem`
export const unwrap = `${base.path.profile}/${version}/${base.enitity.Reward}/unwrap`
export function claim(rewardId: string) {
return `${base.path.profile}/${version}/${base.enitity.Reward}/Claim/${rewardId}`

View File

@@ -1,11 +1,15 @@
#import "../Fragments/System.graphql"
#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/Blocks/Card.graphql"
#import "../Fragments/Blocks/Refs/Card.graphql"
#import "../Fragments/AccountPage/Ref.graphql"
#import "../Fragments/CollectionPage/Ref.graphql"
#import "../Fragments/ContentPage/Ref.graphql"
#import "../Fragments/HotelPage/Ref.graphql"
#import "../Fragments/LoyaltyPage/Ref.graphql"
@@ -14,14 +18,35 @@ query GetHeader($locale: String!) {
all_header(limit: 1, locale: $locale) {
items {
top_link {
title
linkConnection {
edges {
node {
__typename
...ContentPageLink
...HotelPageLink
...LoyaltyPageLink
logged_in {
icon
title
linkConnection {
edges {
node {
__typename
...AccountPageLink
...CollectionPageLink
...ContentPageLink
...HotelPageLink
...LoyaltyPageLink
}
}
}
}
logged_out {
icon
title
linkConnection {
edges {
node {
__typename
...AccountPageLink
...CollectionPageLink
...ContentPageLink
...HotelPageLink
...LoyaltyPageLink
}
}
}
}
@@ -84,13 +109,31 @@ query GetHeaderRef($locale: String!) {
all_header(limit: 1, locale: $locale) {
items {
top_link {
linkConnection {
edges {
node {
__typename
...ContentPageRef
...HotelPageRef
...LoyaltyPageRef
logged_in {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...CollectionPageRef
...ContentPageRef
...HotelPageRef
...LoyaltyPageRef
}
}
}
}
logged_out {
linkConnection {
edges {
node {
__typename
...AccountPageRef
...CollectionPageRef
...ContentPageRef
...HotelPageRef
...LoyaltyPageRef
}
}
}
}

View File

@@ -8,7 +8,10 @@ import {
import { serverClient } from "../server"
import type { BreackfastPackagesInput } from "@/types/requests/packages"
import type {
BreackfastPackagesInput,
PackagesInput,
} from "@/types/requests/packages"
export const getLocations = cache(async function getMemoizedLocations() {
return serverClient().hotel.locations.get()
@@ -144,6 +147,12 @@ export const getBreakfastPackages = cache(async function getMemoizedPackages(
return serverClient().hotel.packages.breakfast(input)
})
export const getPackages = cache(async function getMemoizedPackages(
input: PackagesInput
) {
return serverClient().hotel.packages.get(input)
})
export const getBookingConfirmation = cache(
function getMemoizedBookingConfirmation(confirmationNumber: string) {
return serverClient().booking.confirmation({ confirmationNumber })