/** * API Analyzer - Discovers and analyzes API patterns from network traffic */ import type { NetworkRequest, ApiPattern } from '../types/index.js'; export declare class ApiAnalyzer { /** * Analyze network requests to discover API patterns */ analyzeRequests(requests: NetworkRequest[]): ApiPattern[]; /** * Determine if a request is likely an API call */ private isLikelyApiRequest; /** * Create an API pattern from a request */ private createPattern; /** * Detect authentication type from request */ private detectAuthType; /** * Extract authentication headers */ private extractAuthHeaders; /** * Calculate confidence level for direct API access */ private calculateConfidence; /** * Normalize endpoint URL to a pattern */ private normalizeEndpoint; /** * Get human-readable reason for confidence level */ private getConfidenceReason; /** * Analyze requests with tier-aware confidence degradation * * For non-Playwright tiers, we have less complete data and lower certainty, * so we apply confidence penalties. * * @param requests - Network requests (can be partial data from lightweight tier) * @param tier - The rendering tier that captured these requests * @returns API patterns with tier-adjusted confidence */ analyzeRequestsWithTier(requests: NetworkRequest[], tier: 'playwright' | 'lightweight' | 'intelligence'): ApiPattern[]; /** * Degrade confidence level based on tier * * Lightweight tier: Downgrade by 1 level * Intelligence tier: Downgrade by 2 levels (essentially skip) */ private degradeConfidence; /** * Convert lightweight renderer network requests to full NetworkRequest type * * This bridges the gap between the lightweight renderer's simpler network tracking * and the full NetworkRequest interface expected by analyzeRequests. */ static convertLightweightRequests(lightweightRequests: Array<{ url: string; method: string; status?: number; contentType?: string; requestHeaders?: Record; responseHeaders?: Record; responseBody?: unknown; timestamp: number; duration?: number; }>): NetworkRequest[]; } //# sourceMappingURL=api-analyzer.d.ts.map