Skip to content

@codesoul-co/hypha-core / modules/runtime/orchestration-projection

Using this module

Use the Orchestration projection module for executing runtime behavior at this boundary. It exports 2 constants, 2 functions.

Import from the package entrypoint

ts
import {
  RUNTIME_ORCHESTRATION_PROJECTION_ID,
  RUNTIME_ORCHESTRATION_PROJECTION_VERSION,
  createRuntimeOrchestrationProjectionDefinition,
  reduceRuntimeOrchestrationProjection,
} from '@codesoul-co/hypha-core';

Usage patterns

  • The module exposes 2 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
  • The 2 constant/enum exports provide stable values, schemas, definitions, or defaults. Reuse these exports instead of copying internal values into an application.

Public exports

SymbolKindSignatureDescription
RUNTIME_ORCHESTRATION_PROJECTION_IDconstantconst RUNTIME_ORCHESTRATION_PROJECTION_ID: "runtime.orchestration"RUNTIME ORCHESTRATION PROJECTION ID constant exported by the modules/runtime/orchestration-projection module.
RUNTIME_ORCHESTRATION_PROJECTION_VERSIONconstantconst RUNTIME_ORCHESTRATION_PROJECTION_VERSION: "1.5.0"RUNTIME ORCHESTRATION PROJECTION VERSION constant exported by the modules/runtime/orchestration-projection module.
createRuntimeOrchestrationProjectionDefinitionfunctioncreateRuntimeOrchestrationProjectionDefinition(runId: string): ProjectionDefinition<RuntimeOrchestrationProjection>Create Runtime Orchestration Projection Definition function with 1 public call signature; parameters and return types are listed below.
reduceRuntimeOrchestrationProjectionfunctionreduceRuntimeOrchestrationProjection(state: RuntimeOrchestrationProjection, event: PersistedFrameworkEvent): RuntimeOrchestrationProjectionReduce Runtime Orchestration Projection function with 1 public call signature; parameters and return types are listed below.

RUNTIME_ORCHESTRATION_PROJECTION_ID

RUNTIME ORCHESTRATION PROJECTION ID constant exported by the modules/runtime/orchestration-projection module.

Declaration

text
export declare const RUNTIME_ORCHESTRATION_PROJECTION_ID: "runtime.orchestration";

RUNTIME_ORCHESTRATION_PROJECTION_VERSION

RUNTIME ORCHESTRATION PROJECTION VERSION constant exported by the modules/runtime/orchestration-projection module.

Declaration

text
export declare const RUNTIME_ORCHESTRATION_PROJECTION_VERSION: "1.5.0";

createRuntimeOrchestrationProjectionDefinition

Create Runtime Orchestration Projection Definition function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function createRuntimeOrchestrationProjectionDefinition(runId: string): ProjectionDefinition<RuntimeOrchestrationProjection>;

Call signature

text
createRuntimeOrchestrationProjectionDefinition(runId: string): ProjectionDefinition<RuntimeOrchestrationProjection>

Parameters

ParameterTypeRequiredDescription
runIdstringYesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: ProjectionDefinition<RuntimeOrchestrationProjection>
  • Description: The return contract is defined by the type shown above.

reduceRuntimeOrchestrationProjection

Reduce Runtime Orchestration Projection function with 1 public call signature; parameters and return types are listed below.

Declaration

text
export declare function reduceRuntimeOrchestrationProjection(state: RuntimeOrchestrationProjection, event: PersistedFrameworkEvent): RuntimeOrchestrationProjection;

Call signature

text
reduceRuntimeOrchestrationProjection(state: RuntimeOrchestrationProjection, event: PersistedFrameworkEvent): RuntimeOrchestrationProjection

Parameters

ParameterTypeRequiredDescription
stateRuntimeOrchestrationProjectionYesRequired parameter; accepted values are defined by the type column.
eventPersistedFrameworkEvent<unknown>YesRequired parameter; accepted values are defined by the type column.

Returns

  • Type: RuntimeOrchestrationProjection
  • Description: The return contract is defined by the type shown above.