/** Errors the Figma adapter raises. All carry a stable `code` for callers. */ export type FigmaErrorCode = "auth" | "rate-limit" | "node-not-found" | "bad-ref" | "cache-miss" | "api"; /** Base class so callers can `catch (e) { if (e instanceof FigmaError) ... }`. */ export declare class FigmaError extends Error { readonly code: FigmaErrorCode; constructor(code: FigmaErrorCode, message: string, options?: ErrorOptions); } /** Missing/invalid token, or 401/403 from the API. */ export declare class FigmaAuthError extends FigmaError { constructor(message: string, options?: ErrorOptions); } /** 429 from the API. `retryAfterSeconds` is parsed from `Retry-After` when present. */ export declare class FigmaRateLimitError extends FigmaError { readonly retryAfterSeconds?: number; constructor(message: string, retryAfterSeconds?: number, options?: ErrorOptions); } /** The requested node is absent from the file, or the image render returned null. */ export declare class FigmaNodeNotFoundError extends FigmaError { readonly fileKey: string; readonly nodeId: string; constructor(fileKey: string, nodeId: string, options?: ErrorOptions); } /** The `ref` could not be parsed into a file key + node id. */ export declare class FigmaBadRefError extends FigmaError { constructor(ref: string, options?: ErrorOptions); } /** * The node is absent from the committed reference cache, and the run was told * to read only from it. * * Distinct from {@link FigmaNodeNotFoundError} because the remedy is different * and mechanical: the node exists, the *import* has not reached it yet. The * message says so, since this surfaces per component on an otherwise green run. */ export declare class FigmaCacheMissError extends FigmaError { readonly fileKey: string; readonly nodeId: string; constructor(fileKey: string, nodeId: string, detail?: string, options?: ErrorOptions); } /** Any other non-2xx response. */ export declare class FigmaApiError extends FigmaError { readonly status: number; constructor(status: number, message: string, options?: ErrorOptions); } //# sourceMappingURL=errors.d.ts.map