@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,72 +1,31 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/json-ld/JsonLdExpandedTermDefinition",
4
- "description": "An expanded term definition is used to describe the mapping between a term and its expanded identifier, as well as other properties of the value associated with the term when it is used as key in a node object.",
5
- "anyOf": [
4
+ "title": "JsonLdExpandedTermDefinition",
5
+ "description": "An expanded term definition is used to describe the mapping between a term\nand its expanded identifier, as well as other properties of the value\nassociated with the term when it is used as key in a node object.",
6
+ "allOf": [
6
7
  {
7
8
  "type": "object",
8
9
  "properties": {
9
- "@id": {
10
- "anyOf": [
11
- {
12
- "type": "string"
13
- },
14
- {
15
- "type": "array",
16
- "items": {
17
- "type": "string"
18
- }
19
- },
20
- {
21
- "type": "null"
22
- }
23
- ]
24
- },
25
- "@nest": {
26
- "type": "string"
27
- },
28
- "@container": {
10
+ "@type": {
29
11
  "anyOf": [
30
12
  {
31
- "type": "string",
32
- "const": "@list"
13
+ "const": "@id"
33
14
  },
34
15
  {
35
- "type": "string",
36
- "const": "@set"
16
+ "const": "@json"
37
17
  },
38
18
  {
39
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContainerType"
19
+ "const": "@none"
40
20
  },
41
21
  {
42
- "type": "array",
43
- "items": {
44
- "anyOf": [
45
- {
46
- "type": "string",
47
- "const": "@list"
48
- },
49
- {
50
- "type": "string",
51
- "const": "@set"
52
- },
53
- {
54
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContainerType"
55
- }
56
- ]
57
- }
58
- },
59
- {
60
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContainerTypeArray"
22
+ "const": "@vocab"
61
23
  },
62
24
  {
63
- "type": "null"
25
+ "type": "string"
64
26
  }
65
27
  ]
66
28
  },
67
- "@type": {
68
- "type": "string"
69
- },
70
29
  "@language": {
71
30
  "type": "string"
72
31
  },
@@ -88,46 +47,101 @@
88
47
  }
89
48
  },
90
49
  {
91
- "type": "object",
92
- "properties": {
93
- "@reverse": {
94
- "type": "string"
50
+ "anyOf": [
51
+ {
52
+ "type": "object",
53
+ "properties": {
54
+ "@id": {
55
+ "anyOf": [
56
+ {
57
+ "type": "string"
58
+ },
59
+ {
60
+ "type": "array",
61
+ "items": {
62
+ "type": "string"
63
+ }
64
+ },
65
+ {
66
+ "type": "null"
67
+ }
68
+ ]
69
+ },
70
+ "@nest": {
71
+ "anyOf": [
72
+ {
73
+ "const": "@nest"
74
+ },
75
+ {
76
+ "type": "string"
77
+ }
78
+ ]
79
+ },
80
+ "@container": {
81
+ "anyOf": [
82
+ {
83
+ "anyOf": [
84
+ {
85
+ "const": "@list"
86
+ },
87
+ {
88
+ "const": "@set"
89
+ },
90
+ {
91
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContainerType"
92
+ }
93
+ ]
94
+ },
95
+ {
96
+ "type": "array",
97
+ "items": {
98
+ "anyOf": [
99
+ {
100
+ "const": "@list"
101
+ },
102
+ {
103
+ "const": "@set"
104
+ },
105
+ {
106
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContainerType"
107
+ }
108
+ ]
109
+ }
110
+ },
111
+ {
112
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdContainerTypeArray"
113
+ },
114
+ {
115
+ "type": "null"
116
+ }
117
+ ]
118
+ }
119
+ }
95
120
  },
96
- "@container": {
97
- "type": [
98
- "string",
99
- "null"
100
- ],
101
- "enum": [
102
- "@set",
103
- "@index",
104
- null
121
+ {
122
+ "type": "object",
123
+ "properties": {
124
+ "@reverse": {
125
+ "type": "string"
126
+ },
127
+ "@container": {
128
+ "anyOf": [
129
+ {
130
+ "const": "@set"
131
+ },
132
+ {
133
+ "const": "@index"
134
+ },
135
+ {
136
+ "type": "null"
137
+ }
138
+ ]
139
+ }
140
+ },
141
+ "required": [
142
+ "@reverse"
105
143
  ]
106
- },
107
- "@type": {
108
- "type": "string"
109
- },
110
- "@language": {
111
- "type": "string"
112
- },
113
- "@index": {
114
- "type": "string"
115
- },
116
- "@context": {
117
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinition"
118
- },
119
- "@prefix": {
120
- "type": "boolean"
121
- },
122
- "@propagate": {
123
- "type": "boolean"
124
- },
125
- "@protected": {
126
- "type": "boolean"
127
144
  }
128
- },
129
- "required": [
130
- "@reverse"
131
145
  ]
132
146
  }
133
147
  ]
@@ -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/JsonLdGraphObject",
4
+ "title": "JsonLdGraphObject",
4
5
  "description": "A graph object represents a named graph, which MAY include an explicit graph name.",
5
6
  "type": "object",
6
7
  "properties": {
@@ -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/JsonLdIdMap",
4
+ "title": "JsonLdIdMap",
4
5
  "description": "An id map is used to associate an IRI with a value that allows easy programmatic access.",
5
6
  "type": "object",
6
7
  "additionalProperties": {
@@ -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/JsonLdIncludedBlock",
4
+ "title": "JsonLdIncludedBlock",
4
5
  "description": "An included block is used to provide a set of node objects.",
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/JsonLdIndexMap",
4
- "description": "An index map allows keys that have no semantic meaning, but should be preserved regardless, to be used in JSON-LD documents.",
4
+ "title": "JsonLdIndexMap",
5
+ "description": "An index map allows keys that have no semantic meaning, but should be preserved regardless,\nto be used in JSON-LD documents.",
5
6
  "type": "object",
6
7
  "additionalProperties": {
7
8
  "anyOf": [
@@ -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/JsonLdIndexMapItem",
4
+ "title": "JsonLdIndexMapItem",
4
5
  "description": "The items that can be stored in an index map.",
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/JsonLdJsonArray",
4
+ "title": "JsonLdJsonArray",
4
5
  "description": "JSON Type for array.",
5
6
  "type": "array",
6
7
  "items": {
@@ -1,16 +1,10 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/json-ld/JsonLdJsonObject",
4
+ "title": "JsonLdJsonObject",
4
5
  "description": "JSON Type for object.",
5
6
  "type": "object",
6
7
  "additionalProperties": {
7
- "anyOf": [
8
- {
9
- "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonValue"
10
- },
11
- {
12
- "not": {}
13
- }
14
- ]
8
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonValue"
15
9
  }
16
10
  }
@@ -1,11 +1,20 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/json-ld/JsonLdJsonPrimitive",
4
+ "title": "JsonLdJsonPrimitive",
4
5
  "description": "JSON Primitive.",
5
- "type": [
6
- "string",
7
- "number",
8
- "boolean",
9
- "null"
6
+ "anyOf": [
7
+ {
8
+ "type": "string"
9
+ },
10
+ {
11
+ "type": "number"
12
+ },
13
+ {
14
+ "type": "boolean"
15
+ },
16
+ {
17
+ "type": "null"
18
+ }
10
19
  ]
11
20
  }
@@ -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/JsonLdJsonValue",
4
+ "title": "JsonLdJsonValue",
4
5
  "description": "JSON Value.",
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/JsonLdLanguageMap",
4
+ "title": "JsonLdLanguageMap",
4
5
  "description": "A language map is used to associate a language with a value in a way that allows easy programmatic access.",
5
6
  "type": "object",
6
7
  "additionalProperties": {
@@ -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/JsonLdListObject",
4
+ "title": "JsonLdListObject",
4
5
  "description": "A list represents an ordered set of values.",
5
6
  "type": "object",
6
7
  "properties": {
@@ -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/JsonLdListOrSetItem",
4
+ "title": "JsonLdListOrSetItem",
4
5
  "description": "A list or set item can be a null, boolean, number, string, node object, or value object.",
5
6
  "anyOf": [
6
7
  {
@@ -1,13 +1,20 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
4
- "description": "A node object represents zero or more properties of a node in the graph serialized by the JSON-LD document.",
4
+ "title": "JsonLdNodeObject",
5
+ "description": "A node object represents zero or more properties of a node\nin the graph serialized by the JSON-LD document.",
5
6
  "type": "object",
6
7
  "additionalProperties": {
7
8
  "anyOf": [
8
9
  {
9
10
  "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
10
11
  },
12
+ {
13
+ "type": "array",
14
+ "items": {
15
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
16
+ }
17
+ },
11
18
  {
12
19
  "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
13
20
  },
@@ -22,79 +29,12 @@
22
29
  },
23
30
  {
24
31
  "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
25
- },
26
- {
27
- "type": "array"
28
32
  }
29
33
  ]
30
34
  },
31
- "properties": {
32
- "@context": {
33
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionRoot"
34
- },
35
- "@id": {
36
- "anyOf": [
37
- {
38
- "type": "string"
39
- },
40
- {
41
- "type": "array",
42
- "items": {
43
- "type": "string"
44
- }
45
- }
46
- ]
47
- },
48
- "@included": {
49
- "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
50
- },
51
- "@graph": {
52
- "anyOf": [
53
- {
54
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
55
- },
56
- {
57
- "type": "array",
58
- "items": {
59
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
60
- }
61
- }
62
- ]
63
- },
64
- "@nest": {
65
- "anyOf": [
66
- {
67
- "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
68
- },
69
- {
70
- "type": "array",
71
- "items": {
72
- "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
73
- }
74
- }
75
- ]
76
- },
77
- "@type": {
78
- "anyOf": [
79
- {
80
- "type": "string"
81
- },
82
- {
83
- "type": "array",
84
- "items": {
85
- "type": "string"
86
- }
87
- }
88
- ]
89
- },
90
- "@reverse": {
91
- "type": "object",
92
- "additionalProperties": {
93
- "type": "string"
94
- }
95
- },
96
- "@index": {
97
- "type": "string"
35
+ "allOf": [
36
+ {
37
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdObject"
98
38
  }
99
- }
39
+ ]
100
40
  }
@@ -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/JsonLdNodePrimitive",
4
+ "title": "JsonLdNodePrimitive",
4
5
  "description": "A node primitive is a JSON-LD value which is not one of the defined NodeObject properties.",
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/JsonLdObject",
4
- "description": "An object represents the pre-defined properties of the node object in the graph serialized by the JSON-LD document.",
4
+ "title": "JsonLdObject",
5
+ "description": "An object represents the pre-defined properties of the node object\nin the graph serialized by the JSON-LD document.",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "@context": {
@@ -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/JsonLdSetObject",
4
+ "title": "JsonLdSetObject",
4
5
  "description": "A set represents an unordered set of values.",
5
6
  "type": "object",
6
7
  "properties": {
@@ -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/JsonLdTypeMap",
4
+ "title": "JsonLdTypeMap",
4
5
  "description": "A type map is used to associate an IRI with a value that allows easy programmatic access.",
5
6
  "type": "object",
6
7
  "additionalProperties": {