import type { Kysely, Generated } from 'kysely'; import type { IPersistenceProvider } from '../scheduler.persistence.js'; import type { IScheduledJob, IJobExecutionResult } from '../scheduler.interfaces.js'; interface SchedulerJobsTable { id: string; name: string; type: string; status: string; target_class_name: string; method: string; pattern: string | null; options: string; next_execution: Date | null; last_execution: Date | null; execution_count: number; failure_count: number; last_error_message: string | null; last_error_stack: string | null; last_result: string | null; avg_execution_time: number | null; is_running: boolean; dependencies: string | null; metadata: string | null; created_at: Generated; updated_at: Generated; } interface SchedulerExecutionHistoryTable { id: Generated; job_id: string; execution_id: string; status: string; result: string | null; error: string | null; timestamp: Date; duration: number; attempt: number | null; created_at: Generated; } interface DatabaseSchema { scheduler_jobs: SchedulerJobsTable; scheduler_execution_history: SchedulerExecutionHistoryTable; } export declare class DatabasePersistenceProvider implements IPersistenceProvider { private readonly db; constructor(db: Kysely); initialize(): Promise; saveJob(job: IScheduledJob): Promise; loadJob(id: string): Promise; loadAllJobs(): Promise; deleteJob(id: string): Promise; saveExecutionResult(result: IJobExecutionResult): Promise; loadExecutionHistory(jobId: string, limit?: number): Promise; clear(): Promise; private cleanupOldHistory; private serializeJobForDb; private deserializeJobFromDb; private parseError; } export {}; //# sourceMappingURL=database-persistence.provider.d.ts.map