import { ConfigManager } from '../config/manager.js';
import { AutomationManager } from './manager.js';
import type { AutomationJob } from './jobs.js';
import type { AutomationRouteBinding } from './routes.js';
import type { AutomationRun } from './runs.js';
import type { AutomationSourceRecord } from './sources.js';
import { AutomationJobStore } from './store/jobs.js';
import { AutomationRouteStore } from './store/routes.js';
import { AutomationRunStore } from './store/runs.js';
import { AutomationSourceStore } from './store/sources.js';
export interface AutomationServiceConfig {
    readonly configManager: ConfigManager;
    readonly jobs?: AutomationJobStore | undefined;
    readonly runs?: AutomationRunStore | undefined;
    readonly routes?: AutomationRouteStore | undefined;
    readonly sources?: AutomationSourceStore | undefined;
    readonly manager?: AutomationManager | undefined;
}
export declare class AutomationService {
    private readonly jobStore;
    private readonly runStore;
    private readonly routeStore;
    private readonly sourceStore;
    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>;
    private saveJobs;
    private saveRuns;
    private saveRoutes;
    private saveSources;
}
//# sourceMappingURL=service.d.ts.map