53 lines
1.6 KiB
TypeScript
53 lines
1.6 KiB
TypeScript
/**
|
|
* Interface of the server (auto-generated code)
|
|
*/
|
|
import { z as zod } from "zod";
|
|
|
|
import {ZodOIDGenericData, ZodOIDGenericDataUpdate , ZodOIDGenericDataCreate } from "./oid-generic-data";
|
|
|
|
export const ZodOIDGenericDataSoftDelete = ZodOIDGenericData.extend({
|
|
/**
|
|
* Deleted state
|
|
*/
|
|
deleted: zod.boolean().readonly().optional(),
|
|
|
|
});
|
|
|
|
export type OIDGenericDataSoftDelete = zod.infer<typeof ZodOIDGenericDataSoftDelete>;
|
|
|
|
export function isOIDGenericDataSoftDelete(data: any): data is OIDGenericDataSoftDelete {
|
|
try {
|
|
ZodOIDGenericDataSoftDelete.parse(data);
|
|
return true;
|
|
} catch (e: any) {
|
|
console.log(`Fail to parse data type='ZodOIDGenericDataSoftDelete' error=${e}`);
|
|
return false;
|
|
}
|
|
}
|
|
export const ZodOIDGenericDataSoftDeleteUpdate = ZodOIDGenericDataUpdate;
|
|
|
|
export type OIDGenericDataSoftDeleteUpdate = zod.infer<typeof ZodOIDGenericDataSoftDeleteUpdate>;
|
|
|
|
export function isOIDGenericDataSoftDeleteUpdate(data: any): data is OIDGenericDataSoftDeleteUpdate {
|
|
try {
|
|
ZodOIDGenericDataSoftDeleteUpdate.parse(data);
|
|
return true;
|
|
} catch (e: any) {
|
|
console.log(`Fail to parse data type='ZodOIDGenericDataSoftDeleteUpdate' error=${e}`);
|
|
return false;
|
|
}
|
|
}
|
|
export const ZodOIDGenericDataSoftDeleteCreate = ZodOIDGenericDataCreate;
|
|
|
|
export type OIDGenericDataSoftDeleteCreate = zod.infer<typeof ZodOIDGenericDataSoftDeleteCreate>;
|
|
|
|
export function isOIDGenericDataSoftDeleteCreate(data: any): data is OIDGenericDataSoftDeleteCreate {
|
|
try {
|
|
ZodOIDGenericDataSoftDeleteCreate.parse(data);
|
|
return true;
|
|
} catch (e: any) {
|
|
console.log(`Fail to parse data type='ZodOIDGenericDataSoftDeleteCreate' error=${e}`);
|
|
return false;
|
|
}
|
|
}
|