@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.
- package/example/example.js +20 -1
- package/lib/gateway/PortfolioGateway.js +17 -0
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/example/example.js
CHANGED
|
@@ -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.
|
|
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