@twin.org/standards-foaf 0.0.3-next.6 → 0.0.3-next.61
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/README.md +1 -1
- package/dist/es/dataTypes/foafDataTypes.js +41 -44
- package/dist/es/dataTypes/foafDataTypes.js.map +1 -1
- package/dist/es/index.js +7 -7
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IFoafAgent.js +2 -0
- package/dist/es/models/IFoafAgent.js.map +1 -0
- package/dist/es/models/IFoafBaseObject.js +2 -0
- package/dist/es/models/IFoafBaseObject.js.map +1 -0
- package/dist/es/models/IFoafDocument.js +2 -0
- package/dist/es/models/IFoafDocument.js.map +1 -0
- package/dist/es/models/IFoafGroup.js +2 -0
- package/dist/es/models/IFoafGroup.js.map +1 -0
- package/dist/es/models/IFoafImage.js +2 -0
- package/dist/es/models/IFoafImage.js.map +1 -0
- package/dist/es/models/IFoafOrganization.js +2 -0
- package/dist/es/models/IFoafOrganization.js.map +1 -0
- package/dist/es/models/IFoafPerson.js +2 -0
- package/dist/es/models/IFoafPerson.js.map +1 -0
- package/dist/es/models/foafContextType.js.map +1 -1
- package/dist/es/models/foafContexts.js +12 -6
- package/dist/es/models/foafContexts.js.map +1 -1
- package/dist/es/schemas/FoafAgent.json +75 -0
- package/dist/es/schemas/FoafContextType.json +30 -0
- package/dist/es/schemas/FoafDocument.json +54 -0
- package/dist/es/schemas/FoafGroup.json +39 -0
- package/dist/es/schemas/FoafImage.json +33 -0
- package/dist/es/schemas/FoafOrganization.json +25 -0
- package/dist/es/schemas/FoafPerson.json +55 -0
- package/dist/types/index.d.ts +7 -7
- package/dist/types/models/{IAgent.d.ts → IFoafAgent.d.ts} +12 -7
- package/dist/types/models/{IBaseObject.d.ts → IFoafBaseObject.d.ts} +7 -4
- package/dist/types/models/{IDocument.d.ts → IFoafDocument.d.ts} +8 -3
- package/dist/types/models/IFoafGroup.d.ts +29 -0
- package/dist/types/models/{IImage.d.ts → IFoafImage.d.ts} +9 -4
- package/dist/types/models/IFoafOrganization.d.ts +23 -0
- package/dist/types/models/{IPerson.d.ts → IFoafPerson.d.ts} +11 -5
- package/dist/types/models/foafContextType.d.ts +2 -1
- package/dist/types/models/foafContexts.d.ts +12 -6
- package/docs/changelog.md +398 -5
- package/docs/examples.md +21 -1
- package/docs/reference/classes/FoafDataTypes.md +2 -2
- package/docs/reference/index.md +13 -7
- package/docs/reference/interfaces/IFoafAgent.md +201 -0
- package/docs/reference/interfaces/IFoafBaseObject.md +88 -0
- package/docs/reference/interfaces/IFoafDocument.md +163 -0
- package/docs/reference/interfaces/IFoafGroup.md +235 -0
- package/docs/reference/interfaces/IFoafImage.md +199 -0
- package/docs/reference/interfaces/IFoafOrganization.md +223 -0
- package/docs/reference/interfaces/IFoafPerson.md +283 -0
- package/docs/reference/type-aliases/FoafContextType.md +1 -1
- package/docs/reference/type-aliases/IFoafAgentWithAliases.md +12 -0
- package/docs/reference/type-aliases/IFoafDocumentWithAliases.md +12 -0
- package/docs/reference/type-aliases/IFoafGroupWithAliases.md +12 -0
- package/docs/reference/type-aliases/IFoafImageWithAliases.md +12 -0
- package/docs/reference/type-aliases/IFoafOrganizationWithAliases.md +12 -0
- package/docs/reference/type-aliases/IFoafPersonWithAliases.md +12 -0
- package/docs/reference/variables/FoafContexts.md +17 -9
- package/docs/reference/variables/FoafTypes.md +6 -6
- package/package.json +4 -4
- package/dist/es/models/IAgent.js +0 -2
- package/dist/es/models/IAgent.js.map +0 -1
- package/dist/es/models/IBaseObject.js +0 -2
- package/dist/es/models/IBaseObject.js.map +0 -1
- package/dist/es/models/IDocument.js +0 -2
- package/dist/es/models/IDocument.js.map +0 -1
- package/dist/es/models/IGroup.js +0 -2
- package/dist/es/models/IGroup.js.map +0 -1
- package/dist/es/models/IImage.js +0 -2
- package/dist/es/models/IImage.js.map +0 -1
- package/dist/es/models/IOrganization.js +0 -2
- package/dist/es/models/IOrganization.js.map +0 -1
- package/dist/es/models/IPerson.js +0 -2
- package/dist/es/models/IPerson.js.map +0 -1
- package/dist/es/schemas/Agent.json +0 -176
- package/dist/es/schemas/Document.json +0 -168
- package/dist/es/schemas/Group.json +0 -191
- package/dist/es/schemas/Image.json +0 -173
- package/dist/es/schemas/Organization.json +0 -177
- package/dist/es/schemas/Person.json +0 -207
- package/dist/types/models/IGroup.d.ts +0 -23
- package/dist/types/models/IOrganization.d.ts +0 -17
- package/docs/reference/interfaces/IAgent.md +0 -197
- package/docs/reference/interfaces/IBaseObject.md +0 -92
- package/docs/reference/interfaces/IDocument.md +0 -159
- package/docs/reference/interfaces/IGroup.md +0 -227
- package/docs/reference/interfaces/IImage.md +0 -191
- package/docs/reference/interfaces/IOrganization.md +0 -215
- package/docs/reference/interfaces/IPerson.md +0 -275
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export * from "./dataTypes/foafDataTypes.js";
|
|
2
|
-
export * from "./models/
|
|
3
|
-
export * from "./models/
|
|
4
|
-
export * from "./models/
|
|
5
|
-
export * from "./models/
|
|
6
|
-
export * from "./models/
|
|
7
|
-
export * from "./models/
|
|
8
|
-
export * from "./models/
|
|
2
|
+
export * from "./models/IFoafAgent.js";
|
|
3
|
+
export * from "./models/IFoafBaseObject.js";
|
|
4
|
+
export * from "./models/IFoafDocument.js";
|
|
5
|
+
export * from "./models/IFoafGroup.js";
|
|
6
|
+
export * from "./models/IFoafImage.js";
|
|
7
|
+
export * from "./models/IFoafOrganization.js";
|
|
8
|
+
export * from "./models/IFoafPerson.js";
|
|
9
9
|
export * from "./models/foafContexts.js";
|
|
10
10
|
export * from "./models/foafContextType.js";
|
|
11
11
|
export * from "./models/foafTypes.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { IJsonLdNodeObject, JsonLdObjectWithAliases } from "@twin.org/data-json-ld";
|
|
3
3
|
import type { FoafContextType } from "./foafContextType.js";
|
|
4
4
|
import type { FoafTypes } from "./foafTypes.js";
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
5
|
+
import type { IFoafBaseObject } from "./IFoafBaseObject.js";
|
|
6
|
+
import type { IFoafDocument } from "./IFoafDocument.js";
|
|
7
7
|
/**
|
|
8
8
|
* A FOAF Agent.
|
|
9
9
|
* @see http://xmlns.com/foaf/0.1/
|
|
10
10
|
*/
|
|
11
|
-
export interface
|
|
11
|
+
export interface IFoafAgent extends IFoafBaseObject {
|
|
12
12
|
/**
|
|
13
13
|
* The LD Context.
|
|
14
14
|
*/
|
|
@@ -31,20 +31,25 @@ export interface IAgent extends IBaseObject {
|
|
|
31
31
|
* A weblog of some thing (whether person, group, company etc.).
|
|
32
32
|
* @see http://xmlns.com/foaf/spec/#term_weblog
|
|
33
33
|
*/
|
|
34
|
-
weblog?:
|
|
34
|
+
weblog?: IFoafDocument;
|
|
35
35
|
/**
|
|
36
36
|
* An OpenID for an agent.
|
|
37
37
|
* @see http://xmlns.com/foaf/spec/#term_openid
|
|
38
38
|
*/
|
|
39
|
-
openid?:
|
|
39
|
+
openid?: IFoafDocument;
|
|
40
40
|
/**
|
|
41
41
|
* A page about a topic of interest to this person.
|
|
42
42
|
* @see http://xmlns.com/foaf/spec/#term_interest
|
|
43
43
|
*/
|
|
44
|
-
interest?:
|
|
44
|
+
interest?: IFoafDocument;
|
|
45
45
|
/**
|
|
46
46
|
* A thing of interest to this person.
|
|
47
47
|
* @see http://xmlns.com/foaf/spec/#term_topic_interest
|
|
48
48
|
*/
|
|
49
49
|
topic_interest?: IJsonLdNodeObject;
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* A FOAF Agent with FOAF-prefixed aliases for non-JSON-LD keys.
|
|
53
|
+
* This allows using either prefixed aliases (e.g., "foaf:name") when defining a FOAF Agent.
|
|
54
|
+
*/
|
|
55
|
+
export type IFoafAgentWithAliases<T extends string = "foaf"> = JsonLdObjectWithAliases<IFoafAgent, T>;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
1
|
import type { FoafContextType } from "./foafContextType.js";
|
|
3
|
-
import type {
|
|
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
|
|
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
|
|
@@ -34,5 +37,5 @@ export interface IBaseObject extends IJsonLdNodeObject {
|
|
|
34
37
|
* A depiction of some thing.
|
|
35
38
|
* @see http://xmlns.com/foaf/spec/#term_depiction
|
|
36
39
|
*/
|
|
37
|
-
depiction?:
|
|
40
|
+
depiction?: IFoafImage;
|
|
38
41
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { IJsonLdNodeObject, JsonLdObjectWithAliases } from "@twin.org/data-json-ld";
|
|
3
3
|
import type { FoafContextType } from "./foafContextType.js";
|
|
4
4
|
import type { FoafTypes } from "./foafTypes.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { IFoafBaseObject } from "./IFoafBaseObject.js";
|
|
6
6
|
/**
|
|
7
7
|
* A FOAF Document
|
|
8
8
|
* @see http://xmlns.com/foaf/0.1/
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
10
|
+
export interface IFoafDocument extends IFoafBaseObject {
|
|
11
11
|
/**
|
|
12
12
|
* The LD Context.
|
|
13
13
|
*/
|
|
@@ -32,3 +32,8 @@ export interface IDocument extends IBaseObject {
|
|
|
32
32
|
*/
|
|
33
33
|
sha1?: string;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* A FOAF Document with FOAF-prefixed aliases for non-JSON-LD keys.
|
|
37
|
+
* This allows using either prefixed aliases (e.g., "foaf:name") when defining a FOAF Document.
|
|
38
|
+
*/
|
|
39
|
+
export type IFoafDocumentWithAliases<T extends string = "foaf"> = JsonLdObjectWithAliases<IFoafDocument, T>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { JsonLdObjectWithAliases } from "@twin.org/data-json-ld";
|
|
3
|
+
import type { FoafContextType } from "./foafContextType.js";
|
|
4
|
+
import type { FoafTypes } from "./foafTypes.js";
|
|
5
|
+
import type { IFoafAgent } from "./IFoafAgent.js";
|
|
6
|
+
/**
|
|
7
|
+
* A FOAF Group.
|
|
8
|
+
* @see http://xmlns.com/foaf/0.1/
|
|
9
|
+
*/
|
|
10
|
+
export interface IFoafGroup extends IFoafAgent {
|
|
11
|
+
/**
|
|
12
|
+
* The LD Context.
|
|
13
|
+
*/
|
|
14
|
+
"@context"?: FoafContextType;
|
|
15
|
+
/**
|
|
16
|
+
* Type.
|
|
17
|
+
*/
|
|
18
|
+
"@type": typeof FoafTypes.Group;
|
|
19
|
+
/**
|
|
20
|
+
* Indicates a member of a Group
|
|
21
|
+
* @see http://xmlns.com/foaf/spec/#term_member
|
|
22
|
+
*/
|
|
23
|
+
member?: ObjectOrArray<IFoafAgent>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A FOAF Group with FOAF-prefixed aliases for non-JSON-LD keys.
|
|
27
|
+
* This allows using either prefixed aliases (e.g., "foaf:name") when defining a FOAF Group.
|
|
28
|
+
*/
|
|
29
|
+
export type IFoafGroupWithAliases<T extends string = "foaf"> = JsonLdObjectWithAliases<IFoafGroup, T>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { IJsonLdNodeObject } from "@twin.org/data-json-ld";
|
|
1
|
+
import type { IJsonLdNodeObject, JsonLdObjectWithAliases } from "@twin.org/data-json-ld";
|
|
2
2
|
import type { FoafContextType } from "./foafContextType.js";
|
|
3
3
|
import type { FoafTypes } from "./foafTypes.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { IFoafDocument } from "./IFoafDocument.js";
|
|
5
5
|
/**
|
|
6
6
|
* A FOAF image.
|
|
7
7
|
* @see http://xmlns.com/foaf/0.1/
|
|
8
8
|
*/
|
|
9
|
-
export interface
|
|
9
|
+
export interface IFoafImage extends IFoafDocument {
|
|
10
10
|
/**
|
|
11
11
|
* The LD Context.
|
|
12
12
|
*
|
|
@@ -25,5 +25,10 @@ export interface IImage extends IDocument {
|
|
|
25
25
|
* A derived thumbnail image.
|
|
26
26
|
* @see http://xmlns.com/foaf/spec/#term_thumbnail
|
|
27
27
|
*/
|
|
28
|
-
thumbnail?:
|
|
28
|
+
thumbnail?: IFoafImage;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* A FOAF Image with FOAF-prefixed aliases for non-JSON-LD keys.
|
|
32
|
+
* This allows using either prefixed aliases (e.g., "foaf:name") when defining a FOAF Image.
|
|
33
|
+
*/
|
|
34
|
+
export type IFoafImageWithAliases<T extends string = "foaf"> = JsonLdObjectWithAliases<IFoafImage, T>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { JsonLdObjectWithAliases } from "@twin.org/data-json-ld";
|
|
2
|
+
import type { FoafContextType } from "./foafContextType.js";
|
|
3
|
+
import type { FoafTypes } from "./foafTypes.js";
|
|
4
|
+
import type { IFoafAgent } from "./IFoafAgent.js";
|
|
5
|
+
/**
|
|
6
|
+
* A FOAF Organization.
|
|
7
|
+
* @see http://xmlns.com/foaf/0.1/
|
|
8
|
+
*/
|
|
9
|
+
export interface IFoafOrganization extends IFoafAgent {
|
|
10
|
+
/**
|
|
11
|
+
* The LD Context.
|
|
12
|
+
*/
|
|
13
|
+
"@context"?: FoafContextType;
|
|
14
|
+
/**
|
|
15
|
+
* Type.
|
|
16
|
+
*/
|
|
17
|
+
"@type": typeof FoafTypes.Organization;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A FOAF Organization with FOAF-prefixed aliases for non-JSON-LD keys.
|
|
21
|
+
* This allows using either prefixed aliases (e.g., "foaf:name") when defining a FOAF Organization.
|
|
22
|
+
*/
|
|
23
|
+
export type IFoafOrganizationWithAliases<T extends string = "foaf"> = JsonLdObjectWithAliases<IFoafOrganization, T>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { ObjectOrArray } from "@twin.org/core";
|
|
2
|
+
import type { JsonLdObjectWithAliases } from "@twin.org/data-json-ld";
|
|
2
3
|
import type { FoafContextType } from "./foafContextType.js";
|
|
3
4
|
import type { FoafTypes } from "./foafTypes.js";
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
5
|
+
import type { IFoafAgent } from "./IFoafAgent.js";
|
|
6
|
+
import type { IFoafImage } from "./IFoafImage.js";
|
|
6
7
|
/**
|
|
7
8
|
* A FOAF Person.
|
|
8
9
|
* @see http://xmlns.com/foaf/0.1/
|
|
9
10
|
*/
|
|
10
|
-
export interface
|
|
11
|
+
export interface IFoafPerson extends IFoafAgent {
|
|
11
12
|
/**
|
|
12
13
|
* The LD Context.
|
|
13
14
|
*/
|
|
@@ -30,15 +31,20 @@ export interface IPerson extends IAgent {
|
|
|
30
31
|
* A person known by this person (indicating some level of reciprocated interaction between the parties).
|
|
31
32
|
* @see http://xmlns.com/foaf/spec/#term_knows
|
|
32
33
|
*/
|
|
33
|
-
knows?: ObjectOrArray<
|
|
34
|
+
knows?: ObjectOrArray<IFoafAgent>;
|
|
34
35
|
/**
|
|
35
36
|
* An image that can be used to represent some thing.
|
|
36
37
|
* @see http://xmlns.com/foaf/spec/#term_img
|
|
37
38
|
*/
|
|
38
|
-
img?:
|
|
39
|
+
img?: IFoafImage;
|
|
39
40
|
/**
|
|
40
41
|
* A short informal nickname characterizing an agent (includes login identifiers, IRC and other chat nicknames).
|
|
41
42
|
* @see http://xmlns.com/foaf/spec/#term_nick
|
|
42
43
|
*/
|
|
43
44
|
nick?: string;
|
|
44
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* A FOAF Person with FOAF-prefixed aliases for non-JSON-LD keys.
|
|
48
|
+
* This allows using either prefixed aliases (e.g., "foaf:name") when defining a FOAF Person.
|
|
49
|
+
*/
|
|
50
|
+
export type IFoafPersonWithAliases<T extends string = "foaf"> = JsonLdObjectWithAliases<IFoafPerson, T>;
|
|
@@ -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.
|
|
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
|
|
6
|
+
* The canonical RDF namespace URI.
|
|
7
7
|
*/
|
|
8
|
-
readonly
|
|
8
|
+
readonly Namespace: "https://xmlns.com/foaf/0.1/";
|
|
9
9
|
/**
|
|
10
|
-
* The
|
|
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
|
|
14
|
+
readonly Context: "https://xmlns.com/foaf/0.1/";
|
|
13
15
|
/**
|
|
14
|
-
* The
|
|
16
|
+
* The JSON-LD Context URL.
|
|
15
17
|
*/
|
|
16
|
-
readonly
|
|
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.
|