import type { OutboundHttpEgressConfig } from "./types.js";
export type { OutboundHttpEgressConfig } from "./types.js";
export declare const MAX_RESPONSE_BYTES = 10000000;
export interface GatewayFetchOptions extends RequestInit {
    readonly fetchImpl?: typeof fetch | undefined;
    readonly useCaFallback?: boolean | undefined;
    readonly egress?: OutboundHttpEgressConfig | undefined;
}
export type OutboundHttpEgressErrorCode = "PROXY_UNREACHABLE" | "PROXY_AUTH_REQUIRED" | "PROXY_EGRESS_FAILED" | "PROXY_BLOCKED_BY_POLICY" | "TLS_CA_FAILURE";
export declare class OutboundHttpEgressError extends Error {
    readonly code: OutboundHttpEgressErrorCode;
    constructor(code: OutboundHttpEgressErrorCode, message: string);
}
export declare function isMissingIssuerError(error: unknown): boolean;
export declare function isRecoverableTlsTrustError(error: unknown): boolean;
export declare function gatewayTrustedCaCertificates(caBundlePath?: string): readonly string[];
export declare function streamingResponseFromNode(res: import("node:http").IncomingMessage, onCancel: () => void, maxBytes?: number): Response;
export declare function gatewayFetch(url: string, options?: GatewayFetchOptions): Promise<Response>;
export declare function readJsonCapped(response: Response, maxBytes?: number): Promise<unknown>;
export declare function readSseStream(response: Response, maxBytes?: number): AsyncGenerator;
//# sourceMappingURL=http.d.ts.map