UNPKG

node-sagas-orchestrator

Version:

Library for handling distributed transactions using an orchestrator

20 lines (19 loc) 567 B
import { SagaFlow } from './saga-flow'; export declare enum SagaStates { New = "New", InProgress = "In progress", InCompensation = "In compensation", Complete = "Complete", CompensationComplete = "Compensation complete", CompensationError = "Compensation error" } export declare class Saga<T extends object = null> { private sagaFlow; private state; private invokeError; private compensationError; constructor(sagaFlow: SagaFlow<T>); getState(): string; execute(): Promise<void>; private runCompensationFlow; }