import type { Context as HonoCtx, Next as HonoNext } from 'hono';
import type { ActionHandler } from '../types/action';
export interface BodyLimitOptions {
    maxSize: number;
    onError?: ActionHandler;
}
/**
 * Limit request body size
 * @example
 * ```ts
 * const action = BlazeCreator.action({
 *   rest: 'POST /',
 *   middlewares: [
 *     [
 *       'ALL',
 *       bodyLimit({
 *        maxSize: 100 * 1024, // 100kb
 *        async onError() {
 *          throw new BlazeError('Payload too large', 413)
 *         }
 *       })
 *     ]
 *   ],
 *   async handler(ctx) {
 *      /// Do something with the request
 *      /// when the request size is less than 100kb
 *   }
 * })
 * ```
 */
export declare function bodyLimit(options: BodyLimitOptions): (honoCtx: HonoCtx, next: HonoNext) => Promise<void | Response>;
