@divvydiary/divvydiary-json-schemas 0.8.0 → 0.9.2
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/index.js +2 -0
- package/package.json +1 -1
- package/src/schemas/defs.json +46 -4
- package/src/schemas/depot.json +93 -0
- package/src/schemas/dividend.json +7 -2
- package/src/schemas/symbol.json +4 -19
- package/src/schemas/user.json +1 -1
- package/test.js +3 -0
package/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const article = require("./src/schemas/article.json");
|
|
2
2
|
const defs = require("./src/schemas/defs.json");
|
|
3
|
+
const depot = require("./src/schemas/depot.json");
|
|
3
4
|
const dividend = require("./src/schemas/dividend.json");
|
|
4
5
|
const split = require("./src/schemas/split.json");
|
|
5
6
|
const symbol = require("./src/schemas/symbol.json");
|
|
@@ -8,6 +9,7 @@ const user = require("./src/schemas/user.json");
|
|
|
8
9
|
module.exports = {
|
|
9
10
|
article,
|
|
10
11
|
defs,
|
|
12
|
+
depot,
|
|
11
13
|
dividend,
|
|
12
14
|
split,
|
|
13
15
|
symbol,
|
package/package.json
CHANGED
package/src/schemas/defs.json
CHANGED
|
@@ -174,7 +174,8 @@
|
|
|
174
174
|
"ZMK",
|
|
175
175
|
"ZMW",
|
|
176
176
|
"ZWL"
|
|
177
|
-
]
|
|
177
|
+
],
|
|
178
|
+
"example": "EUR"
|
|
178
179
|
},
|
|
179
180
|
"exchange": {
|
|
180
181
|
"type": "string",
|
|
@@ -248,13 +249,15 @@
|
|
|
248
249
|
"XTSX",
|
|
249
250
|
"XWAR",
|
|
250
251
|
"XWBO"
|
|
251
|
-
]
|
|
252
|
+
],
|
|
253
|
+
"example": "XNAS"
|
|
252
254
|
},
|
|
253
255
|
"isin": {
|
|
254
256
|
"type": "string",
|
|
255
257
|
"minLength": 12,
|
|
256
258
|
"maxLength": 12,
|
|
257
|
-
"pattern": "^[A-Z]{2}[A-Z0-9]{9}[0-9]{1}$"
|
|
259
|
+
"pattern": "^[A-Z]{2}[A-Z0-9]{9}[0-9]{1}$",
|
|
260
|
+
"example": "US88160R1014"
|
|
258
261
|
},
|
|
259
262
|
"password": {
|
|
260
263
|
"type": "string",
|
|
@@ -270,16 +273,55 @@
|
|
|
270
273
|
"type": "string",
|
|
271
274
|
"minLength": 6,
|
|
272
275
|
"maxLength": 6,
|
|
273
|
-
"pattern": "^[A-Z0-9]{6}$"
|
|
276
|
+
"pattern": "^[A-Z0-9]{6}$",
|
|
277
|
+
"example": "A1CX3T"
|
|
274
278
|
},
|
|
275
279
|
"dividendFrequency": {
|
|
276
280
|
"type": "string",
|
|
277
281
|
"enum": ["none", "any", "monthly", "quarterly", "biannually", "annually"]
|
|
278
282
|
},
|
|
283
|
+
"dividendRate": {
|
|
284
|
+
"type": "number",
|
|
285
|
+
"minimum": 0,
|
|
286
|
+
"description": "Forward Annual Payout (FWD) *aristocrats only*",
|
|
287
|
+
"nullable": true,
|
|
288
|
+
"example": 0.054
|
|
289
|
+
},
|
|
290
|
+
"dividendYield": {
|
|
291
|
+
"type": "number",
|
|
292
|
+
"minimum": 0,
|
|
293
|
+
"description": "Forward Dividend Yield (FWD) on current price *aristocrats only*",
|
|
294
|
+
"nullable": true,
|
|
295
|
+
"example": 0.8
|
|
296
|
+
},
|
|
297
|
+
"dividendYieldOnBuyin": {
|
|
298
|
+
"type": "number",
|
|
299
|
+
"minimum": 0,
|
|
300
|
+
"description": "Forward Dividend Yield (FWD) on buyin price *aristocrats only*",
|
|
301
|
+
"nullable": true,
|
|
302
|
+
"example": 0.8
|
|
303
|
+
},
|
|
279
304
|
"taxRate": {
|
|
280
305
|
"type": "number",
|
|
281
306
|
"minimum": 0,
|
|
282
307
|
"maximum": 1
|
|
308
|
+
},
|
|
309
|
+
"name": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"minLength": 1,
|
|
312
|
+
"maxLength": 255,
|
|
313
|
+
"example": "Tesla Inc"
|
|
314
|
+
},
|
|
315
|
+
"symbol": {
|
|
316
|
+
"type": "string",
|
|
317
|
+
"minLength": 1,
|
|
318
|
+
"maxLength": 8,
|
|
319
|
+
"example": "TSLA"
|
|
320
|
+
},
|
|
321
|
+
"exchangeRate": {
|
|
322
|
+
"type": "number",
|
|
323
|
+
"minimum": 0,
|
|
324
|
+
"example": 1.1604
|
|
283
325
|
}
|
|
284
326
|
}
|
|
285
327
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://divvydiary.com/schemas/depot.json",
|
|
3
|
+
"title": "Definitions",
|
|
4
|
+
"type": "array",
|
|
5
|
+
"items": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"isin": {
|
|
9
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/isin"
|
|
10
|
+
},
|
|
11
|
+
"wkn": {
|
|
12
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/wkn"
|
|
13
|
+
},
|
|
14
|
+
"quantity": {
|
|
15
|
+
"type": "number",
|
|
16
|
+
"minimum": 0.000001,
|
|
17
|
+
"multipleOf": 0.000001
|
|
18
|
+
},
|
|
19
|
+
"price": {
|
|
20
|
+
"type": "number",
|
|
21
|
+
"minimum": 0,
|
|
22
|
+
"multipleOf": 0.0001
|
|
23
|
+
},
|
|
24
|
+
"value": {
|
|
25
|
+
"type": "number",
|
|
26
|
+
"minimum": 0,
|
|
27
|
+
"multipleOf": 0.0001
|
|
28
|
+
},
|
|
29
|
+
"allocation": {
|
|
30
|
+
"type": "number",
|
|
31
|
+
"minimum": 0,
|
|
32
|
+
"maximum": 1,
|
|
33
|
+
"multipleOf": 0.0001
|
|
34
|
+
},
|
|
35
|
+
"buyin": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"price": {
|
|
39
|
+
"type": "number",
|
|
40
|
+
"minimum": 0,
|
|
41
|
+
"multipleOf": 0.0001,
|
|
42
|
+
"nullable": true
|
|
43
|
+
},
|
|
44
|
+
"currency": {
|
|
45
|
+
"oneOf": [
|
|
46
|
+
{
|
|
47
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/currency"
|
|
48
|
+
},
|
|
49
|
+
{ "type": "null" }
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"exchangeRate": {
|
|
53
|
+
"oneOf": [
|
|
54
|
+
{
|
|
55
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/exchangeRate"
|
|
56
|
+
},
|
|
57
|
+
{ "type": "null" }
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"dividendYield": {
|
|
63
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/dividendYield"
|
|
64
|
+
},
|
|
65
|
+
"dividendYieldOnBuyin": {
|
|
66
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/dividendYieldOnBuyin"
|
|
67
|
+
},
|
|
68
|
+
"dividendRate": {
|
|
69
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/dividendRate"
|
|
70
|
+
},
|
|
71
|
+
"currency": {
|
|
72
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/currency"
|
|
73
|
+
},
|
|
74
|
+
"name": {
|
|
75
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/name"
|
|
76
|
+
},
|
|
77
|
+
"nickname": {
|
|
78
|
+
"oneOf": [
|
|
79
|
+
{
|
|
80
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/name"
|
|
81
|
+
},
|
|
82
|
+
{ "type": "null" }
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"symbol": {
|
|
86
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/symbol"
|
|
87
|
+
},
|
|
88
|
+
"taxRate": {
|
|
89
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/taxRate"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -35,12 +35,17 @@
|
|
|
35
35
|
"multipleOf": 0.000001
|
|
36
36
|
},
|
|
37
37
|
"exchangeRate": {
|
|
38
|
-
"
|
|
39
|
-
"minimum": 0
|
|
38
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/exchangeRate"
|
|
40
39
|
},
|
|
41
40
|
"taxRate": {
|
|
42
41
|
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/taxRate"
|
|
43
42
|
},
|
|
43
|
+
"nickname": {
|
|
44
|
+
"oneOf": [
|
|
45
|
+
{ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/name" },
|
|
46
|
+
{ "type": "null" }
|
|
47
|
+
]
|
|
48
|
+
},
|
|
44
49
|
"isin": {
|
|
45
50
|
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/isin"
|
|
46
51
|
},
|
package/src/schemas/symbol.json
CHANGED
|
@@ -4,13 +4,10 @@
|
|
|
4
4
|
"title": "Symbol",
|
|
5
5
|
"properties": {
|
|
6
6
|
"name": {
|
|
7
|
-
"
|
|
8
|
-
"maxLength": 255
|
|
7
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/name"
|
|
9
8
|
},
|
|
10
9
|
"symbol": {
|
|
11
|
-
"
|
|
12
|
-
"minLength": 1,
|
|
13
|
-
"maxLength": 6
|
|
10
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/symbol"
|
|
14
11
|
},
|
|
15
12
|
"isin": {
|
|
16
13
|
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/isin"
|
|
@@ -30,23 +27,11 @@
|
|
|
30
27
|
"taxRate": {
|
|
31
28
|
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/taxRate"
|
|
32
29
|
},
|
|
33
|
-
"payoutRatio": {
|
|
34
|
-
"type": "number",
|
|
35
|
-
"minimum": 0,
|
|
36
|
-
"description": "Payout Ratio *aristocrats only*",
|
|
37
|
-
"nullable": true
|
|
38
|
-
},
|
|
39
30
|
"dividendRate": {
|
|
40
|
-
"
|
|
41
|
-
"minimum": 0,
|
|
42
|
-
"description": "Forward Annual Payout (FWD) *aristocrats only*",
|
|
43
|
-
"nullable": true
|
|
31
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/dividendRate"
|
|
44
32
|
},
|
|
45
33
|
"dividendYield": {
|
|
46
|
-
"
|
|
47
|
-
"minimum": 0,
|
|
48
|
-
"description": "Forward Dividend Yield (FWD) *aristocrats only*",
|
|
49
|
-
"nullable": true
|
|
34
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/dividendYield"
|
|
50
35
|
},
|
|
51
36
|
"dividendCagr": {
|
|
52
37
|
"type": "object",
|
package/src/schemas/user.json
CHANGED