@codesoul-co/hypha-core / modules/runtime/state-execution-claim-store
- Package index:
@codesoul-co/hypha-core - Source:
packages/core/src/modules/runtime/state-execution-claim-store.ts - Exports: 4
Using this module
Use the State execution claim store module for persisting and reading data at this boundary. It exports 1 class, 2 functions, 1 interface.
Import from the package entrypoint
ts
import {
InMemoryStateExecutionClaimStore,
stateExecutionClaimGuard,
stateExecutionClaimScopeKey,
} from '@codesoul-co/hypha-core';
import type {
InMemoryStateExecutionClaimStoreOptions,
} from '@codesoul-co/hypha-core';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.
- The module exposes 2 functions as direct operation entrypoints. Every overload, required/optional parameter, and return type is documented below.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
InMemoryStateExecutionClaimStore | class | new InMemoryStateExecutionClaimStore(options: InMemoryStateExecutionClaimStoreOptions): InMemoryStateExecutionClaimStore | In Memory State Execution Claim Store class with 7 public constructor or member entries; its exact declarations are listed below. |
stateExecutionClaimGuard | function | stateExecutionClaimGuard(claim: StateExecutionClaim): StateExecutionClaimGuard | State Execution Claim Guard function with 1 public call signature; parameters and return types are listed below. |
stateExecutionClaimScopeKey | function | stateExecutionClaimScopeKey(scope: StateExecutionClaimScope): string | State Execution Claim Scope Key function with 1 public call signature; parameters and return types are listed below. |
InMemoryStateExecutionClaimStoreOptions | interface | interface InMemoryStateExecutionClaimStoreOptions | In Memory State Execution Claim Store Options interface with 2 public fields or methods. |
InMemoryStateExecutionClaimStore
In Memory State Execution Claim Store class with 7 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { InMemoryStateExecutionClaimStore } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/state-execution-claim-store
Declaration
text
export declare class InMemoryStateExecutionClaimStore implements StateExecutionClaimStore {
constructor(options: InMemoryStateExecutionClaimStoreOptions);
acquire(request: StateExecutionClaimAcquireRequest): Promise<StateExecutionClaim | null>;
renew(request: StateExecutionClaimRenewRequest): Promise<StateExecutionClaim>;
complete(request: StateExecutionClaimCompleteRequest): Promise<StateExecutionClaim>;
release(request: StateExecutionClaimReleaseRequest): Promise<StateExecutionClaim>;
get(scope: StateExecutionClaimScope, checkedAt?: string): Promise<StateExecutionClaim | null>;
assertCurrent(request: StateExecutionClaimAssertionRequest): Promise<StateExecutionClaim>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
acquire | method | acquire(request: StateExecutionClaimAcquireRequest): Promise<StateExecutionClaim | null> | Public method; parameters and return type are shown in the signature. |
assertCurrent | method | assertCurrent(request: StateExecutionClaimAssertionRequest): Promise<StateExecutionClaim> | Public method; parameters and return type are shown in the signature. |
complete | method | complete(request: StateExecutionClaimCompleteRequest): Promise<StateExecutionClaim> | Public method; parameters and return type are shown in the signature. |
constructor | constructor | (options: InMemoryStateExecutionClaimStoreOptions): InMemoryStateExecutionClaimStore | Creates an instance of this class. |
get | method | get(scope: StateExecutionClaimScope, checkedAt?: string): Promise<StateExecutionClaim | null> | Public method; parameters and return type are shown in the signature. |
release | method | release(request: StateExecutionClaimReleaseRequest): Promise<StateExecutionClaim> | Public method; parameters and return type are shown in the signature. |
renew | method | renew(request: StateExecutionClaimRenewRequest): Promise<StateExecutionClaim> | Public method; parameters and return type are shown in the signature. |
stateExecutionClaimGuard
State Execution Claim Guard function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { stateExecutionClaimGuard } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/state-execution-claim-store
Declaration
text
export declare function stateExecutionClaimGuard(claim: StateExecutionClaim): StateExecutionClaimGuard;Call signature
text
stateExecutionClaimGuard(claim: StateExecutionClaim): StateExecutionClaimGuardParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
claim | StateExecutionClaim | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
StateExecutionClaimGuard - Description: The return contract is defined by the type shown above.
stateExecutionClaimScopeKey
State Execution Claim Scope Key function with 1 public call signature; parameters and return types are listed below.
- Kind: function
- Import:
import { stateExecutionClaimScopeKey } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/state-execution-claim-store
Declaration
text
export declare function stateExecutionClaimScopeKey(scope: StateExecutionClaimScope): string;Call signature
text
stateExecutionClaimScopeKey(scope: StateExecutionClaimScope): stringParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
scope | StateExecutionClaimScope | Yes | Required parameter; accepted values are defined by the type column. |
Returns
- Type:
string - Description: The return contract is defined by the type shown above.
InMemoryStateExecutionClaimStoreOptions
In Memory State Execution Claim Store Options interface with 2 public fields or methods.
- Kind: interface
- Import:
import type { InMemoryStateExecutionClaimStoreOptions } from '@codesoul-co/hypha-core'; - Source module:
modules/runtime/state-execution-claim-store
Declaration
text
export interface InMemoryStateExecutionClaimStoreOptions {
runLeaseStore: Pick<RunLeaseStore, 'assertCurrent'>;
now?: () => string;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
now | method | now?(): string | Public method; parameters and return type are shown in the signature. |
runLeaseStore | property | runLeaseStore: Pick<RunLeaseStore, "assertCurrent"> | Public property; its type, readonly modifier and optionality are shown in the signature. |
