@khulnasoft.com/dev-tools
Version:
KhulnaSoft Visual CMS Devtools
32 lines (31 loc) • 1.51 kB
TypeScript
import { type Credentials, type FigmaAuth } from "./credentials";
import type { DevToolsSys } from "../types";
import type { CLIArgs } from "./index";
import type { FigmaKhulnasoftLink, FigmaComponentInfo } from "$/ai-utils";
type FigmaAPIOpts = {
auth: {
access_token: string;
oauth: boolean;
};
params?: Record<string, any>;
};
export declare const parseFigmaURL: (str: string) => {
fileID: string;
nodeId: string;
} | null;
export declare const figmaApi: <T = any>(sys: DevToolsSys, args: CLIArgs, path: string, { auth, params }: FigmaAPIOpts) => Promise<T>;
export declare const getFigmaNodeData: (sys: DevToolsSys, args: CLIArgs, auth: {
access_token: string;
oauth: boolean;
}, fileId: string, nodeIds: string, depth?: number) => Promise<any>;
export declare function getImportDataFromToken(credentials: Credentials, token: string, verbose: boolean): Promise<(readonly [string, FigmaComponentInfo])[]>;
export declare function needsFigmaAuth(urls: string[]): boolean;
export declare function getFigmaNodeDataFromURLs(sys: DevToolsSys, args: CLIArgs, figmaAuth: {
access_token: string;
oauth: boolean;
} | undefined, khulnasoftAuth: {
privateKey: string;
spaceId: string;
}, urls: string[]): Promise<(readonly [string, FigmaComponentInfo])[]>;
export declare function inPlaceResolveFigmaURLs(sys: DevToolsSys, args: CLIArgs, figmaAuth: FigmaAuth, figmaKhulnasoftLinks: FigmaKhulnasoftLink[], figmaLinksToResolve: string[]): Promise<void>;
export {};