@codesoul-co/hypha-memory / memory-server-permanent-migration
- Package index:
@codesoul-co/hypha-memory - Source:
packages/memory/src/memory-server-permanent-migration.ts - Exports: 14
Using this module
Use the Memory server permanent migration module for using the public contracts and operations for this capability boundary. It exports 1 class, 3 functions, 7 interfaces, 3 types.
Import from the package entrypoint
import {
PermanentMemoryMigrationAdapter,
decidePermanentMemoryFailure,
isExplicitPermanentMemoryNotFound,
normalizePermanentMemoryProviderError,
} from '@codesoul-co/hypha-memory';
import type {
PermanentMemoryFailureDecision,
PermanentMemoryFailureEvent,
PermanentMemoryFailureObserver,
PermanentMemoryMigrationAdapterOptions,
PermanentMemoryMigrationPort,
PermanentMemoryMigrationProvider,
PermanentMemoryMigrationRequest,
PermanentMemoryFailureDisposition,
} from '@codesoul-co/hypha-memory';
// The complete export list is documented below.Usage patterns
- Use the 10 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.
- The module exposes 3 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
PermanentMemoryMigrationAdapter | class | new PermanentMemoryMigrationAdapter(options: PermanentMemoryMigrationAdapterOptions): PermanentMemoryMigrationAdapter | Permanent Memory Migration Adapter class with 5 public constructor or member entries; its exact declarations are listed below. |
decidePermanentMemoryFailure | function | decidePermanentMemoryFailure(error: NormalizedMemoryError, request: PermanentMemoryMigrationRequest, operation: PermanentMemoryMigrationOperation): PermanentMemoryFailureDecision | Decide Permanent Memory Failure function with 1 public call signature; parameters and return types are listed below. |
isExplicitPermanentMemoryNotFound | function | isExplicitPermanentMemoryNotFound(error: unknown): boolean | Is Explicit Permanent Memory Not Found function with 1 public call signature; parameters and return types are listed below. |
normalizePermanentMemoryProviderError | function | normalizePermanentMemoryProviderError(providerError: unknown, request: PermanentMemoryMigrationRequest, operation: PermanentMemoryMigrationOperation): NormalizedMemoryError | Normalize Permanent Memory Provider Error function with 1 public call signature; parameters and return types are listed below. |
PermanentMemoryFailureDecision | interface | interface PermanentMemoryFailureDecision | Permanent Memory Failure Decision interface with 6 public fields or methods. |
PermanentMemoryFailureEvent | interface | interface PermanentMemoryFailureEvent | Permanent Memory Failure Event interface with 10 public fields or methods. |
PermanentMemoryFailureObserver | interface | interface PermanentMemoryFailureObserver | Permanent Memory Failure Observer interface with 1 public fields or methods. |
PermanentMemoryMigrationAdapterOptions | interface | interface PermanentMemoryMigrationAdapterOptions | Permanent Memory Migration Adapter Options interface with 2 public fields or methods. |
PermanentMemoryMigrationPort | interface | interface PermanentMemoryMigrationPort | Permanent Memory Migration Port interface with 4 public fields or methods. |
PermanentMemoryMigrationProvider | interface | interface PermanentMemoryMigrationProvider | Permanent Memory Migration Provider interface with 4 public fields or methods. |
PermanentMemoryMigrationRequest | interface | interface PermanentMemoryMigrationRequest | Permanent Memory Migration Request interface with 7 public fields or methods. |
PermanentMemoryFailureDisposition | type | type PermanentMemoryFailureDisposition = 'retry' | 'reconcile' | 'quarantine' | 'dlq' | Public type alias for Permanent Memory Failure Disposition; the declaration contains its complete type expression. |
PermanentMemoryFailureFinalState | type | type PermanentMemoryFailureFinalState = 'waiting' | 'reconciling' | 'quarantined' | 'dead_lettered' | Public type alias for Permanent Memory Failure Final State; the declaration contains its complete type expression. |
PermanentMemoryMigrationOperation | type | type PermanentMemoryMigrationOperation = 'get' | 'list' | 'delete' | 'write' | Public type alias for Permanent Memory Migration Operation; the declaration contains its complete type expression. |
PermanentMemoryMigrationAdapter
Permanent Memory Migration Adapter class with 5 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { PermanentMemoryMigrationAdapter } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export declare class PermanentMemoryMigrationAdapter implements PermanentMemoryMigrationPort {
constructor(options: PermanentMemoryMigrationAdapterOptions);
get<TValue = unknown>(request: PermanentMemoryMigrationRequest): Promise<TValue | null>;
list<TValue = unknown>(request: PermanentMemoryMigrationRequest): Promise<TValue[]>;
delete(request: PermanentMemoryMigrationRequest): Promise<boolean>;
write<TValue = unknown>(request: PermanentMemoryMigrationRequest, value: TValue): Promise<void>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: PermanentMemoryMigrationAdapterOptions): PermanentMemoryMigrationAdapter | Creates an instance of this class. |
delete | method | delete(request: PermanentMemoryMigrationRequest): Promise<boolean> | Public method; parameters and return type are shown in the signature. |
get | method | get<TValue = unknown>(request: PermanentMemoryMigrationRequest): Promise<TValue | null> | Public method; parameters and return type are shown in the signature. |
list | method | list<TValue = unknown>(request: PermanentMemoryMigrationRequest): Promise<TValue[]> | Public method; parameters and return type are shown in the signature. |
write | method | write<TValue = unknown>(request: PermanentMemoryMigrationRequest, value: TValue): Promise<void> | Public method; parameters and return type are shown in the signature. |
decidePermanentMemoryFailure
Decide Permanent Memory Failure function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { decidePermanentMemoryFailure } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export declare function decidePermanentMemoryFailure(error: NormalizedMemoryError, request: PermanentMemoryMigrationRequest, operation: PermanentMemoryMigrationOperation): PermanentMemoryFailureDecision;Call signature
decidePermanentMemoryFailure(error: NormalizedMemoryError, request: PermanentMemoryMigrationRequest, operation: PermanentMemoryMigrationOperation): PermanentMemoryFailureDecisionParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
error | NormalizedMemoryError | Yes | Required parameter; accepted values are defined by the type column. |
request | PermanentMemoryMigrationRequest | Yes | Required parameter; accepted values are defined by the type column. |
operation | PermanentMemoryMigrationOperation | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
PermanentMemoryFailureDecision - Description: The return contract is defined by the type shown above.
isExplicitPermanentMemoryNotFound
Is Explicit Permanent Memory Not Found function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { isExplicitPermanentMemoryNotFound } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export declare function isExplicitPermanentMemoryNotFound(error: unknown): boolean;Call signature
isExplicitPermanentMemoryNotFound(error: unknown): booleanParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
error | unknown | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
boolean - Description: The return contract is defined by the type shown above.
normalizePermanentMemoryProviderError
Normalize Permanent Memory Provider Error function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { normalizePermanentMemoryProviderError } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export declare function normalizePermanentMemoryProviderError(providerError: unknown, request: PermanentMemoryMigrationRequest, operation: PermanentMemoryMigrationOperation): NormalizedMemoryError;Call signature
normalizePermanentMemoryProviderError(providerError: unknown, request: PermanentMemoryMigrationRequest, operation: PermanentMemoryMigrationOperation): NormalizedMemoryErrorParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
providerError | unknown | Yes | Required parameter; accepted values are defined by the type column. |
request | PermanentMemoryMigrationRequest | Yes | Required parameter; accepted values are defined by the type column. |
operation | PermanentMemoryMigrationOperation | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
NormalizedMemoryError - Description: The return contract is defined by the type shown above.
PermanentMemoryFailureDecision
Permanent Memory Failure Decision interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { PermanentMemoryFailureDecision } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export interface PermanentMemoryFailureDecision {
disposition: PermanentMemoryFailureDisposition;
finalState: PermanentMemoryFailureFinalState;
retryable: boolean;
attempt: number;
maxAttempts: number;
reason: string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
attempt | property | attempt: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
disposition | property | disposition: PermanentMemoryFailureDisposition | Public property; its type, readonly modifier and optionality are shown in the signature. |
finalState | property | finalState: PermanentMemoryFailureFinalState | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxAttempts | property | maxAttempts: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
reason | property | reason: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
retryable | property | retryable: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
PermanentMemoryFailureEvent
Permanent Memory Failure Event interface with 10 public fields or methods.
- Kind: interface
- Import:
import type { PermanentMemoryFailureEvent } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export interface PermanentMemoryFailureEvent {
type: 'permanent_memory.operation_failed';
operationId: string;
operation: PermanentMemoryMigrationOperation;
providerRef: string;
profileRef: string;
scopeHash: string;
attempt: number;
error: NormalizedMemoryError;
disposition: PermanentMemoryFailureDisposition;
finalState: PermanentMemoryFailureFinalState;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
attempt | property | attempt: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
disposition | property | disposition: PermanentMemoryFailureDisposition | Public property; its type, readonly modifier and optionality are shown in the signature. |
error | property | error: NormalizedMemoryError | Public property; its type, readonly modifier and optionality are shown in the signature. |
finalState | property | finalState: PermanentMemoryFailureFinalState | Public property; its type, readonly modifier and optionality are shown in the signature. |
operation | property | operation: PermanentMemoryMigrationOperation | Public property; its type, readonly modifier and optionality are shown in the signature. |
operationId | property | operationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileRef | property | profileRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerRef | property | providerRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scopeHash | property | scopeHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
type | property | type: "permanent_memory.operation_failed" | Public property; its type, readonly modifier and optionality are shown in the signature. |
PermanentMemoryFailureObserver
Permanent Memory Failure Observer interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { PermanentMemoryFailureObserver } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export interface PermanentMemoryFailureObserver {
record(event: PermanentMemoryFailureEvent): void | Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
record | method | record(event: PermanentMemoryFailureEvent): void | Promise<void> | Public method; parameters and return type are shown in the signature. |
PermanentMemoryMigrationAdapterOptions
Permanent Memory Migration Adapter Options interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { PermanentMemoryMigrationAdapterOptions } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export interface PermanentMemoryMigrationAdapterOptions {
provider: PermanentMemoryMigrationProvider;
observer?: PermanentMemoryFailureObserver;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
observer | property | observer?: PermanentMemoryFailureObserver | Public property; its type, readonly modifier and optionality are shown in the signature. |
provider | property | provider: PermanentMemoryMigrationProvider | Public property; its type, readonly modifier and optionality are shown in the signature. |
PermanentMemoryMigrationPort
Permanent Memory Migration Port interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { PermanentMemoryMigrationPort } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export interface PermanentMemoryMigrationPort {
get<TValue = unknown>(request: PermanentMemoryMigrationRequest): Promise<TValue | null>;
list<TValue = unknown>(request: PermanentMemoryMigrationRequest): Promise<TValue[]>;
delete(request: PermanentMemoryMigrationRequest): Promise<boolean>;
write<TValue = unknown>(request: PermanentMemoryMigrationRequest, value: TValue): Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
delete | method | delete(request: PermanentMemoryMigrationRequest): Promise<boolean> | Public method; parameters and return type are shown in the signature. |
get | method | get<TValue = unknown>(request: PermanentMemoryMigrationRequest): Promise<TValue | null> | Public method; parameters and return type are shown in the signature. |
list | method | list<TValue = unknown>(request: PermanentMemoryMigrationRequest): Promise<TValue[]> | Public method; parameters and return type are shown in the signature. |
write | method | write<TValue = unknown>(request: PermanentMemoryMigrationRequest, value: TValue): Promise<void> | Public method; parameters and return type are shown in the signature. |
PermanentMemoryMigrationProvider
Permanent Memory Migration Provider interface with 4 public fields or methods.
- Kind: interface
- Import:
import type { PermanentMemoryMigrationProvider } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export interface PermanentMemoryMigrationProvider {
get<TValue = unknown>(scope: ManagedMemoryScope, recordId: string): Promise<TValue | null>;
list<TValue = unknown>(scope: ManagedMemoryScope): Promise<TValue[]>;
delete(scope: ManagedMemoryScope, recordId: string): Promise<boolean>;
write<TValue = unknown>(scope: ManagedMemoryScope, recordId: string, value: TValue): Promise<void>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
delete | method | delete(scope: ManagedMemoryScope, recordId: string): Promise<boolean> | Public method; parameters and return type are shown in the signature. |
get | method | get<TValue = unknown>(scope: ManagedMemoryScope, recordId: string): Promise<TValue | null> | Public method; parameters and return type are shown in the signature. |
list | method | list<TValue = unknown>(scope: ManagedMemoryScope): Promise<TValue[]> | Public method; parameters and return type are shown in the signature. |
write | method | write<TValue = unknown>(scope: ManagedMemoryScope, recordId: string, value: TValue): Promise<void> | Public method; parameters and return type are shown in the signature. |
PermanentMemoryMigrationRequest
Permanent Memory Migration Request interface with 7 public fields or methods.
- Kind: interface
- Import:
import type { PermanentMemoryMigrationRequest } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export interface PermanentMemoryMigrationRequest {
operationId: string;
scope: ManagedMemoryScope;
providerRef: string;
profileRef: string;
recordId?: string;
attempt?: number;
maxAttempts?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
attempt | property | attempt?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxAttempts | property | maxAttempts?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
operationId | property | operationId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
profileRef | property | profileRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
providerRef | property | providerRef: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
recordId | property | recordId?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
scope | property | scope: ManagedMemoryScope | Public property; its type, readonly modifier and optionality are shown in the signature. |
PermanentMemoryFailureDisposition
Public type alias for Permanent Memory Failure Disposition; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { PermanentMemoryFailureDisposition } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export type PermanentMemoryFailureDisposition = 'retry' | 'reconcile' | 'quarantine' | 'dlq';PermanentMemoryFailureFinalState
Public type alias for Permanent Memory Failure Final State; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { PermanentMemoryFailureFinalState } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export type PermanentMemoryFailureFinalState = 'waiting' | 'reconciling' | 'quarantined' | 'dead_lettered';PermanentMemoryMigrationOperation
Public type alias for Permanent Memory Migration Operation; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { PermanentMemoryMigrationOperation } from '@codesoul-co/hypha-memory'; - Source module:
memory-server-permanent-migration
Declaration
export type PermanentMemoryMigrationOperation = 'get' | 'list' | 'delete' | 'write';