import * as i0 from "@angular/core";
export interface SchedulingKPIs {
    totalActiveJobs: number;
    jobsDueInNextHour: number;
    recentExecutions24h: number;
    successRate24h: number;
    currentlyRunning: number;
    lockedJobs: number;
    totalCost24h: number;
    failureRate7d: number;
    totalFailures7d: number;
}
export interface JobExecution {
    id: string;
    jobId: string;
    jobName: string;
    jobType: string;
    status: 'Running' | 'Completed' | 'Failed' | 'Cancelled' | 'Timeout';
    startedAt: Date;
    completedAt?: Date;
    duration?: number;
    success?: boolean;
    errorMessage?: string;
}
export interface UpcomingExecution {
    jobId: string;
    jobName: string;
    jobType: string;
    nextRunAt: Date;
    cronExpression: string;
    timezone: string;
}
export interface JobStatistics {
    jobId: string;
    jobName: string;
    jobType: string;
    jobTypeId: string;
    status: string;
    description: string | null;
    cronExpression: string;
    timezone: string;
    totalRuns: number;
    successCount: number;
    failureCount: number;
    successRate: number;
    lastRunAt?: Date;
    nextRunAt?: Date;
    concurrencyMode: string;
    configuration: string | null;
    ownerUserID: string | null;
    ownerUser: string | null;
    notifyOnSuccess: boolean;
    notifyOnFailure: boolean;
    startAt?: Date;
    endAt?: Date;
    createdAt: Date;
}
export interface JobTypeStatistics {
    typeId: string;
    typeName: string;
    activeJobsCount: number;
    totalRuns: number;
    successRate: number;
}
export interface ExecutionTrendData {
    timestamp: Date;
    executions: number;
    successes: number;
    failures: number;
}
export interface LockInfo {
    jobId: string;
    jobName: string;
    lockToken: string;
    lockedAt: Date;
    lockedBy: string;
    expectedCompletion: Date;
    isStale: boolean;
}
export interface AlertCondition {
    type: 'stale-lock' | 'high-failure' | 'job-expired';
    severity: 'warning' | 'error';
    title: string;
    message: string;
    jobId?: string;
    jobName?: string;
}
export declare class SchedulingInstrumentationService {
    private readonly _dateRange$;
    private readonly _refreshTrigger$;
    private readonly _isLoading$;
    readonly isLoading$: import("rxjs").Observable<boolean>;
    readonly kpis$: import("rxjs").Observable<SchedulingKPIs>;
    readonly liveExecutions$: import("rxjs").Observable<JobExecution[]>;
    readonly upcomingExecutions$: import("rxjs").Observable<UpcomingExecution[]>;
    readonly executionHistory$: import("rxjs").Observable<JobExecution[]>;
    readonly executionTrends$: import("rxjs").Observable<ExecutionTrendData[]>;
    readonly jobStatistics$: import("rxjs").Observable<JobStatistics[]>;
    readonly jobTypes$: import("rxjs").Observable<JobTypeStatistics[]>;
    readonly lockInfo$: import("rxjs").Observable<LockInfo[]>;
    readonly alerts$: import("rxjs").Observable<AlertCondition[]>;
    setDateRange(start: Date, end: Date): void;
    get CurrentDateRange(): {
        start: Date;
        end: Date;
    };
    refresh(): void;
    private loadKPIs;
    private extractCostFromRun;
    private loadLiveExecutions;
    private loadUpcomingExecutions;
    private loadExecutionHistory;
    private loadExecutionTrends;
    private loadJobStatistics;
    private loadJobTypes;
    private loadLockInfo;
    private buildAlerts;
    private mapRunsToExecutions;
    private createTimeBuckets;
    private getBucketSizeMs;
    updateJobStatus(jobId: string, status: 'Pending' | 'Active' | 'Paused' | 'Disabled' | 'Expired'): Promise<boolean>;
    saveJob(jobId: string | null, data: Partial<{
        Name: string;
        Description: string | null;
        JobTypeID: string;
        CronExpression: string;
        Timezone: string;
        Status: 'Pending' | 'Active' | 'Paused' | 'Disabled' | 'Expired';
        Configuration: string | null;
        ConcurrencyMode: 'Concurrent' | 'Queue' | 'Skip';
        StartAt: Date | null;
        EndAt: Date | null;
        NotifyOnSuccess: boolean;
        NotifyOnFailure: boolean;
    }>): Promise<boolean>;
    deleteJob(jobId: string): Promise<boolean>;
    releaseLock(jobId: string): Promise<boolean>;
    loadJobTypesForDropdown(): Promise<{
        id: string;
        name: string;
    }[]>;
    static ɵfac: i0.ɵɵFactoryDeclaration<SchedulingInstrumentationService, never>;
    static ɵprov: i0.ɵɵInjectableDeclaration<SchedulingInstrumentationService>;
}
//# sourceMappingURL=scheduling-instrumentation.service.d.ts.map