@barchart/portfolio-api-common 1.0.202 → 1.0.203
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.
|
@@ -12,6 +12,17 @@ module.exports = (() => {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* The portfolio referenced does not exist.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
* @static
|
|
20
|
+
* @returns {FailureType}
|
|
21
|
+
*/
|
|
22
|
+
static get TRANSACTION_CREATE_FAILED_NO_PORTFOLIO() {
|
|
23
|
+
return transactionCreateFailedNoPortfolio;
|
|
24
|
+
}
|
|
25
|
+
|
|
15
26
|
/**
|
|
16
27
|
* The transaction would occur before an existing transaction.
|
|
17
28
|
*
|
|
@@ -60,6 +71,7 @@ module.exports = (() => {
|
|
|
60
71
|
}
|
|
61
72
|
}
|
|
62
73
|
|
|
74
|
+
const transactionCreateFailedNoPortfolio = new FailureType('TRANSACTION_CREATE_FAILED_OUT_OF_SEQUENCE', 'Unable to create transaction, because the referenced portfolio does not exist. Has it been deleted?');
|
|
63
75
|
const transactionCreateFailedOutOfSequence = new FailureType('TRANSACTION_CREATE_FAILED_OUT_OF_SEQUENCE', 'Unable to create transaction, because the transaction date is out-of-sequence. In other words, it would occur before an existing transaction. Please confirm your intent to re-write transaction history (which could take some time and alter the historical results for this position).');
|
|
64
76
|
const transactionCreateFailedDirectionSwitch = new FailureType('TRANSACTION_CREATE_FAILED_DIRECTION_SWITCH', 'Unable to create transaction, because the position direction would be switched (from long to short or vice versa). Please close the position (to a zero balance) first, then enter a second transaction.');
|
|
65
77
|
const transactionCreateRewriteUnsupported = new FailureType('TRANSACTION_CREATE_REWRITE_UNSUPPORTED', 'Unable to re-write transaction history. This operation is not currently supported (but will be implemented soon).');
|
|
@@ -448,7 +448,6 @@ module.exports = (() => {
|
|
|
448
448
|
.withField('type', DataType.forEnum(TransactionType, 'TransactionType'))
|
|
449
449
|
.withField('date', DataType.DAY)
|
|
450
450
|
.withField('value', DataType.DECIMAL)
|
|
451
|
-
.withField('fee', DataType.DECIMAL, true)
|
|
452
451
|
.withField('force', DataType.BOOLEAN, true)
|
|
453
452
|
.schema
|
|
454
453
|
);
|