import { VeryfrontError } from "./errors.js"; import { type RequestLimits } from "./types.js"; export interface ReadBodyLimitOptions { /** Abort the read and cancel the underlying stream when the caller deadline expires. */ signal?: AbortSignal; } /** Resolve and validate every request-boundary limit before it is used. */ export declare function resolveRequestLimits(limits?: RequestLimits): Required; export declare function isRequestBodyTooLargeError(error: unknown): error is VeryfrontError; export declare function validateRequestLimits(request: Request, limits?: RequestLimits): Required; export declare function validateContentType(request: Request, expected: string | string[]): void; export declare function readBodyWithLimit(request: Request, maxSize?: number): Promise; /** * Read a request body without accepting more than the configured byte limit. * * Content-Length is an early rejection hint only. The streamed byte count is * always authoritative, which also bounds chunked and dishonest requests. * Tiny transport chunks are coalesced into fixed-size blocks so chunk metadata * cannot grow independently of the byte limit. */ export declare function readBodyBytesWithLimit(request: Request, maxSize?: number, options?: ReadBodyLimitOptions): Promise; //# sourceMappingURL=limits.d.ts.map