Skip to content

@codesoul-co/hypha-adapters-local / state-execution-claim-store

Using this module

Use the State execution claim store module for persisting and reading data at this boundary. It exports 1 class, 1 interface.

Import from the package entrypoint

ts
import {
  SQLiteStateExecutionClaimStore,
} from '@codesoul-co/hypha-adapters-local';

import type {
  SQLiteStateExecutionClaimStoreOptions,
} from '@codesoul-co/hypha-adapters-local';

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
SQLiteStateExecutionClaimStoreclassnew SQLiteStateExecutionClaimStore(options: SQLiteStateExecutionClaimStoreOptions): SQLiteStateExecutionClaimStoreSQLite State Execution Claim Store class with 8 public constructor or member entries; its exact declarations are listed below.
SQLiteStateExecutionClaimStoreOptionsinterfaceinterface SQLiteStateExecutionClaimStoreOptionsSQLite State Execution Claim Store Options interface with 3 public fields or methods.

SQLiteStateExecutionClaimStore

SQLite State Execution Claim Store class with 8 public constructor or member entries; its exact declarations are listed below.

  • Kind: class
  • Import: import { SQLiteStateExecutionClaimStore } from '@codesoul-co/hypha-adapters-local';
  • Source module: state-execution-claim-store

Declaration

text
export declare class SQLiteStateExecutionClaimStore implements StateExecutionClaimStore {
    constructor(options: SQLiteStateExecutionClaimStoreOptions);
    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>;
    close(): void;
}

Public members

MemberKindSignatureDescription
acquiremethodacquire(request: StateExecutionClaimAcquireRequest): Promise<StateExecutionClaim | null>Public method; parameters and return type are shown in the signature.
assertCurrentmethodassertCurrent(request: StateExecutionClaimAssertionRequest): Promise<StateExecutionClaim>Public method; parameters and return type are shown in the signature.
closemethodclose(): voidPublic method; parameters and return type are shown in the signature.
completemethodcomplete(request: StateExecutionClaimCompleteRequest): Promise<StateExecutionClaim>Public method; parameters and return type are shown in the signature.
constructorconstructor(options: SQLiteStateExecutionClaimStoreOptions): SQLiteStateExecutionClaimStoreCreates an instance of this class.
getmethodget(scope: StateExecutionClaimScope, checkedAt?: string): Promise<StateExecutionClaim | null>Public method; parameters and return type are shown in the signature.
releasemethodrelease(request: StateExecutionClaimReleaseRequest): Promise<StateExecutionClaim>Public method; parameters and return type are shown in the signature.
renewmethodrenew(request: StateExecutionClaimRenewRequest): Promise<StateExecutionClaim>Public method; parameters and return type are shown in the signature.

SQLiteStateExecutionClaimStoreOptions

SQLite State Execution Claim Store Options interface with 3 public fields or methods.

  • Kind: interface
  • Import: import type { SQLiteStateExecutionClaimStoreOptions } from '@codesoul-co/hypha-adapters-local';
  • Source module: state-execution-claim-store

Declaration

text
export interface SQLiteStateExecutionClaimStoreOptions {
    filename: string;
    runLeaseStore: Pick<RunLeaseStore, 'assertCurrent'>;
    now?: () => string;
}

Contract members

MemberKindSignatureDescription
filenamepropertyfilename: stringPublic property; its type, readonly modifier and optionality are shown in the signature.
nowmethodnow?(): stringPublic method; parameters and return type are shown in the signature.
runLeaseStorepropertyrunLeaseStore: Pick<RunLeaseStore, "assertCurrent">Public property; its type, readonly modifier and optionality are shown in the signature.