42 lines
1.2 KiB
TypeScript
42 lines
1.2 KiB
TypeScript
/**
|
|
* Interface of the server (auto-generated code)
|
|
*/
|
|
import { z as zod } from "zod";
|
|
|
|
import {ZodUUIDGenericData, ZodUUIDGenericDataWrite } from "./uuid-generic-data";
|
|
|
|
export const ZodUUIDGenericDataSoftDelete = ZodUUIDGenericData.extend({
|
|
/**
|
|
* Deleted state
|
|
*/
|
|
deleted: zod.boolean().readonly().optional(),
|
|
|
|
});
|
|
|
|
export type UUIDGenericDataSoftDelete = zod.infer<typeof ZodUUIDGenericDataSoftDelete>;
|
|
|
|
export function isUUIDGenericDataSoftDelete(data: any): data is UUIDGenericDataSoftDelete {
|
|
try {
|
|
ZodUUIDGenericDataSoftDelete.parse(data);
|
|
return true;
|
|
} catch (e: any) {
|
|
console.log(`Fail to parse data type='ZodUUIDGenericDataSoftDelete' error=${e}`);
|
|
return false;
|
|
}
|
|
}
|
|
export const ZodUUIDGenericDataSoftDeleteWrite = ZodUUIDGenericDataWrite.extend({
|
|
|
|
});
|
|
|
|
export type UUIDGenericDataSoftDeleteWrite = zod.infer<typeof ZodUUIDGenericDataSoftDeleteWrite>;
|
|
|
|
export function isUUIDGenericDataSoftDeleteWrite(data: any): data is UUIDGenericDataSoftDeleteWrite {
|
|
try {
|
|
ZodUUIDGenericDataSoftDeleteWrite.parse(data);
|
|
return true;
|
|
} catch (e: any) {
|
|
console.log(`Fail to parse data type='ZodUUIDGenericDataSoftDeleteWrite' error=${e}`);
|
|
return false;
|
|
}
|
|
}
|