@barchart/portfolio-api-common 1.0.230 → 1.0.231
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.
|
@@ -76,6 +76,17 @@ module.exports = (() => {
|
|
|
76
76
|
return transactionDeleteFailedOutOfSequence;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Unable to delete, the transaction cannot be found.
|
|
81
|
+
*
|
|
82
|
+
* @public
|
|
83
|
+
* @static
|
|
84
|
+
* @returns {FailureType}
|
|
85
|
+
*/
|
|
86
|
+
static get TRANSACTION_DELETE_FAILED_NO_TRANSACTION() {
|
|
87
|
+
return transactionDeleteFailedNoTransaction;
|
|
88
|
+
}
|
|
89
|
+
|
|
79
90
|
toString() {
|
|
80
91
|
return '[PortfolioFailureType]';
|
|
81
92
|
}
|
|
@@ -89,6 +100,7 @@ module.exports = (() => {
|
|
|
89
100
|
const transactionCreateFailedInvalidDirectionSwitch = new FailureType('TRANSACTION_CREATE_FAILED_INVALID_DIRECTION_SWITCH', 'Unable to process transaction, the transaction would switch the position from {L|currentDirection.description} to {L|proposedDirection.description} (i.e. {L|currentDirection.sign} to {L|proposedDirection.sign} shares/units). This is not allowed. Please close the current position (i.e. zero it out) and then enter a second transaction.');
|
|
90
101
|
|
|
91
102
|
const transactionDeleteFailedOutOfSequence = new FailureType('TRANSACTION_DELETE_FAILED_OUT_OF_SEQUENCE', 'Deleting any transaction, except for the most recent, will cause transaction history to be re-written. Please confirm your intent to re-write transaction history (which could take some time and alter the historical results for this position).');
|
|
103
|
+
const transactionDeleteFailedNoTransaction = new FailureType('TRANSACTION_DELETE_FAILED_NO_TRANSACTION', 'Unable to delete transaction. The referenced transaction does not exist.');
|
|
92
104
|
|
|
93
105
|
return PortfolioFailureType;
|
|
94
106
|
})();
|