/** * Code Analyzer - Parse JavaScript/TypeScript for API usage patterns * Detects fetch, axios, SWR, React Query calls and authentication context */ import { APICall, APIUsageContext } from '../types/api-contracts'; export declare class CodeAnalyzer { /** * Authentication detection patterns */ private static readonly AUTH_PATTERNS; /** * Find all API calls in a file */ static findAPICalls(fileContent: string): APICall[]; /** * Find fetch() API calls */ private static findFetchCalls; /** * Find axios API calls */ private static findAxiosCalls; /** * Find useSWR hooks */ private static findSWRCalls; /** * Find React Query calls (useQuery, useMutation) */ private static findReactQueryCalls; /** * Check if code has authentication checks before a specific line */ static hasAuthenticationCheck(fileContent: string, beforeLine: number): boolean; /** * Check if fetch call includes Authorization header */ static includesAuthHeader(fileContent: string, callIndex: number): boolean; /** * Check if error handling exists for 401/403 responses */ static has401ErrorHandling(fileContent: string, callIndex: number): boolean; /** * Check if error handling exists for 403 responses */ static has403ErrorHandling(fileContent: string, callIndex: number): boolean; /** * Detect if API call is in public or protected context */ static detectAuthContext(fileContent: string, lineNumber: number): APIUsageContext; /** * Check if component is in public context (landing page, login, etc.) */ private static isInPublicComponent; /** * Check if any error handling exists */ private static hasAnyErrorHandling; /** * Extract HTTP method from fetch options */ private static extractMethod; /** * Get line number from string index */ private static getLineNumber; /** * Extract code snippet around a line */ static extractCodeSnippet(fileContent: string, lineNumber: number, context?: number): string; } //# sourceMappingURL=code-analyzer.d.ts.map