CollabKitRole
Session-scoped role chosen at join time or changed withclient.updateRole(...).
SocketClientEventMap
Event map forclient.socket.on() listeners.
SocketState
Possible connection states.SocketClientOptions
Options for the low-level socket client.SocketMessageResponseMap
Maps each client requestMessageType to the data shape of its corresponding server response. Used by sendMessagePromise to infer the response type from the request type at compile time.
Note:CollabKitUserobjects in WebSocket responses havetoken,room_id, andcreated_atstripped for payload efficiency and security. These fields are only present in REST API responses.
Broadcast Message Types
The server sends batched broadcast messages to connected clients when editors become active or inactive:userJoined / userLeft events per active editor.
InferResponseData
Helper type that infers the responsedata type for a given client message. Falls back to Record<string, any> for unrecognised message types.
sendMessagePromise without manual casts: