import type { GetFileMetaResponse, GetFileNodesResponse, GetFileResponse, GetImageFillsResponse, GetImagesResponse, ImageExportOptions } from "../types/figma.js"; export interface FigmaClientOptions { token: string; maxRetries?: number; initialRetryDelay?: number; fileRequestTimeoutMs?: number; } export interface LibraryMetaProgress { stage: "components" | "component_sets"; page: number; itemsTotal: number; } export declare class FigmaClient { private client; private maxRetries; private initialRetryDelay; private fileRequestTimeoutMs; constructor(options: FigmaClientOptions); /** * Get Figma file with retry and rate limit handling */ getFile(fileKey: string, options?: { geometry?: "paths"; }): Promise; getFileMeta(fileKey: string): Promise; /** * Get specific nodes from file with batching support */ getFileNodes(fileKey: string, nodeIds: string[], options?: { geometry?: "paths"; depth?: number; version?: string; }): Promise; /** * Get image URLs for nodes with batching support */ getImages(fileKey: string, nodeIds: string[], options: Omit): Promise; getImageFills(fileKey: string): Promise>; /** * Get library components metadata (with updatedAt timestamps) */ getFileLibraryMeta(fileKey: string): Promise>; getFileLibraryMetaWithProgress(fileKey: string, options?: { onProgress?: (progress: LibraryMetaProgress) => void; }): Promise>; /** * Fetch paginated library meta data */ private fetchLibraryMetaPaginated; /** * Download image from URL */ downloadImage(url: string, options?: { maxBytes?: number; }): Promise; /** * Retry request with exponential backoff */ private retryRequest; /** * Check if error is rate limit (429) */ private isRateLimitError; /** * Get retry-after header value in milliseconds */ private getRetryAfter; /** * Check if error is retryable */ private isRetryableError; /** * Calculate exponential backoff delay */ private calculateBackoff; /** * Sleep for specified milliseconds */ private sleep; /** * Split array into chunks */ private chunkArray; /** * Merge multiple node responses */ private mergeNodeResponses; /** * Merge multiple image responses */ private mergeImageResponses; } export declare function normalizeImageFillsResponse(response: GetImageFillsResponse): Record;