/** * API Analyzer * Analyzes API endpoints and generates documentation */ export interface APIEndpoint { method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; path: string; description?: string; parameters: ParameterInfo[]; requestBody?: RequestBodyInfo; responses: ResponseInfo[]; authentication?: string; tags?: string[]; deprecated?: boolean; } export interface ParameterInfo { name: string; in: 'path' | 'query' | 'header' | 'cookie'; type: string; required: boolean; description?: string; example?: string; } export interface RequestBodyInfo { contentType: string; schema: Record; required: boolean; example?: Record; } export interface ResponseInfo { statusCode: number; description: string; contentType?: string; schema?: Record; example?: Record; } export interface APIInventory { title: string; version: string; baseUrl: string; authentication: string; endpoints: APIEndpoint[]; tags: string[]; analyzedAt: string; } /** * Generate API inventory markdown */ export declare function generateAPIInventoryMarkdown(inventory: APIInventory): string; /** * Extract CRUD operations by resource */ export declare function analyzeCRUDOperations(inventory: APIInventory): Map>; /** * Find missing CRUD operations */ export declare function findMissingCRUD(inventory: APIInventory): Map; export declare class APIAnalyzer { /** * Parse OpenAPI/Swagger spec */ parseOpenAPI(spec: Record): APIInventory; /** * Parse a single endpoint */ private parseEndpoint; /** * Extract authentication method */ private extractAuthMethod; /** * Extract type from schema */ private extractType; /** * Analyze API from Express routes */ parseExpressRoutes(routeCode: string): APIEndpoint[]; /** * Generate full API documentation */ generateDocumentation(inventory: APIInventory): { markdown: string; crudAnalysis: Map>; missingCRUD: Map; }; }