@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.
Files changed (89) hide show
  1. package/README.md +1 -1
  2. package/dist/es/dataTypes/foafDataTypes.js +41 -44
  3. package/dist/es/dataTypes/foafDataTypes.js.map +1 -1
  4. package/dist/es/index.js +7 -7
  5. package/dist/es/index.js.map +1 -1
  6. package/dist/es/models/IFoafAgent.js +2 -0
  7. package/dist/es/models/IFoafAgent.js.map +1 -0
  8. package/dist/es/models/IFoafBaseObject.js +2 -0
  9. package/dist/es/models/IFoafBaseObject.js.map +1 -0
  10. package/dist/es/models/IFoafDocument.js +2 -0
  11. package/dist/es/models/IFoafDocument.js.map +1 -0
  12. package/dist/es/models/IFoafGroup.js +2 -0
  13. package/dist/es/models/IFoafGroup.js.map +1 -0
  14. package/dist/es/models/IFoafImage.js +2 -0
  15. package/dist/es/models/IFoafImage.js.map +1 -0
  16. package/dist/es/models/IFoafOrganization.js +2 -0
  17. package/dist/es/models/IFoafOrganization.js.map +1 -0
  18. package/dist/es/models/IFoafPerson.js +2 -0
  19. package/dist/es/models/IFoafPerson.js.map +1 -0
  20. package/dist/es/models/foafContextType.js.map +1 -1
  21. package/dist/es/models/foafContexts.js +12 -6
  22. package/dist/es/models/foafContexts.js.map +1 -1
  23. package/dist/es/schemas/FoafAgent.json +75 -0
  24. package/dist/es/schemas/FoafContextType.json +30 -0
  25. package/dist/es/schemas/FoafDocument.json +54 -0
  26. package/dist/es/schemas/FoafGroup.json +39 -0
  27. package/dist/es/schemas/FoafImage.json +33 -0
  28. package/dist/es/schemas/FoafOrganization.json +25 -0
  29. package/dist/es/schemas/FoafPerson.json +55 -0
  30. package/dist/types/index.d.ts +7 -7
  31. package/dist/types/models/{IAgent.d.ts → IFoafAgent.d.ts} +12 -7
  32. package/dist/types/models/{IBaseObject.d.ts → IFoafBaseObject.d.ts} +7 -4
  33. package/dist/types/models/{IDocument.d.ts → IFoafDocument.d.ts} +8 -3
  34. package/dist/types/models/IFoafGroup.d.ts +29 -0
  35. package/dist/types/models/{IImage.d.ts → IFoafImage.d.ts} +9 -4
  36. package/dist/types/models/IFoafOrganization.d.ts +23 -0
  37. package/dist/types/models/{IPerson.d.ts → IFoafPerson.d.ts} +11 -5
  38. package/dist/types/models/foafContextType.d.ts +2 -1
  39. package/dist/types/models/foafContexts.d.ts +12 -6
  40. package/docs/changelog.md +398 -5
  41. package/docs/examples.md +21 -1
  42. package/docs/reference/classes/FoafDataTypes.md +2 -2
  43. package/docs/reference/index.md +13 -7
  44. package/docs/reference/interfaces/IFoafAgent.md +201 -0
  45. package/docs/reference/interfaces/IFoafBaseObject.md +88 -0
  46. package/docs/reference/interfaces/IFoafDocument.md +163 -0
  47. package/docs/reference/interfaces/IFoafGroup.md +235 -0
  48. package/docs/reference/interfaces/IFoafImage.md +199 -0
  49. package/docs/reference/interfaces/IFoafOrganization.md +223 -0
  50. package/docs/reference/interfaces/IFoafPerson.md +283 -0
  51. package/docs/reference/type-aliases/FoafContextType.md +1 -1
  52. package/docs/reference/type-aliases/IFoafAgentWithAliases.md +12 -0
  53. package/docs/reference/type-aliases/IFoafDocumentWithAliases.md +12 -0
  54. package/docs/reference/type-aliases/IFoafGroupWithAliases.md +12 -0
  55. package/docs/reference/type-aliases/IFoafImageWithAliases.md +12 -0
  56. package/docs/reference/type-aliases/IFoafOrganizationWithAliases.md +12 -0
  57. package/docs/reference/type-aliases/IFoafPersonWithAliases.md +12 -0
  58. package/docs/reference/variables/FoafContexts.md +17 -9
  59. package/docs/reference/variables/FoafTypes.md +6 -6
  60. package/package.json +4 -4
  61. package/dist/es/models/IAgent.js +0 -2
  62. package/dist/es/models/IAgent.js.map +0 -1
  63. package/dist/es/models/IBaseObject.js +0 -2
  64. package/dist/es/models/IBaseObject.js.map +0 -1
  65. package/dist/es/models/IDocument.js +0 -2
  66. package/dist/es/models/IDocument.js.map +0 -1
  67. package/dist/es/models/IGroup.js +0 -2
  68. package/dist/es/models/IGroup.js.map +0 -1
  69. package/dist/es/models/IImage.js +0 -2
  70. package/dist/es/models/IImage.js.map +0 -1
  71. package/dist/es/models/IOrganization.js +0 -2
  72. package/dist/es/models/IOrganization.js.map +0 -1
  73. package/dist/es/models/IPerson.js +0 -2
  74. package/dist/es/models/IPerson.js.map +0 -1
  75. package/dist/es/schemas/Agent.json +0 -176
  76. package/dist/es/schemas/Document.json +0 -168
  77. package/dist/es/schemas/Group.json +0 -191
  78. package/dist/es/schemas/Image.json +0 -173
  79. package/dist/es/schemas/Organization.json +0 -177
  80. package/dist/es/schemas/Person.json +0 -207
  81. package/dist/types/models/IGroup.d.ts +0 -23
  82. package/dist/types/models/IOrganization.d.ts +0 -17
  83. package/docs/reference/interfaces/IAgent.md +0 -197
  84. package/docs/reference/interfaces/IBaseObject.md +0 -92
  85. package/docs/reference/interfaces/IDocument.md +0 -159
  86. package/docs/reference/interfaces/IGroup.md +0 -227
  87. package/docs/reference/interfaces/IImage.md +0 -191
  88. package/docs/reference/interfaces/IOrganization.md +0 -215
  89. package/docs/reference/interfaces/IPerson.md +0 -275
@@ -1,11 +1,11 @@
1
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";
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 { IBaseObject } from "./IBaseObject.js";
6
- import type { IDocument } from "./IDocument.js";
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 IAgent extends IBaseObject {
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?: IDocument;
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?: IDocument;
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?: IDocument;
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 { IImage } from "./IImage.js";
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 IBaseObject 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
@@ -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?: IImage;
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 { IBaseObject } from "./IBaseObject.js";
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 IDocument extends IBaseObject {
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 { IDocument } from "./IDocument.js";
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 IImage extends IDocument {
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?: IImage;
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 { IAgent } from "./IAgent.js";
5
- import type { IImage } from "./IImage.js";
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 IPerson extends IAgent {
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<IAgent>;
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?: IImage;
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.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.