Skip to content

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

Using this module

Use the Runtime query service module for executing runtime behavior at this boundary. It exports 1 class, 1 interface.

Import from the package entrypoint

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

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

Usage patterns

  • Use the 1 type/interface export 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
RuntimeQueryServiceclassnew RuntimeQueryService(options: RuntimeQueryServiceOptions): RuntimeQueryServiceRuntime Query Service class with 6 public constructor or member entries; its exact declarations are listed below.
RuntimeQueryServiceOptionsinterfaceinterface RuntimeQueryServiceOptionsRuntime Query Service Options interface with 4 public fields or methods.

RuntimeQueryService

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

Declaration

text
export declare class RuntimeQueryService implements RuntimeQueryServiceContract {
    constructor(options: RuntimeQueryServiceOptions);
    getRun(input: RuntimeQueryRequest): Promise<RuntimeRunView | null>;
    getFSM(input: RuntimeQueryRequest): Promise<RuntimeOrchestrationProjection | null>;
    getTimeline(input: RuntimeTimelineRequest): Promise<RuntimeTimelineResult>;
    getPendingWaits(input: RuntimeQueryRequest): Promise<RuntimePendingWaitProjection[]>;
    explainState(input: RuntimeQueryRequest): Promise<RuntimeStateExplanation | null>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: RuntimeQueryServiceOptions): RuntimeQueryServiceCreates an instance of this class.
explainStatemethodexplainState(input: RuntimeQueryRequest): Promise<RuntimeStateExplanation | null>Public method; parameters and return type are shown in the signature.
getFSMmethodgetFSM(input: RuntimeQueryRequest): Promise<RuntimeOrchestrationProjection | null>Public method; parameters and return type are shown in the signature.
getPendingWaitsmethodgetPendingWaits(input: RuntimeQueryRequest): Promise<RuntimePendingWaitProjection[]>Public method; parameters and return type are shown in the signature.
getRunmethodgetRun(input: RuntimeQueryRequest): Promise<RuntimeRunView | null>Public method; parameters and return type are shown in the signature.
getTimelinemethodgetTimeline(input: RuntimeTimelineRequest): Promise<RuntimeTimelineResult>Public method; parameters and return type are shown in the signature.

RuntimeQueryServiceOptions

Runtime Query Service Options interface with 4 public fields or methods.

Declaration

text
export interface RuntimeQueryServiceOptions {
    events: Pick<EventRuntime, 'read' | 'getStreamHead'>;
    projections: ProjectionEngine;
    projectionStore: ProjectionStore<RuntimeOrchestrationProjection>;
    now?: () => string;
}

Contract members

MemberKindSignatureDescription
eventspropertyevents: Pick<EventRuntime, "read" | "getStreamHead">Public property; its type, readonly modifier and optionality 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.