Skip to content

@codesoul-co/hypha-core / modules/runtime/runtime-recovery-service

Using this module

Use the Runtime recovery service module for executing runtime behavior at this boundary. It exports 1 class, 2 interfaces.

Import from the package entrypoint

ts
import {
  RuntimeRecoveryService,
} from '@codesoul-co/hypha-core';

import type {
  RuntimeActivityRedispatchRecoveryPort,
  RuntimeRecoveryServiceOptions,
} from '@codesoul-co/hypha-core';

Usage patterns

  • Use the 2 type/interface exports as static contracts in application code, adapters, or tests. Import them with import type; they do not exist at runtime.
  • The module exposes 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.

Public exports

SymbolKindSignatureDescription
RuntimeRecoveryServiceclassnew RuntimeRecoveryService(options: RuntimeRecoveryServiceOptions): RuntimeRecoveryServiceRuntime Recovery Service class with 3 public constructor or member entries; its exact declarations are listed below.
RuntimeActivityRedispatchRecoveryPortinterfaceinterface RuntimeActivityRedispatchRecoveryPortRuntime Activity Redispatch Recovery Port interface with 1 public fields or methods.
RuntimeRecoveryServiceOptionsinterfaceinterface RuntimeRecoveryServiceOptionsRuntime Recovery Service Options interface with 11 public fields or methods.

RuntimeRecoveryService

Runtime Recovery Service class with 3 public constructor or member entries; its exact declarations are listed below.

Declaration

text
export declare class RuntimeRecoveryService {
    constructor(options: RuntimeRecoveryServiceOptions);
    scan(input: RuntimeRecoveryScanRequest): Promise<RuntimeRecoveryScanResult>;
    recover(input: RuntimeRecoveryCommand): Promise<RuntimeRecoveryResult>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: RuntimeRecoveryServiceOptions): RuntimeRecoveryServiceCreates an instance of this class.
recovermethodrecover(input: RuntimeRecoveryCommand): Promise<RuntimeRecoveryResult>Public method; parameters and return type are shown in the signature.
scanmethodscan(input: RuntimeRecoveryScanRequest): Promise<RuntimeRecoveryScanResult>Public method; parameters and return type are shown in the signature.

RuntimeActivityRedispatchRecoveryPort

Runtime Activity Redispatch Recovery Port interface with 1 public fields or methods.

Declaration

text
export interface RuntimeActivityRedispatchRecoveryPort {
    redispatch(command: RuntimeActivityRedispatchCommand): Promise<RuntimeActivityRedispatchResult>;
}

Contract members

MemberKindSignatureDescription
redispatchmethodredispatch(command: RuntimeActivityRedispatchCommand): Promise<RuntimeActivityRedispatchResult>Public method; parameters and return type are shown in the signature.

RuntimeRecoveryServiceOptions

Runtime Recovery Service Options interface with 11 public fields or methods.

Declaration

text
export interface RuntimeRecoveryServiceOptions {
    events: EventRuntime;
    projections: ProjectionEngine;
    projectionStore: ProjectionStore<RuntimeOrchestrationProjection>;
    runLeases: RunLeaseStore;
    stateClaims: StateExecutionClaimStore;
    activities: RuntimeActivityReconciliationPort;
    redispatches: RuntimeActivityRedispatchRecoveryPort;
    cancellations: RuntimeCancellationRecoveryPort;
    requeue: RuntimeRecoveryRequeuePort;
    now?: () => string;
    nextId?: (namespace: string) => string;
}

Contract members

MemberKindSignatureDescription
activitiespropertyactivities: RuntimeActivityReconciliationPortPublic property; its type, readonly modifier and optionality are shown in the signature.
cancellationspropertycancellations: RuntimeCancellationRecoveryPortPublic property; its type, readonly modifier and optionality are shown in the signature.
eventspropertyevents: EventRuntimePublic property; its type, readonly modifier and optionality are shown in the signature.
nextIdmethodnextId?(namespace: string): stringPublic method; parameters and return type are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.
projectionspropertyprojections: ProjectionEnginePublic property; its type, readonly modifier and optionality are shown in the signature.
projectionStorepropertyprojectionStore: ProjectionStore<RuntimeOrchestrationProjection>Public property; its type, readonly modifier and optionality are shown in the signature.
redispatchespropertyredispatches: RuntimeActivityRedispatchRecoveryPortPublic property; its type, readonly modifier and optionality are shown in the signature.
requeuepropertyrequeue: RuntimeRecoveryRequeuePortPublic property; its type, readonly modifier and optionality are shown in the signature.
runLeasespropertyrunLeases: RunLeaseStorePublic property; its type, readonly modifier and optionality are shown in the signature.
stateClaimspropertystateClaims: StateExecutionClaimStorePublic property; its type, readonly modifier and optionality are shown in the signature.