/** * Interface of the server (auto-generated code) */ import { z as zod } from "zod"; import {ZodInteger} from "./integer"; import {ZodObjectId} from "./object-id"; import {ZodRestInputError} from "./rest-input-error"; export const ZodRestErrorResponse = zod.object({ oid: ZodObjectId.optional(), name: zod.string(), message: zod.string(), time: zod.string(), status: ZodInteger, statusMessage: zod.string(), inputError: zod.array(ZodRestInputError).optional(), }); export type RestErrorResponse = zod.infer; export function isRestErrorResponse(data: any): data is RestErrorResponse { try { ZodRestErrorResponse.parse(data); return true; } catch (e: any) { console.log(`Fail to parse data type='ZodRestErrorResponse' error=${e}`); return false; } }