Files
web/types/user.ts
2024-04-18 13:53:49 +02:00

40 lines
661 B
TypeScript

import { z } from "zod"
import { getUserSchema } from "@/server/routers/user/output"
type Journey = {
tag: string
title: string
}
type ShortcutLink = {
href: string
title: string
}
export type Stay = {
dateArrive: Date
dateDepart: Date
guests: number
hotel: string
}
type Victory = {
tag: string
title: string
}
/**
* All extended field needs to be added by API team to response or
* we have to get the values from elsewhere
*/
export interface User extends z.infer<typeof getUserSchema> {
dob: string
firstName: string
journeys: Journey[]
nights: number
shortcuts: ShortcutLink[]
stays: Stay[]
victories: Victory[]
}