@barchart/portfolio-api-common 7.5.0 → 7.5.2

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.
@@ -5,6 +5,7 @@ const Currency = require('@barchart/common-js/lang/Currency'),
5
5
  Timezones = require('@barchart/common-js/lang/Timezones');
6
6
 
7
7
  const SnapTradeLinkStatus = require('./../data/SnapTradeLinkStatus'),
8
+ SnapTradeLinkMode = require('./../data/SnapTradeLinkMode'),
8
9
  ValuationType = require('./../data/ValuationType');
9
10
 
10
11
  module.exports = (() => {
@@ -96,96 +97,123 @@ module.exports = (() => {
96
97
  const complete = new PortfolioSchema(SchemaBuilder.withName('complete')
97
98
  .withField('user', DataType.STRING)
98
99
  .withField('portfolio', DataType.STRING)
100
+
99
101
  .withField('name', DataType.STRING)
100
102
  .withField('timezone', DataType.forEnum(Timezones, 'Timezone'))
103
+ .withField('miscellany', DataType.AD_HOC, true)
104
+ .withField('email', DataType.AD_HOC, true)
105
+
101
106
  .withField('dates.create', DataType.DAY)
102
107
  .withField('dates.access', DataType.TIMESTAMP, true)
108
+
103
109
  .withField('defaults.cash', DataType.BOOLEAN, true)
104
110
  .withField('defaults.currency', DataType.forEnum(Currency, 'Currency'))
105
111
  .withField('defaults.reinvest', DataType.BOOLEAN, true)
106
112
  .withField('defaults.valuation', DataType.forEnum(ValuationType, 'ValuationType'))
113
+
114
+ .withField('legacy.system', DataType.STRING, true)
115
+ .withField('legacy.user', DataType.STRING, true)
116
+ .withField('legacy.portfolio', DataType.STRING, true)
117
+ .withField('legacy.warnings', DataType.NUMBER, true)
118
+ .withField('legacy.drops', DataType.NUMBER, true)
119
+
107
120
  .withField('snaptrade.connection', DataType.STRING, true)
108
121
  .withField('snaptrade.account', DataType.STRING, true)
109
122
  .withField('snaptrade.broken', DataType.BOOLEAN, true)
110
123
  .withField('snaptrade.timestamp', DataType.TIMESTAMP, true)
124
+
125
+ .withField('snaptrade.brokerage.display', DataType.STRING, true)
126
+ .withField('snaptrade.brokerage.logo', DataType.STRING, true)
127
+
128
+ .withField('snaptrade.link.mode', DataType.forEnum(SnapTradeLinkMode, 'SnapTradeLinkMode'), true)
111
129
  .withField('snaptrade.link.status', DataType.forEnum(SnapTradeLinkStatus, 'SnapTradeLinkStatus'), true)
112
130
  .withField('snaptrade.link.progress', DataType.NUMBER, true)
113
131
  .withField('snaptrade.link.timestamp', DataType.TIMESTAMP, true)
114
- .withField('snaptrade.brokerage.display', DataType.STRING, true)
115
- .withField('snaptrade.brokerage.logo', DataType.STRING, true)
116
- .withField('legacy.system', DataType.STRING, true)
117
- .withField('legacy.user', DataType.STRING, true)
118
- .withField('legacy.portfolio', DataType.STRING, true)
119
- .withField('legacy.warnings', DataType.NUMBER, true)
120
- .withField('legacy.drops', DataType.NUMBER, true)
121
- .withField('miscellany', DataType.AD_HOC, true)
122
- .withField('email', DataType.AD_HOC, true)
123
- .withField('system.calculate.processors', DataType.NUMBER, true)
132
+
124
133
  .withField('system.sequence', DataType.NUMBER)
125
134
  .withField('system.version', DataType.STRING)
126
135
  .withField('system.timestamp', DataType.TIMESTAMP)
136
+ .withField('system.calculate.processors', DataType.NUMBER, true)
137
+
127
138
  .schema
128
139
  );
129
140
 
130
141
  const client = new PortfolioSchema(SchemaBuilder.withName('client')
131
142
  .withField('user', DataType.STRING)
132
143
  .withField('portfolio', DataType.STRING)
144
+
133
145
  .withField('name', DataType.STRING)
134
146
  .withField('timezone', DataType.forEnum(Timezones, 'Timezone'))
147
+ .withField('miscellany', DataType.AD_HOC, true)
148
+ .withField('email', DataType.AD_HOC, true)
149
+
135
150
  .withField('dates.create', DataType.DAY)
136
151
  .withField('dates.access', DataType.TIMESTAMP, true)
152
+
137
153
  .withField('defaults.cash', DataType.BOOLEAN, true)
138
154
  .withField('defaults.currency', DataType.forEnum(Currency, 'Currency'))
139
155
  .withField('defaults.reinvest', DataType.BOOLEAN, true)
140
156
  .withField('defaults.valuation', DataType.forEnum(ValuationType, 'ValuationType'))
157
+
158
+ .withField('legacy.system', DataType.STRING, true)
159
+ .withField('legacy.user', DataType.STRING, true)
160
+ .withField('legacy.portfolio', DataType.STRING, true)
161
+ .withField('legacy.warnings', DataType.NUMBER, true)
162
+ .withField('legacy.drops', DataType.NUMBER, true)
163
+
141
164
  .withField('snaptrade.connection', DataType.STRING, true)
142
165
  .withField('snaptrade.account', DataType.STRING, true)
143
166
  .withField('snaptrade.broken', DataType.BOOLEAN, true)
144
167
  .withField('snaptrade.timestamp', DataType.TIMESTAMP, true)
168
+
169
+ .withField('snaptrade.brokerage.display', DataType.STRING, true)
170
+ .withField('snaptrade.brokerage.logo', DataType.STRING, true)
171
+
172
+ .withField('snaptrade.link.mode', DataType.forEnum(SnapTradeLinkMode, 'SnapTradeLinkMode'), true)
145
173
  .withField('snaptrade.link.status', DataType.forEnum(SnapTradeLinkStatus, 'SnapTradeLinkStatus'), true)
146
174
  .withField('snaptrade.link.progress', DataType.NUMBER, true)
147
175
  .withField('snaptrade.link.timestamp', DataType.TIMESTAMP, true)
148
- .withField('snaptrade.brokerage.display', DataType.STRING, true)
149
- .withField('snaptrade.brokerage.logo', DataType.STRING, true)
150
- .withField('legacy.system', DataType.STRING, true)
151
- .withField('legacy.user', DataType.STRING, true)
152
- .withField('legacy.portfolio', DataType.STRING, true)
153
- .withField('legacy.warnings', DataType.NUMBER, true)
154
- .withField('legacy.drops', DataType.NUMBER, true)
155
- .withField('miscellany', DataType.AD_HOC, true)
156
- .withField('email', DataType.AD_HOC, true)
176
+
157
177
  .withField('system.calculate.processors', DataType.NUMBER, true)
178
+
158
179
  .schema
159
180
  );
160
181
 
161
182
  const name = new PortfolioSchema(SchemaBuilder.withName('name')
162
183
  .withField('user', DataType.STRING)
163
184
  .withField('portfolio', DataType.STRING)
185
+
164
186
  .withField('name', DataType.STRING)
187
+
165
188
  .schema
166
189
  );
167
190
 
168
191
  const create = new PortfolioSchema(SchemaBuilder.withName('create')
169
192
  .withField('name', DataType.STRING)
170
193
  .withField('timezone', DataType.forEnum(Timezones, 'Timezone'))
194
+ .withField('miscellany', DataType.AD_HOC, true)
195
+ .withField('email', DataType.AD_HOC, true)
196
+
171
197
  .withField('defaults.cash', DataType.BOOLEAN, true)
172
198
  .withField('defaults.currency', DataType.forEnum(Currency, 'Currency'), true)
173
199
  .withField('defaults.reinvest', DataType.BOOLEAN, true)
174
200
  .withField('defaults.valuation', DataType.forEnum(ValuationType, 'ValuationType'), true)
175
- .withField('miscellany', DataType.AD_HOC, true)
176
- .withField('email', DataType.AD_HOC, true)
201
+
177
202
  .schema
178
203
  );
179
204
 
180
205
  const update = new PortfolioSchema(SchemaBuilder.withName('update')
181
206
  .withField('portfolio', DataType.STRING)
182
- .withField('name', DataType.STRING)
207
+
183
208
  .withField('timezone', DataType.forEnum(Timezones, 'Timezone'), true)
209
+ .withField('name', DataType.STRING)
210
+ .withField('miscellany', DataType.AD_HOC, true)
211
+ .withField('email', DataType.AD_HOC, true)
212
+
184
213
  .withField('defaults.cash', DataType.BOOLEAN, true)
185
214
  .withField('defaults.currency', DataType.forEnum(Currency, 'Currency'), true)
186
215
  .withField('defaults.reinvest', DataType.BOOLEAN, true)
187
- .withField('miscellany', DataType.AD_HOC, true)
188
- .withField('email', DataType.AD_HOC, true)
216
+
189
217
  .schema
190
218
  );
191
219
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "7.5.0",
3
+ "version": "7.5.2",
4
4
  "description": "Common JavaScript code used by Barchart's Portfolio Service",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",