{"version":3,"file":"figma.d.cts","names":["Document","BaseDocumentLoader","FigmaFile","Node","Array","FigmaLoaderParams","FigmaFileLoader","accessToken","nodeIds","fileKey","Promise"],"sources":["../../../src/document_loaders/web/figma.d.ts"],"sourcesContent":["import { Document } from \"@langchain/core/documents\";\nimport { BaseDocumentLoader } from \"@langchain/core/document_loaders/base\";\n/**\n * Interface representing a Figma file. It includes properties for the\n * file name, role, last modified date, editor type, thumbnail URL,\n * version, document node, schema version, main file key, and an array of\n * branches.\n */\nexport interface FigmaFile {\n    name: string;\n    role: string;\n    lastModified: string;\n    editorType: string;\n    thumbnailUrl: string;\n    version: string;\n    document: Node;\n    schemaVersion: number;\n    mainFileKey: string;\n    branches: Array<{\n        key: string;\n        name: string;\n        thumbnail_url: string;\n        last_modified: string;\n        link_access: string;\n    }>;\n}\n/**\n * Interface representing the parameters for configuring the FigmaLoader.\n * It includes optional properties for the access token, an array of node\n * IDs, and the file key.\n */\nexport interface FigmaLoaderParams {\n    accessToken?: string;\n    nodeIds: string[];\n    fileKey: string;\n}\n/**\n * Class representing a document loader for loading Figma files. It\n * extends the BaseDocumentLoader and implements the FigmaLoaderParams\n * interface. The constructor takes a config object as a parameter, which\n * contains the access token, an array of node IDs, and the file key.\n * @example\n * ```typescript\n * const loader = new FigmaFileLoader({\n *   accessToken: \"FIGMA_ACCESS_TOKEN\",\n *   nodeIds: [\"id1\", \"id2\", \"id3\"],\n *   fileKey: \"key\",\n * });\n * const docs = await loader.load();\n * ```\n */\nexport declare class FigmaFileLoader extends BaseDocumentLoader implements FigmaLoaderParams {\n    accessToken?: string;\n    nodeIds: string[];\n    fileKey: string;\n    private headers;\n    constructor({ accessToken, nodeIds, fileKey }: FigmaLoaderParams);\n    /**\n     * Constructs the URL for the Figma API call.\n     * @returns The constructed URL as a string.\n     */\n    private constructFigmaApiURL;\n    private getFigmaFile;\n    /**\n     * Fetches the Figma file using the Figma API, creates a Document instance\n     * with the JSON representation of the file as the page content and the\n     * API URL as the metadata, and returns it.\n     * @returns A Promise that resolves to an array of Document instances.\n     */\n    load(): Promise<Document[]>;\n}\n//# sourceMappingURL=figma.d.ts.map"],"mappings":";;;;;;;AAQA;AAuBA;AAoBA;;AAK+BQ,UAhDdN,SAAAA,CAgDcM;EAASC,IAAAA,EAAAA,MAAAA;EAAWJ,IAAAA,EAAAA,MAAAA;EAa/BL,YAAAA,EAAAA,MAAAA;EAARU,UAAAA,EAAAA,MAAAA;EAlBiCT,YAAAA,EAAAA,MAAAA;EAA8BI,OAAAA,EAAAA,MAAAA;EAAiB,QAAA,EApC9EF,IAoC8E;;;YAjC9EC;;;;;;;;;;;;;UAaGC,iBAAAA;;;;;;;;;;;;;;;;;;;;cAoBIC,eAAAA,SAAwBL,kBAAAA,YAA8BI;;;;;;;;;KAKxBA;;;;;;;;;;;;;UAavCK,QAAQV"}