@twin.org/data-json-ld 0.0.3-next.17 → 0.0.3-next.19

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.
Files changed (50) hide show
  1. package/dist/es/schemas/JsonLdContainerType.json +17 -7
  2. package/dist/es/schemas/JsonLdContainerTypeArray.json +129 -142
  3. package/dist/es/schemas/JsonLdContextDefinition.json +75 -16
  4. package/dist/es/schemas/JsonLdContextDefinitionElement.json +1 -0
  5. package/dist/es/schemas/JsonLdContextDefinitionRoot.json +1 -0
  6. package/dist/es/schemas/JsonLdDocument.json +2 -1
  7. package/dist/es/schemas/JsonLdExpandedTermDefinition.json +101 -87
  8. package/dist/es/schemas/JsonLdGraphObject.json +1 -0
  9. package/dist/es/schemas/JsonLdIdMap.json +1 -0
  10. package/dist/es/schemas/JsonLdIncludedBlock.json +1 -0
  11. package/dist/es/schemas/JsonLdIndexMap.json +2 -1
  12. package/dist/es/schemas/JsonLdIndexMapItem.json +1 -0
  13. package/dist/es/schemas/JsonLdJsonArray.json +1 -0
  14. package/dist/es/schemas/JsonLdJsonObject.json +2 -8
  15. package/dist/es/schemas/JsonLdJsonPrimitive.json +14 -5
  16. package/dist/es/schemas/JsonLdJsonValue.json +1 -0
  17. package/dist/es/schemas/JsonLdLanguageMap.json +1 -0
  18. package/dist/es/schemas/JsonLdListObject.json +1 -0
  19. package/dist/es/schemas/JsonLdListOrSetItem.json +1 -0
  20. package/dist/es/schemas/JsonLdNodeObject.json +12 -72
  21. package/dist/es/schemas/JsonLdNodePrimitive.json +1 -0
  22. package/dist/es/schemas/JsonLdObject.json +2 -1
  23. package/dist/es/schemas/JsonLdSetObject.json +1 -0
  24. package/dist/es/schemas/JsonLdTypeMap.json +1 -0
  25. package/dist/es/schemas/JsonLdValueObject.json +99 -84
  26. package/docs/changelog.md +28 -0
  27. package/docs/reference/classes/JsonLdDataTypes.md +1 -1
  28. package/docs/reference/classes/JsonLdHelper.md +11 -11
  29. package/docs/reference/classes/JsonLdProcessor.md +22 -32
  30. package/docs/reference/interfaces/IJsonLdContextDefinition.md +20 -20
  31. package/docs/reference/interfaces/IJsonLdGraphObject.md +7 -7
  32. package/docs/reference/interfaces/IJsonLdIdMap.md +1 -1
  33. package/docs/reference/interfaces/IJsonLdIndexMap.md +1 -1
  34. package/docs/reference/interfaces/IJsonLdJsonObject.md +1 -1
  35. package/docs/reference/interfaces/IJsonLdLanguageMap.md +1 -1
  36. package/docs/reference/interfaces/IJsonLdListObject.md +3 -3
  37. package/docs/reference/interfaces/IJsonLdNodeObject.md +17 -17
  38. package/docs/reference/interfaces/IJsonLdObject.md +16 -16
  39. package/docs/reference/interfaces/IJsonLdSetObject.md +3 -3
  40. package/docs/reference/interfaces/IJsonLdTypeMap.md +1 -1
  41. package/docs/reference/type-aliases/IJsonLdExpandedTermDefinition.md +7 -7
  42. package/docs/reference/type-aliases/IJsonLdValueObject.md +2 -2
  43. package/docs/reference/type-aliases/JsonLdObjectWithOptionalAtId.md +1 -1
  44. package/docs/reference/type-aliases/JsonLdObjectWithOptionalAtType.md +1 -1
  45. package/docs/reference/type-aliases/JsonLdObjectWithOptionalContext.md +1 -1
  46. package/docs/reference/type-aliases/JsonLdObjectWithOptionalId.md +1 -1
  47. package/docs/reference/type-aliases/JsonLdObjectWithOptionalType.md +1 -1
  48. package/docs/reference/variables/JsonLdContexts.md +3 -3
  49. package/docs/reference/variables/JsonLdTypes.md +26 -26
  50. package/package.json +2 -2
@@ -1,13 +1,23 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/json-ld/JsonLdContainerType",
4
+ "title": "JsonLdContainerType",
4
5
  "description": "JSON-LD container types.",
5
- "type": "string",
6
- "enum": [
7
- "@language",
8
- "@index",
9
- "@id",
10
- "@graph",
11
- "@type"
6
+ "anyOf": [
7
+ {
8
+ "const": "@language"
9
+ },
10
+ {
11
+ "const": "@index"
12
+ },
13
+ {
14
+ "const": "@id"
15
+ },
16
+ {
17
+ "const": "@graph"
18
+ },
19
+ {
20
+ "const": "@type"
21
+ }
12
22
  ]
13
23
  }
@@ -1,179 +1,166 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/json-ld/JsonLdContainerTypeArray",
4
+ "title": "JsonLdContainerTypeArray",
4
5
  "description": "JSON-LD container type array.",
5
6
  "anyOf": [
6
7
  {
7
8
  "type": "array",
8
- "items": {
9
- "allOf": [
10
- {
11
- "type": "string",
12
- "const": "@graph"
13
- },
14
- {
15
- "type": "string",
16
- "const": "@id"
17
- }
18
- ]
19
- }
9
+ "prefixItems": [
10
+ {
11
+ "const": "@graph"
12
+ },
13
+ {
14
+ "const": "@id"
15
+ }
16
+ ],
17
+ "items": false,
18
+ "minItems": 2,
19
+ "maxItems": 2
20
20
  },
21
21
  {
22
22
  "type": "array",
23
- "items": {
24
- "allOf": [
25
- {
26
- "type": "string",
27
- "const": "@id"
28
- },
29
- {
30
- "type": "string",
31
- "const": "@graph"
32
- }
33
- ]
34
- }
23
+ "prefixItems": [
24
+ {
25
+ "const": "@id"
26
+ },
27
+ {
28
+ "const": "@graph"
29
+ }
30
+ ],
31
+ "items": false,
32
+ "minItems": 2,
33
+ "maxItems": 2
35
34
  },
36
35
  {
37
36
  "type": "array",
38
- "items": {
39
- "allOf": [
40
- {
41
- "type": "string",
42
- "const": "@set"
43
- },
44
- {
45
- "type": "string",
46
- "const": "@graph"
47
- },
48
- {
49
- "type": "string",
50
- "const": "@id"
51
- }
52
- ]
53
- }
37
+ "prefixItems": [
38
+ {
39
+ "const": "@set"
40
+ },
41
+ {
42
+ "const": "@graph"
43
+ },
44
+ {
45
+ "const": "@id"
46
+ }
47
+ ],
48
+ "items": false,
49
+ "minItems": 3,
50
+ "maxItems": 3
54
51
  },
55
52
  {
56
53
  "type": "array",
57
- "items": {
58
- "allOf": [
59
- {
60
- "type": "string",
61
- "const": "@set"
62
- },
63
- {
64
- "type": "string",
65
- "const": "@id"
66
- },
67
- {
68
- "type": "string",
69
- "const": "@graph"
70
- }
71
- ]
72
- }
54
+ "prefixItems": [
55
+ {
56
+ "const": "@set"
57
+ },
58
+ {
59
+ "const": "@id"
60
+ },
61
+ {
62
+ "const": "@graph"
63
+ }
64
+ ],
65
+ "items": false,
66
+ "minItems": 3,
67
+ "maxItems": 3
73
68
  },
74
69
  {
75
70
  "type": "array",
76
- "items": {
77
- "allOf": [
78
- {
79
- "type": "string",
80
- "const": "@graph"
81
- },
82
- {
83
- "type": "string",
84
- "const": "@set"
85
- },
86
- {
87
- "type": "string",
88
- "const": "@id"
89
- }
90
- ]
91
- }
71
+ "prefixItems": [
72
+ {
73
+ "const": "@graph"
74
+ },
75
+ {
76
+ "const": "@set"
77
+ },
78
+ {
79
+ "const": "@id"
80
+ }
81
+ ],
82
+ "items": false,
83
+ "minItems": 3,
84
+ "maxItems": 3
92
85
  },
93
86
  {
94
87
  "type": "array",
95
- "items": {
96
- "allOf": [
97
- {
98
- "type": "string",
99
- "const": "@id"
100
- },
101
- {
102
- "type": "string",
103
- "const": "@set"
104
- },
105
- {
106
- "type": "string",
107
- "const": "@graph"
108
- }
109
- ]
110
- }
88
+ "prefixItems": [
89
+ {
90
+ "const": "@id"
91
+ },
92
+ {
93
+ "const": "@set"
94
+ },
95
+ {
96
+ "const": "@graph"
97
+ }
98
+ ],
99
+ "items": false,
100
+ "minItems": 3,
101
+ "maxItems": 3
111
102
  },
112
103
  {
113
104
  "type": "array",
114
- "items": {
115
- "allOf": [
116
- {
117
- "type": "string",
118
- "const": "@graph"
119
- },
120
- {
121
- "type": "string",
122
- "const": "@id"
123
- },
124
- {
125
- "type": "string",
126
- "const": "@set"
127
- }
128
- ]
129
- }
105
+ "prefixItems": [
106
+ {
107
+ "const": "@graph"
108
+ },
109
+ {
110
+ "const": "@id"
111
+ },
112
+ {
113
+ "const": "@set"
114
+ }
115
+ ],
116
+ "items": false,
117
+ "minItems": 3,
118
+ "maxItems": 3
130
119
  },
131
120
  {
132
121
  "type": "array",
133
- "items": {
134
- "allOf": [
135
- {
136
- "type": "string",
137
- "const": "@id"
138
- },
139
- {
140
- "type": "string",
141
- "const": "@graph"
142
- },
143
- {
144
- "type": "string",
145
- "const": "@set"
146
- }
147
- ]
148
- }
122
+ "prefixItems": [
123
+ {
124
+ "const": "@id"
125
+ },
126
+ {
127
+ "const": "@graph"
128
+ },
129
+ {
130
+ "const": "@set"
131
+ }
132
+ ],
133
+ "items": false,
134
+ "minItems": 3,
135
+ "maxItems": 3
149
136
  },
150
137
  {
151
138
  "type": "array",
152
- "items": {
153
- "allOf": [
154
- {
155
- "type": "string",
156
- "const": "@set"
157
- },
158
- {
159
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContainerType"
160
- }
161
- ]
162
- }
139
+ "prefixItems": [
140
+ {
141
+ "const": "@set"
142
+ },
143
+ {
144
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContainerType"
145
+ }
146
+ ],
147
+ "items": false,
148
+ "minItems": 2,
149
+ "maxItems": 2
163
150
  },
164
151
  {
165
152
  "type": "array",
166
- "items": {
167
- "allOf": [
168
- {
169
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContainerType"
170
- },
171
- {
172
- "type": "string",
173
- "const": "@set"
174
- }
175
- ]
176
- }
153
+ "prefixItems": [
154
+ {
155
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContainerType"
156
+ },
157
+ {
158
+ "const": "@set"
159
+ }
160
+ ],
161
+ "items": false,
162
+ "minItems": 2,
163
+ "maxItems": 2
177
164
  }
178
165
  ]
179
166
  }
@@ -1,24 +1,31 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/json-ld/JsonLdContextDefinition",
4
+ "title": "JsonLdContextDefinition",
4
5
  "description": "A context definition defines a local context in a node object.",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "@base": {
8
- "type": [
9
- "string",
10
- "null"
9
+ "anyOf": [
10
+ {
11
+ "type": "string"
12
+ },
13
+ {
14
+ "type": "null"
15
+ }
11
16
  ]
12
17
  },
13
18
  "@direction": {
14
- "type": [
15
- "string",
16
- "null"
17
- ],
18
- "enum": [
19
- "ltr",
20
- "rtl",
21
- null
19
+ "anyOf": [
20
+ {
21
+ "const": "ltr"
22
+ },
23
+ {
24
+ "const": "rtl"
25
+ },
26
+ {
27
+ "type": "null"
28
+ }
22
29
  ]
23
30
  },
24
31
  "@import": {
@@ -37,7 +44,6 @@
37
44
  "type": "object",
38
45
  "properties": {
39
46
  "@container": {
40
- "type": "string",
41
47
  "const": "@set"
42
48
  },
43
49
  "@protected": {
@@ -49,13 +55,16 @@
49
55
  ]
50
56
  },
51
57
  "@version": {
52
- "type": "string",
53
58
  "const": "1.1"
54
59
  },
55
60
  "@vocab": {
56
- "type": [
57
- "string",
58
- "null"
61
+ "anyOf": [
62
+ {
63
+ "type": "string"
64
+ },
65
+ {
66
+ "type": "null"
67
+ }
59
68
  ]
60
69
  }
61
70
  },
@@ -69,6 +78,56 @@
69
78
  },
70
79
  {
71
80
  "$ref": "https://schema.twindev.org/json-ld/JsonLdExpandedTermDefinition"
81
+ },
82
+ {
83
+ "anyOf": [
84
+ {
85
+ "anyOf": [
86
+ {
87
+ "type": "string"
88
+ },
89
+ {
90
+ "type": "null"
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ "anyOf": [
96
+ {
97
+ "const": "ltr"
98
+ },
99
+ {
100
+ "const": "rtl"
101
+ },
102
+ {
103
+ "type": "null"
104
+ }
105
+ ]
106
+ },
107
+ {
108
+ "type": "string"
109
+ },
110
+ {
111
+ "type": "boolean"
112
+ },
113
+ {
114
+ "type": "object",
115
+ "properties": {
116
+ "@container": {
117
+ "const": "@set"
118
+ },
119
+ "@protected": {
120
+ "type": "boolean"
121
+ }
122
+ },
123
+ "required": [
124
+ "@container"
125
+ ]
126
+ },
127
+ {
128
+ "const": "1.1"
129
+ }
130
+ ]
72
131
  }
73
132
  ]
74
133
  }
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement",
4
+ "title": "JsonLdContextDefinitionElement",
4
5
  "description": "A context definition element is used to define the types of a context definition.",
5
6
  "anyOf": [
6
7
  {
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot",
4
+ "title": "JsonLdContextDefinitionRoot",
4
5
  "description": "A context definition root is used to define the root of a context definition.",
5
6
  "anyOf": [
6
7
  {
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/json-ld/JsonLdDocument",
4
- "description": "A JSON-LD document MUST be valid JSON text as described in [RFC8259], or some format that can be represented in the JSON-LD internal representation that is equivalent to valid JSON text.",
4
+ "title": "JsonLdDocument",
5
+ "description": "A JSON-LD document MUST be valid JSON text as described in [RFC8259],\nor some format that can be represented in the JSON-LD internal representation\nthat is equivalent to valid JSON text.",
5
6
  "anyOf": [
6
7
  {
7
8
  "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"