@barchart/portfolio-api-common 1.0.22 → 1.0.23
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.
|
@@ -42,6 +42,15 @@ module.exports = (() => {
|
|
|
42
42
|
return create;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* @static
|
|
47
|
+
* @public
|
|
48
|
+
* @returns {PortfolioSchema}
|
|
49
|
+
*/
|
|
50
|
+
static get CLIENT() {
|
|
51
|
+
return client;
|
|
52
|
+
}
|
|
53
|
+
|
|
45
54
|
/**
|
|
46
55
|
* @static
|
|
47
56
|
* @public
|
|
@@ -65,7 +74,29 @@ module.exports = (() => {
|
|
|
65
74
|
}
|
|
66
75
|
}
|
|
67
76
|
|
|
68
|
-
const complete = new PortfolioSchema(SchemaBuilder.withName('
|
|
77
|
+
const complete = new PortfolioSchema(SchemaBuilder.withName('complete')
|
|
78
|
+
.withField('user', DataType.STRING)
|
|
79
|
+
.withField('portfolio', DataType.STRING)
|
|
80
|
+
.withField('name', DataType.STRING)
|
|
81
|
+
.withField('timezone', DataType.forEnum(Timezones, 'Timezone'))
|
|
82
|
+
.withField('dates.create', DataType.DAY)
|
|
83
|
+
.withField('dates.cash', DataType.DAY, true)
|
|
84
|
+
.withField('defaults.currency', DataType.forEnum(Currency, 'Currency'))
|
|
85
|
+
.withField('defaults.reinvest', DataType.BOOLEAN, true)
|
|
86
|
+
.withField('defaults.valuation', DataType.forEnum(ValuationType, 'ValuationType'))
|
|
87
|
+
.withField('legacy.system', DataType.STRING, true)
|
|
88
|
+
.withField('legacy.user', DataType.STRING, true)
|
|
89
|
+
.withField('legacy.portfolio', DataType.STRING, true)
|
|
90
|
+
.withField('legacy.warnings', DataType.NUMBER, true)
|
|
91
|
+
.withField('legacy.drops', DataType.NUMBER, true)
|
|
92
|
+
.withField('miscellany', DataType.AD_HOC, true)
|
|
93
|
+
.withField('system.sequence', DataType.NUMBER)
|
|
94
|
+
.withField('system.version', DataType.STRING)
|
|
95
|
+
.withField('system.timestamp', DataType.TIMESTAMP)
|
|
96
|
+
.schema
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
const client = new PortfolioSchema(SchemaBuilder.withName('client')
|
|
69
100
|
.withField('user', DataType.STRING)
|
|
70
101
|
.withField('portfolio', DataType.STRING)
|
|
71
102
|
.withField('name', DataType.STRING)
|
|
@@ -81,11 +112,10 @@ module.exports = (() => {
|
|
|
81
112
|
.withField('legacy.warnings', DataType.NUMBER, true)
|
|
82
113
|
.withField('legacy.drops', DataType.NUMBER, true)
|
|
83
114
|
.withField('miscellany', DataType.AD_HOC, true)
|
|
84
|
-
.withField('system.version', DataType.NUMBER, true)
|
|
85
115
|
.schema
|
|
86
116
|
);
|
|
87
117
|
|
|
88
|
-
const create = new PortfolioSchema(SchemaBuilder.withName('
|
|
118
|
+
const create = new PortfolioSchema(SchemaBuilder.withName('create')
|
|
89
119
|
.withField('name', DataType.STRING)
|
|
90
120
|
.withField('timezone', DataType.forEnum(Timezones, 'Timezone'))
|
|
91
121
|
.withField('dates.create', DataType.DAY)
|
|
@@ -97,7 +127,7 @@ module.exports = (() => {
|
|
|
97
127
|
.schema
|
|
98
128
|
);
|
|
99
129
|
|
|
100
|
-
const update = new PortfolioSchema(SchemaBuilder.withName('
|
|
130
|
+
const update = new PortfolioSchema(SchemaBuilder.withName('update')
|
|
101
131
|
.withField('name', DataType.STRING)
|
|
102
132
|
.withField('timezone', DataType.forEnum(Timezones, 'Timezone'))
|
|
103
133
|
.withField('dates.cash', DataType.DAY, true)
|