import { Category, CategoryList, Config, Interface, InterfaceList, Project, SyntheticalConfig } from "./types.mjs"; interface OutputFileList { [outputFilePath: string]: { syntheticalConfig: SyntheticalConfig; content: string[]; requestFunctionFilePath: string; requestHookMakerFilePath: string; }; } export declare class Generator { private options; /** 配置 */ private config; private disposes; constructor(config: Config, options?: { cwd: string; }); prepare(): Promise; generate(): Promise; write(outputFileList: OutputFileList): Promise; private getImportPath; tsc(file: string): Promise; fetchApi(url: string, query: Record): Promise; fetchProject: (({ serverUrl, token }: SyntheticalConfig) => Promise) & { cache: import("vtils").AsyncMemoizeCacheMap; }; fetchExport: (({ serverUrl, token }: SyntheticalConfig) => Promise) & { cache: import("vtils").AsyncMemoizeCacheMap; }; /** 获取分类的接口列表 */ fetchInterfaceList({ serverUrl, token, id }: SyntheticalConfig): Promise; /** 获取项目信息 */ fetchProjectInfo(syntheticalConfig: SyntheticalConfig): Promise<{ cats: CategoryList; getMockUrl: () => string; getDevUrl: (devEnvName: string) => string; getProdUrl: (prodEnvName: string) => string; _id: number; _url: string; name: string; desc: string; basepath: string; tag: string[]; env: Array<{ name: string; domain: string; }>; }>; /** 生成接口代码 */ generateInterfaceCode(syntheticalConfig: SyntheticalConfig, interfaceInfo: Interface, categoryUID: string): Promise; destroy(): Promise; } export {};