@barchart/portfolio-client-js 5.8.0 → 5.9.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.
- package/lib/common/Configuration.js +22 -0
- package/lib/gateway/PortfolioGateway.js +40 -0
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -45,6 +45,17 @@ module.exports = (() => {
|
|
|
45
45
|
return 'portfolio-stage.aws.barchart.com';
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* The hostname of the REST API for the staging WWW environment (public use allowed).
|
|
50
|
+
*
|
|
51
|
+
* @public
|
|
52
|
+
* @static
|
|
53
|
+
* @returns {String}
|
|
54
|
+
*/
|
|
55
|
+
static get stagingWwwHost() {
|
|
56
|
+
return 'portfolio-www-stage.aws.barchart.com';
|
|
57
|
+
}
|
|
58
|
+
|
|
48
59
|
/**
|
|
49
60
|
* The hostname of the REST API for the demo environment (intended for Barchart use only).
|
|
50
61
|
*
|
|
@@ -67,6 +78,17 @@ module.exports = (() => {
|
|
|
67
78
|
return 'portfolio.aws.barchart.com';
|
|
68
79
|
}
|
|
69
80
|
|
|
81
|
+
/**
|
|
82
|
+
* The hostname of the REST API for the production WWW environment (public use allowed).
|
|
83
|
+
*
|
|
84
|
+
* @public
|
|
85
|
+
* @static
|
|
86
|
+
* @returns {String}
|
|
87
|
+
*/
|
|
88
|
+
static get productionWwwHost() {
|
|
89
|
+
return 'portfolio-www.aws.barchart.com';
|
|
90
|
+
}
|
|
91
|
+
|
|
70
92
|
/**
|
|
71
93
|
* The hostname of the REST API for the admin environment (intended for Barchart use only).
|
|
72
94
|
*
|
|
@@ -1296,6 +1296,26 @@ module.exports = (() => {
|
|
|
1296
1296
|
});
|
|
1297
1297
|
}
|
|
1298
1298
|
|
|
1299
|
+
/**
|
|
1300
|
+
* Creates and starts a new {@link PortfolioGateway} for use in the private staging WWW environment.
|
|
1301
|
+
*
|
|
1302
|
+
* @public
|
|
1303
|
+
* @ignore
|
|
1304
|
+
* @static
|
|
1305
|
+
* @param {JwtProvider} jwtProvider
|
|
1306
|
+
* @param {String=} product
|
|
1307
|
+
* @returns {Promise<PortfolioGateway>}
|
|
1308
|
+
*/
|
|
1309
|
+
static forStagingWww(jwtProvider, product) {
|
|
1310
|
+
return Promise.resolve()
|
|
1311
|
+
.then(() => {
|
|
1312
|
+
assert.argumentIsRequired(jwtProvider, 'jwtProvider', JwtProvider, 'JwtProvider');
|
|
1313
|
+
assert.argumentIsOptional(product, 'product', String);
|
|
1314
|
+
|
|
1315
|
+
return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.stagingWwwHost, REST_API_SECURE_PORT, 'www-staging', product), jwtProvider);
|
|
1316
|
+
});
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1299
1319
|
/**
|
|
1300
1320
|
* Creates and starts a new {@link PortfolioGateway} for use in the public demo environment.
|
|
1301
1321
|
*
|
|
@@ -1334,6 +1354,26 @@ module.exports = (() => {
|
|
|
1334
1354
|
});
|
|
1335
1355
|
}
|
|
1336
1356
|
|
|
1357
|
+
/**
|
|
1358
|
+
* Creates and starts a new {@link PortfolioGateway} for use in the private production WWW environment.
|
|
1359
|
+
*
|
|
1360
|
+
* @public
|
|
1361
|
+
* @ignore
|
|
1362
|
+
* @static
|
|
1363
|
+
* @param {JwtProvider} jwtProvider
|
|
1364
|
+
* @param {String=} product
|
|
1365
|
+
* @returns {Promise<PortfolioGateway>}
|
|
1366
|
+
*/
|
|
1367
|
+
static forProductionWww(jwtProvider, product) {
|
|
1368
|
+
return Promise.resolve()
|
|
1369
|
+
.then(() => {
|
|
1370
|
+
assert.argumentIsRequired(jwtProvider, 'jwtProvider', JwtProvider, 'JwtProvider');
|
|
1371
|
+
assert.argumentIsOptional(product, 'product', String);
|
|
1372
|
+
|
|
1373
|
+
return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.productionWwwHost, REST_API_SECURE_PORT, 'www-production', product), jwtProvider);
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1337
1377
|
/**
|
|
1338
1378
|
* Creates and starts a new {@link PortfolioGateway} for use in the private admin environment.
|
|
1339
1379
|
*
|
package/lib/index.js
CHANGED