import type { SimplifiedDesign } from "../figma/extractors/types.js"; import type { FigmaConfig, FigmaDataOptions, FigmaNodeImageOptions } from "../models/index.js"; /** * Service for interacting with the Figma API * Follows the service pattern established by PowerPlatformService */ export declare class FigmaService { private config; private readonly baseUrl; constructor(config: FigmaConfig); /** * Get authentication headers based on configuration */ private getAuthHeaders; /** * Make an authenticated request to the Figma API */ private request; /** * Get raw Figma API response for a file * @param fileKey - The Figma file key from the URL * @param depth - Optional depth limit for traversal */ private getFigmaFile; /** * Get raw Figma API response for specific nodes * @param fileKey - The Figma file key from the URL * @param nodeIds - Array of node IDs to fetch * @param depth - Optional depth limit for traversal */ private getFigmaNodes; /** * Get comprehensive Figma design data in simplified, AI-friendly format * This is the main method exposed to MCP tools * * @param fileKey - The Figma file key from the URL * @param nodeId - Optional specific node ID(s) to fetch (format: "1:10" or "1:10;2:20") * @param depth - Optional tree traversal depth limit * @param dataOptions - Optional optimization options for reducing output size * @returns Simplified design data ready for AI consumption */ getFigmaData(fileKey: string, nodeId?: string, depth?: number, dataOptions?: FigmaDataOptions): Promise; /** * Get rendered image URLs for specific nodes via Figma Images API. * Returns a map of nodeId -> temporary CDN URL (valid ~14 days). */ getNodeImages(fileKey: string, nodeIds: string[], options?: FigmaNodeImageOptions): Promise>; /** * Download a rendered image from a CDN URL to local disk. * Uses the existing downloadFigmaImage utility (no auth needed for CDN URLs). */ downloadNodeImage(imageUrl: string, localPath: string, fileName: string): Promise; } //# sourceMappingURL=figma-service.d.ts.map