Stone.js API
    Preparing search index...

    A DynamoDB-backed ConnectionStore for API Gateway WebSocket presence.

    API Gateway invokes a fresh Lambda per event, so presence cannot live in memory: this store keeps connections and their channel memberships in a single table, shared across invocations. Items use a pk/sk layout: a connection meta record (CONN#<id> / META) and two-way membership records (CHAN#<channel> / CONN#<id> and CONN#<id> / CHAN#<channel>) so both "who is on a channel" and "clean up a connection" are single queries. @aws-sdk/lib-dynamodb is imported lazily.

    Implements

    • ConnectionStore
    Index
    • Parameters

      • connection: Connection

      Returns Promise<void>

    • Parameters

      • channel: string

      Returns Promise<Connection<unknown>[]>

    • Parameters

      • channel: string

      Returns Promise<PresenceMember<unknown>[]>

    • Parameters

      • connectionId: string

      Returns Promise<void>

    • Parameters

      • connectionId: string
      • channel: string

      Returns Promise<void>

    • Parameters

      • connectionId: string
      • channel: string

      Returns Promise<void>