import { z, ZodArray, ZodLiteral, ZodNumber, ZodObject, ZodOptional, ZodString, ZodUnion } from 'zod'; import { MapController } from '../../types'; import { TupleOfEntityRelation, ZodEntityProps } from '../../../mixin/types'; import { EntityClass, ObjectLiteral } from '../../../../types'; export declare enum Operation { add = "add", update = "update", remove = "remove" } declare const literalSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>; type Literal = z.infer; type Json = Literal | { [key: string]: Json; } | Json[]; declare const zodGeneralData: z.ZodNullable>; type ZodGeneral = typeof zodGeneralData; export type ZodAdd = ReturnType>; export declare const zodAdd: (type: T) => z.ZodObject<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; tmpId: z.ZodOptional>; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; tmpId: z.ZodOptional>; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }>[k_1]; } : never>; data: z.ZodNullable>; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; ref: z.ZodObject<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; tmpId: z.ZodOptional>; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; tmpId: z.ZodOptional>; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }>[k_1]; } : never>; data: z.ZodNullable>; }>, any> extends infer T_3 ? { [k_2 in keyof T_3]: z.objectUtil.addQuestionMarks; ref: z.ZodObject<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; tmpId: z.ZodOptional>; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; tmpId: z.ZodOptional>; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }>[k_1]; } : never>; data: z.ZodNullable>; }>, any>[k_2]; } : never, z.baseObjectInputType<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; tmpId: z.ZodOptional>; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; tmpId: z.ZodOptional>; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }>[k_1]; } : never>; data: z.ZodNullable>; }> extends infer T_4 ? { [k_3 in keyof T_4]: z.baseObjectInputType<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; tmpId: z.ZodOptional>; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; tmpId: z.ZodOptional>; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }>[k_1]; } : never>; data: z.ZodNullable>; }>[k_3]; } : never>; export type ZodUpdate = ReturnType>; export declare const zodUpdate: (type: T) => z.ZodObject<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }>[k_1]; } : never>; data: z.ZodNullable>; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }>[k_1]; } : never>; data: z.ZodNullable>; }>, any> extends infer T_3 ? { [k_2 in keyof T_3]: z.objectUtil.addQuestionMarks; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }>[k_1]; } : never>; data: z.ZodNullable>; }>, any>[k_2]; } : never, z.baseObjectInputType<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }>[k_1]; } : never>; data: z.ZodNullable>; }> extends infer T_4 ? { [k_3 in keyof T_4]: z.baseObjectInputType<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }>[k_1]; } : never>; data: z.ZodNullable>; }>[k_3]; } : never>; export type ZodRemove = ReturnType>; export declare const zodRemove: (type: T) => z.ZodObject<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }>[k_1]; } : never>; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }>[k_1]; } : never>; }>, any> extends infer T_3 ? { [k_2 in keyof T_3]: z.objectUtil.addQuestionMarks; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }>[k_1]; } : never>; }>, any>[k_2]; } : never, z.baseObjectInputType<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }>[k_1]; } : never>; }> extends infer T_4 ? { [k_3 in keyof T_4]: z.baseObjectInputType<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any> extends infer T_1 ? { [k in keyof T_1]: z.objectUtil.addQuestionMarks; id: z.ZodString; }>, any>[k]; } : never, z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }> extends infer T_2 ? { [k_1 in keyof T_2]: z.baseObjectInputType<{ type: z.ZodLiteral; id: z.ZodString; }>[k_1]; } : never>; }>[k_3]; } : never>; export type ZodOperationRel = ReturnType>; export declare const zodOperationRel: (type: string, rel: TupleOfEntityRelation, typeOperation: O) => z.ZodObject<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; relationship: z.ZodUnion<[z.ZodLiteral, z.ZodLiteral, ...z.ZodLiteral[]]>; }, "strict", z.ZodTypeAny, { id: string; type: string; relationship: string; }, { id: string; type: string; relationship: string; }>; data: z.ZodNullable>; }, "strict", z.ZodTypeAny, z.objectUtil.addQuestionMarks; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; relationship: z.ZodUnion<[z.ZodLiteral, z.ZodLiteral, ...z.ZodLiteral[]]>; }, "strict", z.ZodTypeAny, { id: string; type: string; relationship: string; }, { id: string; type: string; relationship: string; }>; data: z.ZodNullable>; }>, any> extends infer T ? { [k in keyof T]: z.objectUtil.addQuestionMarks; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; relationship: z.ZodUnion<[z.ZodLiteral, z.ZodLiteral, ...z.ZodLiteral[]]>; }, "strict", z.ZodTypeAny, { id: string; type: string; relationship: string; }, { id: string; type: string; relationship: string; }>; data: z.ZodNullable>; }>, any>[k]; } : never, z.baseObjectInputType<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; relationship: z.ZodUnion<[z.ZodLiteral, z.ZodLiteral, ...z.ZodLiteral[]]>; }, "strict", z.ZodTypeAny, { id: string; type: string; relationship: string; }, { id: string; type: string; relationship: string; }>; data: z.ZodNullable>; }> extends infer T_1 ? { [k_1 in keyof T_1]: z.baseObjectInputType<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; relationship: z.ZodUnion<[z.ZodLiteral, z.ZodLiteral, ...z.ZodLiteral[]]>; }, "strict", z.ZodTypeAny, { id: string; type: string; relationship: string; }, { id: string; type: string; relationship: string; }>; data: z.ZodNullable>; }>[k_1]; } : never>; export type ZodInputArray = ZodArray; ref: ZodObject<{ type: ZodString; id: ZodOptional; relationship: ZodOptional; tmpId: ZodOptional>; }>; data: ZodOptional; }>, 'atleastone'>; export type ZodInputOperation = ReturnType>; export type InputOperation = z.infer>; export type InputArray = z.infer; export declare function zodInputOperation(mapController: MapController, entityMapProps: Map, ZodEntityProps>): z.ZodObject<{ "atomic:operations": z.ZodArray; ref: z.ZodObject<{ type: z.ZodLiteral; tmpId: z.ZodOptional>; }, "strict", z.ZodTypeAny, { type: string; tmpId?: string | number | undefined; }, { type: string; tmpId?: string | number | undefined; }>; data: z.ZodNullable>; }, "strict", z.ZodTypeAny, { ref: { type: string; tmpId?: string | number | undefined; }; op: Operation.add; data: Json; }, { ref: { type: string; tmpId?: string | number | undefined; }; op: Operation.add; data: Json; }>, z.ZodObject<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; }, "strict", z.ZodTypeAny, { id: string; type: string; }, { id: string; type: string; }>; data: z.ZodNullable>; }, "strict", z.ZodTypeAny, { ref: { id: string; type: string; }; op: Operation.update; data: Json; }, { ref: { id: string; type: string; }; op: Operation.update; data: Json; }>, z.ZodObject<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; }, "strict", z.ZodTypeAny, { id: string; type: string; }, { id: string; type: string; }>; }, "strict", z.ZodTypeAny, { ref: { id: string; type: string; }; op: Operation.remove; }, { ref: { id: string; type: string; }; op: Operation.remove; }>, z.ZodObject<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; relationship: z.ZodUnion<[z.ZodLiteral, z.ZodLiteral, ...z.ZodLiteral[]]>; }, "strict", z.ZodTypeAny, { id: string; type: string; relationship: string; }, { id: string; type: string; relationship: string; }>; data: z.ZodNullable>; }, "strict", z.ZodTypeAny, { ref: { id: string; type: string; relationship: string; }; op: Operation.add; data: Json; }, { ref: { id: string; type: string; relationship: string; }; op: Operation.add; data: Json; }>, z.ZodObject<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; relationship: z.ZodUnion<[z.ZodLiteral, z.ZodLiteral, ...z.ZodLiteral[]]>; }, "strict", z.ZodTypeAny, { id: string; type: string; relationship: string; }, { id: string; type: string; relationship: string; }>; data: z.ZodNullable>; }, "strict", z.ZodTypeAny, { ref: { id: string; type: string; relationship: string; }; op: Operation.remove; data: Json; }, { ref: { id: string; type: string; relationship: string; }; op: Operation.remove; data: Json; }>, z.ZodObject<{ op: z.ZodLiteral; ref: z.ZodObject<{ type: z.ZodLiteral; id: z.ZodString; relationship: z.ZodUnion<[z.ZodLiteral, z.ZodLiteral, ...z.ZodLiteral[]]>; }, "strict", z.ZodTypeAny, { id: string; type: string; relationship: string; }, { id: string; type: string; relationship: string; }>; data: z.ZodNullable>; }, "strict", z.ZodTypeAny, { ref: { id: string; type: string; relationship: string; }; op: Operation.update; data: Json; }, { ref: { id: string; type: string; relationship: string; }; op: Operation.update; data: Json; }>]>, "atleastone">; }, "strict", z.ZodTypeAny, { "atomic:operations": [{ ref: { type: string; tmpId?: string | number | undefined; }; op: Operation.add; data: Json; } | { ref: { id: string; type: string; }; op: Operation.update; data: Json; } | { ref: { id: string; type: string; }; op: Operation.remove; } | { ref: { id: string; type: string; relationship: string; }; op: Operation.add; data: Json; } | { ref: { id: string; type: string; relationship: string; }; op: Operation.remove; data: Json; } | { ref: { id: string; type: string; relationship: string; }; op: Operation.update; data: Json; }, ...({ ref: { type: string; tmpId?: string | number | undefined; }; op: Operation.add; data: Json; } | { ref: { id: string; type: string; }; op: Operation.update; data: Json; } | { ref: { id: string; type: string; }; op: Operation.remove; } | { ref: { id: string; type: string; relationship: string; }; op: Operation.add; data: Json; } | { ref: { id: string; type: string; relationship: string; }; op: Operation.remove; data: Json; } | { ref: { id: string; type: string; relationship: string; }; op: Operation.update; data: Json; })[]]; }, { "atomic:operations": [{ ref: { type: string; tmpId?: string | number | undefined; }; op: Operation.add; data: Json; } | { ref: { id: string; type: string; }; op: Operation.update; data: Json; } | { ref: { id: string; type: string; }; op: Operation.remove; } | { ref: { id: string; type: string; relationship: string; }; op: Operation.add; data: Json; } | { ref: { id: string; type: string; relationship: string; }; op: Operation.remove; data: Json; } | { ref: { id: string; type: string; relationship: string; }; op: Operation.update; data: Json; }, ...({ ref: { type: string; tmpId?: string | number | undefined; }; op: Operation.add; data: Json; } | { ref: { id: string; type: string; }; op: Operation.update; data: Json; } | { ref: { id: string; type: string; }; op: Operation.remove; } | { ref: { id: string; type: string; relationship: string; }; op: Operation.add; data: Json; } | { ref: { id: string; type: string; relationship: string; }; op: Operation.remove; data: Json; } | { ref: { id: string; type: string; relationship: string; }; op: Operation.update; data: Json; })[]]; }>; export {};