@barchart/portfolio-api-common 1.3.8 → 1.3.9
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.
- package/lib/data/CorporateActionType.js +20 -19
- package/lib/websockets/WebsocketActionType.js +25 -0
- package/package.json +1 -1
- package/test/SpecRunner.js +2821 -3778
|
@@ -18,58 +18,58 @@ module.exports = (() => {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
22
|
-
* system purposes.
|
|
21
|
+
* A split.
|
|
23
22
|
*
|
|
24
23
|
* @public
|
|
25
|
-
* @
|
|
24
|
+
* @static
|
|
25
|
+
* @returns {CorporateActionType}
|
|
26
26
|
*/
|
|
27
|
-
get
|
|
28
|
-
return
|
|
27
|
+
static get SPLIT() {
|
|
28
|
+
return split;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* A
|
|
32
|
+
* A dividend.
|
|
33
33
|
*
|
|
34
34
|
* @public
|
|
35
35
|
* @static
|
|
36
36
|
* @returns {CorporateActionType}
|
|
37
37
|
*/
|
|
38
|
-
static get
|
|
39
|
-
return
|
|
38
|
+
static get DIVIDEND() {
|
|
39
|
+
return dividend;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* A
|
|
43
|
+
* A stock dividend.
|
|
44
44
|
*
|
|
45
45
|
* @public
|
|
46
46
|
* @static
|
|
47
47
|
* @returns {CorporateActionType}
|
|
48
48
|
*/
|
|
49
|
-
static get
|
|
50
|
-
return
|
|
49
|
+
static get STOCK_DIVIDEND() {
|
|
50
|
+
return stockDividend;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
* A
|
|
54
|
+
* A symbol change.
|
|
55
55
|
*
|
|
56
56
|
* @public
|
|
57
57
|
* @static
|
|
58
58
|
* @returns {CorporateActionType}
|
|
59
59
|
*/
|
|
60
|
-
static get
|
|
61
|
-
return
|
|
60
|
+
static get SYMBOL_CHANGE() {
|
|
61
|
+
return symbolChange;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
|
-
* A
|
|
65
|
+
* A name change.
|
|
66
66
|
*
|
|
67
67
|
* @public
|
|
68
68
|
* @static
|
|
69
69
|
* @returns {CorporateActionType}
|
|
70
70
|
*/
|
|
71
|
-
static get
|
|
72
|
-
return
|
|
71
|
+
static get NAME_CHANGE() {
|
|
72
|
+
return nameChange;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
/**
|
|
@@ -84,10 +84,11 @@ module.exports = (() => {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
const split = new CorporateActionType('SPLIT', 'Split', false);
|
|
88
|
+
const dividend = new CorporateActionType('DIVIDEND', 'Dividend', false);
|
|
89
|
+
const stockDividend = new CorporateActionType('STOCK_DIVIDEND', 'Stock Dividend', false);
|
|
87
90
|
const symbolChange = new CorporateActionType('SYMBOL_CHANGE', 'Symbol Change', false);
|
|
88
91
|
const nameChange = new CorporateActionType('NAME_CHANGE', 'Name Change', false);
|
|
89
|
-
const dividend = new CorporateActionType('DIVIDEND', 'Dividend', false);
|
|
90
|
-
const split = new CorporateActionType('SPLIT', 'Split', false);
|
|
91
92
|
const delist = new CorporateActionType('DELIST', 'Delist', false);
|
|
92
93
|
|
|
93
94
|
return CorporateActionType;
|
|
@@ -108,6 +108,28 @@ module.exports = (() => {
|
|
|
108
108
|
static get TRANSACTION_BATCH() {
|
|
109
109
|
return transactionBatch;
|
|
110
110
|
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Action type for deleting position.
|
|
114
|
+
*
|
|
115
|
+
* @public
|
|
116
|
+
* @static
|
|
117
|
+
* @returns {WebsocketActionType}
|
|
118
|
+
*/
|
|
119
|
+
static get POSITION_DELETE() {
|
|
120
|
+
return positionDelete;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Action type for updating position.
|
|
125
|
+
*
|
|
126
|
+
* @public
|
|
127
|
+
* @static
|
|
128
|
+
* @returns {WebsocketActionType}
|
|
129
|
+
*/
|
|
130
|
+
static get POSITION_UPDATE() {
|
|
131
|
+
return positionUpdate;
|
|
132
|
+
}
|
|
111
133
|
}
|
|
112
134
|
|
|
113
135
|
const portfolioCreate = new WebsocketActionType('PORTFOLIO_CREATE', 'Create portfolio action', 'portfolio/create');
|
|
@@ -119,5 +141,8 @@ module.exports = (() => {
|
|
|
119
141
|
const transactionEdit = new WebsocketActionType('TRANSACTION_EDIT', 'Edit transaction action', 'transaction/edit');
|
|
120
142
|
const transactionBatch = new WebsocketActionType('TRANSACTION_BATCH', 'Batch transaction action', 'transaction/batch');
|
|
121
143
|
|
|
144
|
+
const positionDelete = new WebsocketActionType('POSITION_DELETE', 'Delete position action', 'position/delete');
|
|
145
|
+
const positionUpdate = new WebsocketActionType('POSITION_UPDATE', 'Update position action', 'position/update');
|
|
146
|
+
|
|
122
147
|
return WebsocketActionType;
|
|
123
148
|
})();
|