import { ProjectFlow } from '../../core/analyzer/flow-analyzer'; import { ParsedModule } from '../../types'; import { AIService } from '../ai'; export interface AIOptimizedDoc { projectOverview: ProjectOverviewSection; executionFlow: ExecutionFlowSection; fileDocumentation: FileDocSection[]; dependencies: DependencySection; apiReference: APIReferenceSection; dataModels: DataModelSection; codeExamples: CodeExampleSection; } interface ProjectOverviewSection { title: string; purpose: string; techStack: string[]; entryPoints: EntryPointInfo[]; projectStructure: string; keyFeatures: string[]; setupInstructions: string; } interface EntryPointInfo { file: string; purpose: string; startsFlow: string[]; } interface ExecutionFlowSection { title: string; description: string; mainFlow: FlowStep[]; alternativeFlows: FlowStep[][]; } interface FlowStep { order: number; file: string; action: string; imports: string[]; exports: string[]; triggers: string[]; } interface FileDocSection { filePath: string; purpose: string; dependencies: FileDependency[]; exports: ExportInfo[]; functions: FunctionDoc[]; classes: ClassDoc[]; usedBy: string[]; criticalFor: string[]; codeSnippets: CodeSnippet[]; functionFlowDiagram?: string; } interface FileDependency { path: string; reason: string; items: string[]; } interface ExportInfo { name: string; type: 'function' | 'class' | 'variable' | 'interface' | 'type'; description: string; } interface FunctionDoc { name: string; purpose: string; parameters: ParameterDoc[]; returns: string; sideEffects: string[]; example?: string; } interface ParameterDoc { name: string; type: string; description: string; required: boolean; default?: string; } interface ClassDoc { name: string; purpose: string; constructor: FunctionDoc; methods: FunctionDoc[]; properties: PropertyDoc[]; inheritance?: string; } interface PropertyDoc { name: string; type: string; visibility: 'public' | 'private' | 'protected'; description: string; } interface DependencySection { title: string; graph: DependencyGraph; externalDependencies: ExternalDep[]; internalModules: InternalModule[]; } interface DependencyGraph { nodes: GraphNode[]; edges: GraphEdge[]; clusters: ModuleCluster[]; } interface GraphNode { id: string; label: string; type: string; importance: 'critical' | 'important' | 'standard'; } interface GraphEdge { from: string; to: string; type: 'imports' | 'extends' | 'implements' | 'uses'; } interface ModuleCluster { name: string; purpose: string; modules: string[]; } interface ExternalDep { name: string; version?: string; purpose: string; usedIn: string[]; } interface InternalModule { path: string; exports: string[]; importedBy: string[]; purpose: string; } interface APIReferenceSection { title: string; endpoints?: APIEndpoint[]; functions: PublicFunction[]; classes: PublicClass[]; } interface APIEndpoint { method: string; path: string; description: string; parameters: ParameterDoc[]; responses: ResponseDoc[]; authentication?: string; } interface ResponseDoc { status: number; description: string; schema?: any; } interface PublicFunction { name: string; module: string; signature: string; description: string; usage: string; } interface PublicClass { name: string; module: string; description: string; publicMethods: string[]; usage: string; } interface DataModelSection { title: string; databases: DatabaseInfo[]; models: ModelDoc[]; relationships: RelationshipDoc[]; } interface DatabaseInfo { type: string; name?: string; collections?: CollectionDoc[]; tables?: TableDoc[]; } interface CollectionDoc { name: string; schema: any; indexes: string[]; purpose: string; } interface TableDoc { name: string; columns: ColumnDoc[]; indexes: string[]; foreignKeys: ForeignKeyDoc[]; } interface ColumnDoc { name: string; type: string; nullable: boolean; default?: string; description: string; } interface ForeignKeyDoc { column: string; references: string; onDelete?: string; onUpdate?: string; } interface ModelDoc { name: string; type: string; fields: FieldDoc[]; methods?: string[]; validations?: string[]; } interface FieldDoc { name: string; type: string; required: boolean; unique?: boolean; reference?: string; } interface RelationshipDoc { from: string; to: string; type: 'one-to-one' | 'one-to-many' | 'many-to-many'; through?: string; } interface CodeExampleSection { title: string; examples: CodeExample[]; } interface CodeExample { title: string; description: string; files: string[]; code: string; explanation: string; } interface CodeSnippet { purpose: string; code: string; language: string; } export declare class AIOptimizedDocGenerator { private outputDir; private aiService; constructor(outputDir?: string, aiService?: AIService); generateStructuredDocs(flow: ProjectFlow, modules: Map): Promise; private generateProjectOverview; private inferProjectPurpose; private extractTechStack; private describeProjectStructure; private identifyKeyFeatures; private generateSetupInstructions; private generateExecutionFlow; private identifyAlternativeFlows; private generateFileDocumentation; private inferDependencyReason; private inferExportType; private identifyCriticalDependents; private extractKeySnippets; private generateFunctionFlowDiagram; private generateDependencySection; private identifyModuleClusters; private inferDirectoryPurpose; private identifyExternalDependencies; private inferPackagePurpose; private generateAPIReference; private extractSignature; private generateDataModels; private identifyRelationships; private generateCodeExamples; private writeDocumentation; private formatMainDocument; private formatFileDoc; private formatExecutionFlow; private formatDependencyGraph; } export {}; //# sourceMappingURL=ai-optimized-generator.d.ts.map