import { PersistentStore } from '@pellux/goodvibes-sdk/platform/state/persistent-store';
import { ConfigManager } from '../config/manager.js';
import { AutomationManager } from './manager.js';
import { type LegacySchedulerSnapshot } from '@pellux/goodvibes-sdk/platform/automation/migration';
import type { AutomationJob } from '@pellux/goodvibes-sdk/platform/automation/jobs';
import type { AutomationRouteBinding } from '@pellux/goodvibes-sdk/platform/automation/routes';
import type { AutomationRun } from '@pellux/goodvibes-sdk/platform/automation/runs';
import type { AutomationSourceRecord } from '@pellux/goodvibes-sdk/platform/automation/sources';
import { AutomationJobStore } from '@pellux/goodvibes-sdk/platform/automation/store/jobs';
import { AutomationRouteStore } from '@pellux/goodvibes-sdk/platform/automation/store/routes';
import { AutomationRunStore } from '@pellux/goodvibes-sdk/platform/automation/store/runs';
import { AutomationSourceStore } from '@pellux/goodvibes-sdk/platform/automation/store/sources';
export interface AutomationServiceConfig {
    readonly configManager: ConfigManager;
    readonly jobs?: AutomationJobStore;
    readonly runs?: AutomationRunStore;
    readonly routes?: AutomationRouteStore;
    readonly sources?: AutomationSourceStore;
    readonly legacyStore?: PersistentStore<LegacySchedulerSnapshot>;
    readonly manager?: AutomationManager;
}
export declare class AutomationService {
    private readonly jobStore;
    private readonly runStore;
    private readonly routeStore;
    private readonly sourceStore;
    private readonly legacyStore;
    private readonly manager;
    private readonly jobs;
    private readonly runs;
    private readonly routes;
    private readonly sources;
    private loaded;
    constructor(config: AutomationServiceConfig);
    start(): Promise<void>;
    stop(): void;
    load(): Promise<void>;
    listJobs(): AutomationJob[];
    listRuns(jobId?: string): AutomationRun[];
    listRoutes(): AutomationRouteBinding[];
    listSources(): AutomationSourceRecord[];
    getJob(jobId: string): AutomationJob | undefined;
    getRoute(routeId: string): AutomationRouteBinding | undefined;
    getSource(sourceId: string): AutomationSourceRecord | undefined;
    upsertJob(job: AutomationJob): Promise<AutomationJob>;
    upsertRun(run: AutomationRun): Promise<AutomationRun>;
    appendRun(run: Omit<AutomationRun, 'id'> & {
        readonly id?: string;
    }): Promise<AutomationRun>;
    upsertRoute(route: AutomationRouteBinding): Promise<AutomationRouteBinding>;
    upsertSource(source: AutomationSourceRecord): Promise<AutomationSourceRecord>;
    removeJob(jobId: string): Promise<boolean>;
    removeRoute(routeId: string): Promise<boolean>;
    removeSource(sourceId: string): Promise<boolean>;
    seedFromLegacyScheduler(snapshot?: LegacySchedulerSnapshot): Promise<void>;
    private saveJobs;
    private saveRuns;
    private saveRoutes;
    private saveSources;
}
//# sourceMappingURL=service.d.ts.map