Skip to content

@codesoul-co/hypha-core / modules/runtime/session-command-payload-store

Using this module

Use the Session command payload store module for persisting and reading data at this boundary. It exports 1 class, 3 interfaces, 1 type.

Import from the package entrypoint

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

import type {
  ArtifactSessionCommandPayloadStoreOptions,
  PutSessionCommandPayloadRequest,
  SessionCommandPayloadReference,
  GetSessionCommandPayloadRequest,
} from '@codesoul-co/hypha-core';

Usage patterns

  • Use the 4 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
ArtifactSessionCommandPayloadStoreclassnew ArtifactSessionCommandPayloadStore(options: ArtifactSessionCommandPayloadStoreOptions): ArtifactSessionCommandPayloadStoreStores canonical command JSON outside the Queue while retaining a verified durable reference.
ArtifactSessionCommandPayloadStoreOptionsinterfaceinterface ArtifactSessionCommandPayloadStoreOptionsArtifact Session Command Payload Store Options interface with 2 public fields or methods.
PutSessionCommandPayloadRequestinterfaceinterface PutSessionCommandPayloadRequestPut Session Command Payload Request interface with 2 public fields or methods.
SessionCommandPayloadReferenceinterfaceinterface SessionCommandPayloadReferenceSession Command Payload Reference interface with 2 public fields or methods.
GetSessionCommandPayloadRequesttypetype GetSessionCommandPayloadRequest = SessionCommandPayloadReferencePublic type alias for Get Session Command Payload Request; the declaration contains its complete type expression.

ArtifactSessionCommandPayloadStore

Stores canonical command JSON outside the Queue while retaining a verified durable reference.

Declaration

text
export declare class ArtifactSessionCommandPayloadStore {
    constructor(options: ArtifactSessionCommandPayloadStoreOptions);
    put(request: PutSessionCommandPayloadRequest): Promise<SessionCommandPayloadReference>;
    get(request: GetSessionCommandPayloadRequest): Promise<unknown>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: ArtifactSessionCommandPayloadStoreOptions): ArtifactSessionCommandPayloadStoreCreates an instance of this class.
getmethodget(request: GetSessionCommandPayloadRequest): Promise<unknown>Public method; parameters and return type are shown in the signature.
putmethodput(request: PutSessionCommandPayloadRequest): Promise<SessionCommandPayloadReference>Public method; parameters and return type are shown in the signature.

ArtifactSessionCommandPayloadStoreOptions

Artifact Session Command Payload Store Options interface with 2 public fields or methods.

Declaration

text
export interface ArtifactSessionCommandPayloadStoreOptions {
    artifacts: ArtifactStoreProvider;
    maxPayloadBytes?: number;
}

Contract members

MemberKindSignatureDescription
artifactspropertyartifacts: ArtifactStoreProviderPublic property; its type, readonly modifier and optionality are shown in the signature.
maxPayloadBytespropertymaxPayloadBytes?: numberPublic property; its type, readonly modifier and optionality are shown in the signature.

PutSessionCommandPayloadRequest

Put Session Command Payload Request interface with 2 public fields or methods.

Declaration

text
export interface PutSessionCommandPayloadRequest {
    commandId: string;
    payload: unknown;
}

Contract members

MemberKindSignatureDescription
commandIdpropertycommandId: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
payloadpropertypayload: unknownPublic property; its type, readonly modifier and optionality are shown in the signature.

SessionCommandPayloadReference

Session Command Payload Reference interface with 2 public fields or methods.

Declaration

text
export interface SessionCommandPayloadReference {
    payloadRef: string;
    payloadHash: string;
}

Contract members

MemberKindSignatureDescription
payloadHashpropertypayloadHash: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
payloadRefpropertypayloadRef: stringPublic property; its type, readonly modifier and optionality are shown in the signature.

GetSessionCommandPayloadRequest

Public type alias for Get Session Command Payload Request; the declaration contains its complete type expression.

Declaration

text
export type GetSessionCommandPayloadRequest = SessionCommandPayloadReference;