export type FigmaConnectorErrorCode = "FIGMA_MALFORMED_URL" | "FIGMA_TOKEN_MISSING" | "FIGMA_CONSENT_REQUIRED" | "FIGMA_TOKEN_INVALID" | "FIGMA_TOKEN_EXPIRED" | "FIGMA_TOKEN_REVOKED" | "FIGMA_NOT_FOUND" | "FIGMA_INSUFFICIENT_SCOPE" | "FIGMA_RENDER_FAILED" | "FIGMA_PROXY_EGRESS_FAILED" | "FIGMA_PROXY_UNREACHABLE" | "FIGMA_TLS_CA_FAILURE" | "FIGMA_OVERSIZED_SCOPE" | "FIGMA_RATE_LIMITED" | "FIGMA_UPSTREAM_UNAVAILABLE" | "FIGMA_INTERNAL";
export interface FigmaConnectorErrorBody {
    readonly error: {
        readonly code: FigmaConnectorErrorCode;
        readonly message: string;
    };
}
export declare const figmaConnectorErrorBody: (code: FigmaConnectorErrorCode) => FigmaConnectorErrorBody;
export declare class FigmaConnectorError extends Error {
    readonly code: FigmaConnectorErrorCode;
    constructor(code: FigmaConnectorErrorCode);
}
/**
 * Classify a transport-level throw from `fetch` or the body read into a stable
 * {@link FigmaConnectorErrorCode}. Side-effect-free and total — any non-Error
 * throwable (string, undefined) maps to `FIGMA_PROXY_EGRESS_FAILED`.
 *
 * Inspects `err.code`, `err.cause.code`, and `err.message` in that order of
 * precedence so Node.js `TypeError: fetch failed` wrappers (undici wraps the
 * underlying `cause.code`) are classified correctly.
 */
export declare const classifyFigmaTransportError: (err: unknown) => FigmaConnectorErrorCode;
//# sourceMappingURL=figmaConnectorErrors.d.ts.map