@twin.org/standards-foaf 0.0.3-next.9 → 0.9.0

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 (33) hide show
  1. package/README.md +1 -1
  2. package/dist/es/dataTypes/foafDataTypes.js +35 -38
  3. package/dist/es/dataTypes/foafDataTypes.js.map +1 -1
  4. package/dist/es/models/IFoafBaseObject.js.map +1 -1
  5. package/dist/es/models/IFoafImage.js.map +1 -1
  6. package/dist/es/models/foafContextType.js.map +1 -1
  7. package/dist/es/models/foafContexts.js +12 -6
  8. package/dist/es/models/foafContexts.js.map +1 -1
  9. package/dist/es/schemas/FoafAgent.json +18 -119
  10. package/dist/es/schemas/FoafContextType.json +30 -0
  11. package/dist/es/schemas/FoafDocument.json +13 -127
  12. package/dist/es/schemas/FoafGroup.json +10 -162
  13. package/dist/es/schemas/FoafImage.json +8 -148
  14. package/dist/es/schemas/FoafOrganization.json +8 -160
  15. package/dist/es/schemas/FoafPerson.json +10 -162
  16. package/dist/types/models/IFoafBaseObject.d.ts +5 -2
  17. package/dist/types/models/IFoafImage.d.ts +0 -1
  18. package/dist/types/models/foafContextType.d.ts +2 -1
  19. package/dist/types/models/foafContexts.d.ts +12 -6
  20. package/docs/changelog.md +466 -9
  21. package/docs/examples.md +21 -1
  22. package/docs/reference/classes/FoafDataTypes.md +2 -2
  23. package/docs/reference/interfaces/IFoafAgent.md +37 -33
  24. package/docs/reference/interfaces/IFoafBaseObject.md +18 -22
  25. package/docs/reference/interfaces/IFoafDocument.md +30 -26
  26. package/docs/reference/interfaces/IFoafGroup.md +39 -31
  27. package/docs/reference/interfaces/IFoafImage.md +34 -26
  28. package/docs/reference/interfaces/IFoafOrganization.md +37 -29
  29. package/docs/reference/interfaces/IFoafPerson.md +47 -39
  30. package/docs/reference/type-aliases/FoafContextType.md +1 -1
  31. package/docs/reference/variables/FoafContexts.md +17 -9
  32. package/docs/reference/variables/FoafTypes.md +6 -6
  33. package/package.json +7 -7
@@ -1,150 +1,18 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://schema.twindev.org/foaf/FoafPerson",
4
+ "title": "FoafPerson",
4
5
  "description": "A FOAF Person.",
5
6
  "type": "object",
6
7
  "properties": {
7
8
  "@context": {
8
- "description": "The FOAF JSON-LD context type.",
9
- "anyOf": [
10
- {
11
- "type": "string",
12
- "const": "https://xmlns.com/foaf/0.1/"
13
- },
14
- {
15
- "type": "array",
16
- "items": {
17
- "type": "string",
18
- "const": "https://xmlns.com/foaf/0.1/"
19
- },
20
- "minItems": 1,
21
- "maxItems": 1
22
- },
23
- {
24
- "type": "array",
25
- "minItems": 1,
26
- "prefixItems": [
27
- {
28
- "type": "string",
29
- "const": "https://xmlns.com/foaf/0.1/"
30
- }
31
- ],
32
- "items": {
33
- "$ref": "https://schema.twindev.org/json-ld/JsonLdContextDefinitionElement"
34
- }
35
- }
36
- ]
37
- },
38
- "@id": {
39
- "anyOf": [
40
- {
41
- "type": "string"
42
- },
43
- {
44
- "type": "array",
45
- "items": {
46
- "type": "string"
47
- }
48
- }
49
- ]
50
- },
51
- "@included": {
52
- "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
53
- },
54
- "@graph": {
55
- "anyOf": [
56
- {
57
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
58
- },
59
- {
60
- "type": "array",
61
- "items": {
62
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
63
- }
64
- }
65
- ]
66
- },
67
- "@nest": {
68
- "anyOf": [
69
- {
70
- "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
71
- },
72
- {
73
- "type": "array",
74
- "items": {
75
- "$ref": "https://schema.twindev.org/json-ld/JsonLdJsonObject"
76
- }
77
- }
78
- ]
9
+ "$ref": "https://schema.twindev.org/foaf/FoafContextType",
10
+ "description": "The LD Context."
79
11
  },
80
12
  "@type": {
81
- "type": "string",
82
13
  "const": "Person",
83
14
  "description": "Type."
84
15
  },
85
- "@reverse": {
86
- "type": "object",
87
- "additionalProperties": {
88
- "type": "string"
89
- }
90
- },
91
- "@index": {
92
- "type": "string"
93
- },
94
- "name": {
95
- "type": "string",
96
- "description": "A name for some thing."
97
- },
98
- "title": {
99
- "type": "string",
100
- "description": "Title (Mr, Mrs, Ms, Dr. etc)"
101
- },
102
- "mbox": {
103
- "type": "string",
104
- "description": "A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox"
105
- },
106
- "homepage": {
107
- "type": "string",
108
- "description": "A homepage for some thing."
109
- },
110
- "depiction": {
111
- "$ref": "https://schema.twindev.org/foaf/FoafImage",
112
- "description": "A depiction of some thing."
113
- },
114
- "age": {
115
- "type": "number",
116
- "description": "The age in years of some agent."
117
- },
118
- "made": {
119
- "description": "Object or array data type",
120
- "anyOf": [
121
- {
122
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
123
- },
124
- {
125
- "type": "array",
126
- "items": {
127
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject"
128
- }
129
- }
130
- ]
131
- },
132
- "weblog": {
133
- "$ref": "https://schema.twindev.org/foaf/FoafDocument",
134
- "description": "A weblog of some thing (whether person, group, company etc.)."
135
- },
136
- "openid": {
137
- "$ref": "https://schema.twindev.org/foaf/FoafDocument",
138
- "description": "An OpenID for an agent."
139
- },
140
- "interest": {
141
- "$ref": "https://schema.twindev.org/foaf/FoafDocument",
142
- "description": "A page about a topic of interest to this person."
143
- },
144
- "topic_interest": {
145
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodeObject",
146
- "description": "A thing of interest to this person."
147
- },
148
16
  "familyName": {
149
17
  "type": "string",
150
18
  "description": "The family name of some person."
@@ -154,7 +22,6 @@
154
22
  "description": "The given name of some person."
155
23
  },
156
24
  "knows": {
157
- "description": "Object or array data type",
158
25
  "anyOf": [
159
26
  {
160
27
  "$ref": "https://schema.twindev.org/foaf/FoafAgent"
@@ -165,7 +32,8 @@
165
32
  "$ref": "https://schema.twindev.org/foaf/FoafAgent"
166
33
  }
167
34
  }
168
- ]
35
+ ],
36
+ "description": "A person known by this person (indicating some level of reciprocated interaction between the parties)."
169
37
  },
170
38
  "img": {
171
39
  "$ref": "https://schema.twindev.org/foaf/FoafImage",
@@ -179,29 +47,9 @@
179
47
  "required": [
180
48
  "@type"
181
49
  ],
182
- "additionalProperties": {
183
- "anyOf": [
184
- {
185
- "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
186
- },
187
- {
188
- "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
189
- },
190
- {
191
- "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
192
- },
193
- {
194
- "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
195
- },
196
- {
197
- "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
198
- },
199
- {
200
- "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
201
- },
202
- {
203
- "type": "array"
204
- }
205
- ]
206
- }
50
+ "allOf": [
51
+ {
52
+ "$ref": "https://schema.twindev.org/foaf/FoafAgent"
53
+ }
54
+ ]
207
55
  }
@@ -1,15 +1,18 @@
1
- import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
1
  import type { FoafContextType } from "./foafContextType.js";
3
2
  import type { IFoafImage } from "./IFoafImage.js";
4
3
  /**
5
4
  * Core FOAF Properties
6
5
  * @see http://xmlns.com/foaf/0.1/
7
6
  */
8
- export interface IFoafBaseObject extends IJsonLdNodeObject {
7
+ export interface IFoafBaseObject {
9
8
  /**
10
9
  * The LD Context.
11
10
  */
12
11
  "@context"?: FoafContextType;
12
+ /**
13
+ * The unique identifier for the FOAF object.
14
+ */
15
+ "@id"?: string;
13
16
  /**
14
17
  * A name for some thing.
15
18
  * @see http://xmlns.com/foaf/spec/#term_name
@@ -9,7 +9,6 @@ import type { IFoafDocument } from "./IFoafDocument.js";
9
9
  export interface IFoafImage extends IFoafDocument {
10
10
  /**
11
11
  * The LD Context.
12
- *
13
12
  */
14
13
  "@context"?: FoafContextType;
15
14
  /**
@@ -1,6 +1,7 @@
1
+ import type { SingleOccurrenceArray } from "@twin.org/core";
1
2
  import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
2
3
  import type { FoafContexts } from "./foafContexts.js";
3
4
  /**
4
5
  * The FOAF JSON-LD context type.
5
6
  */
6
- export type FoafContextType = typeof FoafContexts.ContextRoot | [typeof FoafContexts.ContextRoot] | [...IJsonLdContextDefinitionElement[], typeof FoafContexts.ContextRoot];
7
+ export type FoafContextType = typeof FoafContexts.Context | SingleOccurrenceArray<IJsonLdContextDefinitionElement, typeof FoafContexts.Context>;
@@ -3,17 +3,23 @@
3
3
  */
4
4
  export declare const FoafContexts: {
5
5
  /**
6
- * The FOAF LD Context.
6
+ * The canonical RDF namespace URI.
7
7
  */
8
- readonly ContextRoot: "https://xmlns.com/foaf/0.1/";
8
+ readonly Namespace: "https://xmlns.com/foaf/0.1/";
9
9
  /**
10
- * The TWIN context for FOAF.
10
+ * The value to use in @context.
11
+ * Note: Context matches Namespace (both include trailing slash) as per FOAF specification.
12
+ * The FOAF JSON-LD context URL format includes a trailing slash.
11
13
  */
12
- readonly TwinContext: "https://schema.twindev.org/foaf/";
14
+ readonly Context: "https://xmlns.com/foaf/0.1/";
13
15
  /**
14
- * The TWIN context redirect for JSON-LD.
16
+ * The JSON-LD Context URL.
15
17
  */
16
- readonly ContextRedirect: "https://schema.twindev.org/foaf/types.jsonld";
18
+ readonly JsonLdContext: "https://schema.twindev.org/foaf/types.jsonld";
19
+ /**
20
+ * The namespace location of the hosted version of the JSON Schema.
21
+ */
22
+ readonly JsonSchemaNamespace: "https://schema.twindev.org/foaf/";
17
23
  };
18
24
  /**
19
25
  * The LD Contexts concerning FOAF.