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