import { Actor } from "../actors/Actor.js"; import { Auditor } from "../auditing/Auditor.js"; import { Job } from "./Job.js"; declare abstract class JobPersistence { protected auditor: Auditor; constructor(auditor: Auditor); create(actor: Actor, job: Job): Promise; save(actor: Actor, changeDescription: string, job: Job, properties?: Map, state?: string): Promise; kill(id: string, actor: Actor): Promise; killOlderThan(lastUpdatedBefore: Date, actor: Actor): Promise; heartbeat(id: string, running?: boolean): Promise; countByState(actor: Actor): Promise>; private generatePropertiesDiff; private updateProperties; retrieve(id: string, actor: Actor, keys?: Array): Promise; delete(id: string, actor: Actor): Promise; list(actor: Actor, pageSize?: number, page?: number, query?: JobPersistence.Query): Promise>; protected abstract saveInternal(job: Job, properties?: Map): Promise; protected abstract retrieveInternal(id: string, keys?: Array): Promise; protected abstract deleteInternal(id: string): Promise; protected abstract listInternal(pageSize?: number, page?: number, query?: JobPersistence.Query): Promise>; protected abstract heartbeatInternal(id: string, running: boolean): Promise; protected abstract killInternal(id: string): Promise; protected abstract killOlderThanInternal(lastUpdatedBefore: Date): Promise; protected abstract countByStateInternal(): Promise>; } declare namespace JobPersistence { type Query = { workflowId?: string; appId?: string; state?: string; status?: string; killed?: boolean; order?: "oldest" | "newest"; }; enum Interaction { CREATE = "CREATE", UPDATE_PROPERTIES = "UPDATE_PROPERTIES", CHANGE_STATE = "CHANGE_STATE", AWAIT = "AWAIT", DELETE = "DELETE", READ = "READ", LIST = "LIST", KILL = "KILL" } type StateCount = { state: string; killed: boolean; count: number; }; } export { JobPersistence }; //# sourceMappingURL=JobPersistence.d.ts.map