Types

Link copied to clipboard

AuthError means that an authentication error occurred. Published for AuthErrorMethod.Watch/AuthErrorMethod.Broadcast on ErrUnauthenticated, and -- new as of this document's push-pull path -- for AuthErrorMethod.PushPull on ErrPermissionDenied (an authorization webhook denial, distinct from an unauthenticated token): published once per denial EPISODE, not once per sync-loop tick, and only shouldRefreshToken-free (this path never asks for a token refresh, since the token itself was accepted). An episode ends only on the next push-pull that SUCCEEDS on this attachment; a different failure (e.g. a transient RESOURCE_EXHAUSTED) in between does not clear it or re-publish.

Link copied to clipboard
data class Broadcast(val actorID: String?, val topic: String, val payload: String) : Document.Event

Broadcast means that the broadcast event is received from the remote client.

Link copied to clipboard
data class ChangeInfo(val message: String, val operations: List<OperationInfo>, val actorID: String, val clientSeq: UInt, val serverSeq: Long)

Represents the modification made during a document update and the message passed.

Link copied to clipboard
data class DocumentStatusChanged(val docStatus: ResourceStatus, val actorID: String?) : Document.Event

An event that occurs when the document's status has been changed.

Link copied to clipboard
data class DroppedChange(val id: ChangeID, val message: String?, val operationCount: Int, val hasPresenceChange: Boolean)

The app-readable projection of a dropped Change. Change's own fields are internal, so this projection is what an app handling LocalChangesDropped can actually read.

Link copied to clipboard

EpochMismatch indicates the document was compacted on the server and this client must detach and reattach to recover.

Link copied to clipboard

An event that occurs when the document is changed by local changes.

Link copied to clipboard

Indicates that local changes were discarded without reaching the server. Emitted only by the store-backed client (spec 025); this type exists here so an app can react to the event regardless of which layer raises it.

Link copied to clipboard
sealed interface PresenceChanged : Document.Event
Link copied to clipboard

The reason LocalChangesDropped was raised.

Link copied to clipboard

An event that occurs when the document is changed by remote changes.

Link copied to clipboard

An event that occurs when a snapshot is received from the server.

Link copied to clipboard

An event that represents whether the stream connection is connected or not.

Link copied to clipboard

Means that the document sync status has changed.

Link copied to clipboard

WriteRejected means a push was answered with a code the server will never reconsider for the SAME change -- YorkieException.Code.ErrDocumentSizeExceedsLimit or YorkieException.Code.ErrChangeTooLarge -- so the sync loop parks this document instead of resending it every tick. Push and pull share one RPC, so parking also stops PULLS on this document, realtime or polling, until it un-parks -- new remote changes do not arrive either. A bare Client.syncAsync(document) call does NOT recover it: the oversized change is still the head of the queue, so the explicit sync re-fails the same way and this event republishes. Local edits keep queuing behind the rejected one meanwhile. The actual recovery is Client.resyncAsync(document, discardLocalChanges = true), which discards the queue (the oversized change with it) and re-anchors; any push-pull that then succeeds un-parks the attachment. Published next to SyncStatusChanged's SyncFailed for the same failure, not instead of it. Mirrors AuthError's shape. Ported from yorkie-js-sdk write-rejected (29a81fe0, #1462).