import { type WhookBodyValidator, type WhookParametersValidators } from '../libs/validation.js';
import { type WhookCoercionOptions } from '../libs/coercion.js';
import { type WhookBodySpec } from '../libs/router.js';
import { type JsonValue } from 'type-fest';
import { type Provider } from 'knifecycle';
import { type Transform } from 'node:stream';
import { type WhookHTTPTransactionService } from './httpTransaction.js';
import { type LogService } from 'common-services';
import { type IncomingMessage, type ServerResponse } from 'node:http';
import { type WhookErrorHandler } from '../services/errorHandler.js';
import { type AppEnvVars } from 'application-services';
import { type WhookRouteHandler, WhookRouteConfig } from '../types/routes.js';
import { type WhookSchemaValidatorsService } from './schemaValidators.js';
import { type WhookOpenAPIOperation, type WhookOpenAPI } from '../types/openapi.js';
import { type WhookQueryParser, type WhookQueryParserBuilderService } from './queryParserBuilder.js';
import { type WhookDefinitions } from './DEFINITIONS.js';
export declare const SEARCH_SEPARATOR = "?";
export declare const PATH_SEPARATOR = "/";
export type WhookHandlersService = Record<string, WhookRouteHandler>;
export type WhookParser = (content: string, bodySpec?: WhookBodySpec) => JsonValue;
export type WhookParsers = {
    [name: string]: WhookParser;
};
export type WhookStringifyer = (content: string) => string;
export type WhookStringifiers = {
    [name: string]: WhookStringifyer;
};
export type WhookEncoder<T extends Transform> = {
    new (...args: unknown[]): T;
};
export type WhookEncoders<T extends Transform> = {
    [name: string]: WhookEncoder<T>;
};
export type WhookDecoder<T extends Transform> = {
    new (...args: unknown[]): T;
};
export type WhookDecoders<T extends Transform> = {
    [name: string]: WhookDecoder<T>;
};
export type WhookHTTPRouterConfig = {
    DEBUG_NODE_ENVS?: string[];
    BUFFER_LIMIT?: string;
    BASE_PATH?: string;
    COERCION_OPTIONS?: WhookCoercionOptions;
};
export type WhookHTTPRouterDependencies = WhookHTTPRouterConfig & {
    ENV: AppEnvVars;
    ROUTES_HANDLERS: WhookHandlersService;
    API: WhookOpenAPI;
    DEFINITIONS: WhookDefinitions;
    PARSERS?: WhookParsers;
    STRINGIFIERS?: WhookStringifiers;
    DECODERS?: WhookEncoders<Transform>;
    ENCODERS?: WhookDecoders<Transform>;
    queryParserBuilder: WhookQueryParserBuilderService;
    log?: LogService;
    schemaValidators: WhookSchemaValidatorsService;
    httpTransaction: WhookHTTPTransactionService;
    errorHandler: WhookErrorHandler;
};
export interface WhookHTTPRouterService {
    (req: IncomingMessage, res: ServerResponse): Promise<void>;
}
export type WhookHTTPRouterProvider = Provider<WhookHTTPRouterService>;
export type WhookHTTPRouterDescriptor = {
    handler: WhookRouteHandler;
    operation: WhookOpenAPIOperation;
    config: WhookRouteConfig;
    queryParser: WhookQueryParser;
    parametersValidators: WhookParametersValidators;
    consumableMediaTypes: string[];
    produceableMediaTypes: string[];
    bodyValidator: WhookBodyValidator;
};
declare const _default: import("knifecycle").ProviderInitializer<WhookHTTPRouterDependencies, WhookHTTPRouterService>;
export default _default;
