/**
 * API Route Analyzer
 *
 * Extracts API routes from Express, Fastify, and Next.js projects.
 *
 * @module core/discrepancy/analyzers/api-route-analyzer
 */
import { Logger } from '../../../utils/logger.js';
/**
 * HTTP methods supported by the analyzer.
 */
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
/**
 * Represents an API route extracted from code.
 */
export interface ApiRoute {
    method: HttpMethod;
    path: string;
    filePath: string;
    lineNumber: number;
    params: string[];
    framework: 'express' | 'fastify' | 'nextjs' | 'unknown';
    handlerName?: string;
}
/**
 * Configuration for the API route analyzer.
 */
export interface ApiRouteAnalyzerConfig {
    /** Project root directory */
    projectRoot?: string;
    /** Patterns for Express/Fastify routes */
    routePatterns?: string[];
    /** Directory for Next.js API routes */
    nextjsApiDir?: string;
}
/**
 * Result of route analysis.
 */
export interface RouteAnalysisResult {
    routes: ApiRoute[];
    errors: string[];
}
/**
 * Analyzes projects to extract API routes from Express, Fastify, and Next.js.
 */
export declare class ApiRouteAnalyzer {
    private readonly logger;
    private readonly config;
    constructor(options?: {
        logger?: Logger;
        config?: ApiRouteAnalyzerConfig;
    });
    /**
     * Analyze a project for API routes.
     */
    analyze(projectRoot?: string): Promise<RouteAnalysisResult>;
    /**
     * Analyze a list of files for Express/Fastify routes.
     */
    analyzeFiles(files: string[]): Promise<RouteAnalysisResult>;
    /**
     * Analyze a single file for Express/Fastify routes.
     */
    analyzeFile(filePath: string): Promise<RouteAnalysisResult>;
    /**
     * Analyze Next.js API routes from the pages/api directory.
     */
    analyzeNextjsRoutes(projectRoot: string): Promise<RouteAnalysisResult>;
    private scanNextjsApiDir;
    private parseNextjsRoute;
    private detectNextjsExportedMethods;
    private extractExpressRoute;
    private extractFastifyRoute;
    private extractRouteParams;
    private isHttpMethod;
}
//# sourceMappingURL=api-route-analyzer.d.ts.map