Fired when a new item appears in the list, regardless of whether its creator was local or remote.
Parameters:
args
- info object provided with the event. It has the following properties:item
- added itemisLocal
- equals true if the item was added by a local actor, false otherwiseFired when a list item is removed, regardless of whether the remover was local or remote.
Parameters:
args
- info object provided with the event. It has the following properties:index
- index of the removed itemisLocal
- equals true if the item was removed by a local actor, false otherwisepreviousItemData
- contains a snapshot of the item data before the removalFired when a list item is updated (not added or removed, but changed), regardless of whether the updater was local or remote.
Parameters:
args
- info object provided with the event. It has the following properties:item
- updated itemisLocal
- equals true if the item was updated by a local actor, false otherwisepreviousItemData
- contains a snapshot of the item data before the updateFired when a list is deleted entirely, by any actor local or remote.
Parameters:
args
- info object provided with the event. It has the following properties:isLocal
- equals true if the list was removed by a local actor, false otherwiseDate when the list was last updated, given in UTC ISO 8601 format (e.g., '2018-04-26T15:23:19.732Z').
Unique ID of the list, immutable identifier assigned by the system.
Unique name of the list, immutable identifier that can be assigned to the list during creation.
Conclude work with the list instance and remove all event listeners attached to it. Any subsequent operation on this object will be rejected with error. Other local copies of this list will continue operating and receiving events normally.
Retrieve an item by List index.
Item index in the list.
A promise with the item containing latest known data. The promise will be rejected if the item was not found.
Query a list of items from collection. Information about the query limits can be found here.
Query options.
Modify an existing item by applying a mutation function to it.
Index of the item to be changed.
A function that outputs a new data based on the existing data.
New item metadata.
Resolves with the most recent item state, the output of a successful
mutation or a state that prompted graceful cancellation (mutator returned null
). This promise
will be rejected if the indicated item does not already exist.
Add a new item to the list.
Data to be added.
Item metadata.
The newly added item.
Delete an item given its index.
Index of the item to be removed.
A promise to remove the item. The promise will be rejected if the item was not found.
Delete this list. It will be impossible to restore it.
A promise that resolves when the list has been deleted.
Assign new data to an existing item, given its index.
Index of the item to be updated.
New data to be assigned to an item.
New item metadata.
A promise with the updated item containing latest known data. The promise will be rejected if the item does not exist.
Update the time-to-live of a list item.
Item index.
Specifies the TTL in seconds after which the list item is subject to automatic deletion. The value 0 means infinity.
A promise that resolves after the TTL update was successful.
Update the time-to-live of the list.
Specifies the TTL in seconds after which the list is subject to automatic deletion. The value 0 means infinity.
A promise that resolves after the TTL update was successful.
Modify an existing item by appending new fields (or overwriting existing ones) with the values from the object. This is equivalent to
list.mutate(42, (currentValue) => Object.assign(currentValue, obj));
Index of an item to be changed.
Set of fields to update.
New item metadata.
A promise with a modified item containing latest known data. The promise will be rejected if the item was not found.
Represents a Sync list, which stores an ordered list of values. Use the SyncClient.list method to obtain a reference to a Sync list. Information about rate limits can be found here.