functai for TypeScript - v0.1.0
    Preparing search index...

    Interface ConversationStore

    A conversation store: append and read, sync or async (a Map-backed one, a database, …).

    interface ConversationStore {
        durability?: string;
        events?: EventStore | null;
        persistent?: boolean;
        append(
            conversation: string,
            records: readonly Rec[],
            opts?: { expect?: number },
        ): number | Promise<number>;
        read(
            conversation: string,
            after?: number,
        ): readonly Rec[] | Promise<readonly Rec[]>;
        wait?(
            conversation: string,
            after: number,
            ms: number,
        ): void | Promise<void>;
    }

    Implemented by

    Index
    durability?: string
    events?: EventStore | null

    Each turn's call tree log, kept while it runs (streaming.md, The rules a store keeps).

    persistent?: boolean

    Whether it keeps records beyond this process (unknown: yes).

    • Parameters

      • conversation: string
      • records: readonly Rec[]
      • Optionalopts: { expect?: number }

      Returns number | Promise<number>

    • Parameters

      • conversation: string
      • Optionalafter: number

      Returns readonly Rec[] | Promise<readonly Rec[]>

    • Resolves when a record after after exists (or ms passed).

      Parameters

      • conversation: string
      • after: number
      • ms: number

      Returns void | Promise<void>