import type { AxiosResponse } from 'axios'; import type { CloudFormationResource, Issue, SingleResourceAnalysis } from '../../types/analysis.types'; /** * Context about a resource's relationships for AI analysis */ export interface ResourceAnalysisContext { /** Resources this resource depends on (formatted with types) */ dependencies?: string[]; /** Resources that depend on this resource (formatted with types) */ dependents?: string[]; /** Human-readable description of how this resource is used */ usageDescription?: string; } type AxiosClient = { post(url: string, data?: unknown, config?: unknown): Promise>; get(url: string, config?: unknown): Promise>; }; /** * Creates a function to analyze a single CDK resource using AI analysis. * * Optimized Timeout Configuration for AI Analysis: * - MAX_ATTEMPTS: 30 - covers AI analysis jobs up to ~90 seconds (30 × 3s max interval) * - BASE_INTERVAL_MS: 1000ms - start with 1 second for AI model processing time * - MAX_INTERVAL_MS: 3000ms - cap at 3 seconds for reasonable AI analysis polling * * This reduces API calls by 80% while maintaining responsiveness for AI jobs */ export declare const createAnalyzeResource: (axiosClient: AxiosClient, apiUrl: string) => (stackName: string, resourceId: string, resourceData: CloudFormationResource, resourceType: string, authToken: string, fingerprint: string, _existingFindings: Issue[], progressTracker?: { startJob: (jobId: string, resourceId: string) => void; updateJobStatus: (jobId: string, resourceId: string, status: string, attempt: number) => void; completeJob: (jobId: string, resourceId: string) => void; failJob: (jobId: string, resourceId: string, error: string) => void; timeoutJob: (jobId: string, resourceId: string) => void; }, context?: ResourceAnalysisContext, aiModelId?: string) => Promise; export type AnalyzeResourceFn = ReturnType; export {};