export interface ApiParameterDetail { name: string; type?: string; required?: boolean; decorators?: string[]; validationRules?: string[]; } export interface ServiceCall { service: string; method: string; line?: number; } export interface ApiEndpoint { path: string; method: string; handler: string; filePath: string; line: number; parameters?: string[]; parameterDetails?: ApiParameterDetail[]; responseType?: string; decorators?: string[]; authDecorators?: string[]; description?: string; dtoRef?: string; serviceCalls?: ServiceCall[]; } export interface EntityField { name: string; type: string; nullable: boolean; defaultValue?: string; isPrimaryKey?: boolean; isForeignKey?: boolean; description?: string; columnOptions?: Record; validationRules?: string[]; } export interface EntityDefinition { name: string; tableName?: string; filePath: string; line: number; fields: EntityField[]; relations?: { target: string; type: string; field: string; }[]; description?: string; indexes?: { name?: string; fields: string[]; unique?: boolean; }[]; constraints?: { type: string; fields: string[]; }[]; } export interface RouteConfig { path: string; component?: string; layout?: string; lazy?: boolean; guards?: string[]; children?: RouteConfig[]; filePath: string; line: number; } export interface ComponentInfo { name: string; filePath: string; line: number; props?: string[]; slots?: string[]; emits?: string[]; dependencies?: string[]; description?: string; } export interface DependencyEdge { from: string; to: string; type: 'import' | 'inherit' | 'implement'; } export interface DtoField { name: string; type: string; required?: boolean; decorators?: string[]; validationRules?: string[]; defaultValue?: string; description?: string; } export interface DtoDefinition { name: string; filePath: string; line: number; fields: DtoField[]; description?: string; usedByApis?: string[]; } export interface ServiceMethod { name: string; returnType?: string; parameters: { name: string; type?: string; }[]; decorators?: string[]; description?: string; line: number; } export interface ServiceDefinition { name: string; filePath: string; line: number; methods: ServiceMethod[]; description?: string; injects?: string[]; } export interface StructuredData { generatedAt: string; projectRoot: string; endpoints: { [platform: string]: { apis: ApiEndpoint[]; entities: EntityDefinition[]; routes: RouteConfig[]; components: ComponentInfo[]; }; }; dtos: DtoDefinition[]; services: ServiceDefinition[]; dependencies: DependencyEdge[]; stats: { totalApis: number; totalEntities: number; totalRoutes: number; totalComponents: number; totalDtos: number; totalServices: number; totalFiles: number; }; } /** TS/JS 文件判定(v8.3.341+: 导出供单测) */ export declare function isTsOrJs(filePath: string): boolean; /** 按扩展名判定源码语言(v8.3.341+: 导出供单测) */ export declare function detectLanguage(filePath: string): 'typescript' | 'java' | 'python' | 'go' | 'unknown'; /** * 扫描项目源码,提取结构化数据 * @param projectRoot 项目根目录 * @param sourcePaths 源码路径列表(从 CONSTITUTION.md 读取) */ export declare function extractStructuredData(projectRoot: string, sourcePaths: string[]): Promise; /** * 加载已提取的结构化数据 */ export declare function loadStructuredData(): Promise; export declare function loadStructuredDataForPlatform(platform: string): Promise; export declare function listStructuredDataPlatforms(): Promise; /** 从路径推断平台归属(v8.3.341+: 导出供单测) */ export declare function inferPlatform(path: string): string; //# sourceMappingURL=structured-extractor.d.ts.map