import { HttpResponse, type RequestContext } from '@jsango/http'; import type { IValidator } from './validation.js'; import { BaseSchema } from './schema.js'; export interface ValidationMiddlewareOptions { readonly body?: IValidator | Record> | undefined; readonly query?: IValidator | Record> | undefined; readonly params?: IValidator | Record> | undefined; } export type ValidationTarget = ValidationMiddlewareOptions | IValidator | Record>; /** * Route middleware that automatically validates incoming request body, query, and params. * Returns HTTP 400 Bad Request with structured field error details if validation fails. */ export declare function validate(options: ValidationTarget): (ctx: RequestContext, next: () => Promise) => Promise; //# sourceMappingURL=middleware.d.ts.map