fix: move packages schemas

This commit is contained in:
Christel Westerberg
2024-11-12 08:43:29 +01:00
parent 684faaa4b0
commit 43ef48e2c7
9 changed files with 87 additions and 75 deletions

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 })