import type { Ajv, ValidateFunction } from 'ajv'; import type { FastifyError } from 'fastify'; export declare const kHttpErrorsEnhancedConfiguration: unique symbol; export declare const kHttpErrorsEnhancedResponseValidations: unique symbol; export interface Configuration { hideUnhandledErrors?: boolean; convertValidationErrors?: boolean; allowUndeclaredResponses?: boolean; use422ForValidationErrors?: boolean; responseValidatorCustomizer?: (ajv: Ajv) => void; preHandler?: (error: FastifyError | Error) => Error; } declare module 'fastify' { interface FastifyInstance { [kHttpErrorsEnhancedResponseValidations]: [FastifyInstance, ResponseSchemas, [string, object][]][]; } interface FastifyRequest { [kHttpErrorsEnhancedConfiguration]?: Configuration; } } export type GenericObject = Record; export type NodeError = NodeJS.ErrnoException; export type RequestSection = 'params' | 'query' | 'querystring' | 'headers' | 'body' | 'response'; export type ResponseSchemas = Record; export type Validations = Record>; export type ValidationFormatter = (...args: any[]) => string;