Twilio access token.
Options to customize the client.
Fired when connection is interrupted by unexpected reason.
Parameters:
connectionError
- connection error details. It has following properties:terminal
- twilsock will stop connection attemptsmessage
- root causehttpStatusCode
- HTTP status code if availableerrorCode
- Twilio public error code if availableFired when connection state has been changed.
Parameters:
connectionState
- contains current service connection state.Fired when the access token is about to expire and needs to be updated. The trigger takes place three minutes before the JWT access token expiry. For long living applications, you should refresh the token when either tokenAboutToExpire or tokenExpire events occur; handling just one of them is sufficient.
Fired when the access token is expired. In case the token is not refreshed, all subsequent Sync operations will fail and the client will disconnect. For long living applications, you should refresh the token when either tokenAboutToExpire or tokenExpire events occur; handling just one of them is sufficient.
Current service connection state.
Current version of the Sync client.
Read or create a Sync document.
Could be any of the following:
A promise which resolves after the document is successfully read (or created). This promise may reject if the document could not be created or if this endpoint lacks the necessary permissions to access it.
For Flex customers only. Creates a query object that can be used to issue one-time queries repeatedly against the target index.
Must specify one of the Flex data classes for which live queries are available.
A promise which resolves after the instance of InstantQuery is successfully created.
Read or create a Sync list.
Could be any of the following:
A promise which resolves after the list is successfully read (or created). This promise may reject if the list could not be created or if this endpoint lacks the necessary permissions to access it.
For Flex customers only. Establishes a long-running query against Flex data wherein the returned result set is updated whenever new (or updated) records match the given expression. Updated results are presented row-by-row according to the lifetime of the returned LiveQuery object.
Must specify one of the Flex data classes for which Live Queries are available.
A query expression to be executed against the given data index. Please review the Live Query Language page for Sync client limits and a full list of operators currently supported in query expressions.
A promise that resolves when the query has been successfully executed.
Read or create a Sync map.
Could be any of the following:
A promise which resolves after the map is successfully read (or created). This promise may reject if the map could not be created or if this endpoint lacks the necessary permissions to access it.
Gracefully shuts the Sync client down.
Read or create a Sync message stream.
Could be any of the following:
A promise which resolves after the stream is successfully read (or created). The flow of messages will begin imminently (but not necessarily immediately) upon resolution. This promise may reject if the stream could not be created or if this endpoint lacks the necessary permissions to access it.
Set the authentication token.
New token to set.
Client for the Twilio Sync service.