@barchart/portfolio-client-js 1.1.33 → 1.1.34
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 +51 -160
- package/lib/common/Configuration.js +3 -3
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/example/example.js
CHANGED
|
@@ -78,7 +78,7 @@ module.exports = function () {
|
|
|
78
78
|
}, {
|
|
79
79
|
key: 'developmentHost',
|
|
80
80
|
get: function get() {
|
|
81
|
-
return '
|
|
81
|
+
return 'y0glq1g3x7.execute-api.us-east-1.amazonaws.com/dev';
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
|
@@ -92,7 +92,7 @@ module.exports = function () {
|
|
|
92
92
|
}, {
|
|
93
93
|
key: 'stagingHost',
|
|
94
94
|
get: function get() {
|
|
95
|
-
return '
|
|
95
|
+
return 'y0glq1g3x7.execute-api.us-east-1.amazonaws.com/dev';
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
/**
|
|
@@ -106,7 +106,7 @@ module.exports = function () {
|
|
|
106
106
|
}, {
|
|
107
107
|
key: 'productionHost',
|
|
108
108
|
get: function get() {
|
|
109
|
-
return '
|
|
109
|
+
return 'o77obtxxr4.execute-api.us-east-1.amazonaws.com/prod';
|
|
110
110
|
}
|
|
111
111
|
}]);
|
|
112
112
|
|
|
@@ -1117,7 +1117,7 @@ module.exports = function () {
|
|
|
1117
1117
|
return {
|
|
1118
1118
|
JwtGateway: JwtGateway,
|
|
1119
1119
|
PortfolioGateway: PortfolioGateway,
|
|
1120
|
-
version: '1.1.
|
|
1120
|
+
version: '1.1.34'
|
|
1121
1121
|
};
|
|
1122
1122
|
}();
|
|
1123
1123
|
|
|
@@ -5584,9 +5584,9 @@ module.exports = function () {
|
|
|
5584
5584
|
assert.argumentIsRequired(a, 'a', Decimal, 'Decimal');
|
|
5585
5585
|
assert.argumentIsRequired(b, 'b', Decimal, 'Decimal');
|
|
5586
5586
|
|
|
5587
|
-
if (a._big.gt(b
|
|
5587
|
+
if (a._big.gt(b)) {
|
|
5588
5588
|
return 1;
|
|
5589
|
-
} else if (a._big.lt(b
|
|
5589
|
+
} else if (a._big.lt(b)) {
|
|
5590
5590
|
return -1;
|
|
5591
5591
|
} else {
|
|
5592
5592
|
return 0;
|
|
@@ -9172,27 +9172,15 @@ module.exports = (() => {
|
|
|
9172
9172
|
* @param {String} alternateDescription
|
|
9173
9173
|
* @param {String} code
|
|
9174
9174
|
* @param {Boolean} canReinvest
|
|
9175
|
-
* @param {Boolean} usesSymbols
|
|
9176
9175
|
*/
|
|
9177
9176
|
class InstrumentType extends Enum {
|
|
9178
|
-
constructor(code, description, alternateDescription, canReinvest
|
|
9177
|
+
constructor(code, description, alternateDescription, canReinvest) {
|
|
9179
9178
|
super(code, description);
|
|
9180
9179
|
|
|
9181
|
-
assert.argumentIsRequired(alternateDescription, 'alternateDescription', String);
|
|
9182
|
-
assert.argumentIsRequired(canReinvest, 'canReinvest', Boolean);
|
|
9183
|
-
assert.argumentIsRequired(usesSymbols, 'usesSymbols', Boolean);
|
|
9184
|
-
|
|
9185
9180
|
this._alternateDescription = alternateDescription;
|
|
9186
9181
|
this._canReinvest = canReinvest;
|
|
9187
|
-
this._usesSymbols = usesSymbols;
|
|
9188
9182
|
}
|
|
9189
9183
|
|
|
9190
|
-
/**
|
|
9191
|
-
* A human-readable description.
|
|
9192
|
-
*
|
|
9193
|
-
* @public
|
|
9194
|
-
* @return {String}
|
|
9195
|
-
*/
|
|
9196
9184
|
get alternateDescription() {
|
|
9197
9185
|
return this._alternateDescription;
|
|
9198
9186
|
}
|
|
@@ -9200,28 +9188,16 @@ module.exports = (() => {
|
|
|
9200
9188
|
/**
|
|
9201
9189
|
* Indicates if the instrument type allows automatic reinvestment.
|
|
9202
9190
|
*
|
|
9203
|
-
* @public
|
|
9204
9191
|
* @returns {Boolean}
|
|
9205
9192
|
*/
|
|
9206
9193
|
get canReinvest() {
|
|
9207
9194
|
return this._canReinvest;
|
|
9208
9195
|
}
|
|
9209
9196
|
|
|
9210
|
-
/**
|
|
9211
|
-
* Indicates if an instrument of this type can be represented by a symbol.
|
|
9212
|
-
*
|
|
9213
|
-
* @public
|
|
9214
|
-
* @returns {Boolean}
|
|
9215
|
-
*/
|
|
9216
|
-
get usesSymbols() {
|
|
9217
|
-
return this._usesSymbols;
|
|
9218
|
-
}
|
|
9219
|
-
|
|
9220
9197
|
/**
|
|
9221
9198
|
* Cash.
|
|
9222
9199
|
*
|
|
9223
9200
|
* @public
|
|
9224
|
-
* @static
|
|
9225
9201
|
* @returns {InstrumentType}
|
|
9226
9202
|
*/
|
|
9227
9203
|
static get CASH() {
|
|
@@ -9232,7 +9208,6 @@ module.exports = (() => {
|
|
|
9232
9208
|
* An equity issue.
|
|
9233
9209
|
*
|
|
9234
9210
|
* @public
|
|
9235
|
-
* @static
|
|
9236
9211
|
* @returns {InstrumentType}
|
|
9237
9212
|
*/
|
|
9238
9213
|
static get EQUITY() {
|
|
@@ -9243,7 +9218,6 @@ module.exports = (() => {
|
|
|
9243
9218
|
* A mutual fund.
|
|
9244
9219
|
*
|
|
9245
9220
|
* @public
|
|
9246
|
-
* @static
|
|
9247
9221
|
* @returns {InstrumentType}
|
|
9248
9222
|
*/
|
|
9249
9223
|
static get FUND() {
|
|
@@ -9254,7 +9228,6 @@ module.exports = (() => {
|
|
|
9254
9228
|
* An undefined asset (e.g. a house, or a collectible, or a salvaged alien spaceship).
|
|
9255
9229
|
*
|
|
9256
9230
|
* @public
|
|
9257
|
-
* @static
|
|
9258
9231
|
* @returns {InstrumentType}
|
|
9259
9232
|
*/
|
|
9260
9233
|
static get OTHER() {
|
|
@@ -9266,10 +9239,10 @@ module.exports = (() => {
|
|
|
9266
9239
|
}
|
|
9267
9240
|
}
|
|
9268
9241
|
|
|
9269
|
-
const cash = new InstrumentType('CASH', 'cash', 'Cash', false
|
|
9270
|
-
const equity = new InstrumentType('EQUITY', 'equity', 'Equities', true
|
|
9271
|
-
const fund = new InstrumentType('FUND', 'mutual fund', 'Funds', true
|
|
9272
|
-
const other = new InstrumentType('OTHER', 'other', 'Other', false
|
|
9242
|
+
const cash = new InstrumentType('CASH', 'cash', 'Cash', false);
|
|
9243
|
+
const equity = new InstrumentType('EQUITY', 'equity', 'Equities', true);
|
|
9244
|
+
const fund = new InstrumentType('FUND', 'mutual fund', 'Funds', true);
|
|
9245
|
+
const other = new InstrumentType('OTHER', 'other', 'Other', false);
|
|
9273
9246
|
|
|
9274
9247
|
return InstrumentType;
|
|
9275
9248
|
})();
|
|
@@ -9278,7 +9251,6 @@ module.exports = (() => {
|
|
|
9278
9251
|
const array = require('@barchart/common-js/lang/array'),
|
|
9279
9252
|
assert = require('@barchart/common-js/lang/assert'),
|
|
9280
9253
|
Day = require('@barchart/common-js/lang/Day'),
|
|
9281
|
-
Decimal = require('@barchart/common-js/lang/Decimal'),
|
|
9282
9254
|
Enum = require('@barchart/common-js/lang/Enum'),
|
|
9283
9255
|
is = require('@barchart/common-js/lang/is');
|
|
9284
9256
|
|
|
@@ -9294,68 +9266,23 @@ module.exports = (() => {
|
|
|
9294
9266
|
* @param {String} description
|
|
9295
9267
|
* @param {Function} rangeCalculator
|
|
9296
9268
|
* @param {Function} startDateCalculator
|
|
9297
|
-
* @param {Function} descriptionCalculator
|
|
9298
9269
|
*/
|
|
9299
9270
|
class PositionSummaryFrame extends Enum {
|
|
9300
|
-
constructor(code, description, rangeCalculator, startDateCalculator
|
|
9271
|
+
constructor(code, description, rangeCalculator, startDateCalculator) {
|
|
9301
9272
|
super(code, description);
|
|
9302
9273
|
|
|
9303
9274
|
assert.argumentIsRequired(rangeCalculator, 'rangeCalculator', Function);
|
|
9304
|
-
assert.argumentIsRequired(startDateCalculator, 'startDateCalculator', Function);
|
|
9305
|
-
assert.argumentIsRequired(descriptionCalculator, 'descriptionCalculator', Function);
|
|
9306
9275
|
|
|
9307
9276
|
this._rangeCalculator = rangeCalculator;
|
|
9308
9277
|
this._startDateCalculator = startDateCalculator;
|
|
9309
|
-
this._descriptionCalculator = descriptionCalculator;
|
|
9310
9278
|
}
|
|
9311
9279
|
|
|
9312
|
-
/**
|
|
9313
|
-
* Returns a human-readable description of the frame, given
|
|
9314
|
-
* start and end dates.
|
|
9315
|
-
*
|
|
9316
|
-
* @public
|
|
9317
|
-
* @param {Day} startDate
|
|
9318
|
-
* @param {Day} endDate
|
|
9319
|
-
* @return {String}
|
|
9320
|
-
*/
|
|
9321
|
-
describeRange(startDate, endDate) {
|
|
9322
|
-
return this._descriptionCalculator(startDate, endDate);
|
|
9323
|
-
}
|
|
9324
|
-
|
|
9325
|
-
/**
|
|
9326
|
-
* Returns the most recent ranges for the frame.
|
|
9327
|
-
*
|
|
9328
|
-
* @public
|
|
9329
|
-
* @param {Number} periods
|
|
9330
|
-
* @returns {Array.<PositionSummaryRange>}
|
|
9331
|
-
*/
|
|
9332
|
-
getRecentRanges(periods) {
|
|
9333
|
-
const startDate = this.getStartDate(periods);
|
|
9334
|
-
const transaction = { date: startDate, snapshot: { open: Decimal.ONE } };
|
|
9335
|
-
|
|
9336
|
-
return this.getRanges([ transaction ]);
|
|
9337
|
-
}
|
|
9338
|
-
|
|
9339
|
-
/**
|
|
9340
|
-
* Returns the ranges for the set of {@link Transaction} objects.
|
|
9341
|
-
*
|
|
9342
|
-
* @public
|
|
9343
|
-
* @param {Array.<Transaction>} transactions
|
|
9344
|
-
* @returns {Array.<PositionSummaryRange>}
|
|
9345
|
-
*/
|
|
9346
9280
|
getRanges(transactions) {
|
|
9347
9281
|
assert.argumentIsArray(transactions, 'transactions');
|
|
9348
9282
|
|
|
9349
9283
|
return this._rangeCalculator(getFilteredTransactions(transactions));
|
|
9350
9284
|
}
|
|
9351
9285
|
|
|
9352
|
-
/**
|
|
9353
|
-
* Returns the start date for a frame, a given number of periods ago.
|
|
9354
|
-
*
|
|
9355
|
-
* @public
|
|
9356
|
-
* @param {Number} periods
|
|
9357
|
-
* @returns {Day}
|
|
9358
|
-
*/
|
|
9359
9286
|
getStartDate(periods) {
|
|
9360
9287
|
assert.argumentIsRequired(periods, 'periods', Number);
|
|
9361
9288
|
|
|
@@ -9407,19 +9334,10 @@ module.exports = (() => {
|
|
|
9407
9334
|
}
|
|
9408
9335
|
}
|
|
9409
9336
|
|
|
9410
|
-
const yearly = new PositionSummaryFrame('YEARLY', 'year', getYearlyRanges, getYearlyStartDate
|
|
9411
|
-
const quarterly = new PositionSummaryFrame('QUARTER', 'quarter', getQuarterlyRanges, getQuarterlyStartDate
|
|
9412
|
-
const monthly = new PositionSummaryFrame('MONTH', 'month', getMonthlyRanges, getMonthlyStartDate
|
|
9413
|
-
const ytd = new PositionSummaryFrame('YTD', 'year-to-date', getYearToDateRanges, getYearToDateStartDate
|
|
9414
|
-
|
|
9415
|
-
/**
|
|
9416
|
-
* The start and and date for a {@link PositionSummaryFrame}
|
|
9417
|
-
*
|
|
9418
|
-
* @typedef PositionSummaryRange
|
|
9419
|
-
* @type {Object}
|
|
9420
|
-
* @property {Day} start
|
|
9421
|
-
* @property {Day} end
|
|
9422
|
-
*/
|
|
9337
|
+
const yearly = new PositionSummaryFrame('YEARLY', 'year', getYearlyRanges, getYearlyStartDate);
|
|
9338
|
+
const quarterly = new PositionSummaryFrame('QUARTER', 'quarter', getQuarterlyRanges, getQuarterlyStartDate);
|
|
9339
|
+
const monthly = new PositionSummaryFrame('MONTH', 'month', getMonthlyRanges, getMonthlyStartDate);
|
|
9340
|
+
const ytd = new PositionSummaryFrame('YTD', 'year-to-date', getYearToDateRanges, getYearToDateStartDate);
|
|
9423
9341
|
|
|
9424
9342
|
function getRange(start, end) {
|
|
9425
9343
|
return {
|
|
@@ -9503,22 +9421,6 @@ module.exports = (() => {
|
|
|
9503
9421
|
return null;
|
|
9504
9422
|
}
|
|
9505
9423
|
|
|
9506
|
-
function getYearlyRangeDescription(startDate, endDate) {
|
|
9507
|
-
return endDate.year.toString();
|
|
9508
|
-
}
|
|
9509
|
-
|
|
9510
|
-
function getQuarterlyRangeDescription(startDate, endDate) {
|
|
9511
|
-
return '';
|
|
9512
|
-
}
|
|
9513
|
-
|
|
9514
|
-
function getMonthlyRangeDescription(startDate, endDate) {
|
|
9515
|
-
return '';
|
|
9516
|
-
}
|
|
9517
|
-
|
|
9518
|
-
function getYearToDateRangeDescription(startDate, endDate) {
|
|
9519
|
-
return `${endDate.year.toString()} YTD`;
|
|
9520
|
-
}
|
|
9521
|
-
|
|
9522
9424
|
function getFilteredTransactions(transactions) {
|
|
9523
9425
|
return transactions.reduce((filtered, transaction) => {
|
|
9524
9426
|
if (!transaction.snapshot.open.getIsZero() || transaction.type.closing) {
|
|
@@ -9532,7 +9434,7 @@ module.exports = (() => {
|
|
|
9532
9434
|
return PositionSummaryFrame;
|
|
9533
9435
|
})();
|
|
9534
9436
|
|
|
9535
|
-
},{"@barchart/common-js/lang/Day":29,"@barchart/common-js/lang/
|
|
9437
|
+
},{"@barchart/common-js/lang/Day":29,"@barchart/common-js/lang/Enum":32,"@barchart/common-js/lang/array":36,"@barchart/common-js/lang/assert":37,"@barchart/common-js/lang/is":40}],53:[function(require,module,exports){
|
|
9536
9438
|
const assert = require('@barchart/common-js/lang/assert'),
|
|
9537
9439
|
Enum = require('@barchart/common-js/lang/Enum');
|
|
9538
9440
|
|
|
@@ -9546,7 +9448,6 @@ module.exports = (() => {
|
|
|
9546
9448
|
* @extends {Enum}
|
|
9547
9449
|
* @param {String} code
|
|
9548
9450
|
* @param {String} description
|
|
9549
|
-
* @param {String} display
|
|
9550
9451
|
* @param {Boolean} purchase
|
|
9551
9452
|
* @param {Boolean} sale
|
|
9552
9453
|
* @param {Boolean} income
|
|
@@ -9554,17 +9455,15 @@ module.exports = (() => {
|
|
|
9554
9455
|
* @param {Boolean} closing
|
|
9555
9456
|
*/
|
|
9556
9457
|
class TransactionType extends Enum {
|
|
9557
|
-
constructor(code, description,
|
|
9458
|
+
constructor(code, description, purchase, sale, income, opening, closing) {
|
|
9558
9459
|
super(code, description);
|
|
9559
9460
|
|
|
9560
|
-
assert.argumentIsRequired(display, 'display', String);
|
|
9561
9461
|
assert.argumentIsRequired(purchase, 'purchase', Boolean);
|
|
9562
9462
|
assert.argumentIsRequired(sale, 'sale', Boolean);
|
|
9563
9463
|
assert.argumentIsRequired(income, 'income', Boolean);
|
|
9564
9464
|
assert.argumentIsRequired(opening, 'opening', Boolean);
|
|
9565
9465
|
assert.argumentIsRequired(closing, 'closing', Boolean);
|
|
9566
9466
|
|
|
9567
|
-
this._display = display;
|
|
9568
9467
|
this._purchase = purchase;
|
|
9569
9468
|
this._sale = sale;
|
|
9570
9469
|
this._income = income;
|
|
@@ -9572,16 +9471,6 @@ module.exports = (() => {
|
|
|
9572
9471
|
this._closing = closing;
|
|
9573
9472
|
}
|
|
9574
9473
|
|
|
9575
|
-
/**
|
|
9576
|
-
* A human-readable description of the transaction type.
|
|
9577
|
-
*
|
|
9578
|
-
* @public
|
|
9579
|
-
* @returns {String}
|
|
9580
|
-
*/
|
|
9581
|
-
get display() {
|
|
9582
|
-
return this._display;
|
|
9583
|
-
}
|
|
9584
|
-
|
|
9585
9474
|
/**
|
|
9586
9475
|
* Indicates if the transaction was a trade.
|
|
9587
9476
|
*
|
|
@@ -9847,27 +9736,27 @@ module.exports = (() => {
|
|
|
9847
9736
|
}
|
|
9848
9737
|
}
|
|
9849
9738
|
|
|
9850
|
-
const buy = new TransactionType('B', 'Buy',
|
|
9851
|
-
const sell = new TransactionType('S', 'Sell',
|
|
9852
|
-
const buyShort = new TransactionType('BS', 'Buy To Cover',
|
|
9853
|
-
const sellShort = new TransactionType('SS', 'Sell Short',
|
|
9854
|
-
const dividend = new TransactionType('DV', 'Dividend',
|
|
9855
|
-
const dividendReinvest = new TransactionType('DX', 'Dividend (Reinvested)',
|
|
9856
|
-
const dividendStock = new TransactionType('DS', 'Dividend (Stock)',
|
|
9857
|
-
const split = new TransactionType('SP', 'Split',
|
|
9858
|
-
const fee = new TransactionType('F', 'Fee',
|
|
9859
|
-
const feeUnits = new TransactionType('FU', 'Fee
|
|
9739
|
+
const buy = new TransactionType('B', 'Buy', true, false, false, true, false);
|
|
9740
|
+
const sell = new TransactionType('S', 'Sell', false, true, false, false, true);
|
|
9741
|
+
const buyShort = new TransactionType('BS', 'Buy To Cover', true, false, false, false, true);
|
|
9742
|
+
const sellShort = new TransactionType('SS', 'Sell Short', false, true, false, true, false);
|
|
9743
|
+
const dividend = new TransactionType('DV', 'Dividend', false, false, true, false, false);
|
|
9744
|
+
const dividendReinvest = new TransactionType('DX', 'Dividend (Reinvested)', false, false, false, true, false);
|
|
9745
|
+
const dividendStock = new TransactionType('DS', 'Dividend (Stock)', false, false, false, true, false);
|
|
9746
|
+
const split = new TransactionType('SP', 'Split', false, false, false, true, false);
|
|
9747
|
+
const fee = new TransactionType('F', 'Fee', false, false, false, true, false);
|
|
9748
|
+
const feeUnits = new TransactionType('FU', 'Fee', false, false, false, false, false);
|
|
9860
9749
|
|
|
9861
|
-
const distributionCash = new TransactionType('DC', 'Distribution (Cash)',
|
|
9862
|
-
const distributionFund = new TransactionType('DF', 'Distribution (Units)',
|
|
9750
|
+
const distributionCash = new TransactionType('DC', 'Distribution (Cash)', false, false, true, false, false);
|
|
9751
|
+
const distributionFund = new TransactionType('DF', 'Distribution (Units)', false, false, false, true, false);
|
|
9863
9752
|
|
|
9864
|
-
const deposit = new TransactionType('D', 'Deposit',
|
|
9865
|
-
const withdrawal = new TransactionType('W', 'Withdrawal',
|
|
9866
|
-
const debit = new TransactionType('DR', 'Debit',
|
|
9867
|
-
const credit = new TransactionType('CR', 'Credit',
|
|
9753
|
+
const deposit = new TransactionType('D', 'Deposit', false, false, false, true, false);
|
|
9754
|
+
const withdrawal = new TransactionType('W', 'Withdrawal', false, false, false, false, true);
|
|
9755
|
+
const debit = new TransactionType('DR', 'Debit', false, false, false, false, true);
|
|
9756
|
+
const credit = new TransactionType('CR', 'Credit', false, false, false, true, false);
|
|
9868
9757
|
|
|
9869
|
-
const valuation = new TransactionType('V', 'Valuation',
|
|
9870
|
-
const income = new TransactionType('I', 'Income',
|
|
9758
|
+
const valuation = new TransactionType('V', 'Valuation', false, false, false, false, false);
|
|
9759
|
+
const income = new TransactionType('I', 'Income', false, false, true, false, false);
|
|
9871
9760
|
|
|
9872
9761
|
return TransactionType;
|
|
9873
9762
|
})();
|
|
@@ -10092,7 +9981,6 @@ module.exports = (() => {
|
|
|
10092
9981
|
);
|
|
10093
9982
|
|
|
10094
9983
|
const update = new PortfolioSchema(SchemaBuilder.withName('update')
|
|
10095
|
-
.withField('portfolio', DataType.STRING)
|
|
10096
9984
|
.withField('name', DataType.STRING)
|
|
10097
9985
|
.withField('timezone', DataType.forEnum(Timezones, 'Timezone'), true)
|
|
10098
9986
|
.withField('defaults.currency', DataType.forEnum(Currency, 'Currency'), true)
|
|
@@ -10368,8 +10256,7 @@ const assert = require('@barchart/common-js/lang/assert'),
|
|
|
10368
10256
|
Schema = require('@barchart/common-js/serialization/json/Schema'),
|
|
10369
10257
|
SchemaBuilder = require('@barchart/common-js/serialization/json/builders/SchemaBuilder');
|
|
10370
10258
|
|
|
10371
|
-
const
|
|
10372
|
-
TransactionType = require('./../data/TransactionType');
|
|
10259
|
+
const TransactionType = require('./../data/TransactionType');
|
|
10373
10260
|
|
|
10374
10261
|
module.exports = (() => {
|
|
10375
10262
|
'use strict';
|
|
@@ -10521,7 +10408,7 @@ module.exports = (() => {
|
|
|
10521
10408
|
}
|
|
10522
10409
|
|
|
10523
10410
|
toString() {
|
|
10524
|
-
return
|
|
10411
|
+
return '[TransactionSchema]';
|
|
10525
10412
|
}
|
|
10526
10413
|
}
|
|
10527
10414
|
|
|
@@ -10607,11 +10494,12 @@ module.exports = (() => {
|
|
|
10607
10494
|
.withField('portfolio', DataType.STRING)
|
|
10608
10495
|
.withField('position', DataType.STRING)
|
|
10609
10496
|
.withField('type', DataType.forEnum(TransactionType, 'TransactionType'))
|
|
10610
|
-
.withField('instrument.name', DataType.STRING)
|
|
10611
|
-
.withField('instrument.type', DataType.
|
|
10612
|
-
.withField('instrument.currency', DataType.forEnum(Currency, 'Currency'))
|
|
10497
|
+
.withField('instrument.name', DataType.STRING, true)
|
|
10498
|
+
.withField('instrument.type', DataType.STRING, true)
|
|
10499
|
+
.withField('instrument.currency', DataType.forEnum(Currency, 'Currency'), true)
|
|
10613
10500
|
.withField('instrument.symbol.barchart', DataType.STRING, true)
|
|
10614
10501
|
.withField('instrument.symbol.display', DataType.STRING, true)
|
|
10502
|
+
.withField('currency', DataType.forEnum(Currency, 'Currency'))
|
|
10615
10503
|
.withField('date', DataType.DAY)
|
|
10616
10504
|
.withField('price', DataType.DECIMAL)
|
|
10617
10505
|
.withField('quantity', DataType.DECIMAL)
|
|
@@ -10634,9 +10522,9 @@ module.exports = (() => {
|
|
|
10634
10522
|
.withField('portfolio', DataType.STRING)
|
|
10635
10523
|
.withField('position', DataType.STRING)
|
|
10636
10524
|
.withField('type', DataType.forEnum(TransactionType, 'TransactionType'))
|
|
10637
|
-
.withField('instrument.name', DataType.STRING)
|
|
10638
|
-
.withField('instrument.type', DataType.
|
|
10639
|
-
.withField('instrument.currency', DataType.forEnum(Currency, 'Currency'))
|
|
10525
|
+
.withField('instrument.name', DataType.STRING, true)
|
|
10526
|
+
.withField('instrument.type', DataType.STRING, true)
|
|
10527
|
+
.withField('instrument.currency', DataType.forEnum(Currency, 'Currency'), true)
|
|
10640
10528
|
.withField('instrument.symbol.barchart', DataType.STRING, true)
|
|
10641
10529
|
.withField('instrument.symbol.display', DataType.STRING, true)
|
|
10642
10530
|
.withField('date', DataType.DAY)
|
|
@@ -10750,8 +10638,11 @@ module.exports = (() => {
|
|
|
10750
10638
|
.withField('portfolio', DataType.STRING)
|
|
10751
10639
|
.withField('position', DataType.STRING)
|
|
10752
10640
|
.withField('type', DataType.forEnum(TransactionType, 'TransactionType'))
|
|
10753
|
-
.withField('instrument.
|
|
10754
|
-
.withField('instrument.
|
|
10641
|
+
.withField('instrument.name', DataType.STRING, true)
|
|
10642
|
+
.withField('instrument.type', DataType.STRING, true)
|
|
10643
|
+
.withField('instrument.currency', DataType.forEnum(Currency, 'Currency'), true)
|
|
10644
|
+
.withField('instrument.symbol.barchart', DataType.STRING, true)
|
|
10645
|
+
.withField('instrument.symbol.display', DataType.STRING, true)
|
|
10755
10646
|
.withField('date', DataType.DAY)
|
|
10756
10647
|
.withField('amount', DataType.DECIMAL)
|
|
10757
10648
|
.withField('fee', DataType.DECIMAL, true)
|
|
@@ -10832,7 +10723,7 @@ module.exports = (() => {
|
|
|
10832
10723
|
return TransactionSchema;
|
|
10833
10724
|
})();
|
|
10834
10725
|
|
|
10835
|
-
},{"./../data/
|
|
10726
|
+
},{"./../data/TransactionType":53,"@barchart/common-js/lang/Currency":28,"@barchart/common-js/lang/Enum":32,"@barchart/common-js/lang/assert":37,"@barchart/common-js/lang/is":40,"@barchart/common-js/serialization/json/DataType":45,"@barchart/common-js/serialization/json/Schema":47,"@barchart/common-js/serialization/json/builders/SchemaBuilder":49}],59:[function(require,module,exports){
|
|
10836
10727
|
'use strict';
|
|
10837
10728
|
|
|
10838
10729
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
@@ -30,7 +30,7 @@ module.exports = (() => {
|
|
|
30
30
|
* @returns {String}
|
|
31
31
|
*/
|
|
32
32
|
static get developmentHost() {
|
|
33
|
-
return '
|
|
33
|
+
return 'y0glq1g3x7.execute-api.us-east-1.amazonaws.com/dev';
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
|
|
@@ -42,7 +42,7 @@ module.exports = (() => {
|
|
|
42
42
|
* @returns {String}
|
|
43
43
|
*/
|
|
44
44
|
static get stagingHost() {
|
|
45
|
-
return '
|
|
45
|
+
return 'y0glq1g3x7.execute-api.us-east-1.amazonaws.com/dev';
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
@@ -53,7 +53,7 @@ module.exports = (() => {
|
|
|
53
53
|
* @returns {String}
|
|
54
54
|
*/
|
|
55
55
|
static get productionHost() {
|
|
56
|
-
return '
|
|
56
|
+
return 'o77obtxxr4.execute-api.us-east-1.amazonaws.com/prod';
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
toString() {
|
package/lib/index.js
CHANGED