/**
 * Dashboard Data Provider
 *
 * Aggregates data from scheduler, notifications, and logs for the sync monitor dashboard.
 * Caches summary stats with configurable TTL for performance.
 *
 * @module core/dashboard/dashboard-data
 */
import { JobScheduler } from '../scheduler/job-scheduler.js';
import { JobStatus, JobType } from '../scheduler/scheduled-job.js';
import { NotificationManager } from '../notifications/notification-manager.js';
import { Notification, NotificationSeverity } from '../notifications/notification-types.js';
import { SyncAuditLogger } from '../sync/sync-audit-logger.js';
import { SyncPlatform } from '../types/sync-config.js';
import { Logger } from '../../utils/logger.js';
/**
 * Job info for dashboard display
 */
export interface DashboardJobInfo {
    id: string;
    type: JobType;
    status: JobStatus;
    lastRun?: string;
    nextRun?: string;
    lastError?: string;
    retryCount?: number;
}
/**
 * Notification summary for dashboard
 */
export interface DashboardNotificationSummary {
    total: number;
    pending: number;
    bySeverity: Record<NotificationSeverity, number>;
    recent: Notification[];
}
/**
 * Sync activity summary for dashboard
 */
export interface DashboardActivitySummary {
    last24h: {
        synced: number;
        failed: number;
        skipped: number;
    };
    byPlatform: Record<SyncPlatform, number>;
}
/**
 * Complete dashboard data structure
 */
export interface DashboardData {
    jobs: DashboardJobInfo[];
    notifications: DashboardNotificationSummary;
    activity: DashboardActivitySummary;
    generatedAt: string;
}
/**
 * Dashboard data provider options
 */
export interface DashboardDataProviderOptions {
    /**
     * Path to .specweave directory
     */
    specweavePath?: string;
    /**
     * Logger instance
     */
    logger?: Logger;
    /**
     * Job scheduler instance (optional, will create new if not provided)
     */
    scheduler?: JobScheduler;
    /**
     * Notification manager instance (optional, will create new if not provided)
     */
    notificationManager?: NotificationManager;
    /**
     * Audit logger instance (optional, will create new if not provided)
     */
    auditLogger?: SyncAuditLogger;
    /**
     * Notification cache TTL in milliseconds
     * @default 5000 (5 seconds)
     */
    notificationCacheTtlMs?: number;
    /**
     * Activity cache TTL in milliseconds
     * @default 60000 (1 minute)
     */
    activityCacheTtlMs?: number;
    /**
     * Number of recent notifications to include
     * @default 5
     */
    recentNotificationsLimit?: number;
}
/**
 * DashboardDataProvider - Aggregates data for the sync monitor dashboard
 *
 * Pulls data from:
 * - JobScheduler: Job statuses, last run, next run
 * - NotificationManager: Pending notifications, summaries
 * - SyncAuditLogger: Activity stats for last 24 hours
 *
 * Caching strategy:
 * - Job statuses: Real-time (no cache)
 * - Notification counts: 5-second cache
 * - Activity summary: 1-minute cache
 */
export declare class DashboardDataProvider {
    private readonly scheduler;
    private readonly notificationManager;
    private readonly auditLogger;
    private readonly logger;
    private readonly notificationCacheTtlMs;
    private readonly activityCacheTtlMs;
    private readonly recentNotificationsLimit;
    private notificationCache;
    private activityCache;
    constructor(options?: DashboardDataProviderOptions);
    /**
     * Get complete dashboard data
     *
     * @returns Aggregated dashboard data
     */
    getData(): Promise<DashboardData>;
    /**
     * Get jobs data (real-time, no cache)
     */
    getJobsData(): Promise<DashboardJobInfo[]>;
    /**
     * Get notifications data (cached)
     */
    getNotificationsData(): Promise<DashboardNotificationSummary>;
    /**
     * Get activity data (cached)
     */
    getActivityData(): Promise<DashboardActivitySummary>;
    /**
     * Get job status emoji for display
     */
    getJobStatusEmoji(status: JobStatus): string;
    /**
     * Format time relative to now (e.g., "5m ago", "in 10m")
     */
    formatRelativeTime(isoTimestamp: string | undefined): string;
    /**
     * Clear all caches
     */
    clearCache(): void;
    /**
     * Map scheduled job to dashboard format
     */
    private mapJobToDashboard;
}
//# sourceMappingURL=dashboard-data.d.ts.map