Interface MessageStore

interface MessageStore {
    clear(): Promise<void>;
    close(): Promise<void>;
    delete(tenant, cid, options?): Promise<void>;
    get(tenant, cid, options?): Promise<undefined | GenericMessage>;
    open(): Promise<void>;
    put(tenant, message, indexes, options?): Promise<void>;
    query(tenant, filters, messageSort?, pagination?, options?): Promise<{
        cursor?: PaginationCursor;
        messages: GenericMessage[];
    }>;
}

Implemented by

Methods

  • Clears the entire store. Mainly used for cleaning up in test environment.

    Returns Promise<void>

  • adds a message to the underlying store. Uses the message's cid as the key

    Parameters

    Returns Promise<void>