@barchart/portfolio-api-common 1.0.77 → 1.0.78

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.
@@ -6,7 +6,8 @@ const assert = require('@barchart/common-js/lang/assert'),
6
6
  Schema = require('@barchart/common-js/serialization/json/Schema'),
7
7
  SchemaBuilder = require('@barchart/common-js/serialization/json/builders/SchemaBuilder');
8
8
 
9
- const TransactionType = require('./../data/TransactionType');
9
+ const InstrumentType = require('./../data/InstrumentType'),
10
+ TransactionType = require('./../data/TransactionType');
10
11
 
11
12
  module.exports = (() => {
12
13
  'use strict';
@@ -244,9 +245,9 @@ module.exports = (() => {
244
245
  .withField('portfolio', DataType.STRING)
245
246
  .withField('position', DataType.STRING)
246
247
  .withField('type', DataType.forEnum(TransactionType, 'TransactionType'))
247
- .withField('instrument.name', DataType.STRING, true)
248
- .withField('instrument.type', DataType.STRING, true)
249
- .withField('instrument.currency', DataType.forEnum(Currency, 'Currency'), true)
248
+ .withField('instrument.name', DataType.STRING)
249
+ .withField('instrument.type', DataType.forEnum(InstrumentType, 'InstrumentType'))
250
+ .withField('instrument.currency', DataType.forEnum(Currency, 'Currency'))
250
251
  .withField('instrument.symbol.barchart', DataType.STRING, true)
251
252
  .withField('instrument.symbol.display', DataType.STRING, true)
252
253
  .withField('date', DataType.DAY)
@@ -271,9 +272,9 @@ module.exports = (() => {
271
272
  .withField('portfolio', DataType.STRING)
272
273
  .withField('position', DataType.STRING)
273
274
  .withField('type', DataType.forEnum(TransactionType, 'TransactionType'))
274
- .withField('instrument.name', DataType.STRING, true)
275
- .withField('instrument.type', DataType.STRING, true)
276
- .withField('instrument.currency', DataType.forEnum(Currency, 'Currency'), true)
275
+ .withField('instrument.name', DataType.STRING)
276
+ .withField('instrument.type', DataType.forEnum(InstrumentType, 'InstrumentType'))
277
+ .withField('instrument.currency', DataType.forEnum(Currency, 'Currency'))
277
278
  .withField('instrument.symbol.barchart', DataType.STRING, true)
278
279
  .withField('instrument.symbol.display', DataType.STRING, true)
279
280
  .withField('date', DataType.DAY)
@@ -387,8 +388,8 @@ module.exports = (() => {
387
388
  .withField('portfolio', DataType.STRING)
388
389
  .withField('position', DataType.STRING)
389
390
  .withField('type', DataType.forEnum(TransactionType, 'TransactionType'))
390
- .withField('instrument.type', DataType.STRING, true)
391
- .withField('instrument.currency', DataType.forEnum(Currency, 'Currency'), true)
391
+ .withField('instrument.type', DataType.forEnum(InstrumentType, 'InstrumentType'))
392
+ .withField('instrument.currency', DataType.forEnum(Currency, 'Currency'))
392
393
  .withField('date', DataType.DAY)
393
394
  .withField('amount', DataType.DECIMAL)
394
395
  .withField('fee', DataType.DECIMAL, true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.77",
3
+ "version": "1.0.78",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",