@barchart/portfolio-api-common 1.0.195 → 1.0.196

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.
@@ -0,0 +1,33 @@
1
+ const FailureType = require('@barchart/common-js/api/failures/FailureType');
2
+
3
+ module.exports = (() => {
4
+ 'use strict';
5
+
6
+ /**
7
+ * A static container for portfolio-specific {@link FailureType} items.
8
+ *
9
+ * @public
10
+ */
11
+ class PortfolioFailureType {
12
+ constructor() {
13
+ }
14
+
15
+ /**
16
+ * The transaction would occur before an existing transaction.
17
+ *
18
+ * @static
19
+ * @returns {FailureType}
20
+ */
21
+ static get TRANSACTION_CREATE_FAILED_OUT_OF_SEQUENCE() {
22
+ return transactionCreateFailedOutOfSequence;
23
+ }
24
+
25
+ toString() {
26
+ return '[PortfolioFailureType]';
27
+ }
28
+ }
29
+
30
+ const transactionCreateFailedOutOfSequence = new FailureType('TRANSACTION_CREATE_FAILED_OUT_OF_SEQUENCE', 'Unable to create transaction, the transaction date is out-of-sequence (i.e. it would occur before an existing transaction). Please confirm your intent to re-write transaction history.');
31
+
32
+ return PortfolioFailureType;
33
+ })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barchart/portfolio-api-common",
3
- "version": "1.0.195",
3
+ "version": "1.0.196",
4
4
  "description": "Common classes used by the Portfolio system",
5
5
  "author": {
6
6
  "name": "Bryan Ingle",