TypeScript Types Reference
Complete reference for all exported TypeScript types in Vuer-RTC.
Core Message Types
CRDTMessage
The envelope containing CRDT metadata and a batch of operations. This is the fundamental unit of communication in Vuer-RTC.
Example:
Operation
Union type of all operation types. Every operation extends BaseOp.
BaseOp
Base interface extended by all operations.
Number Operations
NumberSetOp
Example:
NumberAddOp
Example:
NumberMultiplyOp
NumberMinOp
NumberMaxOp
String Operations
StringSetOp
StringConcatOp
Text CRDT Operations
Text operations support collaborative character-level editing using a CRDT.
TextInitOp
Initialize a CRDT-backed text property. Must be called before using text operations.
Example:
TextInsertOp
Insert text at a position. Supports two formats:
- Position-based (local operations):
{ position, value } - CRDT metadata (network sync):
{ id, value: [anchor, content], seq, ts }
Examples:
TextDeleteOp
Delete text at a position. Supports two formats:
- Position-based:
{ position, length } - CRDT metadata:
{ rm }
Examples:
TextReplaceOp
Atomic delete + insert (for select-and-type).
Boolean Operations
BooleanSetOp
BooleanOrOp
BooleanAndOp
Vector3 Operations
Vector3SetOp
Example:
Vector3AddOp
Vector3MultiplyOp
Vector3ApplyEulerOp
Rotate a vector by euler angles.
Example:
Vector3ApplyQuaternionOp
Euler Operations
EulerSetOp
EulerAddOp
Quaternion Operations
QuaternionSetOp
QuaternionMultiplyOp
Color Operations
ColorSetOp
ColorBlendOp
Array Operations
ArraySetOp
ArrayPushOp
ArrayUnionOp
ArrayRemoveOp
Object Operations
ObjectSetOp
ObjectMergeOp
Scene Graph Operations
NodeInsertOp
Create a new node as a child of parent.
Example:
NodeRemoveOp
Remove a node from parent (tombstone).
NodeMoveOp
Move a node from one parent to another (reparent).
Meta Operations (Undo/Redo)
MetaUndoOp
Mark a message as undone.
MetaRedoOp
Unmark a message as undone.
Scene Graph State
SceneNode
A node in the flattened scene graph. Properties are stored directly with dot-notation paths.
Example:
CRDTEnvelope
All CRDT metadata for a SceneNode, stored under _crdt.
PropertyLWW
Per-property Last-Write-Wins metadata.
SceneGraph
Complete scene representation.
Example:
Client State
ClientState
Complete client-side state.
JournalEntry
A committed message with metadata.
EditBuffer
Uncommitted operations.
Snapshot
Checkpoint for fast replay.
GraphStore
The public API for the graph store.
CreateGraphOptions
Options for creating a graph store.
Vector Clock
VectorClock
CRDT-inspired vector clock for causal ordering.
Example:
Vector clocks track causality:
- Each session has a counter
- Counters increment with each operation
- Clocks are merged to detect concurrent operations
TextRope Types
Types for the collaborative text editing CRDT.
ItemId
Identifier for a text item.
Item
A text item in the rope.
InsertOp
Insert operation for text rope.
DeleteOp
Delete operation for text rope.
ReplaceOp
Replace operation (atomic delete + insert).
MoveOp
Move operation (delete + insert at new position).
TextRope
High-performance text CRDT based on RGA/YATA.
Sync Types
SyncDigest
Bloom filter digest for sync reconciliation.
Usage:
Awareness Types
Ephemeral presence / cursor relay — see Awareness. Never persisted;
the state payload is app-defined and opaque to the relay.