@barchart/portfolio-client-js 1.2.29 → 1.2.32
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 +7 -7
- package/lib/gateway/PortfolioGateway.js +6 -7
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/example/example.js
CHANGED
|
@@ -292,7 +292,7 @@ module.exports = function () {
|
|
|
292
292
|
}).withRequestInterceptor(requestInterceptorToUse).withResponseInterceptor(ResponseInterceptor.DATA).withErrorInterceptor(ErrorInterceptor.GENERAL).endpoint;
|
|
293
293
|
|
|
294
294
|
_this._downloadBrokerageReportEndpoint = EndpointBuilder.for('download-brokerage-report', 'download brokerage report').withVerb(VerbType.GET).withProtocol(protocolType).withHost(host).withPort(port).withPathBuilder(function (pb) {
|
|
295
|
-
pb.withLiteralParameter('reports', 'reports').withLiteralParameter('
|
|
295
|
+
pb.withLiteralParameter('reports', 'reports').withLiteralParameter('portfolios', 'portfolios').withVariableParameter('portfolio', 'portfolio', 'portfolio', false).withLiteralParameter('frames', 'frames').withVariableParameter('frame', 'frame', 'frame', false, function (x) {
|
|
296
296
|
return x.code;
|
|
297
297
|
}).withLiteralParameter('date', 'date').withVariableParameter('start', 'start', 'start', false, function (x) {
|
|
298
298
|
return x.format();
|
|
@@ -935,27 +935,27 @@ module.exports = function () {
|
|
|
935
935
|
* @public
|
|
936
936
|
* @param {String=} portfolio
|
|
937
937
|
* @param {PositionSummaryFrame} frame
|
|
938
|
-
* @param {Day}
|
|
938
|
+
* @param {Day} end
|
|
939
939
|
* @returns {Promise}
|
|
940
940
|
*/
|
|
941
941
|
|
|
942
942
|
}, {
|
|
943
943
|
key: 'downloadBrokerageReport',
|
|
944
|
-
value: function downloadBrokerageReport(portfolio, frame,
|
|
944
|
+
value: function downloadBrokerageReport(portfolio, frame, end) {
|
|
945
945
|
var _this21 = this;
|
|
946
946
|
|
|
947
947
|
return Promise.resolve().then(function () {
|
|
948
948
|
checkStart.call(_this21);
|
|
949
949
|
|
|
950
950
|
assert.argumentIsRequired(portfolio, 'portfolio', String);
|
|
951
|
-
assert.argumentIsRequired(frame, 'frame',
|
|
952
|
-
assert.argumentIsRequired(
|
|
951
|
+
assert.argumentIsRequired(frame, 'frame', PositionSummaryFrame, 'PositionSummaryFrame');
|
|
952
|
+
assert.argumentIsRequired(end, 'end', Day, 'Day');
|
|
953
953
|
|
|
954
954
|
var payload = {};
|
|
955
955
|
|
|
956
956
|
payload.portfolio = portfolio;
|
|
957
957
|
payload.frame = frame;
|
|
958
|
-
payload.start =
|
|
958
|
+
payload.start = end;
|
|
959
959
|
|
|
960
960
|
return Gateway.invoke(_this21._downloadBrokerageReportEndpoint, payload);
|
|
961
961
|
});
|
|
@@ -1556,7 +1556,7 @@ module.exports = function () {
|
|
|
1556
1556
|
return {
|
|
1557
1557
|
JwtGateway: JwtGateway,
|
|
1558
1558
|
PortfolioGateway: PortfolioGateway,
|
|
1559
|
-
version: '1.2.
|
|
1559
|
+
version: '1.2.32'
|
|
1560
1560
|
};
|
|
1561
1561
|
}();
|
|
1562
1562
|
|
|
@@ -355,9 +355,8 @@ module.exports = (() => {
|
|
|
355
355
|
.withPort(port)
|
|
356
356
|
.withPathBuilder((pb) => {
|
|
357
357
|
pb.withLiteralParameter('reports', 'reports')
|
|
358
|
-
.withLiteralParameter('
|
|
358
|
+
.withLiteralParameter('portfolios', 'portfolios')
|
|
359
359
|
.withVariableParameter('portfolio', 'portfolio', 'portfolio', false)
|
|
360
|
-
.withLiteralParameter('brokerage', 'brokerage')
|
|
361
360
|
.withLiteralParameter('frames', 'frames')
|
|
362
361
|
.withVariableParameter('frame', 'frame', 'frame', false, x => x.code)
|
|
363
362
|
.withLiteralParameter('date', 'date')
|
|
@@ -927,23 +926,23 @@ module.exports = (() => {
|
|
|
927
926
|
* @public
|
|
928
927
|
* @param {String=} portfolio
|
|
929
928
|
* @param {PositionSummaryFrame} frame
|
|
930
|
-
* @param {Day}
|
|
929
|
+
* @param {Day} end
|
|
931
930
|
* @returns {Promise}
|
|
932
931
|
*/
|
|
933
|
-
downloadBrokerageReport(portfolio, frame,
|
|
932
|
+
downloadBrokerageReport(portfolio, frame, end) {
|
|
934
933
|
return Promise.resolve()
|
|
935
934
|
.then(() => {
|
|
936
935
|
checkStart.call(this);
|
|
937
936
|
|
|
938
937
|
assert.argumentIsRequired(portfolio, 'portfolio', String);
|
|
939
|
-
assert.argumentIsRequired(frame, 'frame',
|
|
940
|
-
assert.argumentIsRequired(
|
|
938
|
+
assert.argumentIsRequired(frame, 'frame', PositionSummaryFrame, 'PositionSummaryFrame');
|
|
939
|
+
assert.argumentIsRequired(end, 'end', Day, 'Day');
|
|
941
940
|
|
|
942
941
|
const payload = { };
|
|
943
942
|
|
|
944
943
|
payload.portfolio = portfolio;
|
|
945
944
|
payload.frame = frame;
|
|
946
|
-
payload.start =
|
|
945
|
+
payload.start = end;
|
|
947
946
|
|
|
948
947
|
return Gateway.invoke(this._downloadBrokerageReportEndpoint, payload);
|
|
949
948
|
});
|
package/lib/index.js
CHANGED