PNDeleteDataSyncMembershipEventMessage

data class PNDeleteDataSyncMembershipEventMessage(val source: String, val version: String, val type: String, val className: String?, val classLevel: String?, val classVersion: Int?, val id: String, val deletedAt: String) : PNDataSyncEventMessage

A DataSync Membership delete event (wire type:"membership").

Backend limitation: the delete wire carries only {id, deletedAt} — no channelId/userId, and no A/B side marker. The peer endpoint id is not recoverable from a delete event alone, and the subscriber cannot tell from the payload whether the ref-channel it arrived on was the channel (A) or the user (B) endpoint. To resolve the peer on delete, maintain a local membershipId -> (channelId, userId) map populated from the Set events (which do carry both refs) and look up by id.

Cascade: deleting a Channel/User (or Entity) also emits a separate membership-delete event of this shape for each affected membership, routed to both endpoint refs — so a subscriber on the surviving peer also sees the membership vanish. One logical delete can therefore produce multiple delete events, with no cross-object ordering guarantee. Do not treat this leaf as implying its own endpoint was the object that was deleted.

Constructors

Link copied to clipboard
constructor(source: String, version: String, type: String, className: String?, classLevel: String?, classVersion: Int?, id: String, deletedAt: String)

Properties

Link copied to clipboard
open override val classLevel: String?

the level at which the class is defined (e.g. SubKey / Global). Modeled as a nullable String rather than an enum to stay source-compatible with future values.

Link copied to clipboard
open override val className: String?

the object's class name, if present on the envelope.

Link copied to clipboard
open override val classVersion: Int?

the object's class version, if present on the envelope.

Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard
open override val source: String

event source, always "data-sync".

Link copied to clipboard
open override val type: String

the wire discriminator: one of user, channel, entity, relationship, membership (an inheritance-aware value derived by the backend from the object's Global ancestor).

Link copied to clipboard
open override val version: String

envelope version.