@barchart/portfolio-api-common 1.3.17 → 1.3.18

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.
@@ -54,6 +54,18 @@ module.exports = (() => {
54
54
  return client;
55
55
  }
56
56
 
57
+ /**
58
+ * Reduced schema that only includes frames and dates -- allowing consumer
59
+ * to detect existence (or non-existence) of summary.
60
+ *
61
+ * @static
62
+ * @public
63
+ * @returns {PositionSummarySchema}
64
+ */
65
+ static get EXISTS() {
66
+ return exists;
67
+ }
68
+
57
69
  toString() {
58
70
  return '[PositionSummarySchema]';
59
71
  }
@@ -111,5 +123,15 @@ module.exports = (() => {
111
123
  .schema
112
124
  );
113
125
 
126
+ const exists = new PositionSummarySchema(SchemaBuilder.withName('complete')
127
+ .withField('user', DataType.STRING)
128
+ .withField('portfolio', DataType.STRING)
129
+ .withField('position', DataType.STRING)
130
+ .withField('frame', DataType.forEnum(PositionSummaryFrame, 'PositionSummaryFrame'))
131
+ .withField('start.date', DataType.DAY)
132
+ .withField('end.date', DataType.DAY)
133
+ .schema
134
+ );
135
+
114
136
  return PositionSummarySchema;
115
137
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.3.17",
3
+ "version": "1.3.18",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",