import { WorkflowExecution, WorkflowStatus } from './context.types'; export interface ExecutionFilter { status?: WorkflowStatus | WorkflowStatus[]; groupId?: string; workflowName?: string; currentState?: string; } export interface PersistenceAdapter { save(execution: WorkflowExecution): Promise; load(executionId: string): Promise; update(executionId: string, updates: Partial): Promise; find(filter: ExecutionFilter): Promise; /** * Optional. Atomically move a suspended execution to running, in a single conditional * write, and report whether this caller won. Implement it wherever more than one process * or timer can resume the same execution: without it resume() relies on a read-then-act * status check, and a loser of that race overwrites the winner's progress with the * snapshot it loaded. Adapters that omit it keep the previous behaviour. */ claimSuspended?(executionId: string): Promise; } export interface LockAdapter { acquire(key: string, executionId: string, ttl?: number): Promise; release(key: string): Promise; isLocked(key: string): Promise; extend(key: string, ttl: number): Promise; } export interface LoggerAdapter { log(message: string, context?: unknown): void; error(message: string, error?: Error, context?: unknown): void; warn(message: string, context?: unknown): void; debug(message: string, context?: unknown): void; } //# sourceMappingURL=adapter.types.d.ts.map