import { Dispatcher } from "undici";
import { types } from "./payments/generated/proto";
/**
 * Normalized HTTP Request structure for the Connector Service.
 */
export interface HttpRequest {
    url: string;
    method: string;
    headers?: Record<string, string>;
    body?: Uint8Array;
}
/**
 * Normalized HTTP Response structure.
 */
export interface HttpResponse {
    statusCode: number;
    headers: Record<string, string>;
    body: Uint8Array;
    latencyMs: number;
}
/** Optional mock intercept — set by smoke test in mock mode only. */
export declare let _intercept: ((req: HttpRequest) => Promise<HttpResponse>) | null;
/** Network error codes from proto (single source of truth). */
export declare const NetworkErrorCode: typeof types.NetworkErrorCode;
/**
 * Network error for HTTP transport failures (timeouts, connection errors, config).
 * Uses proto-generated NetworkErrorCode for cross-SDK parity with IntegrationError/ConnectorError.
 */
export declare class NetworkError extends Error {
    code: types.NetworkErrorCode;
    statusCode?: number | undefined;
    body?: string | undefined;
    headers?: Record<string, string> | undefined;
    constructor(message: string, code?: types.NetworkErrorCode, statusCode?: number | undefined, body?: string | undefined, headers?: Record<string, string> | undefined);
    /**
     * String error code for parity with IntegrationError/ConnectorError (e.g. "CONNECT_TIMEOUT").
     * Use for logging, display, and simple comparisons.
     */
    get errorCode(): string;
}
/**
 * Resolve proxy URL, honoring bypass rules.
 */
export declare function resolveProxyUrl(url: string, proxy?: types.IProxyOptions | null): string | null;
/**
 * Generate a cache key from proxy configuration for HTTP client caching.
 * Returns empty string when no proxy is configured.
 */
export declare function generateProxyCacheKey(proxy?: types.IProxyOptions | null): string;
/**
 * Creates a high-performance dispatcher with specialized fintech timeouts.
 * (The instance-level connection pool)
 */
export declare function createDispatcher(config: types.IHttpConfig): Dispatcher;
/**
 * Standardized network execution engine for Unified Connector Service.
 */
export declare function execute(request: HttpRequest, options?: types.IHttpConfig, dispatcher?: Dispatcher): Promise<HttpResponse>;
