38 lines
860 B
TypeScript
38 lines
860 B
TypeScript
/**
|
|
* Interface of the server (auto-generated code)
|
|
*/
|
|
import { z as zod } from "zod";
|
|
|
|
import {ZodUser, ZodUserWrite } from "./user";
|
|
|
|
export const ZodUserKarusic = ZodUser.extend({
|
|
|
|
});
|
|
|
|
export type UserKarusic = zod.infer<typeof ZodUserKarusic>;
|
|
|
|
export function isUserKarusic(data: any): data is UserKarusic {
|
|
try {
|
|
ZodUserKarusic.parse(data);
|
|
return true;
|
|
} catch (e: any) {
|
|
console.log(`Fail to parse data type='ZodUserKarusic' error=${e}`);
|
|
return false;
|
|
}
|
|
}
|
|
export const ZodUserKarusicWrite = ZodUserWrite.extend({
|
|
|
|
});
|
|
|
|
export type UserKarusicWrite = zod.infer<typeof ZodUserKarusicWrite>;
|
|
|
|
export function isUserKarusicWrite(data: any): data is UserKarusicWrite {
|
|
try {
|
|
ZodUserKarusicWrite.parse(data);
|
|
return true;
|
|
} catch (e: any) {
|
|
console.log(`Fail to parse data type='ZodUserKarusicWrite' error=${e}`);
|
|
return false;
|
|
}
|
|
}
|