UNPKG

yoonite-saga

Version:

> Orchestration de workflows transactionnels avec gestion de compensation (pattern Saga)

16 lines (15 loc) 567 B
import { SagaConfig } from "./types/config.type"; import { Compensation, Condition, Invoke } from "./types/invoke.type"; import { Workflow } from "./types/workflow.type"; export declare class SagaBuilder { index: number | null; steps: Workflow; debug: boolean; constructor(config?: SagaConfig); step(name: string): SagaBuilder; invoke(name: string | Invoke, fn?: Invoke): SagaBuilder; validate(dto: any): SagaBuilder; condition(fn: Condition): SagaBuilder; withCompensation(fn: Compensation): SagaBuilder; build(): Workflow; }