@codesoul-co/hypha-memory / structured-external-mapping-store
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/structured-external-mapping-store.ts - Exports: 2
Using this module
Use the Structured external mapping store module for persisting and reading data at this boundary. It exports 1 class, 1 interface.
Import from the package entrypoint
ts
import {
StructuredExternalMemoryMappingStore,
} from '@codesoul-co/hypha-memory';
import type {
StructuredExternalMemoryMappingStoreOptions,
} 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
| Symbol | Kind | Signature | Description |
|---|---|---|---|
StructuredExternalMemoryMappingStore | class | new StructuredExternalMemoryMappingStore(options: StructuredExternalMemoryMappingStoreOptions): StructuredExternalMemoryMappingStore | Persistent, restart-safe mapping between Hypha memory IDs and provider IDs. |
StructuredExternalMemoryMappingStoreOptions | interface | interface StructuredExternalMemoryMappingStoreOptions | Structured External Memory Mapping Store Options interface with 2 public fields or methods. |
StructuredExternalMemoryMappingStore
Persistent, restart-safe mapping between Hypha memory IDs and provider IDs.
- Kind: class
- Import:
import { StructuredExternalMemoryMappingStore } from '@codesoul-co/hypha-memory'; - Source module:
structured-external-mapping-store
Declaration
text
export declare class StructuredExternalMemoryMappingStore implements ExternalMemoryMappingStore {
readonly durability: "durable";
constructor(options: StructuredExternalMemoryMappingStoreOptions);
get(providerId: string, memoryId: string): Promise<ExternalMemoryMapping | null>;
getByExternalId(providerId: string, externalId: string): Promise<ExternalMemoryMapping | null>;
set(mapping: ExternalMemoryMapping): Promise<void>;
list(providerId: string): Promise<ExternalMemoryMapping[]>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: StructuredExternalMemoryMappingStoreOptions): StructuredExternalMemoryMappingStore | Creates an instance of this class. |
durability | property | readonly durability: "durable" | Public property; its type, readonly modifier and optionality are shown in the signature. |
get | method | get(providerId: string, memoryId: string): Promise<ExternalMemoryMapping | null> | Public method; parameters and return type are shown in the signature. |
getByExternalId | method | getByExternalId(providerId: string, externalId: string): Promise<ExternalMemoryMapping | null> | Public method; parameters and return type are shown in the signature. |
list | method | list(providerId: string): Promise<ExternalMemoryMapping[]> | Public method; parameters and return type are shown in the signature. |
set | method | set(mapping: ExternalMemoryMapping): Promise<void> | Public method; parameters and return type are shown in the signature. |
StructuredExternalMemoryMappingStoreOptions
Structured External Memory Mapping Store Options interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { StructuredExternalMemoryMappingStoreOptions } from '@codesoul-co/hypha-memory'; - Source module:
structured-external-mapping-store
Declaration
text
export interface StructuredExternalMemoryMappingStoreOptions {
store: StructuredStoreProvider;
table?: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
store | property | store: StructuredStoreProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
table | property | table?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
