UNPKG

json-api-nestjs

Version:
23 lines (22 loc) 1.61 kB
import { FactoryProvider, ValueProvider } from '@nestjs/common'; import { ZodInputQuery, ZodQuery, ZodPost, ZodPatch, ZodPostRelationship, ZodPatchRelationship } from '../zod'; import { EntityClass, ObjectLiteral } from '../../../types'; import { EntityProps, FieldWithType, PropsForField, RelationPrimaryColumnType, RelationPropsArray, RelationPropsTypeName, ZodEntityProps } from '../types'; export declare function getParamsForOatchANdPostZod<E extends ObjectLiteral>(entityMapProps: Map<EntityClass<E>, ZodEntityProps<E>>, entity: Function & { prototype: E; }): { primaryColumnType: import("../types").TypeForId; typeName: any; fieldWithType: FieldWithType<E>; propsDb: PropsForField<E>; primaryColumnName: EntityProps<E>; relationArrayProps: RelationPropsArray<E>; relationPopsName: RelationPropsTypeName<E>; primaryColumnTypeForRel: RelationPrimaryColumnType<E>; }; export declare function ZodInputQuerySchema<E extends ObjectLiteral>(entity: EntityClass<E>): FactoryProvider<ZodInputQuery<E>>; export declare function ZodQuerySchema<E extends ObjectLiteral>(entity: EntityClass<E>): FactoryProvider<ZodQuery<E>>; export declare function ZodPostSchema<E extends ObjectLiteral, I extends string>(entity: EntityClass<E>): FactoryProvider<ZodPost<E, I>>; export declare function ZodPatchSchema<E extends ObjectLiteral, I extends string>(entity: EntityClass<E>): FactoryProvider<ZodPatch<E, I>>; export declare const ZodInputPostRelationshipSchema: ValueProvider<ZodPostRelationship>; export declare const ZodInputPatchRelationshipSchema: ValueProvider<ZodPatchRelationship>;