json-api-nestjs
Version:
JsonApi Plugin for NestJs
60 lines (59 loc) • 1.33 kB
TypeScript
import { z } from 'zod';
export declare const zodPostRelationship: z.ZodObject<{
data: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
type: z.ZodString;
id: z.ZodString;
}, "strict", z.ZodTypeAny, {
id: string;
type: string;
}, {
id: string;
type: string;
}>, {
id: string;
type: string;
}, {
id: string;
type: string;
}>, z.ZodArray<z.ZodEffects<z.ZodObject<{
type: z.ZodString;
id: z.ZodString;
}, "strict", z.ZodTypeAny, {
id: string;
type: string;
}, {
id: string;
type: string;
}>, {
id: string;
type: string;
}, {
id: string;
type: string;
}>, "atleastone">]>;
}, "strict", z.ZodTypeAny, {
data: {
id: string;
type: string;
} | [{
id: string;
type: string;
}, ...{
id: string;
type: string;
}[]];
}, {
data: {
id: string;
type: string;
} | [{
id: string;
type: string;
}, ...{
id: string;
type: string;
}[]];
}>;
export type ZodPostRelationship = typeof zodPostRelationship;
export type PostRelationship = z.infer<ZodPostRelationship>;
export type PostRelationshipData = PostRelationship['data'];