import { type InputConstraints, type ZodValidation, type UnwrapEffects } from './index.js'; import type { z, ZodTypeAny, AnyZodObject, ZodDefault, ZodNullable, ZodOptional, ZodEffects } from 'zod'; import type { SuperValidateOptions } from './superValidate.js'; import type { ErrorShape } from './errors.js'; export type ZodTypeInfo = { zodType: ZodTypeAny; originalType: ZodTypeAny; isNullable: boolean; isOptional: boolean; hasDefault: boolean; effects: ZodEffects | undefined; defaultValue: unknown; }; export type UnwrappedEntity = T extends ZodOptional ? UnwrappedEntity : T extends ZodDefault ? UnwrappedEntity : T extends ZodNullable ? UnwrappedEntity : T extends ZodEffects ? UnwrappedEntity : T; type EntityRecord = Record, K>; export type EntityMetaData = { types: EntityRecord; }; export type Entity = { typeInfo: EntityRecord; defaultEntity: z.infer; constraints: InputConstraints; keys: string[]; hash: string; errorShape: ErrorShape; }; export declare function hasEffects(zodType: ZodTypeAny): boolean; export declare function unwrapZodType(zodType: ZodTypeAny): ZodTypeInfo; export declare function entityHash(schema: T): string; export declare function _entityHash(type: T): string; export declare function entityData(schema: T, warnings?: SuperValidateOptions['warnings']): Entity; export declare function valueOrDefault(value: unknown, strict: boolean, implicitDefaults: true, schemaInfo: ZodTypeInfo): unknown; /** * Returns the default values for a zod validation schema. * The main gotcha is that undefined values are changed to null if the field is nullable. */ export declare function defaultValues>(schema: T): z.infer>; export {};