@divvydiary/divvydiary-json-schemas 1.0.1 → 1.1.1
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/package.json +2 -7
- package/src/schemas/article.json +1 -1
- package/src/schemas/depot.json +13 -13
- package/src/schemas/dividend.json +8 -14
- package/src/schemas/portfolio.json +5 -5
- package/src/schemas/split.json +3 -3
- package/src/schemas/symbol.json +11 -14
- package/src/schemas/user.json +7 -7
package/package.json
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@divvydiary/divvydiary-json-schemas",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "JSON Schemas for DivvyDiary.com",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"docs": "rm -rf docs && jsonschema2md -d src/schemas -o docs -e json -x -",
|
|
8
7
|
"preversion": "npm test",
|
|
9
|
-
"version": "npm run docs && git add -A docs",
|
|
10
8
|
"postversion": "git push && git push --tags",
|
|
11
9
|
"test": "node test.js",
|
|
12
10
|
"prepare": "husky install"
|
|
@@ -25,15 +23,12 @@
|
|
|
25
23
|
"access": "public"
|
|
26
24
|
},
|
|
27
25
|
"devDependencies": {
|
|
28
|
-
"@adobe/jsonschema2md": "^6.1.1",
|
|
29
26
|
"ajv": "^8.11.0",
|
|
27
|
+
"ajv-formats": "^2.1.1",
|
|
30
28
|
"ajv-keywords": "^5.1.0",
|
|
31
29
|
"glob": "^8.0.1",
|
|
32
30
|
"husky": "^8.0.1",
|
|
33
31
|
"prettier": "^2.3.2",
|
|
34
32
|
"pretty-quick": "^3.1.1"
|
|
35
|
-
},
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"ajv-formats": "^2.1.1"
|
|
38
33
|
}
|
|
39
34
|
}
|
package/src/schemas/article.json
CHANGED
package/src/schemas/depot.json
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"isin": {
|
|
9
|
-
"$ref": "
|
|
9
|
+
"$ref": "defs.json#/properties/isin"
|
|
10
10
|
},
|
|
11
11
|
"wkn": {
|
|
12
|
-
"$ref": "
|
|
12
|
+
"$ref": "defs.json#/properties/wkn"
|
|
13
13
|
},
|
|
14
14
|
"quantity": {
|
|
15
15
|
"type": "number",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"currency": {
|
|
45
45
|
"oneOf": [
|
|
46
46
|
{
|
|
47
|
-
"$ref": "
|
|
47
|
+
"$ref": "defs.json#/properties/currency"
|
|
48
48
|
},
|
|
49
49
|
{ "type": "null" }
|
|
50
50
|
]
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"exchangeRate": {
|
|
53
53
|
"oneOf": [
|
|
54
54
|
{
|
|
55
|
-
"$ref": "
|
|
55
|
+
"$ref": "defs.json#/properties/exchangeRate"
|
|
56
56
|
},
|
|
57
57
|
{ "type": "null" }
|
|
58
58
|
]
|
|
@@ -60,36 +60,36 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"dividendYield": {
|
|
63
|
-
"$ref": "
|
|
63
|
+
"$ref": "defs.json#/properties/dividendYield"
|
|
64
64
|
},
|
|
65
65
|
"dividendYieldOnBuyin": {
|
|
66
|
-
"$ref": "
|
|
66
|
+
"$ref": "defs.json#/properties/dividendYieldOnBuyin"
|
|
67
67
|
},
|
|
68
68
|
"dividendRate": {
|
|
69
|
-
"$ref": "
|
|
69
|
+
"$ref": "defs.json#/properties/dividendRate"
|
|
70
70
|
},
|
|
71
71
|
"currency": {
|
|
72
|
-
"$ref": "
|
|
72
|
+
"$ref": "defs.json#/properties/currency"
|
|
73
73
|
},
|
|
74
74
|
"name": {
|
|
75
|
-
"$ref": "
|
|
75
|
+
"$ref": "defs.json#/properties/name"
|
|
76
76
|
},
|
|
77
77
|
"nickname": {
|
|
78
78
|
"oneOf": [
|
|
79
79
|
{
|
|
80
|
-
"$ref": "
|
|
80
|
+
"$ref": "defs.json#/properties/name"
|
|
81
81
|
},
|
|
82
82
|
{ "type": "null" }
|
|
83
83
|
]
|
|
84
84
|
},
|
|
85
85
|
"symbol": {
|
|
86
|
-
"$ref": "
|
|
86
|
+
"$ref": "defs.json#/properties/symbol"
|
|
87
87
|
},
|
|
88
88
|
"taxRate": {
|
|
89
|
-
"$ref": "
|
|
89
|
+
"$ref": "defs.json#/properties/taxRate"
|
|
90
90
|
},
|
|
91
91
|
"dividendFrequency": {
|
|
92
|
-
"$ref": "
|
|
92
|
+
"$ref": "defs.json#/properties/dividendFrequency"
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "Dividend",
|
|
5
5
|
"properties": {
|
|
6
6
|
"id": {
|
|
7
|
-
"$ref": "
|
|
7
|
+
"$ref": "defs.json#/properties/unsignedInt"
|
|
8
8
|
},
|
|
9
9
|
"exDate": {
|
|
10
10
|
"type": "string",
|
|
@@ -34,31 +34,25 @@
|
|
|
34
34
|
"multipleOf": 0.000001
|
|
35
35
|
},
|
|
36
36
|
"exchangeRate": {
|
|
37
|
-
"$ref": "
|
|
37
|
+
"$ref": "defs.json#/properties/exchangeRate"
|
|
38
38
|
},
|
|
39
39
|
"taxRate": {
|
|
40
|
-
"$ref": "
|
|
40
|
+
"$ref": "defs.json#/properties/taxRate"
|
|
41
41
|
},
|
|
42
42
|
"nickname": {
|
|
43
|
-
"oneOf": [
|
|
44
|
-
{ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/name" },
|
|
45
|
-
{ "type": "null" }
|
|
46
|
-
]
|
|
43
|
+
"oneOf": [{ "$ref": "defs.json#/properties/name" }, { "type": "null" }]
|
|
47
44
|
},
|
|
48
45
|
"isin": {
|
|
49
|
-
"$ref": "
|
|
46
|
+
"$ref": "defs.json#/properties/isin"
|
|
50
47
|
},
|
|
51
48
|
"wkn": {
|
|
52
|
-
"oneOf": [
|
|
53
|
-
{ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/wkn" },
|
|
54
|
-
{ "type": "null" }
|
|
55
|
-
]
|
|
49
|
+
"oneOf": [{ "$ref": "defs.json#/properties/wkn" }, { "type": "null" }]
|
|
56
50
|
},
|
|
57
51
|
"currency": {
|
|
58
|
-
"$ref": "
|
|
52
|
+
"$ref": "defs.json#/properties/currency"
|
|
59
53
|
},
|
|
60
54
|
"portfolioId": {
|
|
61
|
-
"$ref": "
|
|
55
|
+
"$ref": "defs.json#/properties/unsignedInt"
|
|
62
56
|
}
|
|
63
57
|
}
|
|
64
58
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
6
|
"id": {
|
|
7
|
-
"$ref": "
|
|
7
|
+
"$ref": "defs.json#/properties/unsignedInt"
|
|
8
8
|
},
|
|
9
9
|
"shared": { "type": "boolean" },
|
|
10
10
|
"notifications": { "type": "boolean" },
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"transform": ["trim", "toUpperCase"]
|
|
22
22
|
},
|
|
23
23
|
"currency": {
|
|
24
|
-
"$ref": "
|
|
24
|
+
"$ref": "defs.json#/properties/currency"
|
|
25
25
|
},
|
|
26
26
|
"securities": {
|
|
27
|
-
"$ref": "
|
|
27
|
+
"$ref": "depot.json"
|
|
28
28
|
},
|
|
29
29
|
"dividendsHistory": {
|
|
30
30
|
"type": "object",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"dividends": {
|
|
33
33
|
"type": "array",
|
|
34
34
|
"items": {
|
|
35
|
-
"$ref": "
|
|
35
|
+
"$ref": "dividend.json"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"stubs": {
|
|
39
39
|
"type": "array",
|
|
40
40
|
"items": {
|
|
41
|
-
"$ref": "
|
|
41
|
+
"$ref": "dividend.json"
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
package/src/schemas/split.json
CHANGED
|
@@ -4,17 +4,17 @@
|
|
|
4
4
|
"title": "Stock Split",
|
|
5
5
|
"properties": {
|
|
6
6
|
"id": {
|
|
7
|
-
"$ref": "
|
|
7
|
+
"$ref": "defs.json#/properties/unsignedInt"
|
|
8
8
|
},
|
|
9
9
|
"date": {
|
|
10
10
|
"type": "string",
|
|
11
11
|
"format": "date"
|
|
12
12
|
},
|
|
13
13
|
"ratioFrom": {
|
|
14
|
-
"$ref": "
|
|
14
|
+
"$ref": "defs.json#/properties/unsignedInt"
|
|
15
15
|
},
|
|
16
16
|
"ratioTo": {
|
|
17
|
-
"$ref": "
|
|
17
|
+
"$ref": "defs.json#/properties/unsignedInt"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
package/src/schemas/symbol.json
CHANGED
|
@@ -4,42 +4,39 @@
|
|
|
4
4
|
"title": "Symbol",
|
|
5
5
|
"properties": {
|
|
6
6
|
"name": {
|
|
7
|
-
"$ref": "
|
|
7
|
+
"$ref": "defs.json#/properties/name"
|
|
8
8
|
},
|
|
9
9
|
"symbol": {
|
|
10
|
-
"$ref": "
|
|
10
|
+
"$ref": "defs.json#/properties/symbol"
|
|
11
11
|
},
|
|
12
12
|
"isin": {
|
|
13
|
-
"$ref": "
|
|
13
|
+
"$ref": "defs.json#/properties/isin"
|
|
14
14
|
},
|
|
15
15
|
"wkn": {
|
|
16
|
-
"oneOf": [
|
|
17
|
-
{ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/wkn" },
|
|
18
|
-
{ "type": "null" }
|
|
19
|
-
]
|
|
16
|
+
"oneOf": [{ "$ref": "defs.json#/properties/wkn" }, { "type": "null" }]
|
|
20
17
|
},
|
|
21
18
|
"exchange": {
|
|
22
|
-
"$ref": "
|
|
19
|
+
"$ref": "defs.json#/properties/exchange"
|
|
23
20
|
},
|
|
24
21
|
"dividendFrequency": {
|
|
25
|
-
"$ref": "
|
|
22
|
+
"$ref": "defs.json#/properties/dividendFrequency"
|
|
26
23
|
},
|
|
27
24
|
"taxRate": {
|
|
28
|
-
"$ref": "
|
|
25
|
+
"$ref": "defs.json#/properties/taxRate"
|
|
29
26
|
},
|
|
30
27
|
"dividendRate": {
|
|
31
|
-
"$ref": "
|
|
28
|
+
"$ref": "defs.json#/properties/dividendRate"
|
|
32
29
|
},
|
|
33
30
|
"dividendCurrency": {
|
|
34
31
|
"oneOf": [
|
|
35
32
|
{
|
|
36
|
-
"$ref": "
|
|
33
|
+
"$ref": "defs.json#/properties/currency"
|
|
37
34
|
},
|
|
38
35
|
{ "type": "null" }
|
|
39
36
|
]
|
|
40
37
|
},
|
|
41
38
|
"dividendYield": {
|
|
42
|
-
"$ref": "
|
|
39
|
+
"$ref": "defs.json#/properties/dividendYield"
|
|
43
40
|
},
|
|
44
41
|
"dividendCagr": {
|
|
45
42
|
"type": "object",
|
|
@@ -66,7 +63,7 @@
|
|
|
66
63
|
"currency": {
|
|
67
64
|
"oneOf": [
|
|
68
65
|
{
|
|
69
|
-
"$ref": "
|
|
66
|
+
"$ref": "defs.json#/properties/currency"
|
|
70
67
|
},
|
|
71
68
|
{ "type": "null" }
|
|
72
69
|
]
|
package/src/schemas/user.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"title": "User",
|
|
5
5
|
"properties": {
|
|
6
6
|
"id": {
|
|
7
|
-
"$ref": "
|
|
7
|
+
"$ref": "defs.json#/properties/unsignedInt"
|
|
8
8
|
},
|
|
9
9
|
"email": {
|
|
10
10
|
"type": "string",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"currency": {
|
|
18
18
|
"oneOf": [
|
|
19
19
|
{
|
|
20
|
-
"$ref": "
|
|
20
|
+
"$ref": "defs.json#/properties/currency"
|
|
21
21
|
},
|
|
22
22
|
{ "type": "null" }
|
|
23
23
|
]
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"apiKey": {
|
|
26
26
|
"oneOf": [
|
|
27
27
|
{
|
|
28
|
-
"$ref": "
|
|
28
|
+
"$ref": "defs.json#/properties/uuid"
|
|
29
29
|
},
|
|
30
30
|
{ "type": "null" }
|
|
31
31
|
]
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"calendarToken": {
|
|
34
34
|
"oneOf": [
|
|
35
35
|
{
|
|
36
|
-
"$ref": "
|
|
36
|
+
"$ref": "defs.json#/properties/uuid"
|
|
37
37
|
},
|
|
38
38
|
{ "type": "null" }
|
|
39
39
|
]
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"plan": { "type": "string", "enum": ["free", "monthly", "yearly"] },
|
|
51
51
|
"taxes": { "type": "boolean" },
|
|
52
52
|
"defaultTaxRate": {
|
|
53
|
-
"$ref": "
|
|
53
|
+
"$ref": "defs.json#/properties/taxRate"
|
|
54
54
|
},
|
|
55
55
|
"taxesType": { "type": "string", "enum": ["homo", "hetero"] },
|
|
56
56
|
"askReview": { "type": "boolean" },
|
|
57
57
|
"selectedPortfolio": {
|
|
58
58
|
"oneOf": [
|
|
59
59
|
{
|
|
60
|
-
"$ref": "
|
|
60
|
+
"$ref": "defs.json#/properties/unsignedInt"
|
|
61
61
|
},
|
|
62
62
|
{ "type": "null" }
|
|
63
63
|
]
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"portfolios": {
|
|
66
66
|
"type": "array",
|
|
67
67
|
"items": {
|
|
68
|
-
"$ref": "
|
|
68
|
+
"$ref": "portfolio.json"
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"portfoliosLimit": {
|