Interface IStore

A store for most of the data js-sdk needs to store, apart from crypto data

Hierarchy

  • IStore

Implemented by

Properties

accountData: Map<string, MatrixEvent>
on?: ((event: "closed" | EventEmitterEvents | "degraded", handler: ((...args: any[]) => void)) => void)

Type declaration

    • (event: "closed" | EventEmitterEvents | "degraded", handler: ((...args: any[]) => void)): void
    • Parameters

      • event: "closed" | EventEmitterEvents | "degraded"
      • handler: ((...args: any[]) => void)
          • (...args: any[]): void
          • Parameters

            • Rest ...args: any[]

            Returns void

      Returns void

Methods

  • Delete all data from this store. Does nothing since this store doesn't store anything.

    Returns

    An immediately resolved promise.

    Returns Promise<void>

  • Get account data event by event type

    Parameters

    • eventType: string

      The event type being queried

    Returns undefined | MatrixEvent

  • Retrieve a filter.

    Returns

    A filter or null.

    Parameters

    • userId: string
    • filterId: string

    Returns null | Filter

  • Retrieve a filter ID with the given name.

    Returns

    The filter ID or null.

    Parameters

    • filterName: string

      The filter name.

    Returns null | string

  • Returns the out-of-band membership events for this room that were previously loaded.

    Returns

    the events, potentially an empty array if OOB loading didn't yield any new members

    Returns

    in case the members for this room haven't been stored yet

    Parameters

    • roomId: string

    Returns Promise<null | IStateEventWithRoomId[]>

  • Retrieve a room by its' room ID.

    Returns

    The room or null.

    Parameters

    • roomId: string

      The room ID.

    Returns null | Room

  • Returns

    If there is a saved sync, the nextBatch token for this sync, otherwise null.

    Returns Promise<null | string>

  • Get the sync token.

    Returns null | string

  • Retrieve a User by its' user ID.

    Returns

    The user or null.

    Parameters

    • userId: string

      The user ID.

    Returns null | User

  • Permanently delete a room.

    Parameters

    • roomId: string

    Returns void

  • Removes a specific batch of to-device messages from the queue

    Parameters

    • id: number

    Returns Promise<void>

  • Save does nothing as there is no backing data store.

    Parameters

    • Optional force: boolean

    Returns Promise<void>

  • Retrieve scrollback for this room.

    Returns

    An array of objects which will be at most 'limit' length and at least 0. The objects are the raw event JSON.

    Parameters

    • room: Room

      The matrix room

    • limit: number

      The max number of old events to retrieve.

    Returns MatrixEvent[]

  • Set a filter name to ID mapping.

    Parameters

    • filterName: string
    • Optional filterId: string

    Returns void

  • Stores the out-of-band membership events for this room. Note that it still makes sense to store an empty array as the OOB status for the room is marked as fetched, and getOutOfBandMembers will return an empty array instead of null

    Returns

    when all members have been stored

    Parameters

    Returns Promise<void>

  • Set the sync token.

    Parameters

    • token: string

    Returns void

  • Store events for a room.

    Parameters

    • room: Room

      The room to store events for.

    • events: MatrixEvent[]

      The events to store.

    • token: null | string

      The token associated with these events.

    • toStart: boolean

      True if these are paginated results.

    Returns void

  • Store the given room.

    Parameters

    • room: Room

      The room to be stored. All properties must be stored.

    Returns void

  • We never want to save because we have nothing to save to.

    Returns

    If the store wants to save

    Returns boolean

Generated using TypeDoc