diff --git a/docs/_coverpage.md b/docs/_coverpage.md
index 0cfbab0..023672a 100644
--- a/docs/_coverpage.md
+++ b/docs/_coverpage.md
@@ -1,4 +1,4 @@
-# Barchart Alerting Service SDK JavaScript 4.18.5
+# Barchart Alerting Service SDK JavaScript 4.19.0
> Continuously monitor market conditions and receive notifications
diff --git a/example/browser/example.js b/example/browser/example.js
index 83792ac..6aad3e2 100644
--- a/example/browser/example.js
+++ b/example/browser/example.js
@@ -1196,14 +1196,15 @@ $(document).ready(function () {
reset(null, null, null, null);
});
-},{"./../../../lib/AlertManager":2,"./../../../lib/adapters/AdapterForHttp":4,"./../../../lib/adapters/AdapterForSocketIo":5,"./../../../lib/security/JwtProvider":18,"./../../../lib/security/demo/getJwtGenerator":19,"@barchart/common-js/collections/sorting/ComparatorBuilder":41,"@barchart/common-js/collections/sorting/comparators":42,"@barchart/common-js/lang/timezone":59}],2:[function(require,module,exports){
+},{"./../../../lib/AlertManager":2,"./../../../lib/adapters/AdapterForHttp":4,"./../../../lib/adapters/AdapterForSocketIo":5,"./../../../lib/security/JwtProvider":18,"./../../../lib/security/demo/getJwtGenerator":19,"@barchart/common-js/collections/sorting/ComparatorBuilder":41,"@barchart/common-js/collections/sorting/comparators":42,"@barchart/common-js/lang/timezone":60}],2:[function(require,module,exports){
const array = require('@barchart/common-js/lang/array'),
assert = require('@barchart/common-js/lang/assert'),
is = require('@barchart/common-js/lang/is'),
Disposable = require('@barchart/common-js/lang/Disposable'),
Event = require('@barchart/common-js/messaging/Event'),
object = require('@barchart/common-js/lang/object'),
- promise = require('@barchart/common-js/lang/promise');
+ promise = require('@barchart/common-js/lang/promise'),
+ TimeMap = require('@barchart/common-js/collections/specialized/TimeMap');
const EndpointBuilder = require('@barchart/common-js/api/http/builders/EndpointBuilder'),
ErrorInterceptor = require('@barchart/common-js/api/http/interceptors/ErrorInterceptor'),
Gateway = require('@barchart/common-js/api/http/Gateway'),
@@ -1264,10 +1265,11 @@ module.exports = (() => {
* connection has been established and other instance methods can be used.
*
* @public
+ * @async
* @param {JwtProvider} jwtProvider - Your implementation of {@link JwtProvider}.
* @returns {Promise}
*/
- connect(jwtProvider) {
+ async connect(jwtProvider) {
return Promise.resolve().then(() => {
assert.argumentIsRequired(jwtProvider, 'jwtProvider', JwtProvider, 'JwtProvider');
checkDispose(this, 'connect');
@@ -1308,10 +1310,11 @@ module.exports = (() => {
* Gets a single alert by its identifier.
*
* @public
+ * @async
* @param {Schema.Alert|Schema.AlertIdentifier} alert
* @returns {Promise}
*/
- retrieveAlert(alert) {
+ async retrieveAlert(alert) {
return Promise.resolve().then(() => {
checkStatus(this, 'retrieve alert');
validate.alert.forQuery(alert);
@@ -1324,10 +1327,11 @@ module.exports = (() => {
* Gets a set of alerts, matching query criteria.
*
* @public
+ * @async
* @param {Schema.AlertQuery} query
* @returns {Promise}
*/
- retrieveAlerts(query) {
+ async retrieveAlerts(query) {
return Promise.resolve().then(() => {
checkStatus(this, 'retrieve alerts');
validate.alert.forUser(query);
@@ -1421,10 +1425,11 @@ module.exports = (() => {
* Creates a new alert.
*
* @public
+ * @async
* @param {Schema.Alert} alert
* @returns {Promise}
*/
- createAlert(alert) {
+ async createAlert(alert) {
return Promise.resolve().then(() => {
checkStatus(this, 'create alert');
validate.alert.forCreate(alert);
@@ -1493,10 +1498,11 @@ module.exports = (() => {
* place. The new alert will have the same identifier.
*
* @public
+ * @async
* @param {Schema.Alert} alert
* @returns {Promise}
*/
- editAlert(alert) {
+ async editAlert(alert) {
return Promise.resolve().then(() => {
checkStatus(this, 'edit alert');
validate.alert.forEdit(alert);
@@ -1511,10 +1517,11 @@ module.exports = (() => {
* Deletes an existing alert.
*
* @public
+ * @async
* @param {Schema.Alert} alert
* @returns {Promise}
*/
- deleteAlert(alert) {
+ async deleteAlert(alert) {
return Promise.resolve().then(() => {
checkStatus(this, 'delete alert');
validate.alert.forQuery(alert);
@@ -1529,10 +1536,11 @@ module.exports = (() => {
* Sends a request to transition an alert to the ```Active``` state.
*
* @public
+ * @async
* @param {Schema.Alert|Schema.AlertIdentifier} alert
* @returns {Promise}
*/
- enableAlert(alert) {
+ async enableAlert(alert) {
return Promise.resolve().then(() => {
checkStatus(this, 'enable alert');
validate.alert.forQuery(alert);
@@ -1551,10 +1559,11 @@ module.exports = (() => {
* Sends a request to transition all alerts owned by a user to the ```Active``` state.
*
* @public
+ * @async
* @param {Schema.AlertQuery} query
* @returns {Promise}
*/
- enableAlerts(query) {
+ async enableAlerts(query) {
return Promise.resolve().then(() => {
checkStatus(this, 'enable alerts');
validate.alert.forUser(query);
@@ -1572,10 +1581,11 @@ module.exports = (() => {
* Sends a request to transition an alert to the ```Inactive``` state.
*
* @public
+ * @async
* @param {Schema.Alert|Schema.AlertIdentifier} alert
* @returns {Promise}
*/
- disableAlert(alert) {
+ async disableAlert(alert) {
return Promise.resolve().then(() => {
checkStatus(this, 'disable alert');
validate.alert.forQuery(alert);
@@ -1594,10 +1604,11 @@ module.exports = (() => {
* Sends a request to transition all alerts owned by a user to the ```Inactive``` state.
*
* @public
+ * @async
* @param {Schema.AlertQuery} query
* @returns {Promise}
*/
- disableAlerts(query) {
+ async disableAlerts(query) {
return Promise.resolve().then(() => {
checkStatus(this, 'disable alerts');
validate.alert.forUser(query);
@@ -1615,6 +1626,7 @@ module.exports = (() => {
* Gets a set of alert triggers, matching query criteria.
*
* @public
+ * @async
* @param {Object} query
* @param {String} query.user_id
* @param {String} query.alert_system
@@ -1622,7 +1634,7 @@ module.exports = (() => {
* @param {String=} query.trigger_status
* @returns {Promise}
*/
- retrieveTriggers(query) {
+ async retrieveTriggers(query) {
return Promise.resolve().then(() => {
checkStatus(this, 'retrieve alert triggers');
validate.trigger.forQuery(query);
@@ -1687,13 +1699,14 @@ module.exports = (() => {
* Updates the status (i.e. read/unread) for a single alert trigger.
*
* @public
+ * @async
* @param {Object} query
* @param {String} query.alert_id
* @param {String} query.trigger_date
* @param {String=} query.trigger_status
* @returns {Promise}
*/
- updateTrigger(query) {
+ async updateTrigger(query) {
return Promise.resolve().then(() => {
checkStatus(this, 'updates alert trigger');
validate.trigger.forUpdate(query);
@@ -1707,13 +1720,14 @@ module.exports = (() => {
* the query criteria.
*
* @public
+ * @async
* @param {Object} query
* @param {String} query.user_id
* @param {String} query.alert_system
* @param {String=} query.trigger_status
* @returns {Promise}
*/
- updateTriggers(query) {
+ async updateTriggers(query) {
return Promise.resolve().then(() => {
checkStatus(this, 'updates alert triggers');
validate.trigger.forBatch(query);
@@ -1726,10 +1740,11 @@ module.exports = (() => {
* Gets all templates owned by the current user.
*
* @public
+ * @async
* @param {Schema.TemplateQuery} query
* @returns {Promise}
*/
- retrieveTemplates(query) {
+ async retrieveTemplates(query) {
return Promise.resolve().then(() => {
checkStatus(this, 'get templates');
validate.template.forUser(query);
@@ -1794,10 +1809,11 @@ module.exports = (() => {
* Creates a new template.
*
* @public
+ * @async
* @param {Schema.Template} template
* @returns {Promise}
*/
- createTemplate(template) {
+ async createTemplate(template) {
return Promise.resolve().then(() => {
checkStatus(this, 'create template');
validate.template.forCreate(template);
@@ -1810,10 +1826,11 @@ module.exports = (() => {
* Update an existing template.
*
* @public
+ * @async
* @param {Schema.Template} template
* @returns {Promise}
*/
- updateTemplate(template) {
+ async updateTemplate(template) {
return Promise.resolve().then(() => {
checkStatus(this, 'update template');
validate.template.forUpdate(template);
@@ -1826,10 +1843,11 @@ module.exports = (() => {
* Updates the sort_order property for one (or more) templates.
*
* @public
- * @param {TemplateSortOrderDefinition[]} template
+ * @async
+ * @param {TemplateSortOrderDefinition[]} templates
* @returns {Promise}
*/
- updateTemplateOrder(templates) {
+ async updateTemplateOrder(templates) {
return Promise.resolve().then(() => {
checkStatus(this, 'update template order');
}).then(() => {
@@ -1843,10 +1861,11 @@ module.exports = (() => {
* Deletes an existing template.
*
* @public
+ * @async
* @param {Schema.Template} template
* @returns {Promise}
*/
- deleteTemplate(template) {
+ async deleteTemplate(template) {
return Promise.resolve().then(() => {
checkStatus(this, 'delete template');
validate.template.forQuery(template);
@@ -1866,11 +1885,12 @@ module.exports = (() => {
* use the alternate symbol.
*
* @public
+ * @async
* @param {String} symbol - The value intended to be assigned to the `property.target.identifier` attribute of a condition.
* @param {String=} alertSystem - The value intended to be assigned to the `alert.alert_system` attribute of an alert (some symbols are considered invalid given the user's domain).
* @returns {Promise}
*/
- checkSymbol(symbol, alertSystem) {
+ async checkSymbol(symbol, alertSystem) {
return Promise.resolve().then(() => {
checkStatus(this, 'check symbol');
assert.argumentIsRequired(symbol, 'symbol', String);
@@ -1887,9 +1907,10 @@ module.exports = (() => {
* system.
*
* @public
+ * @async
* @returns {Promise}
*/
- getTargets() {
+ async getTargets() {
return Promise.resolve().then(() => {
checkStatus(this, 'get targets');
return this._adapter.getTargets();
@@ -1901,9 +1922,10 @@ module.exports = (() => {
* system.
*
* @public
+ * @async
* @returns {Promise}
*/
- getProperties() {
+ async getProperties() {
return Promise.resolve().then(() => {
checkStatus(this, 'get properties');
return this._adapter.getProperties();
@@ -1915,15 +1937,16 @@ module.exports = (() => {
* system.
*
* @public
+ * @async
* @returns {Promise}
*/
- getOperators() {
+ async getOperators() {
return Promise.resolve().then(() => {
checkStatus(this, 'get operators');
return this._adapter.getOperators();
});
}
- getModifiers() {
+ async getModifiers() {
return Promise.resolve().then(() => {
checkStatus(this, 'get modifiers');
return this._adapter.getModifiers();
@@ -1935,9 +1958,10 @@ module.exports = (() => {
* users when an alert is triggered.
*
* @public
+ * @async
* @returns {Promise}
*/
- getPublisherTypes() {
+ async getPublisherTypes() {
return Promise.resolve().then(() => {
checkStatus(this, 'get publisher types');
return this._adapter.getPublisherTypes();
@@ -1948,12 +1972,13 @@ module.exports = (() => {
* Retrieves the notification preferences for a user.
*
* @public
+ * @async
* @param {Object} query
* @param {String} query.user_id
* @param {String} query.alert_system
* @returns {Promise}
*/
- getPublisherTypeDefaults(query) {
+ async getPublisherTypeDefaults(query) {
return Promise.resolve().then(() => {
checkStatus(this, 'get publisher type defaults');
validate.publisherTypeDefault.forUser(query);
@@ -1967,10 +1992,11 @@ module.exports = (() => {
* or text message).
*
* @public
+ * @async
* @param {Schema.PublisherTypeDefault} publisherTypeDefault
* @returns {Promise}
*/
- assignPublisherTypeDefault(publisherTypeDefault) {
+ async assignPublisherTypeDefault(publisherTypeDefault) {
return Promise.resolve().then(() => {
checkStatus(this, 'assign publisher type default');
validate.publisherTypeDefault.forCreate(publisherTypeDefault);
@@ -1984,10 +2010,11 @@ module.exports = (() => {
* or text message).
*
* @public
+ * @async
* @param {Schema.PublisherTypeDefault} publisherTypeDefault
* @returns {Promise}
*/
- deletePublisherTypeDefault(publisherTypeDefault) {
+ async deletePublisherTypeDefault(publisherTypeDefault) {
return Promise.resolve().then(() => {
checkStatus(this, 'clear publisher type default');
validate.publisherTypeDefault.forClear(publisherTypeDefault);
@@ -1999,14 +2026,14 @@ module.exports = (() => {
return this._adapter.deletePublisherTypeDefault(payload);
});
}
- getMarketDataConfiguration(query) {
+ async getMarketDataConfiguration(query) {
return Promise.resolve().then(() => {
checkStatus(this, 'get market data configuration');
}).then(() => {
return this._adapter.getMarketDataConfiguration(query);
});
}
- assignMarketDataConfiguration(marketDataConfiguration) {
+ async assignMarketDataConfiguration(marketDataConfiguration) {
return Promise.resolve().then(() => {
checkStatus(this, 'assign market data configuration');
}).then(() => {
@@ -2018,9 +2045,10 @@ module.exports = (() => {
* Returns the version number of the remote service you are connected to.
*
* @public
+ * @async
* @returns {Promise}
*/
- getServerVersion() {
+ async getServerVersion() {
return Promise.resolve().then(() => {
checkStatus(this, 'get server version');
}).then(() => {
@@ -2029,13 +2057,14 @@ module.exports = (() => {
}
/**
- * Returns the current user (according to the JWT token which is embedded
+ * Returns the current user (according to the JWT which is embedded
* in the request).
*
* @public
+ * @async
* @returns {Promise}
*/
- getUser() {
+ async getUser() {
return Promise.resolve().then(() => {
checkStatus(this, 'get authenticated user');
}).then(() => {
@@ -2086,7 +2115,9 @@ module.exports = (() => {
* Given an array of property objects, returns the properties which are valid for
* use with a given symbol.
*
+ * @public
* @static
+ * @async
* @ignore
* @param {Array