Skip to content

@codesoul-co/hypha-memory / structured-idempotency-store

Using this module

Use the Structured idempotency store module for persisting and reading data at this boundary. It exports 1 class, 1 interface.

Import from the package entrypoint

ts
import {
  StructuredMemoryIdempotencyStore,
} from '@codesoul-co/hypha-memory';

import type {
  StructuredMemoryIdempotencyStoreOptions,
} from '@codesoul-co/hypha-memory';

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
StructuredMemoryIdempotencyStoreclassnew StructuredMemoryIdempotencyStore(options: StructuredMemoryIdempotencyStoreOptions): StructuredMemoryIdempotencyStoreDurable idempotency results used to reconcile retries after process restart.
StructuredMemoryIdempotencyStoreOptionsinterfaceinterface StructuredMemoryIdempotencyStoreOptionsStructured Memory Idempotency Store Options interface with 2 public fields or methods.

StructuredMemoryIdempotencyStore

Durable idempotency results used to reconcile retries after process restart.

Declaration

text
export declare class StructuredMemoryIdempotencyStore implements MemoryIdempotencyStore {
    constructor(options: StructuredMemoryIdempotencyStoreOptions);
    get(scopeHash: string, key: string): Promise<unknown | null>;
    set(scopeHash: string, key: string, result: unknown): Promise<void>;
}

Public members

MemberKindSignatureDescription
constructorconstructor(options: StructuredMemoryIdempotencyStoreOptions): StructuredMemoryIdempotencyStoreCreates an instance of this class.
getmethodget(scopeHash: string, key: string): Promise<unknown | null>Public method; parameters and return type are shown in the signature.
setmethodset(scopeHash: string, key: string, result: unknown): Promise<void>Public method; parameters and return type are shown in the signature.

StructuredMemoryIdempotencyStoreOptions

Structured Memory Idempotency Store Options interface with 2 public fields or methods.

  • Kind: interface
  • Import: import type { StructuredMemoryIdempotencyStoreOptions } from '@codesoul-co/hypha-memory';
  • Source module: structured-idempotency-store

Declaration

text
export interface StructuredMemoryIdempotencyStoreOptions {
    store: StructuredStoreProvider;
    table?: string;
}

Contract members

MemberKindSignatureDescription
storepropertystore: StructuredStoreProviderPublic property; its type, readonly modifier and optionality are shown in the signature.
tablepropertytable?: stringPublic property; its type, readonly modifier and optionality are shown in the signature.