34 lines
945 B
TypeScript
34 lines
945 B
TypeScript
/**
|
|
* Interface of the server (auto-generated code)
|
|
*/
|
|
import { z as zod } from "zod";
|
|
|
|
import {ZodGenericToken, ZodGenericTokenWrite } from "./generic-token";
|
|
|
|
export const ZodApplicationToken = ZodGenericToken;
|
|
|
|
export type ApplicationToken = zod.infer<typeof ZodApplicationToken>;
|
|
|
|
export function isApplicationToken(data: any): data is ApplicationToken {
|
|
try {
|
|
ZodApplicationToken.parse(data);
|
|
return true;
|
|
} catch (e: any) {
|
|
console.log(`Fail to parse data type='ZodApplicationToken' error=${e}`);
|
|
return false;
|
|
}
|
|
}
|
|
export const ZodApplicationTokenWrite = ZodGenericTokenWrite;
|
|
|
|
export type ApplicationTokenWrite = zod.infer<typeof ZodApplicationTokenWrite>;
|
|
|
|
export function isApplicationTokenWrite(data: any): data is ApplicationTokenWrite {
|
|
try {
|
|
ZodApplicationTokenWrite.parse(data);
|
|
return true;
|
|
} catch (e: any) {
|
|
console.log(`Fail to parse data type='ZodApplicationTokenWrite' error=${e}`);
|
|
return false;
|
|
}
|
|
}
|