/**
 * JiraDependencyLoader - Three-Tier Dependency Loading for JIRA
 *
 * Architecture (ADR-0056):
 * - Tier 1 (Init): Metadata only (< 5 seconds, 1 API call)
 * - Tier 2 (On-Demand): Lazy loading per project (2-5 seconds, 4-7 API calls)
 * - Tier 3 (Bulk): Optional pre-load command (1-2 minutes for 50 projects)
 *
 * Features:
 * - 24-hour TTL caching via CacheManager
 * - Rate limit detection and stale cache fallback
 * - Per-project dependency caching
 * - Automatic cache invalidation on 404 errors
 *
 * @module integrations/jira/jira-dependency-loader
 */
import { CacheManager } from '../../core/cache/cache-manager.js';
import { RateLimitChecker } from '../../core/cache/rate-limit-checker.js';
import { JiraClient } from './jira-client.js';
import { Logger } from '../../utils/logger.js';
/**
 * Project metadata (Tier 1)
 */
export interface ProjectMetadata {
    key: string;
    name: string;
    type: string;
    lead?: {
        displayName: string;
    };
}
/**
 * Project dependencies (Tier 2)
 */
export interface ProjectDependencies {
    projectKey: string;
    boards: Array<{
        id: number;
        name: string;
        type?: string;
    }>;
    components: Array<{
        id: string;
        name: string;
    }>;
    versions: Array<{
        id: string;
        name: string;
        released?: boolean;
    }>;
    lastUpdated: string;
}
/**
 * JiraDependencyLoader - Three-tier dependency loading with smart caching
 */
export declare class JiraDependencyLoader {
    private cacheManager;
    private rateLimitChecker;
    private jiraClient;
    private logger;
    constructor(options: {
        jiraClient: JiraClient;
        cacheManager: CacheManager;
        rateLimitChecker?: RateLimitChecker;
        logger?: Logger;
    });
    /**
     * Tier 1: Load project metadata only (init)
     *
     * Performance: < 5 seconds for 50 projects (1 API call)
     * Cache: 24-hour TTL in `jira-projects.json`
     *
     * @param maxProjects Maximum projects to load (default: 50)
     * @returns Array of project metadata
     */
    loadProjectMetadata(maxProjects?: number): Promise<ProjectMetadata[]>;
    /**
     * Tier 2: Load dependencies for specific project (on-demand)
     *
     * Performance: 2-5 seconds per project (4-7 API calls, cached)
     * Cache: 24-hour TTL in `jira-{PROJECT}-deps.json`
     *
     * @param projectKey Project key (e.g., "BACKEND")
     * @returns Project dependencies
     */
    loadProjectDependencies(projectKey: string): Promise<ProjectDependencies>;
    /**
     * Tier 3: Bulk pre-load all dependencies (optional command)
     *
     * Performance: 1-2 minutes for 50 projects (200-350 API calls, batched)
     * Progress: Real-time progress tracking, cancelation support
     *
     * @param projectKeys Array of project keys to preload
     * @returns void (results cached)
     */
    preloadAllDependencies(projectKeys: string[], options?: {
        onProgress?: (current: number, total: number) => void;
        signal?: AbortSignal;
    }): Promise<void>;
}
//# sourceMappingURL=jira-dependency-loader.d.ts.map