Interface ISagaManager<AR, A, ARM, AM>

Saga manager interface - Stateless process orchestrator.

It is reacting on Action Results of type AR and produces new actions A based on them.

Author

Иван Дугалић / Ivan Dugalic /

Idugalic

interface ISagaManager<AR, A, ARM, AM> {
    handle: ((actionResult) => Promise<readonly (A & AM)[]>);
    publish: ((actions) => Promise<readonly (A & AM)[]>);
    react: ((actionResult) => readonly A[]);
}

Type Parameters

  • AR

    Action Result of type AR

  • A

    Action of type A that are going to be published downstream

  • ARM

    Action Result metadata

  • AM

    Action metadata

Hierarchy (view full)

Implemented by

Properties

Properties

handle: ((actionResult) => Promise<readonly (A & AM)[]>)

Type declaration

    • (actionResult): Promise<readonly (A & AM)[]>
    • Parameters

      Returns Promise<readonly (A & AM)[]>

publish: ((actions) => Promise<readonly (A & AM)[]>)

Publish actions

Type declaration

    • (actions): Promise<readonly (A & AM)[]>
    • Parameters

      • actions: readonly (A & ARM)[]

        of Actions with Action Result Metadata of type A & ARM

      Returns Promise<readonly (A & AM)[]>

Returns

list of newly published Actions with Action Metadata of type A & AM

react: ((actionResult) => readonly A[])

Type declaration

    • (actionResult): readonly A[]
    • Parameters

      • actionResult: AR

      Returns readonly A[]

Generated using TypeDoc