/**
 * Shared utilities for HTTP server adapters.
 *
 * Extracted from NodeHttpAdapter, BunHttpAdapter, and DenoHttpAdapter
 * to eliminate duplicated constants and body-reading logic (B135).
 *
 * @module infrastructure/adapters/httpAdapterUtils
 * @private
 */
import WarpError from '../../domain/errors/WarpError.ts';
import { HttpRequest } from '../../ports/HttpServerPort.ts';
/**
 * Error thrown when a request body exceeds the size limit.
 */
export declare class PayloadTooLargeError extends WarpError {
    readonly status: number;
    constructor(totalBytes: number);
}
/** Absolute streaming body limit (10 MB). */
export declare const MAX_BODY_BYTES: number;
/**
 * Reads a ReadableStream body with a byte-count limit.
 * Aborts immediately when the limit is exceeded, preventing full buffering.
 *
 * Used by BunHttpAdapter and DenoHttpAdapter (which receive Web ReadableStream bodies).
 * NodeHttpAdapter uses its own Node.js stream-based body reading.
 */
export declare function readStreamBody(bodyStream: ReadableStream<Uint8Array>): Promise<Uint8Array | undefined>;
/** No-op logger matching the `{ error(...) }` interface. */
export declare const noopLogger: {
    error(...args: unknown[]): void;
};
export declare const ERROR_BODY = "Internal Server Error";
export declare const ERROR_BODY_BYTES: Uint8Array<ArrayBuffer>;
export declare const ERROR_BODY_LENGTH: string;
export declare const PAYLOAD_TOO_LARGE_BODY = "Payload Too Large";
export declare const PAYLOAD_TOO_LARGE_BYTES: Uint8Array<ArrayBuffer>;
export declare const PAYLOAD_TOO_LARGE_LENGTH: string;
/**
 * Converts a Web API Request into the HttpRequest instance expected by
 * HttpServerPort request handlers.
 *
 * Used by both BunHttpAdapter and DenoHttpAdapter.
 */
export declare function toPortRequest(request: Request): Promise<HttpRequest>;
