@divvydiary/divvydiary-json-schemas 0.10.4 → 0.11.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/index.js +3 -1
- package/package.json +1 -1
- package/src/schemas/{defs.json → _defs.json} +5 -0
- package/src/schemas/article.json +1 -3
- package/src/schemas/depot.json +1 -1
- package/src/schemas/dividend.json +4 -2
- package/src/schemas/portfolio.json +36 -0
- package/src/schemas/split.json +3 -9
- package/src/schemas/user.json +16 -4
package/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
const article = require("./src/schemas/article.json");
|
|
2
|
-
const defs = require("./src/schemas/
|
|
2
|
+
const defs = require("./src/schemas/_defs.json");
|
|
3
3
|
const depot = require("./src/schemas/depot.json");
|
|
4
4
|
const dividend = require("./src/schemas/dividend.json");
|
|
5
|
+
const portfolio = require("./src/schemas/portfolio.json");
|
|
5
6
|
const split = require("./src/schemas/split.json");
|
|
6
7
|
const symbol = require("./src/schemas/symbol.json");
|
|
7
8
|
const user = require("./src/schemas/user.json");
|
|
@@ -11,6 +12,7 @@ module.exports = {
|
|
|
11
12
|
defs,
|
|
12
13
|
depot,
|
|
13
14
|
dividend,
|
|
15
|
+
portfolio,
|
|
14
16
|
split,
|
|
15
17
|
symbol,
|
|
16
18
|
user,
|
package/package.json
CHANGED
package/src/schemas/article.json
CHANGED
package/src/schemas/depot.json
CHANGED
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
"title": "Dividend",
|
|
5
5
|
"properties": {
|
|
6
6
|
"id": {
|
|
7
|
-
"
|
|
8
|
-
"minimum": 1
|
|
7
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/unsignedInt"
|
|
9
8
|
},
|
|
10
9
|
"exDate": {
|
|
11
10
|
"type": "string",
|
|
@@ -57,6 +56,9 @@
|
|
|
57
56
|
},
|
|
58
57
|
"currency": {
|
|
59
58
|
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/currency"
|
|
59
|
+
},
|
|
60
|
+
"portfolioId": {
|
|
61
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/unsignedInt"
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
64
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://divvydiary.com/schemas/portfolio.json",
|
|
3
|
+
"title": "Portfolio",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"id": {
|
|
7
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/unsignedInt"
|
|
8
|
+
},
|
|
9
|
+
"shared": { "type": "boolean" },
|
|
10
|
+
"notifications": { "type": "boolean" },
|
|
11
|
+
"name": { "type": "string", "minLength": 1, "maxLength": 50 },
|
|
12
|
+
"currency": {
|
|
13
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/currency"
|
|
14
|
+
},
|
|
15
|
+
"securities": {
|
|
16
|
+
"$ref": "https://divvydiary.com/schemas/depot.json"
|
|
17
|
+
},
|
|
18
|
+
"dividendsHistory": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"dividends": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"$ref": "https://divvydiary.com/schemas/dividend.json"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"stubs": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"$ref": "https://divvydiary.com/schemas/dividend.json"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/schemas/split.json
CHANGED
|
@@ -4,23 +4,17 @@
|
|
|
4
4
|
"title": "Stock Split",
|
|
5
5
|
"properties": {
|
|
6
6
|
"id": {
|
|
7
|
-
"
|
|
8
|
-
"minimum": 1,
|
|
9
|
-
"maximum": 4294967295
|
|
7
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/unsignedInt"
|
|
10
8
|
},
|
|
11
9
|
"date": {
|
|
12
10
|
"type": "string",
|
|
13
11
|
"format": "date"
|
|
14
12
|
},
|
|
15
13
|
"ratioFrom": {
|
|
16
|
-
"
|
|
17
|
-
"minimum": 1,
|
|
18
|
-
"maximum": 4294967295
|
|
14
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/unsignedInt"
|
|
19
15
|
},
|
|
20
16
|
"ratioTo": {
|
|
21
|
-
"
|
|
22
|
-
"minimum": 1,
|
|
23
|
-
"maximum": 4294967295
|
|
17
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/unsignedInt"
|
|
24
18
|
}
|
|
25
19
|
}
|
|
26
20
|
}
|
package/src/schemas/user.json
CHANGED
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
"title": "User",
|
|
5
5
|
"properties": {
|
|
6
6
|
"id": {
|
|
7
|
-
"
|
|
8
|
-
"minimum": 1,
|
|
9
|
-
"maximum": 4294967295
|
|
7
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/unsignedInt"
|
|
10
8
|
},
|
|
11
9
|
"email": {
|
|
12
10
|
"type": "string",
|
|
@@ -57,6 +55,20 @@
|
|
|
57
55
|
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/taxRate"
|
|
58
56
|
},
|
|
59
57
|
"taxesType": { "type": "string", "enum": ["homo", "hetero"] },
|
|
60
|
-
"askReview": { "type": "boolean" }
|
|
58
|
+
"askReview": { "type": "boolean" },
|
|
59
|
+
"selectedPortfolio": {
|
|
60
|
+
"oneOf": [
|
|
61
|
+
{
|
|
62
|
+
"$ref": "https://divvydiary.com/schemas/defs.json#/properties/unsignedInt"
|
|
63
|
+
},
|
|
64
|
+
{ "type": "null" }
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"portfolios": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"$ref": "https://divvydiary.com/schemas/portfolio.json"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
61
73
|
}
|
|
62
74
|
}
|