Skip to content

@codesoul-co/hypha-core / contracts/runtime-projection-schemas

Using this module

Use the Runtime projection schemas module for declaring and runtime-validating contracts. It exports 7 constants, 1 function.

Import from the package entrypoint

ts
import {
  runtimeOrchestrationProjectionDefinition,
  runtimeOrchestrationProjectionExample,
  runtimeOrchestrationProjectionJsonSchema,
  runtimeOrchestrationProjectionSchema,
  runtimeOrchestrationRunStatusSchema,
  runtimeProjectionContractDefinitions,
  runtimeProjectionContractJsonSchemas,
  validateRuntimeOrchestrationProjection,
} from '@codesoul-co/hypha-core';

Usage patterns

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

Runtime validation example

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

declare function loadExternalInput(): unknown;
const input: unknown = loadExternalInput();
const parsed = runtimeOrchestrationProjectionSchema.parse(input);

Parse untrusted configuration, network, or persisted input with the runtime schema before passing it to functions or classes that expect a validated contract.

Public exports

SymbolKindSignatureDescription
runtimeOrchestrationProjectionDefinitionconstantconst runtimeOrchestrationProjectionDefinition: SpecSchemaDefinition<RuntimeOrchestrationProjection>Runtime Orchestration Projection Definition constant exported by the contracts/runtime-projection-schemas module.
runtimeOrchestrationProjectionExampleconstantconst runtimeOrchestrationProjectionExample: RuntimeOrchestrationProjectionValid example value for Runtime Orchestration Projection.
runtimeOrchestrationProjectionJsonSchemaconstantconst runtimeOrchestrationProjectionJsonSchema: JsonSchemaJSON Schema for Runtime Orchestration Projection.
runtimeOrchestrationProjectionSchemaconstantconst runtimeOrchestrationProjectionSchema: z.ZodEffects<z.ZodObject<{ runId: z.ZodString; runStatus: z.ZodEnum<[RuntimeOrchestrationRunStatus, ...RuntimeOrchestrationRunStatus[]]>; currentState: z.ZodOptional<z.ZodString>; terminalState: z.ZodOptional<z.ZodString>; statePath: z.ZodArray<z.ZodString, "many">; stateVisitCounts: z.ZodRecord<z.ZodString, z.ZodNumber>; stateAttempt: z.ZodNumber; pendingTransition: z.Z...Runtime schema for Runtime Orchestration Projection.
runtimeOrchestrationRunStatusSchemaconstantconst runtimeOrchestrationRunStatusSchema: z.ZodEnum<[RuntimeOrchestrationRunStatus, ...RuntimeOrchestrationRunStatus[]]>Runtime schema for Runtime Orchestration Run Status.
runtimeProjectionContractDefinitionsconstantconst runtimeProjectionContractDefinitions: readonly [SpecSchemaDefinition<RuntimeOrchestrationProjection>]Runtime Projection Contract Definitions constant exported by the contracts/runtime-projection-schemas module.
runtimeProjectionContractJsonSchemasconstantconst runtimeProjectionContractJsonSchemas: Record<string, JsonSchema>Runtime Projection Contract JSON Schemas constant exported by the contracts/runtime-projection-schemas module.
validateRuntimeOrchestrationProjectionfunctionvalidateRuntimeOrchestrationProjection(input: unknown): RuntimeOrchestrationProjectionValidate Runtime Orchestration Projection function with 1 public call signature; parameters and return types are listed below.

runtimeOrchestrationProjectionDefinition

Runtime Orchestration Projection Definition constant exported by the contracts/runtime-projection-schemas module.

Declaration

text
export declare const runtimeOrchestrationProjectionDefinition: SpecSchemaDefinition<RuntimeOrchestrationProjection>;

runtimeOrchestrationProjectionExample

Valid example value for Runtime Orchestration Projection.

Declaration

text
export declare const runtimeOrchestrationProjectionExample: RuntimeOrchestrationProjection;

runtimeOrchestrationProjectionJsonSchema

JSON Schema for Runtime Orchestration Projection.

Declaration

text
export declare const runtimeOrchestrationProjectionJsonSchema: JsonSchema;

runtimeOrchestrationProjectionSchema

Runtime schema for Runtime Orchestration Projection.

Declaration

text
// Exact type resolved from the package entrypoint; see source for the compiler expansion.
export declare const runtimeOrchestrationProjectionSchema: (typeof import('@codesoul-co/hypha-core'))['runtimeOrchestrationProjectionSchema'];

This compiler-expanded constant type is compacted. Its public name, top-level type, and source location remain here; use the module’s exported interfaces, types, or runtime schema for input/output fields.

runtimeOrchestrationRunStatusSchema

Runtime schema for Runtime Orchestration Run Status.

Declaration

text
export declare const runtimeOrchestrationRunStatusSchema: z.ZodEnum<[RuntimeOrchestrationRunStatus, ...RuntimeOrchestrationRunStatus[]]>;

runtimeProjectionContractDefinitions

Runtime Projection Contract Definitions constant exported by the contracts/runtime-projection-schemas module.

Declaration

text
export declare const runtimeProjectionContractDefinitions: readonly [SpecSchemaDefinition<RuntimeOrchestrationProjection>];

runtimeProjectionContractJsonSchemas

Runtime Projection Contract JSON Schemas constant exported by the contracts/runtime-projection-schemas module.

Declaration

text
export declare const runtimeProjectionContractJsonSchemas: Record<string, JsonSchema>;

validateRuntimeOrchestrationProjection

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

Declaration

text
export declare function validateRuntimeOrchestrationProjection(input: unknown): RuntimeOrchestrationProjection;

Call signature

text
validateRuntimeOrchestrationProjection(input: unknown): RuntimeOrchestrationProjection

Parameters

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

Returns

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