Skip to content

js-bao-wss-client


js-bao-wss-client / DocumentWriteRefusedEvent

Interface: DocumentWriteRefusedEvent ​

Payload of the document:write-refused event (client.on("document:write-refused", ...)).

Fired for EVERY local write a large document refuses because it is past its offline write window — the same event, by the same name, the Swift client emits. A call that can throw throws error as well, so the throw stays the call site's signal; this is the channel for handling the refusal once, in one place, on either client.

Nothing is emitted for an accepted write, for an ordinary (format-1) document, or for a refusal of another kind.

Properties ​

documentId ​

documentId: string


error ​

error: DocumentOfflineWindowError

The very error the call threw: code is DOCUMENT_OFFLINE_WINDOW_EXPIRED, and details carries documentId, lastSyncAt, windowDays and overdueMs.


model ​

model: string

The model the refused write was on.


recordId ​

recordId: string

The record it was on.

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