@codesoul-co/hypha-core / contracts/runtime-query
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/contracts/runtime-query.ts - Exports: 6
Using this module
Use the Runtime query module for declaring and runtime-validating contracts. It exports 6 interfaces.
Import from the package entrypoint
ts
import type {
RuntimeQueryRequest,
RuntimeQueryServiceContract,
RuntimeRunView,
RuntimeStateExplanation,
RuntimeTimelineRequest,
RuntimeTimelineResult,
} from '@codesoul-co/hypha-core';Usage patterns
- Use the 6 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
RuntimeQueryRequest | interface | interface RuntimeQueryRequest | Runtime Query Request interface with 1 public fields or methods. |
RuntimeQueryServiceContract | interface | interface RuntimeQueryServiceContract | Runtime Query Service Contract interface with 5 public fields or methods. |
RuntimeRunView | interface | interface RuntimeRunView | Runtime Run View interface with 7 public fields or methods. |
RuntimeStateExplanation | interface | interface RuntimeStateExplanation | Runtime State Explanation interface with 10 public fields or methods. |
RuntimeTimelineRequest | interface | interface RuntimeTimelineRequest extends RuntimeQueryRequest | Runtime Timeline Request interface with 5 public fields or methods. |
RuntimeTimelineResult | interface | interface RuntimeTimelineResult | Runtime Timeline Result interface with 5 public fields or methods. |
RuntimeQueryRequest
Runtime Query Request interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeQueryRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-query
Declaration
text
export interface RuntimeQueryRequest {
scope: RuntimeScope;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
scope | property | scope: RuntimeScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeQueryServiceContract
Runtime Query Service Contract interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeQueryServiceContract } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-query
Declaration
text
export interface RuntimeQueryServiceContract {
getRun(request: RuntimeQueryRequest): Promise<RuntimeRunView | null>;
getFSM(request: RuntimeQueryRequest): Promise<RuntimeOrchestrationProjection | null>;
getTimeline(request: RuntimeTimelineRequest): Promise<RuntimeTimelineResult>;
getPendingWaits(request: RuntimeQueryRequest): Promise<RuntimePendingWaitProjection[]>;
explainState(request: RuntimeQueryRequest): Promise<RuntimeStateExplanation | null>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
explainState | method | explainState(request: RuntimeQueryRequest): Promise<RuntimeStateExplanation | null> | Public method; parameters and return type are shown in the signature. |
getFSM | method | getFSM(request: RuntimeQueryRequest): Promise<RuntimeOrchestrationProjection | null> | Public method; parameters and return type are shown in the signature. |
getPendingWaits | method | getPendingWaits(request: RuntimeQueryRequest): Promise<RuntimePendingWaitProjection[]> | Public method; parameters and return type are shown in the signature. |
getRun | method | getRun(request: RuntimeQueryRequest): Promise<RuntimeRunView | null> | Public method; parameters and return type are shown in the signature. |
getTimeline | method | getTimeline(request: RuntimeTimelineRequest): Promise<RuntimeTimelineResult> | Public method; parameters and return type are shown in the signature. |
RuntimeRunView
Runtime Run View interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeRunView } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-query
Declaration
text
export interface RuntimeRunView {
scope: RuntimeScope;
projectionVersion: string;
projection: RuntimeOrchestrationProjection;
projectionLastSequence: number;
eventHeadSequence: number;
projectionLag: number;
refreshedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
eventHeadSequence | property | eventHeadSequence: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
projection | property | projection: RuntimeOrchestrationProjection | Public property; its type, readonly modifier and optionality are shown in the signature. |
projectionLag | property | projectionLag: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
projectionLastSequence | property | projectionLastSequence: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
projectionVersion | property | projectionVersion: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
refreshedAt | property | refreshedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: RuntimeScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeStateExplanation
Runtime State Explanation interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeStateExplanation } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-query
Declaration
text
export interface RuntimeStateExplanation {
scope: RuntimeScope;
runStatus: RuntimeOrchestrationProjection['runStatus'];
currentState?: string;
stateAttempt: number;
statePath: string[];
pendingWaitId?: string;
pendingTransitionEventId?: string;
pendingActivityIds: string[];
lastEventSequence: number;
source: 'runtime.orchestration.projection';
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
currentState | property | currentState?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
lastEventSequence | property | lastEventSequence: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingActivityIds | property | pendingActivityIds: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingTransitionEventId | property | pendingTransitionEventId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
pendingWaitId | property | pendingWaitId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
runStatus | property | runStatus: import("/Users/erwin/Downloads/codespace/Hypha/packages/core/dist/contracts/runtime-projection").RuntimeOrchestrationRunStatus | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: RuntimeScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
source | property | source: "runtime.orchestration.projection" | Public property; its type, readonly modifier and optionality are shown in the signature. |
stateAttempt | property | stateAttempt: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
statePath | property | statePath: string[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeTimelineRequest
Runtime Timeline Request interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeTimelineRequest } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-query
Declaration
text
export interface RuntimeTimelineRequest extends RuntimeQueryRequest {
fromSequence?: number;
toSequence?: number;
types?: FrameworkEventType[];
limit?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
fromSequence | property | fromSequence?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
limit | property | limit?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: RuntimeScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
toSequence | property | toSequence?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
types | property | types?: FrameworkEventType[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
RuntimeTimelineResult
Runtime Timeline Result interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { RuntimeTimelineResult } from '@codesoul-co/hypha-core'; - Source module:
contracts/runtime-query
Declaration
text
export interface RuntimeTimelineResult {
scope: RuntimeScope;
events: PersistedFrameworkEvent[];
eventCount: number;
eventHeadSequence: number;
refreshedAt: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
eventCount | property | eventCount: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
eventHeadSequence | property | eventHeadSequence: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
events | property | events: PersistedFrameworkEvent<unknown>[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
refreshedAt | property | refreshedAt: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: RuntimeScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
