Classes

Classes

Client
Document
List
ListItem
Map
MapItem
Paginator
Stream
StreamMessage

Events


connectionStateChanged

Fired when connection state has been changed.
Parameters:
Name Type Description
connectionState Client#ConnectionState Contains current service connection state.

removed

Fired when the document is removed, whether the remover was local or remote.
Parameters:
Type Description
Boolean 'true' if the item was removed by local code, 'false' otherwise

removedRemotely

Fired when the document is removed by remote code.

updated

Fired when the document's contents have changed, whether the updater was local or remote.
Parameters:
Type Description
Object A snapshot of the document's new contents.
Boolean Equals 'true' if item was removed by local actor, 'false' otherwise

updatedRemotely

Fired when a document's contents were changed by remote code.
Parameters:
Type Description
Object A snapshot of the document's new contents.

collectionRemoved

Fired when a list is deleted entirely, by any actor local or remote.
Parameters:
Type Description
Boolean Equals 'true' if list was removed by local actor, 'false' otherwise

collectionRemovedRemotely

Fired when remote code deletes a list.

itemAdded

Fired when a new item appears in the list, whether its creator was local or remote.
Parameters:
Type Description
ListItem Added item
Boolean Equals 'true' if item was added by local actor, 'false' otherwise

itemAddedRemotely

Fired when remote code adds a new item to the list.
Parameters:
Type Description
ListItem Added item

itemRemoved

Fired when a list item is removed, whether the remover was local or remote.
Parameters:
Type Description
Number An index of removed item
Boolean Equals 'true' if item was removed by local actor, 'false' otherwise

itemRemovedRemotely

Fired when a remote actor removes a list item.
Parameters:
Type Description
Number An index of removed item
Object A snapshot of item data before removal

itemUpdated

Fired when a list item is updated (not added or removed, but changed), whether the updater was local or remote.
Parameters:
Type Description
ListItem Updated item
Boolean Equals 'true' if item was updated by local actor, 'false' otherwise

itemUpdatedRemotely

Fired when a remote actor updates a list item.
Parameters:
Type Description
ListItem Updated item

collectionRemoved

Fired when a map is deleted entirely, by any actor local or remote.
Parameters:
Type Description
Boolean Equals 'true' if map was removed by local actor, 'false' otherwise

collectionRemovedRemotely

Fired when remote code deletes a map.

itemAdded

Fired when a new item appears in the map, whether its creator was local or remote.
Parameters:
Type Description
MapItem Added item
Boolean Equals 'true' if item was added by local actor, 'false' otherwise

itemAddedRemotely

Fired when remote code creates a new item in the map.
Parameters:
Type Description
MapItem Added item

itemRemoved

Fired when a map item is removed, whether the remover was local or remote.
Parameters:
Type Description
String A key of removed item
Boolean Equals 'true' if item was removed by local actor, 'false' otherwise

itemRemovedRemotely

Fired when a remote actor removes a map item.
Parameters:
Type Description
String A key of removed item
Object A snapshot of item data before removal

itemUpdated

Fired when a map item is updated (not added or removed, but changed), whether the updater was local or remote.
Parameters:
Type Description
MapItem Updated item
Boolean Equals 'true' if item was updated by local actor, 'false' otherwise

itemUpdatedRemotely

Fired when a remote actor updates a map item.
Parameters:
Type Description
MapItem Updated item

messagePublished

Fired when a Message is published to the Stream either locally or by a remote actor
Parameters:
Name Type Description
args Object Arguments provided with the event
Properties
Name Type Description
message StreamMessage Published message
isLocal Boolean Equals 'true' if message was published by local code, 'false' otherwise

removed

Fired when a stream is removed entirely, whether the remover was local or remote.
Parameters:
Name Type Description
args Object Arguments provided with the event
Properties
Name Type Description
isLocal Boolean Equals 'true' if stream was removed by local code, 'false' otherwise