import type { ControlPlaneStore, JsonValue } from '../control-plane';
import type { JobExecution, JobExecutionStatus, ReconciliationStatus, ScheduledJob, WorkerDefinition } from './model';
export declare class JobStore {
    readonly controlPlane: ControlPlaneStore;
    private readonly options;
    constructor(controlPlane: ControlPlaneStore, options?: {
        now?: () => Date;
    });
    now(): Date;
    create(input: Omit<ScheduledJob, 'id' | 'normalizedExpression' | 'nextRunAt' | 'lastScheduledFor' | 'version' | 'createdAt' | 'updatedAt'>): ScheduledJob;
    get(id: string): ScheduledJob | undefined;
    getBySource(projectId: string, environmentId: string | undefined, sourceKey: string): ScheduledJob | undefined;
    list(projectId: string, input?: {
        environmentId?: string;
        resourceIds?: string[];
        enabled?: boolean;
    }): ScheduledJob[];
    setEnabled(id: string, enabled: boolean): ScheduledJob;
    updateSchedule(id: string, input: {
        expression?: string;
        timezone?: string;
        missedRunPolicy?: ScheduledJob['missedRunPolicy'];
        overlapPolicy?: ScheduledJob['overlapPolicy'];
        timeoutSeconds?: number;
    }): ScheduledJob;
    remove(id: string): void;
    markScheduled(id: string, scheduledFor: string, nextRunAt?: string): void;
    reconcile(id: string, status: ReconciliationStatus, observedState: Record<string, JsonValue>): ScheduledJob;
    upsertConfigJob(input: Omit<ScheduledJob, 'id' | 'normalizedExpression' | 'nextRunAt' | 'lastScheduledFor' | 'version' | 'createdAt' | 'updatedAt'> & {
        sourceKey: string;
    }): ScheduledJob;
    due(at?: string): ScheduledJob[];
    createExecution(input: Omit<JobExecution, 'id' | 'attempt' | 'startedAt' | 'finishedAt' | 'createdAt' | 'updatedAt'>): JobExecution;
    getExecution(id: string): JobExecution | undefined;
    listExecutions(jobId: string, limit?: number): JobExecution[];
    activeExecution(jobId: string): JobExecution | undefined;
    attachOperation(id: string, operationId: string): JobExecution;
    transitionExecution(id: string, status: JobExecutionStatus, input?: {
        attempt?: number;
        output?: Record<string, JsonValue>;
        error?: string;
    }): JobExecution;
    upsertWorker(input: Omit<WorkerDefinition, 'id' | 'version' | 'createdAt' | 'updatedAt'>): WorkerDefinition;
    getWorker(id: string): WorkerDefinition | undefined;
    listWorkers(projectId: string, environmentId?: string): WorkerDefinition[];
    setWorkerProcesses(id: string, processes: number): WorkerDefinition;
    reconcileWorker(id: string, status: ReconciliationStatus, observedState: Record<string, JsonValue>): WorkerDefinition;
}
