@twin.org/standards-foaf 0.0.3-next.3

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 (62) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +21 -0
  3. package/dist/es/dataTypes/foafDataTypes.js +65 -0
  4. package/dist/es/dataTypes/foafDataTypes.js.map +1 -0
  5. package/dist/es/index.js +14 -0
  6. package/dist/es/index.js.map +1 -0
  7. package/dist/es/models/IAgent.js +2 -0
  8. package/dist/es/models/IAgent.js.map +1 -0
  9. package/dist/es/models/IBaseObject.js +2 -0
  10. package/dist/es/models/IBaseObject.js.map +1 -0
  11. package/dist/es/models/IDocument.js +2 -0
  12. package/dist/es/models/IDocument.js.map +1 -0
  13. package/dist/es/models/IGroup.js +2 -0
  14. package/dist/es/models/IGroup.js.map +1 -0
  15. package/dist/es/models/IImage.js +2 -0
  16. package/dist/es/models/IImage.js.map +1 -0
  17. package/dist/es/models/IOrganization.js +2 -0
  18. package/dist/es/models/IOrganization.js.map +1 -0
  19. package/dist/es/models/IPerson.js +2 -0
  20. package/dist/es/models/IPerson.js.map +1 -0
  21. package/dist/es/models/foafContextType.js +2 -0
  22. package/dist/es/models/foafContextType.js.map +1 -0
  23. package/dist/es/models/foafContexts.js +21 -0
  24. package/dist/es/models/foafContexts.js.map +1 -0
  25. package/dist/es/models/foafTypes.js +34 -0
  26. package/dist/es/models/foafTypes.js.map +1 -0
  27. package/dist/es/schemas/Agent.json +176 -0
  28. package/dist/es/schemas/Document.json +168 -0
  29. package/dist/es/schemas/Group.json +191 -0
  30. package/dist/es/schemas/Image.json +173 -0
  31. package/dist/es/schemas/Organization.json +177 -0
  32. package/dist/es/schemas/Person.json +207 -0
  33. package/dist/types/dataTypes/foafDataTypes.d.ts +13 -0
  34. package/dist/types/index.d.ts +11 -0
  35. package/dist/types/models/IAgent.d.ts +50 -0
  36. package/dist/types/models/IBaseObject.d.ts +38 -0
  37. package/dist/types/models/IDocument.d.ts +34 -0
  38. package/dist/types/models/IGroup.d.ts +23 -0
  39. package/dist/types/models/IImage.d.ts +29 -0
  40. package/dist/types/models/IOrganization.d.ts +17 -0
  41. package/dist/types/models/IPerson.d.ts +44 -0
  42. package/dist/types/models/foafContextType.d.ts +6 -0
  43. package/dist/types/models/foafContexts.d.ts +21 -0
  44. package/dist/types/models/foafTypes.d.ts +35 -0
  45. package/docs/changelog.md +10 -0
  46. package/docs/examples.md +1 -0
  47. package/docs/reference/classes/FoafDataTypes.md +37 -0
  48. package/docs/reference/index.md +26 -0
  49. package/docs/reference/interfaces/IAgent.md +197 -0
  50. package/docs/reference/interfaces/IBaseObject.md +92 -0
  51. package/docs/reference/interfaces/IDocument.md +159 -0
  52. package/docs/reference/interfaces/IGroup.md +227 -0
  53. package/docs/reference/interfaces/IImage.md +191 -0
  54. package/docs/reference/interfaces/IOrganization.md +215 -0
  55. package/docs/reference/interfaces/IPerson.md +275 -0
  56. package/docs/reference/type-aliases/FoafContextType.md +5 -0
  57. package/docs/reference/type-aliases/FoafContexts.md +5 -0
  58. package/docs/reference/type-aliases/FoafTypes.md +9 -0
  59. package/docs/reference/variables/FoafContexts.md +25 -0
  60. package/docs/reference/variables/FoafTypes.md +47 -0
  61. package/locales/en.json +1 -0
  62. package/package.json +52 -0
@@ -0,0 +1,177 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/foaf/Organization",
4
+ "description": "A FOAF Organization.",
5
+ "type": "object",
6
+ "properties": {
7
+ "@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
+ ]
79
+ },
80
+ "@type": {
81
+ "type": "string",
82
+ "const": "Organization",
83
+ "description": "Type."
84
+ },
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/Image",
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/Document",
134
+ "description": "A weblog of some thing (whether person, group, company etc.)."
135
+ },
136
+ "openid": {
137
+ "$ref": "https://schema.twindev.org/foaf/Document",
138
+ "description": "An OpenID for an agent."
139
+ },
140
+ "interest": {
141
+ "$ref": "https://schema.twindev.org/foaf/Document",
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
+ },
149
+ "required": [
150
+ "@type"
151
+ ],
152
+ "additionalProperties": {
153
+ "anyOf": [
154
+ {
155
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdNodePrimitive"
156
+ },
157
+ {
158
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdLanguageMap"
159
+ },
160
+ {
161
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIndexMap"
162
+ },
163
+ {
164
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIncludedBlock"
165
+ },
166
+ {
167
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdIdMap"
168
+ },
169
+ {
170
+ "$ref": "https://schema.twindev.org/json-ld/JsonLdTypeMap"
171
+ },
172
+ {
173
+ "type": "array"
174
+ }
175
+ ]
176
+ }
177
+ }
@@ -0,0 +1,207 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.twindev.org/foaf/Person",
4
+ "description": "A FOAF Person.",
5
+ "type": "object",
6
+ "properties": {
7
+ "@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
+ ]
79
+ },
80
+ "@type": {
81
+ "type": "string",
82
+ "const": "Person",
83
+ "description": "Type."
84
+ },
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/Image",
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/Document",
134
+ "description": "A weblog of some thing (whether person, group, company etc.)."
135
+ },
136
+ "openid": {
137
+ "$ref": "https://schema.twindev.org/foaf/Document",
138
+ "description": "An OpenID for an agent."
139
+ },
140
+ "interest": {
141
+ "$ref": "https://schema.twindev.org/foaf/Document",
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
+ "familyName": {
149
+ "type": "string",
150
+ "description": "The family name of some person."
151
+ },
152
+ "givenName": {
153
+ "type": "string",
154
+ "description": "The given name of some person."
155
+ },
156
+ "knows": {
157
+ "description": "Object or array data type",
158
+ "anyOf": [
159
+ {
160
+ "$ref": "https://schema.twindev.org/foaf/Agent"
161
+ },
162
+ {
163
+ "type": "array",
164
+ "items": {
165
+ "$ref": "https://schema.twindev.org/foaf/Agent"
166
+ }
167
+ }
168
+ ]
169
+ },
170
+ "img": {
171
+ "$ref": "https://schema.twindev.org/foaf/Image",
172
+ "description": "An image that can be used to represent some thing."
173
+ },
174
+ "nick": {
175
+ "type": "string",
176
+ "description": "A short informal nickname characterizing an agent (includes login identifiers, IRC and other chat nicknames)."
177
+ }
178
+ },
179
+ "required": [
180
+ "@type"
181
+ ],
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
+ }
207
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Data Type registration for FOAF
3
+ */
4
+ export declare abstract class FoafDataTypes {
5
+ /**
6
+ * Register redirects for FOAF namespace to enable offline JSON-LD processing.
7
+ */
8
+ static registerRedirects(): void;
9
+ /**
10
+ * Register all the data types.
11
+ */
12
+ static registerTypes(): void;
13
+ }
@@ -0,0 +1,11 @@
1
+ export * from "./dataTypes/foafDataTypes.js";
2
+ export * from "./models/IAgent.js";
3
+ export * from "./models/IBaseObject.js";
4
+ export * from "./models/IDocument.js";
5
+ export * from "./models/IGroup.js";
6
+ export * from "./models/IImage.js";
7
+ export * from "./models/IOrganization.js";
8
+ export * from "./models/IPerson.js";
9
+ export * from "./models/foafContexts.js";
10
+ export * from "./models/foafContextType.js";
11
+ export * from "./models/foafTypes.js";
@@ -0,0 +1,50 @@
1
+ import type { ObjectOrArray } from "@twin.org/core";
2
+ import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
3
+ import type { FoafContextType } from "./foafContextType.js";
4
+ import type { FoafTypes } from "./foafTypes.js";
5
+ import type { IBaseObject } from "./IBaseObject.js";
6
+ import type { IDocument } from "./IDocument.js";
7
+ /**
8
+ * A FOAF Agent.
9
+ * @see http://xmlns.com/foaf/0.1/
10
+ */
11
+ export interface IAgent extends IBaseObject {
12
+ /**
13
+ * The LD Context.
14
+ */
15
+ "@context"?: FoafContextType;
16
+ /**
17
+ * Type.
18
+ */
19
+ "@type": typeof FoafTypes.Agent | typeof FoafTypes.Person | typeof FoafTypes.Organization | typeof FoafTypes.Group | string;
20
+ /**
21
+ * The age in years of some agent.
22
+ * @see http://xmlns.com/foaf/spec/#term_age
23
+ */
24
+ age?: number;
25
+ /**
26
+ * Something that was made by this agent.
27
+ * @see http://xmlns.com/foaf/spec/#term_made
28
+ */
29
+ made?: ObjectOrArray<IJsonLdNodeObject>;
30
+ /**
31
+ * A weblog of some thing (whether person, group, company etc.).
32
+ * @see http://xmlns.com/foaf/spec/#term_weblog
33
+ */
34
+ weblog?: IDocument;
35
+ /**
36
+ * An OpenID for an agent.
37
+ * @see http://xmlns.com/foaf/spec/#term_openid
38
+ */
39
+ openid?: IDocument;
40
+ /**
41
+ * A page about a topic of interest to this person.
42
+ * @see http://xmlns.com/foaf/spec/#term_interest
43
+ */
44
+ interest?: IDocument;
45
+ /**
46
+ * A thing of interest to this person.
47
+ * @see http://xmlns.com/foaf/spec/#term_topic_interest
48
+ */
49
+ topic_interest?: IJsonLdNodeObject;
50
+ }
@@ -0,0 +1,38 @@
1
+ import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
+ import type { FoafContextType } from "./foafContextType.js";
3
+ import type { IImage } from "./IImage.js";
4
+ /**
5
+ * Core FOAF Properties
6
+ * @see http://xmlns.com/foaf/0.1/
7
+ */
8
+ export interface IBaseObject extends IJsonLdNodeObject {
9
+ /**
10
+ * The LD Context.
11
+ */
12
+ "@context"?: FoafContextType;
13
+ /**
14
+ * A name for some thing.
15
+ * @see http://xmlns.com/foaf/spec/#term_name
16
+ */
17
+ name?: string;
18
+ /**
19
+ * Title (Mr, Mrs, Ms, Dr. etc)
20
+ * @see http://xmlns.com/foaf/spec/#term_title
21
+ */
22
+ title?: string;
23
+ /**
24
+ * A personal mailbox, ie. an Internet mailbox associated with exactly one owner, the first owner of this mailbox
25
+ * @see http://xmlns.com/foaf/spec/#term_mbox
26
+ */
27
+ mbox?: string;
28
+ /**
29
+ * A homepage for some thing.
30
+ * @see http://xmlns.com/foaf/spec/#term_homepage
31
+ */
32
+ homepage?: string;
33
+ /**
34
+ * A depiction of some thing.
35
+ * @see http://xmlns.com/foaf/spec/#term_depiction
36
+ */
37
+ depiction?: IImage;
38
+ }
@@ -0,0 +1,34 @@
1
+ import type { ObjectOrArray } from "@twin.org/core";
2
+ import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
3
+ import type { FoafContextType } from "./foafContextType.js";
4
+ import type { FoafTypes } from "./foafTypes.js";
5
+ import type { IBaseObject } from "./IBaseObject.js";
6
+ /**
7
+ * A FOAF Document
8
+ * @see http://xmlns.com/foaf/0.1/
9
+ */
10
+ export interface IDocument extends IBaseObject {
11
+ /**
12
+ * The LD Context.
13
+ */
14
+ "@context"?: FoafContextType;
15
+ /**
16
+ * Type.
17
+ */
18
+ "@type": typeof FoafTypes.Document | typeof FoafTypes.Image;
19
+ /**
20
+ * A topic of some page or document.
21
+ * @see http://xmlns.com/foaf/spec/#term_topic
22
+ */
23
+ topic?: string;
24
+ /**
25
+ * The primary topic of some page or document.
26
+ * @see http://xmlns.com/foaf/spec/#term_primaryTopic
27
+ */
28
+ primaryTopic?: ObjectOrArray<IJsonLdNodeObject>;
29
+ /**
30
+ * A sha1sum hash, in hex.
31
+ * @see http://xmlns.com/foaf/spec/#term_sha1sum
32
+ */
33
+ sha1?: string;
34
+ }
@@ -0,0 +1,23 @@
1
+ import type { ObjectOrArray } from "@twin.org/core";
2
+ import type { FoafContextType } from "./foafContextType.js";
3
+ import type { FoafTypes } from "./foafTypes.js";
4
+ import type { IAgent } from "./IAgent.js";
5
+ /**
6
+ * A FOAF Group.
7
+ * @see http://xmlns.com/foaf/0.1/
8
+ */
9
+ export interface IGroup extends IAgent {
10
+ /**
11
+ * The LD Context.
12
+ */
13
+ "@context"?: FoafContextType;
14
+ /**
15
+ * Type.
16
+ */
17
+ "@type": typeof FoafTypes.Group;
18
+ /**
19
+ * Indicates a member of a Group
20
+ * @see http://xmlns.com/foaf/spec/#term_member
21
+ */
22
+ member?: ObjectOrArray<IAgent>;
23
+ }
@@ -0,0 +1,29 @@
1
+ import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
2
+ import type { FoafContextType } from "./foafContextType.js";
3
+ import type { FoafTypes } from "./foafTypes.js";
4
+ import type { IDocument } from "./IDocument.js";
5
+ /**
6
+ * A FOAF image.
7
+ * @see http://xmlns.com/foaf/0.1/
8
+ */
9
+ export interface IImage extends IDocument {
10
+ /**
11
+ * The LD Context.
12
+ *
13
+ */
14
+ "@context"?: FoafContextType;
15
+ /**
16
+ * Type.
17
+ */
18
+ "@type": typeof FoafTypes.Image;
19
+ /**
20
+ * A thing depicted in this representation.
21
+ * @see http://xmlns.com/foaf/spec/#term_depicts
22
+ */
23
+ depicts?: IJsonLdNodeObject;
24
+ /**
25
+ * A derived thumbnail image.
26
+ * @see http://xmlns.com/foaf/spec/#term_thumbnail
27
+ */
28
+ thumbnail?: IImage;
29
+ }
@@ -0,0 +1,17 @@
1
+ import type { FoafContextType } from "./foafContextType.js";
2
+ import type { FoafTypes } from "./foafTypes.js";
3
+ import type { IAgent } from "./IAgent.js";
4
+ /**
5
+ * A FOAF Organization.
6
+ * @see http://xmlns.com/foaf/0.1/
7
+ */
8
+ export interface IOrganization extends IAgent {
9
+ /**
10
+ * The LD Context.
11
+ */
12
+ "@context"?: FoafContextType;
13
+ /**
14
+ * Type.
15
+ */
16
+ "@type": typeof FoafTypes.Organization;
17
+ }
@@ -0,0 +1,44 @@
1
+ import type { ObjectOrArray } from "@twin.org/core";
2
+ import type { FoafContextType } from "./foafContextType.js";
3
+ import type { FoafTypes } from "./foafTypes.js";
4
+ import type { IAgent } from "./IAgent.js";
5
+ import type { IImage } from "./IImage.js";
6
+ /**
7
+ * A FOAF Person.
8
+ * @see http://xmlns.com/foaf/0.1/
9
+ */
10
+ export interface IPerson extends IAgent {
11
+ /**
12
+ * The LD Context.
13
+ */
14
+ "@context"?: FoafContextType;
15
+ /**
16
+ * Type.
17
+ */
18
+ "@type": typeof FoafTypes.Person;
19
+ /**
20
+ * The family name of some person.
21
+ * @see http://xmlns.com/foaf/spec/#term_familyName
22
+ */
23
+ familyName?: string;
24
+ /**
25
+ * The given name of some person.
26
+ * @see http://xmlns.com/foaf/spec/#term_givenName
27
+ */
28
+ givenName?: string;
29
+ /**
30
+ * A person known by this person (indicating some level of reciprocated interaction between the parties).
31
+ * @see http://xmlns.com/foaf/spec/#term_knows
32
+ */
33
+ knows?: ObjectOrArray<IAgent>;
34
+ /**
35
+ * An image that can be used to represent some thing.
36
+ * @see http://xmlns.com/foaf/spec/#term_img
37
+ */
38
+ img?: IImage;
39
+ /**
40
+ * A short informal nickname characterizing an agent (includes login identifiers, IRC and other chat nicknames).
41
+ * @see http://xmlns.com/foaf/spec/#term_nick
42
+ */
43
+ nick?: string;
44
+ }
@@ -0,0 +1,6 @@
1
+ import type { IJsonLdContextDefinitionElement } from "@twin.org/data-json-ld";
2
+ import type { FoafContexts } from "./foafContexts.js";
3
+ /**
4
+ * The FOAF JSON-LD context type.
5
+ */
6
+ export type FoafContextType = typeof FoafContexts.ContextRoot | [typeof FoafContexts.ContextRoot] | [...IJsonLdContextDefinitionElement[], typeof FoafContexts.ContextRoot];
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The LD Contexts concerning FOAF.
3
+ */
4
+ export declare const FoafContexts: {
5
+ /**
6
+ * The FOAF LD Context.
7
+ */
8
+ readonly ContextRoot: "https://xmlns.com/foaf/0.1/";
9
+ /**
10
+ * The TWIN context for FOAF.
11
+ */
12
+ readonly TwinContext: "https://schema.twindev.org/foaf/";
13
+ /**
14
+ * The TWIN context redirect for JSON-LD.
15
+ */
16
+ readonly ContextRedirect: "https://schema.twindev.org/foaf/types.jsonld";
17
+ };
18
+ /**
19
+ * The LD Contexts concerning FOAF.
20
+ */
21
+ export type FoafContexts = (typeof FoafContexts)[keyof typeof FoafContexts];