@barchart/portfolio-api-common 1.0.9 → 1.0.13

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.
@@ -36,6 +36,10 @@ module.exports = (() => {
36
36
  return complete;
37
37
  }
38
38
 
39
+ static get UPDATE() {
40
+ return update;
41
+ }
42
+
39
43
  toString() {
40
44
  return '[PortfolioSchema]';
41
45
  }
@@ -61,8 +65,6 @@ module.exports = (() => {
61
65
  );
62
66
 
63
67
  const create = new PortfolioSchema(SchemaBuilder.withName('Create')
64
- .withField('user', DataType.STRING)
65
- .withField('portfolio', DataType.STRING)
66
68
  .withField('name', DataType.STRING)
67
69
  .withField('timezone', DataType.forEnum(Timezones, 'Timezone'))
68
70
  .withField('dates.create', DataType.DAY)
@@ -70,9 +72,17 @@ module.exports = (() => {
70
72
  .withField('defaults.currency', DataType.forEnum(Currency, 'Currency'))
71
73
  .withField('defaults.reinvest', DataType.BOOLEAN, true)
72
74
  .withField('defaults.valuation', DataType.forEnum(ValuationType, 'ValuationType'))
73
- .withField('legacy.system', DataType.STRING, true)
74
- .withField('legacy.user', DataType.STRING, true)
75
- .withField('system.version', DataType.NUMBER, true)
75
+ .schema
76
+ );
77
+
78
+ const update = new PortfolioSchema(SchemaBuilder.withName('Update')
79
+ .withField('portfolio', DataType.STRING)
80
+ .withField('name', DataType.STRING)
81
+ .withField('timezone', DataType.forEnum(Timezones, 'Timezone'))
82
+ .withField('dates.cash', DataType.DAY, true)
83
+ .withField('defaults.currency', DataType.forEnum(Currency, 'Currency'))
84
+ .withField('defaults.reinvest', DataType.BOOLEAN, true)
85
+ .withField('defaults.valuation', DataType.forEnum(ValuationType, 'ValuationType'))
76
86
  .schema
77
87
  );
78
88
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.9",
3
+ "version": "1.0.13",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",