UNPKG

node-sagas

Version:

Library for handling distributed transactions in the microservices architecture

20 lines (19 loc) 551 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> { private sagaFlow; private state; private invokeError; private compensationError; constructor(sagaFlow: SagaFlow<T>); getState(): string; execute(params: T): Promise<T>; private runCompensationFlow; }