export type ProxyResponseBodyFailure = "invalid-content-length" | "invalid-utf8" | "too-large" | "too-many-chunks"; export declare class ProxyResponseBodyError extends Error { readonly failure: ProxyResponseBodyFailure; constructor(failure: ProxyResponseBodyFailure); } /** * Discard a response while retaining producer ownership until cancellation * itself settles. Admission-controlled producers must await this operation * before releasing capacity. */ export declare function settleProxyResponseBody(response: Response): Promise; /** * Read one upstream response into a bounded contiguous byte snapshot. * * Both declared and streamed sizes are enforced. Chunk count is bounded * separately so an adversarial one-byte/zero-byte stream cannot turn a modest * byte limit into unbounded scheduling and allocation work. */ export declare function readProxyResponseBytes(response: Response, maxBytes: number, signal?: AbortSignal): Promise>; export declare function readProxyResponseText(response: Response, maxBytes: number, signal?: AbortSignal): Promise; export declare function readProxyResponseJson(response: Response, maxBytes: number, signal?: AbortSignal): Promise; //# sourceMappingURL=response-body.d.ts.map