import type { z } from 'zod';
import type { ItemSchema, MapSchema, Schema, Validator } from '../../../schema/index.js';
import type { Extends, If, Or } from '../../../types/index.js';
export type SavedAsAttributes<SCHEMA extends MapSchema | ItemSchema> = {
    [KEY in keyof SCHEMA['attributes']]: SCHEMA['attributes'][KEY]['props'] extends {
        savedAs: string;
    } ? KEY : never;
}[keyof SCHEMA['attributes']];
export type WithValidate<SCHEMA extends Schema, ZOD_SCHEMA extends z.ZodTypeAny> = If<Or<Extends<SCHEMA['props'], {
    key: true;
    keyValidator: Validator;
}>, Extends<SCHEMA['props'], {
    key?: false;
    putValidator: Validator;
}>>, z.ZodEffects<ZOD_SCHEMA, z.output<ZOD_SCHEMA>, z.input<ZOD_SCHEMA>>, ZOD_SCHEMA>;
export declare const withValidate: (schema: Schema, zodSchema: z.ZodTypeAny) => z.ZodTypeAny;
