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.