Skip to content

js-bao-wss-client


js-bao-wss-client / JsBaoEvents

Interface: JsBaoEvents ​

Every event the client emits, mapped to the payload its listener receives.

client.on(name, handler) is typed from this map, so the handler's argument is the payload type listed here — pick the event you want and follow the link to see what it carries.

Properties ​

auth ​

auth: unknown


auth-failed ​

auth-failed: object

message? ​

optional message?: string

reason? ​

optional reason?: string


auth-refresh-deferred ​

auth-refresh-deferred: AuthRefreshDeferredEvent


auth-success ​

auth-success: object

cause? ​

optional cause?: string

previousToken ​

previousToken: string | null

token ​

token: string


auth:logout ​

auth:logout: object


auth:logout:complete ​

auth:logout:complete: object


auth:onlineAuthRequired ​

auth:onlineAuthRequired: object


auth:state ​

auth:state: AuthStateEvent


awareness ​

awareness: AwarenessEvent


blobs:queue-drained ​

blobs:queue-drained: BlobsQueueDrainedEvent


blobs:upload-completed ​

blobs:upload-completed: BlobUploadCompletedEvent


blobs:upload-failed ​

blobs:upload-failed: BlobUploadFailedEvent


blobs:upload-paused ​

blobs:upload-paused: BlobUploadPausedEvent


blobs:upload-progress ​

blobs:upload-progress: BlobUploadProgressEvent


blobs:upload-resumed ​

blobs:upload-resumed: BlobUploadPausedEvent


channelMessage ​

channelMessage: ChannelMessageEvent


channelSubscribeFailed ​

channelSubscribeFailed: ChannelSubscribeFailedEvent


connection ​

connection: unknown


connection-close ​

connection-close: unknown


connection-error ​

connection-error: unknown


directMessage ​

directMessage: DirectMessageEvent


document:format-mismatch ​

document:format-mismatch: DocumentFormatMismatchEvent


document:snapshot-load ​

document:snapshot-load: DocumentSnapshotLoadEvent


document:write-refused ​

document:write-refused: DocumentWriteRefusedEvent


documentClosed ​

documentClosed: DocumentClosedEvent


documentCreateCommitFailed ​

documentCreateCommitFailed: DocumentCreateCommitFailedEvent


documentLoaded ​

documentLoaded: DocumentLoadedEvent


documentMetadataChanged ​

documentMetadataChanged: DocumentMetadataChangedEvent


documentOfflineWritesResolved ​

documentOfflineWritesResolved: DocumentOfflineWritesResolvedEvent


documentOpened ​

documentOpened: DocumentEvent


documentSyncStateChanged ​

documentSyncStateChanged: DocumentSyncStateChangedEvent


error ​

error: object

error ​

error: unknown


meUpdated ​

meUpdated: MeUpdatedEvent


meUpdateFailed ​

meUpdateFailed: MeUpdateFailedEvent


networkMode ​

networkMode: NetworkModeEvent


notification ​

notification: NotificationEvent


offlineAuth:enabled ​

offlineAuth:enabled: OfflineAuthEnabledEvent


offlineAuth:expiringSoon ​

offlineAuth:expiringSoon: OfflineAuthExpiringSoonEvent


offlineAuth:failed ​

offlineAuth:failed: OfflineAuthFailedEvent


offlineAuth:renewed ​

offlineAuth:renewed: OfflineAuthRenewedEvent


offlineAuth:revoked ​

offlineAuth:revoked: object


offlineAuth:unlocked ​

offlineAuth:unlocked: OfflineAuthUnlockedEvent


pendingCreateCommitted ​

pendingCreateCommitted: PendingCreateCommittedEvent


pendingCreateFailed ​

pendingCreateFailed: PendingCreateFailedEvent


permission ​

permission: PermissionEvent


schema-discovered ​

schema-discovered: SchemaDiscoveredEvent


status ​

status: StatusChangedEvent


sync ​

sync: SyncEvent


syncPerf ​

syncPerf: object

clientTimings? ​

optional clientTimings?: Record<string, unknown>

documentId ​

documentId: string

timings ​

timings: Record<string, unknown>

type ​

type: "syncPerf"


workflowStarted ​

workflowStarted: WorkflowStartedEvent


workflowStatus ​

workflowStatus: WorkflowStatusEvent

Documentation validated against js-bao-wss-client 3.4.0 · js-bao 0.11.0 · primitive-admin 1.0.62 · primitive-app 3.1.0 — 2026-09-30