/**
 * Gateway error model.
 *
 * Every failure surfaced by a connector is normalized into a {@link GatewayError}
 * whose `kind` discriminates the failure class, so callers can branch on it
 * without string-matching messages.
 */
/** The class of failure a {@link GatewayError} represents. */
export type GatewayErrorKind = "auth" | "rate_limit" | "http" | "transport" | "parse" | "unsupported" | "aborted";
/** Optional context attached to a gateway error. */
export interface GatewayErrorExtra {
    /** HTTP status code, when the failure originated from a response. */
    readonly status?: number;
    /** The provider whose connector raised the error. */
    readonly provider?: string;
    /** The underlying error or value that triggered this one, if any. */
    readonly cause?: unknown;
}
/** A normalized, discriminable error raised anywhere inside the gateway. */
export declare class GatewayError extends Error {
    readonly kind: GatewayErrorKind;
    readonly status?: number;
    readonly provider?: string;
    constructor(kind: GatewayErrorKind, message: string, extra?: GatewayErrorExtra);
}
/** Construct a {@link GatewayError}. Convenience over the constructor. */
export declare function gatewayError(kind: GatewayErrorKind, message: string, extra?: GatewayErrorExtra): GatewayError;
