@barchart/portfolio-client-js 1.2.39 → 1.2.40

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.
@@ -1063,6 +1063,25 @@ module.exports = function () {
1063
1063
  return start(new PortfolioGateway('https', Configuration.productionHost, 443, 'production', requestInterceptor));
1064
1064
  });
1065
1065
  }
1066
+
1067
+ /**
1068
+ * Creates and starts a new {@link PortfolioGateway} for use in the administration environment.
1069
+ *
1070
+ * @public
1071
+ * @static
1072
+ * @param {RequestInterceptor=|Promise.<RequestInterceptor>=} requestInterceptor - A request interceptor used with each request (typically used to inject JWT tokens).
1073
+ * @returns {Promise.<PortfolioGateway>}
1074
+ */
1075
+
1076
+ }, {
1077
+ key: 'forAdmin',
1078
+ value: function forAdmin(requestInterceptor) {
1079
+ return Promise.resolve(requestInterceptor).then(function (requestInterceptor) {
1080
+ assert.argumentIsOptional(requestInterceptor, 'requestInterceptor', RequestInterceptor, 'RequestInterceptor');
1081
+
1082
+ return start(new PortfolioGateway('http', Configuration.adminHost, 443, requestInterceptor));
1083
+ });
1084
+ }
1066
1085
  }]);
1067
1086
 
1068
1087
  return PortfolioGateway;
@@ -1607,7 +1626,7 @@ module.exports = function () {
1607
1626
  return {
1608
1627
  JwtGateway: JwtGateway,
1609
1628
  PortfolioGateway: PortfolioGateway,
1610
- version: '1.2.39'
1629
+ version: '1.2.40'
1611
1630
  };
1612
1631
  }();
1613
1632
 
@@ -1014,6 +1014,23 @@ module.exports = (() => {
1014
1014
  });
1015
1015
  }
1016
1016
 
1017
+ /**
1018
+ * Creates and starts a new {@link PortfolioGateway} for use in the administration environment.
1019
+ *
1020
+ * @public
1021
+ * @static
1022
+ * @param {RequestInterceptor=|Promise.<RequestInterceptor>=} requestInterceptor - A request interceptor used with each request (typically used to inject JWT tokens).
1023
+ * @returns {Promise.<PortfolioGateway>}
1024
+ */
1025
+ static forAdmin(requestInterceptor) {
1026
+ return Promise.resolve(requestInterceptor)
1027
+ .then((requestInterceptor) => {
1028
+ assert.argumentIsOptional(requestInterceptor, 'requestInterceptor', RequestInterceptor, 'RequestInterceptor');
1029
+
1030
+ return start(new PortfolioGateway('http', Configuration.adminHost, 443, requestInterceptor));
1031
+ });
1032
+ }
1033
+
1017
1034
  _onDispose() {
1018
1035
  return;
1019
1036
  }
package/lib/index.js CHANGED
@@ -7,6 +7,6 @@ module.exports = (() => {
7
7
  return {
8
8
  JwtGateway: JwtGateway,
9
9
  PortfolioGateway: PortfolioGateway,
10
- version: '1.2.39'
10
+ version: '1.2.40'
11
11
  };
12
12
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-client-js",
3
- "version": "1.2.39",
3
+ "version": "1.2.40",
4
4
  "description": "JavaScript library for interfacing with Barchart's Portfolio API",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",