/** * Interface of the server (auto-generated code) */ import { z as zod } from "zod"; import {ZodUser, ZodUserWrite } from "./user"; export const ZodUserAuthGet = ZodUser.extend({ email: zod.string().max(512), avatar: zod.boolean(), }); export type UserAuthGet = zod.infer; export function isUserAuthGet(data: any): data is UserAuthGet { try { ZodUserAuthGet.parse(data); return true; } catch (e: any) { console.log(`Fail to parse data type='ZodUserAuthGet' error=${e}`); return false; } } export const ZodUserAuthGetWrite = ZodUserWrite.extend({ email: zod.string().max(512).optional(), avatar: zod.boolean().optional(), }); export type UserAuthGetWrite = zod.infer; export function isUserAuthGetWrite(data: any): data is UserAuthGetWrite { try { ZodUserAuthGetWrite.parse(data); return true; } catch (e: any) { console.log(`Fail to parse data type='ZodUserAuthGetWrite' error=${e}`); return false; } }