Other Client Login Fn Client Login Fn< User , Credential > : ( ) => Promise < { credential: Credential ; user: User } >
Type parameters Type declaration ( ) : Promise < { credential: Credential ; user: User } > Returns Promise < { credential: Credential ; user: User } > Conn Identifier Conn Identifier: { id: string ; serverId: string }
Type declaration id: string server Id: string Connect Event Value Connect
Event
Value
: EventValue < "connection" , "connect" , null > Disconnect Event Value Disconnect
Event
Value
: EventValue < "connection" , "disconnect" , { reason
: string | undefined } > Event Input Event Input: { category?: string ; payload?: unknown ; type: string }
Type declaration Optional category?: string Optional payload?: unknown type: string Event Value Event Value< Category , Type , Payload > : { category: Category ; payload: Payload ; type: Type }
Type parameters Category: string = string Type: string = string Payload = any Type declaration category: Category payload: Payload type: Type Verify Login Fn Verify
Login
Fn
< User , AuthContext , Credential > : ( request
: UpgradeRequestInfo , credential
: Credential ) => Promise < OkVerifyLoginResult < User , AuthContext > | FailVerifyLoginResult > Type parameters Type declaration ( request: UpgradeRequestInfo , credential: Credential ) : Promise < OkVerifyLoginResult < User , AuthContext > | FailVerifyLoginResult > Parameters Returns Promise < OkVerifyLoginResult < User , AuthContext > | FailVerifyLoginResult > Verify Upgrade Fn Type declaration Parameters Returns boolean | Promise < boolean > Web Socket Configs Type parameters Type declaration Optional entry Path?: string Optional heartbeat Interval?: number Web Socket Dispatch Channel Web Socket Dispatch Channel: WebSocketConnection | WebSocketUserChannel | WebSocketTopicChannel
Web Socket Dispatch Middleware Web Socket Dispatch Response Web Socket Event Web Socket Event< Value , User > : Value & { channel: WebSocketConnection ; platform: "websokcet" ; user: User }
Type parameters Web Socket Event Context Type parameters Type declaration platform: "websocket" reply: function Web Socket Event Middleware Type parameters Web Socket Metadata Web
Socket
Metadata
< AuthContext > : { auth
: AuthContext ; connection
: WebSocketConnection ; request
: UpgradeRequestInfo ; source
: "websocket" } Type parameters Type declaration auth: AuthContext connection: WebSocketConnection source: "websocket" Web Socket Platform Utilities Type parameters
WebSocket Module
This package is an underlying module of webview platform for serving WebSocket. You might want to use
@sociably/webview
unless you want to serve your own web service.Install
Docs
Check the package reference.
Setup
Back-end
Front-end