@barchart/portfolio-client-js 3.3.0 → 3.3.1

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.
@@ -1186,14 +1186,16 @@ module.exports = (() => {
1186
1186
  * @public
1187
1187
  * @static
1188
1188
  * @param {JwtProvider} jwtProvider
1189
+ * @param {String=} product
1189
1190
  * @returns {Promise<PortfolioGateway>}
1190
1191
  */
1191
- static forTest(jwtProvider) {
1192
+ static forTest(jwtProvider, product) {
1192
1193
  return Promise.resolve()
1193
1194
  .then(() => {
1194
1195
  assert.argumentIsRequired(jwtProvider, 'jwtProvider', JwtProvider, 'JwtProvider');
1196
+ assert.argumentIsOptional(product, 'product', String);
1195
1197
 
1196
- return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.testHost, REST_API_SECURE_PORT, 'test'), jwtProvider);
1198
+ return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.testHost, REST_API_SECURE_PORT, 'test', product), jwtProvider);
1197
1199
  });
1198
1200
  }
1199
1201
 
@@ -1203,14 +1205,16 @@ module.exports = (() => {
1203
1205
  * @public
1204
1206
  * @static
1205
1207
  * @param {JwtProvider} jwtProvider
1208
+ * @param {String=} product
1206
1209
  * @returns {Promise<PortfolioGateway>}
1207
1210
  */
1208
- static forDevelopment(jwtProvider) {
1211
+ static forDevelopment(jwtProvider, product) {
1209
1212
  return Promise.resolve()
1210
1213
  .then(() => {
1211
1214
  assert.argumentIsRequired(jwtProvider, 'jwtProvider', JwtProvider, 'JwtProvider');
1215
+ assert.argumentIsOptional(product, 'product', String);
1212
1216
 
1213
- return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.developmentHost, REST_API_SECURE_PORT, 'development'), jwtProvider);
1217
+ return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.developmentHost, REST_API_SECURE_PORT, 'development', product), jwtProvider);
1214
1218
  });
1215
1219
  }
1216
1220
 
@@ -1220,14 +1224,16 @@ module.exports = (() => {
1220
1224
  * @public
1221
1225
  * @static
1222
1226
  * @param {JwtProvider} jwtProvider
1227
+ * @param {String=} product
1223
1228
  * @returns {Promise<PortfolioGateway>}
1224
1229
  */
1225
- static forStaging(jwtProvider) {
1230
+ static forStaging(jwtProvider, product) {
1226
1231
  return Promise.resolve()
1227
1232
  .then(() => {
1228
1233
  assert.argumentIsRequired(jwtProvider, 'jwtProvider', JwtProvider, 'JwtProvider');
1234
+ assert.argumentIsOptional(product, 'product', String);
1229
1235
 
1230
- return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.stagingHost, REST_API_SECURE_PORT, 'staging'), jwtProvider);
1236
+ return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.stagingHost, REST_API_SECURE_PORT, 'staging', product), jwtProvider);
1231
1237
  });
1232
1238
  }
1233
1239
 
@@ -1237,14 +1243,16 @@ module.exports = (() => {
1237
1243
  * @public
1238
1244
  * @static
1239
1245
  * @param {JwtProvider} jwtProvider
1246
+ * @param {String=} product
1240
1247
  * @returns {Promise<PortfolioGateway>}
1241
1248
  */
1242
- static forDemo(jwtProvider) {
1249
+ static forDemo(jwtProvider, product) {
1243
1250
  return Promise.resolve()
1244
1251
  .then(() => {
1245
1252
  assert.argumentIsRequired(jwtProvider, 'jwtProvider', JwtProvider, 'JwtProvider');
1253
+ assert.argumentIsOptional(product, 'product', String);
1246
1254
 
1247
- return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.demoHost, REST_API_SECURE_PORT, 'demo'), jwtProvider);
1255
+ return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.demoHost, REST_API_SECURE_PORT, 'demo', product), jwtProvider);
1248
1256
  });
1249
1257
  }
1250
1258
 
@@ -1254,14 +1262,16 @@ module.exports = (() => {
1254
1262
  * @public
1255
1263
  * @static
1256
1264
  * @param {JwtProvider} jwtProvider
1265
+ * @param {String=} product
1257
1266
  * @returns {Promise<PortfolioGateway>}
1258
1267
  */
1259
- static forProduction(jwtProvider) {
1268
+ static forProduction(jwtProvider, product) {
1260
1269
  return Promise.resolve()
1261
1270
  .then(() => {
1262
1271
  assert.argumentIsRequired(jwtProvider, 'jwtProvider', JwtProvider, 'JwtProvider');
1272
+ assert.argumentIsOptional(product, 'product', String);
1263
1273
 
1264
- return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.productionHost, REST_API_SECURE_PORT, 'production'), jwtProvider);
1274
+ return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.productionHost, REST_API_SECURE_PORT, 'production', product), jwtProvider);
1265
1275
  });
1266
1276
  }
1267
1277
 
@@ -1271,14 +1281,16 @@ module.exports = (() => {
1271
1281
  * @public
1272
1282
  * @static
1273
1283
  * @param {JwtProvider} jwtProvider
1284
+ * @param {String=} product
1274
1285
  * @returns {Promise<PortfolioGateway>}
1275
1286
  */
1276
- static forAdmin(jwtProvider) {
1287
+ static forAdmin(jwtProvider, product) {
1277
1288
  return Promise.resolve()
1278
1289
  .then(() => {
1279
1290
  assert.argumentIsRequired(jwtProvider, 'jwtProvider', JwtProvider, 'JwtProvider');
1291
+ assert.argumentIsOptional(product, 'product', String);
1280
1292
 
1281
- return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.adminHost, REST_API_SECURE_PORT, 'admin'), jwtProvider);
1293
+ return start(new PortfolioGateway(REST_API_SECURE_PROTOCOL, Configuration.adminHost, REST_API_SECURE_PORT, 'admin', product), jwtProvider);
1282
1294
  });
1283
1295
  }
1284
1296
 
package/lib/index.js CHANGED
@@ -7,6 +7,6 @@ module.exports = (() => {
7
7
  return {
8
8
  JwtProvider: JwtProvider,
9
9
  PortfolioGateway: PortfolioGateway,
10
- version: '3.3.0'
10
+ version: '3.3.1'
11
11
  };
12
12
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-client-js",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "JavaScript library for interfacing with Barchart's Portfolio API",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",