import type { Request, RequestHandler } from 'express'; import type { ParamsDictionary } from 'express-serve-static-core'; import type { z } from 'zod'; export { z } from 'zod'; export type RequestExcludingInput = Omit & Express.Request, 'body' | 'query'> & { body?: unknown; query?: unknown; }; export declare function createValidatedRequestHandler(handler: RequestHandler>): typeof handler; export declare function createValidatedRequestHandler(opts: { body?: undefined; query?: undefined; }, handler: RequestHandler>): typeof handler; export declare function createValidatedRequestHandler(opts: { body?: undefined; query: QuerySchema; }, handler: RequestHandler>): typeof handler; export declare function createValidatedRequestHandler(opts: { body: BodySchema; query?: undefined; }, handler: RequestHandler, Record>): typeof handler; export declare function createValidatedRequestHandler(opts: { body: BodySchema; query: QuerySchema; }, handler: RequestHandler, z.infer>): typeof handler; /** * This marks an unvalidated handler and sets the typings as having no query/body accessible, however it doesn't actually enforce that * and so could be bypassed and still have those accessed without validation. It is not ideal but it does add at least some safety, and * importantly visibility into such endpoints */ export declare const createUnvalidatedRequestHandler: (handler: RequestHandler>) => RequestHandler, Record>;