Kyoo/front/src/models/account.ts
2025-10-22 09:16:44 +02:00

15 lines
285 B
TypeScript

import { z } from "zod";
import { User } from "./user";
// TODO: actually parse the token
const TokenP = z.string();
export const AccountP = User.and(
z.object({
token: TokenP,
apiUrl: z.string(),
selected: z.boolean(),
}),
);
export type Account = z.infer<typeof AccountP>;