js-bao-wss-client / DatabaseChangeEvent
Interface: DatabaseChangeEvent<T>
A single change delivered on a db.change frame.
The changeType is derived server-side from filter transitions: "enter" (no longer matched → now matches), "update" (matched before and after), "leave" (matched before → no longer matches). Projection-using clients should read changeType; CRDT-aware clients can keep reading op. It is optional because the server only sets it for filter-based subscriptions; non-filter paths omit it.
Type Parameters
T
T = unknown
Properties
changeType?
optionalchangeType?:"update"|"enter"|"leave"
data?
optionaldata?:T|null
The record after the change, or null where the wire carries no new state (a delete, or a mutation that resolved to no fields). A typed caller must account for null in addition to undefined before reading T's fields.
id
id:
string
modelName
modelName:
string
op
op:
"save"|"patch"|"delete"|"increment"|"addToSet"|"removeFromSet"
previousData?
optionalpreviousData?:T|null
The record before the change, or null where there was no prior state (an insert / enter). A typed caller must account for null in addition to undefined before reading T's fields.