Files
web/types/user.ts
2024-08-21 16:24:39 +02:00

33 lines
609 B
TypeScript

import { z } from "zod"
import { creditCardSchema, getUserSchema } from "@/server/routers/user/output"
type Journey = {
tag: string
title: string
}
type ShortcutLink = {
href: string
title: 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> {
name: string
journeys: Journey[]
nights: number
shortcuts: ShortcutLink[]
victories: Victory[]
}
export type CreditCard = z.output<typeof creditCardSchema>