@barchart/portfolio-client-js 10.0.1 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1412,13 +1412,16 @@ module.exports = (() => {
1412
1412
  * @param {String} connection - The SnapTrade identifier for the brokerage connection.
1413
1413
  * @param {String} account - The SnapTrade identifier for the brokerage account.
1414
1414
  * @param {SnapTradeLinkStatusCallback} callback
1415
+ * @param {Number=} interval - The polling interval, in milliseconds. Default is 2500 ms.
1415
1416
  * @returns {Disposable}
1416
1417
  */
1417
- subscribeSnapTradeAccountLink(connection, account, callback) {
1418
+ subscribeSnapTradeAccountLink(connection, account, callback, interval = 2500) {
1418
1419
  checkStart.call(this);
1419
1420
 
1420
1421
  assert.argumentIsRequired(connection, 'connection', String);
1421
1422
  assert.argumentIsRequired(account, 'account', String);
1423
+ assert.argumentIsRequired(callback, 'callback', Function);
1424
+ assert.argumentIsOptional(interval, 'interval', Number);
1422
1425
 
1423
1426
  let disposable;
1424
1427
 
@@ -1436,7 +1439,7 @@ module.exports = (() => {
1436
1439
  }
1437
1440
  };
1438
1441
 
1439
- const token = setInterval(poll, 2500);
1442
+ const token = setInterval(poll, interval);
1440
1443
 
1441
1444
  disposable = Disposable.fromAction(() => {
1442
1445
  clearInterval(token);
package/lib/index.js CHANGED
@@ -7,6 +7,6 @@ module.exports = (() => {
7
7
  return {
8
8
  JwtProvider: JwtProvider,
9
9
  PortfolioGateway: PortfolioGateway,
10
- version: '10.0.1'
10
+ version: '10.1.0'
11
11
  };
12
12
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-client-js",
3
- "version": "10.0.1",
3
+ "version": "10.1.0",
4
4
  "description": "JavaScript SDK for Barchart's Portfolio Service",
5
5
  "homepage": "https://docs.barchart.com/portfolio/#/",
6
6
  "author": {