When considering implementing real-time collaboration, most developers think (and only think!) about the various algorithms for synchronizing data. This indeed is a core consideration for collaborative editing systems, and many tomes have been written about it. Convergence's main goal is to insulate developers from the difficulties of implementing Operational Transformation. It does this by supporting a strict set of data: JSON.

See our developer guide for additional information.

To get started with Real Time Data, get an instance of the ModelService from the ConvergenceDomain.

## Index

### Interfaces

- HistoricalArrayEvents
- HistoricalBooleanEvents
- HistoricalContainerElement
- HistoricalDateEvents
- HistoricalElementEvents
- HistoricalModelEvents
- HistoricalNullEvents
- HistoricalNumberEvents
- HistoricalObjectEvents
- HistoricalStringEvents
- HistoricalUndefinedEvents
- IArrayValue
- IAutoCreateModelOptions
- IBooleanValue
- IConvergenceModelValueEvent
- ICreateModelOptions
- IDataValue
- IDateValue
- IModelEvent
- INullValue
- INumberValue
- IObjectValue
- IStringValue
- IValueChangedEvent
- IndexRange
- ModelData
- ModelReferenceEvents
- ModelReferenceTypes
- ModelServiceEvents
- ObservableArray
- ObservableArrayEvents
- ObservableBoolean
- ObservableBooleanEvents
- ObservableContainerElement
- ObservableDate
- ObservableDateEvents
- ObservableElement
- ObservableElementEvents
- ObservableModel
- ObservableModelEvents
- ObservableNull
- ObservableNullEvents
- ObservableNumber
- ObservableNumberEvents
- ObservableObject
- ObservableObjectEvents
- ObservableString
- ObservableStringEvents
- ObservableUndefined
- ObservableUndefinedEvents
- RealTimeArrayEvents
- RealTimeBooleanEvents
- RealTimeContainerElement
- RealTimeDateEvents
- RealTimeElementEvents
- RealTimeModelEvents
- RealTimeNullEvents
- RealTimeNumberEvents
- RealTimeObjectEvents
- RealTimeStringEvents
- RealTimeUndefinedEvents
- ReferenceFilter

### Type aliases

- ModelDataCallback
- ModelDataInitializer
- Path
- PathElement
- ReferenceType

### Object literals

- ModelServiceEventConstants
- ObservableArrayEventConstants
- ObservableElementEventConstants
- ObservableModelEventConstants
- ObservableNumberEventConstants
- ObservableObjectEventConstants
- ObservableStringEventConstants

### Classes

- ArrayInsertEvent
- ArrayRemoveEvent
- ArrayReorderEvent
- ArraySetEvent
- ArraySetValueEvent
- BooleanSetValueEvent
- CollaboratorClosedEvent
- CollaboratorOpenedEvent
- DateSetValueEvent
- ElementDetachedEvent
- ElementReference
- HistoricalArray
- HistoricalBoolean
- HistoricalDate
- HistoricalElement
- HistoricalModel
- HistoricalNull
- HistoricalNumber
- HistoricalObject
- HistoricalString
- HistoricalUndefined
- IndexReference
- LocalElementReference
- LocalIndexReference
- LocalModelReference
- LocalPropertyReference
- LocalRangeReference
- ModelChangedEvent
- ModelClosedEvent
- ModelCollaborator
- ModelCommittedEvent
- ModelDeletedEvent
- ModelModifiedEvent
- ModelOfflineEvent
- ModelOnlineEvent
- ModelPermissionManager
- ModelPermissions
- ModelPermissionsChangedEvent
- ModelReconnectingEvent
- ModelReference
- ModelResult
- ModelService
- NumberDeltaEvent
- NumberSetValueEvent
- ObjectRemoveEvent
- ObjectSetEvent
- ObjectSetValueEvent
- OfflineModelDeletedEvent
- OfflineModelDownloadCompletedEvent
- OfflineModelDownloadPendingEvent
- OfflineModelPermissionsRevokedEvent
- OfflineModelStatusChangedEvent
- OfflineModelSyncAbortedEvent
- OfflineModelSyncCompletedEvent
- OfflineModelSyncErrorEvent
- OfflineModelSyncStartedEvent
- OfflineModelUpdatedEvent
- PropertyReference
- RangeReference
- RealTimeArray
- RealTimeBoolean
- RealTimeDate
- RealTimeElement
- RealTimeModel
- RealTimeNull
- RealTimeNumber
- RealTimeObject
- RealTimeString
- RealTimeUndefined
- ReferenceChangedEvent
- ReferenceClearedEvent
- ReferenceDisposedEvent
- RemoteReferenceCreatedEvent
- RemoteResyncCompletedEvent
- RemoteResyncStartedEvent
- ResyncCompletedEvent
- ResyncErrorEvent
- ResyncStartedEvent
- StringInsertEvent
- StringRemoveEvent
- StringSetValueEvent
- VersionChangedEvent

## Type aliases

### ModelDataCallback

ModelDataCallback: function

A callback function that will result in some model data that will become the model's initial contents.

#### Type declaration

- - (): ModelData

  - #### Returns ModelData

### ModelDataInitializer

ModelDataInitializer: ModelData | ModelDataCallback

Either some data or a callback returning data can be provided.

### Path

Path: PathElement[]

A `Path` is essentially a set of instructions for retrieving a particular piece of data (subtree) within a model's contents (JSON tree). e.g.

for a model with contents

    {
      "firstName": "James",
      "kidsAges": [4, 7, 9]
    }

one could query:

    realTimeModel.elementAt(['firstName']) // RealTimeString, value() => "James"
    realTimeModel.elementAt(['kidsAges', 1]) // RealTimeNumber, value() => 7

See the developer guide for more examples of using paths to get parts of a model's contents.

### PathElement

PathElement: string | number

A PathElement is a particular desired node within a RealTimeModel's contents, which can be thought of as a JSON tree.

These have no meaning outside of a Path.

### ReferenceType

ReferenceType: "index" | "range" | "element" | "property"

A unified type representing any type of reference.

## Object literals

### ConstModelServiceEventConstants

ModelServiceEventConstants: object

### OFFLINE_MODEL_DELETED

OFFLINE_MODEL_DELETED: "offline_model_deleted" = "offline_model_deleted"

### OFFLINE_MODEL_DOWNLOAD_COMPLETED

OFFLINE_MODEL_DOWNLOAD_COMPLETED: "offline_model_download_completed" = "offline_model_download_completed"

### OFFLINE_MODEL_DOWNLOAD_PENDING

OFFLINE_MODEL_DOWNLOAD_PENDING: "offline_model_download_pending" = "offline_model_download_pending"

### OFFLINE_MODEL_PERMISSIONS_REVOKED

OFFLINE_MODEL_PERMISSIONS_REVOKED: "offline_model_permissions_revoked" = "offline_model_permissions_revoked"

### OFFLINE_MODEL_STATUS_CHANGED

OFFLINE_MODEL_STATUS_CHANGED: "offline_model_status_changed" = "offline_model_status_changed"

### OFFLINE_MODEL_SYNC_ABORTED

OFFLINE_MODEL_SYNC_ABORTED: "offline_model_sync_aborted" = "offline_model_sync_aborted"

### OFFLINE_MODEL_SYNC_COMPLETED

OFFLINE_MODEL_SYNC_COMPLETED: "offline_model_sync_completed" = "offline_model_sync_completed"

### OFFLINE_MODEL_SYNC_ERROR

OFFLINE_MODEL_SYNC_ERROR: "offline_model_sync_error" = "offline_model_sync_error"

### OFFLINE_MODEL_SYNC_STARTED

OFFLINE_MODEL_SYNC_STARTED: "offline_model_sync_started" = "offline_model_sync_started"

### OFFLINE_MODEL_UPDATED

OFFLINE_MODEL_UPDATED: "offline_model_updated" = "offline_model_updated"

### ConstObservableArrayEventConstants

ObservableArrayEventConstants: object

### INSERT

INSERT: string = "insert"

### REMOVE

REMOVE: string = "remove"

### REORDER

REORDER: string = "reorder"

### SET

SET: string = "set"

### ConstObservableElementEventConstants

ObservableElementEventConstants: object

### DETACHED

DETACHED: string = "detached"

### MODEL_CHANGED

MODEL_CHANGED: string = "model_changed"

### REFERENCE

REFERENCE: string = "reference"

### VALUE

VALUE: string = "value"

### ConstObservableModelEventConstants

ObservableModelEventConstants: object

### CLOSED

CLOSED: string = "closed"

### DELETED

DELETED: string = "deleted"

### VERSION_CHANGED

VERSION_CHANGED: string = "version_changed"

### ConstObservableNumberEventConstants

ObservableNumberEventConstants: object

### DELTA

DELTA: string = "delta"

### ConstObservableObjectEventConstants

ObservableObjectEventConstants: object

### REMOVE

REMOVE: string = "remove"

### SET

SET: string = "set"

### ConstObservableStringEventConstants

ObservableStringEventConstants: object

### INSERT

INSERT: string = "insert"

### REMOVE

REMOVE: string = "remove"