import type { SwaggerTransform, SwaggerTransformObject } from "@fastify/swagger";
import type { FastifyPluginAsync, FastifyPluginCallback, FastifyPluginOptions, FastifySchema, FastifySchemaCompiler, FastifyTypeProvider, RawServerBase, RawServerDefault } from "fastify";
import type { FastifySerializerCompiler } from "fastify/types/schema";
import type { $ZodRegistry, input, output } from "zod/v4/core";
import { $ZodType } from "zod/v4/core";
import { type ZodToJsonConfig } from "../esm/zod-to-json.js";
export interface ZodTypeProvider extends FastifyTypeProvider {
	validator: this["schema"] extends $ZodType ? output<this["schema"]> : unknown;
	serializer: this["schema"] extends $ZodType ? input<this["schema"]> : unknown;
}
interface Schema extends FastifySchema {
	hide?: boolean;
}
type CreateJsonSchemaTransformOptions = {
	skipList?: readonly string[];
	schemaRegistry?: $ZodRegistry<{
		id?: string | undefined;
	}>;
	zodToJsonConfig?: ZodToJsonConfig;
};
export declare const createJsonSchemaTransform: ({ skipList, schemaRegistry, zodToJsonConfig }: CreateJsonSchemaTransformOptions) => SwaggerTransform<Schema>;
export declare const jsonSchemaTransform: SwaggerTransform<Schema>;
type CreateJsonSchemaTransformObjectOptions = {
	schemaRegistry?: $ZodRegistry<{
		id?: string | undefined;
	}>;
	zodToJsonConfig?: ZodToJsonConfig;
};
export declare const createJsonSchemaTransformObject: ({ schemaRegistry, zodToJsonConfig }: CreateJsonSchemaTransformObjectOptions) => SwaggerTransformObject;
export declare const jsonSchemaTransformObject: SwaggerTransformObject;
export declare const validatorCompiler: FastifySchemaCompiler<$ZodType>;
type ReplacerFunction = (this: any, key: string, value: any) => any;
export type ZodSerializerCompilerOptions = {
	replacer?: ReplacerFunction;
};
export declare const createSerializerCompiler: (options?: ZodSerializerCompilerOptions) => FastifySerializerCompiler<$ZodType | {
	properties: $ZodType;
}>;
export declare const serializerCompiler: ReturnType<typeof createSerializerCompiler>;
/**
* FastifyPluginCallbackZod with Zod automatic type inference
*
* @example
* ```typescript
* import { FastifyPluginCallbackZod } from "fastify-type-provider-zod"
*
* const plugin: FastifyPluginCallbackZod = (fastify, options, done) => {
*   done()
* }
* ```
*/
export type FastifyPluginCallbackZod<
	Options extends FastifyPluginOptions = Record<never, never>,
	Server extends RawServerBase = RawServerDefault
> = FastifyPluginCallback<Options, Server, ZodTypeProvider>;
/**
* FastifyPluginAsyncZod with Zod automatic type inference
*
* @example
* ```typescript
* import { FastifyPluginAsyncZod } from "fastify-type-provider-zod"
*
* const plugin: FastifyPluginAsyncZod = async (fastify, options) => {
* }
* ```
*/
export type FastifyPluginAsyncZod<
	Options extends FastifyPluginOptions = Record<never, never>,
	Server extends RawServerBase = RawServerDefault
> = FastifyPluginAsync<Options, Server, ZodTypeProvider>;
export {};
