@barchart/portfolio-client-js 9.0.0 → 9.1.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/data/.meta.js +106 -1
- package/lib/gateway/PortfolioGateway.js +766 -435
- package/lib/index.js +1 -1
- package/lib/security/JwtProvider.js +26 -28
- package/package.json +3 -3
package/lib/data/.meta.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const Currency = require('@barchart/common-js/lang/Currency'),
|
|
2
|
+
Day = require('@barchart/common-js/lang/Day'),
|
|
2
3
|
Decimal = require('@barchart/common-js/lang/Decimal'),
|
|
3
4
|
Timezones = require('@barchart/common-js/lang/Timezones');
|
|
4
5
|
|
|
@@ -239,6 +240,19 @@ const InstrumentType = require('@barchart/portfolio-api-common/lib/data/Instrume
|
|
|
239
240
|
* @property {Boolean} replaced - If true, the position (and position summaries) need to be replaced.
|
|
240
241
|
*/
|
|
241
242
|
|
|
243
|
+
/**
|
|
244
|
+
* The result of a position mutation operation (like moving, adding, or deleting a position).
|
|
245
|
+
* It contains structured information about what changed in the portfolio(s).
|
|
246
|
+
*
|
|
247
|
+
* @typedef PositionMutateResult
|
|
248
|
+
* @type Object
|
|
249
|
+
* @memberOf Schema
|
|
250
|
+
* @property {Object} positions - The raw lists of saved and deleted positions directly from the API.
|
|
251
|
+
* @property {Schema.Position[]} positions.saved - All positions that were inserted or updated in the database.
|
|
252
|
+
* @property {Schema.Position[]} positions.deleted - All positions that were deleted from the database.
|
|
253
|
+
* @property {Schema.PositionSummary[]} summaries - All position summaries created or updated as a result of the operation.
|
|
254
|
+
*/
|
|
255
|
+
|
|
242
256
|
/**
|
|
243
257
|
* The symbols (i.e. codes) used to identify an instrument (e.g. "AAPL" for Apple Inc).
|
|
244
258
|
*
|
|
@@ -282,4 +296,95 @@ const InstrumentType = require('@barchart/portfolio-api-common/lib/data/Instrume
|
|
|
282
296
|
* @memberOf Schema
|
|
283
297
|
* @property {Boolean} available - If true, all position and portfolio valuations are up-to-date.
|
|
284
298
|
* @property {String[]} positions - Array of position identifiers for which are currently being calculated. An empty result indicates all position valuations are up-to-date.
|
|
285
|
-
*/
|
|
299
|
+
*/
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Instructions for connecting to a brokerage via SnapTrade.
|
|
303
|
+
*
|
|
304
|
+
* @ignore
|
|
305
|
+
* @typedef SnapTradeConnectInstructions
|
|
306
|
+
* @type {Object}
|
|
307
|
+
* @memberOf Schema
|
|
308
|
+
* @property {String} uri - The URI for brokerage authentication.
|
|
309
|
+
*/
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Data regarding a SnapTrade brokerage.
|
|
313
|
+
*
|
|
314
|
+
* @ignore
|
|
315
|
+
* @typedef SnapTradeBrokerage
|
|
316
|
+
* @type {Object}
|
|
317
|
+
* @memberOf Schema
|
|
318
|
+
* @property {String} id - The SnapTrade identifier for the brokerage.
|
|
319
|
+
* @property {String} name - The name of the brokerage.
|
|
320
|
+
* @property {String} display - The name of the brokerage (for display to a user).
|
|
321
|
+
* @property {String} logo - The URI for the logo image for the brokerage.
|
|
322
|
+
* @property {SnapTradeConnection|null} connection
|
|
323
|
+
* @property {SnapTradeAccount[]} accounts
|
|
324
|
+
*/
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Data regarding a connection to a SnapTrade brokerage.
|
|
328
|
+
*
|
|
329
|
+
* @ignore
|
|
330
|
+
* @typedef SnapTradeConnection
|
|
331
|
+
* @type {Object}
|
|
332
|
+
* @memberOf Schema
|
|
333
|
+
* @property {String} id - The SnapTrade identifier for the brokerage connection.
|
|
334
|
+
* @property {Boolean} broken - Indicates if the user needs to authenticate again.
|
|
335
|
+
*/
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Data regarding an SnapTrade brokerage account.
|
|
339
|
+
*
|
|
340
|
+
* @ignore
|
|
341
|
+
* @typedef SnapTradeAccount
|
|
342
|
+
* @type {Object}
|
|
343
|
+
* @memberOf Schema
|
|
344
|
+
* @property {String} id - The SnapTrade identifier for the brokerage account.
|
|
345
|
+
* @property {String} number - The brokerage account number (masked).
|
|
346
|
+
* @property {String} name - The brokerage account name.
|
|
347
|
+
* @property {String} type - The brokerage account type.
|
|
348
|
+
* @property {SnapTradeLink|null} link
|
|
349
|
+
*/
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Data regarding the linkage SnapTrade account and a portfolio.
|
|
353
|
+
*
|
|
354
|
+
* @ignore
|
|
355
|
+
* @typedef SnapTradeLink
|
|
356
|
+
* @type {Object}
|
|
357
|
+
* @memberOf Schema
|
|
358
|
+
* @property {SnapTradeLinkStatus} status - The status of the link.
|
|
359
|
+
* @property {number} progress - If the status indicates work in progress, this is the percent complete (as a whole number).
|
|
360
|
+
* @property {Timestamp} timestamp - The timestamp of the most recent status update.
|
|
361
|
+
* @property {String=} advice
|
|
362
|
+
*/
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Data regarding the status of a link between a SnapTrade account and a portfolio.
|
|
366
|
+
*
|
|
367
|
+
* @ignore
|
|
368
|
+
* @typedef SnapTradeLinkProgress
|
|
369
|
+
* @type {Object}
|
|
370
|
+
* @memberOf Schema
|
|
371
|
+
* @property {String} user
|
|
372
|
+
* @property {String} portfolio
|
|
373
|
+
* @property {String} connection
|
|
374
|
+
* @property {String} account
|
|
375
|
+
* @property {SnapTradeLinkStatus} status
|
|
376
|
+
* @property {number} progress
|
|
377
|
+
*/
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Data returned by a linking operation (which could add or remove portfolios).
|
|
381
|
+
*
|
|
382
|
+
* @ignore
|
|
383
|
+
* @typedef SnapTradeLinkingReport
|
|
384
|
+
* @type {Object}
|
|
385
|
+
* @memberOf Schema
|
|
386
|
+
* @property {SnapTradeBrokerage[]} brokerages
|
|
387
|
+
* @property {Object} portfolios
|
|
388
|
+
* @property {Portfolio} portfolios.saved
|
|
389
|
+
* @property {Portfolio} portfolios.deleted
|
|
390
|
+
*/
|