@fedify/vocab 2.0.0-dev.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 (167) hide show
  1. package/LICENSE +20 -0
  2. package/deno.json +31 -0
  3. package/dist/accept.yaml +15 -0
  4. package/dist/activity.yaml +98 -0
  5. package/dist/actor.test.d.ts +2 -0
  6. package/dist/actor.test.js +6095 -0
  7. package/dist/add.yaml +16 -0
  8. package/dist/announce.yaml +30 -0
  9. package/dist/application.yaml +324 -0
  10. package/dist/arrive.yaml +15 -0
  11. package/dist/article.yaml +46 -0
  12. package/dist/audio.yaml +11 -0
  13. package/dist/block.yaml +16 -0
  14. package/dist/chatmessage.yaml +50 -0
  15. package/dist/collection.yaml +154 -0
  16. package/dist/collectionpage.yaml +55 -0
  17. package/dist/create.yaml +28 -0
  18. package/dist/dataintegrityproof.yaml +56 -0
  19. package/dist/delete.yaml +27 -0
  20. package/dist/deno-B-ypIMwF.js +1282 -0
  21. package/dist/didservice.yaml +22 -0
  22. package/dist/dislike.yaml +14 -0
  23. package/dist/document.yaml +31 -0
  24. package/dist/emoji.yaml +12 -0
  25. package/dist/emojireact.yaml +17 -0
  26. package/dist/endpoints.yaml +85 -0
  27. package/dist/event.yaml +11 -0
  28. package/dist/export.yaml +9 -0
  29. package/dist/flag.yaml +15 -0
  30. package/dist/follow.yaml +19 -0
  31. package/dist/group.yaml +324 -0
  32. package/dist/hashtag.yaml +14 -0
  33. package/dist/ignore.yaml +14 -0
  34. package/dist/image.yaml +9 -0
  35. package/dist/intransitiveactivity.yaml +15 -0
  36. package/dist/invite.yaml +14 -0
  37. package/dist/join.yaml +14 -0
  38. package/dist/key.yaml +28 -0
  39. package/dist/leave.yaml +14 -0
  40. package/dist/like.yaml +16 -0
  41. package/dist/link.yaml +101 -0
  42. package/dist/listen.yaml +12 -0
  43. package/dist/lookup.test.d.ts +2 -0
  44. package/dist/lookup.test.js +690 -0
  45. package/dist/mention.yaml +9 -0
  46. package/dist/mod.cjs +42036 -0
  47. package/dist/mod.d.cts +15329 -0
  48. package/dist/mod.d.ts +15330 -0
  49. package/dist/mod.js +41936 -0
  50. package/dist/move.yaml +15 -0
  51. package/dist/multikey.yaml +36 -0
  52. package/dist/note.yaml +48 -0
  53. package/dist/object.yaml +404 -0
  54. package/dist/offer.yaml +15 -0
  55. package/dist/orderedcollection.yaml +39 -0
  56. package/dist/orderedcollectionpage.yaml +50 -0
  57. package/dist/organization.yaml +324 -0
  58. package/dist/page.yaml +11 -0
  59. package/dist/person.yaml +324 -0
  60. package/dist/place.yaml +75 -0
  61. package/dist/profile.yaml +26 -0
  62. package/dist/propertyvalue.yaml +32 -0
  63. package/dist/question.yaml +103 -0
  64. package/dist/read.yaml +13 -0
  65. package/dist/reject.yaml +14 -0
  66. package/dist/relationship.yaml +52 -0
  67. package/dist/remove.yaml +14 -0
  68. package/dist/service.yaml +324 -0
  69. package/dist/source.yaml +26 -0
  70. package/dist/tentativeaccept.yaml +14 -0
  71. package/dist/tentativereject.yaml +14 -0
  72. package/dist/tombstone.yaml +24 -0
  73. package/dist/travel.yaml +16 -0
  74. package/dist/type-CNuABalk.js +13 -0
  75. package/dist/type.test.d.ts +2 -0
  76. package/dist/type.test.js +24 -0
  77. package/dist/undo.yaml +26 -0
  78. package/dist/update.yaml +58 -0
  79. package/dist/utils-BSWXlrig.js +13 -0
  80. package/dist/video.yaml +11 -0
  81. package/dist/view.yaml +13 -0
  82. package/dist/vocab-DBispxj5.js +41603 -0
  83. package/dist/vocab.test.d.ts +2 -0
  84. package/dist/vocab.test.js +1304 -0
  85. package/package.json +79 -0
  86. package/scripts/codegen.ts +20 -0
  87. package/src/__snapshots__/vocab.test.ts.snap +7903 -0
  88. package/src/accept.yaml +15 -0
  89. package/src/activity.yaml +98 -0
  90. package/src/actor.test.ts +263 -0
  91. package/src/actor.ts +293 -0
  92. package/src/add.yaml +16 -0
  93. package/src/announce.yaml +30 -0
  94. package/src/application.yaml +324 -0
  95. package/src/arrive.yaml +15 -0
  96. package/src/article.yaml +46 -0
  97. package/src/audio.yaml +11 -0
  98. package/src/block.yaml +16 -0
  99. package/src/chatmessage.yaml +50 -0
  100. package/src/collection.yaml +154 -0
  101. package/src/collectionpage.yaml +55 -0
  102. package/src/constants.ts +11 -0
  103. package/src/create.yaml +28 -0
  104. package/src/dataintegrityproof.yaml +56 -0
  105. package/src/delete.yaml +27 -0
  106. package/src/didservice.yaml +22 -0
  107. package/src/dislike.yaml +14 -0
  108. package/src/document.yaml +31 -0
  109. package/src/emoji.yaml +12 -0
  110. package/src/emojireact.yaml +17 -0
  111. package/src/endpoints.yaml +85 -0
  112. package/src/event.yaml +11 -0
  113. package/src/export.yaml +9 -0
  114. package/src/flag.yaml +15 -0
  115. package/src/follow.yaml +19 -0
  116. package/src/group.yaml +324 -0
  117. package/src/handle.ts +104 -0
  118. package/src/hashtag.yaml +14 -0
  119. package/src/ignore.yaml +14 -0
  120. package/src/image.yaml +9 -0
  121. package/src/intransitiveactivity.yaml +15 -0
  122. package/src/invite.yaml +14 -0
  123. package/src/join.yaml +14 -0
  124. package/src/key.yaml +28 -0
  125. package/src/keys.ts +50 -0
  126. package/src/leave.yaml +14 -0
  127. package/src/like.yaml +16 -0
  128. package/src/link.yaml +101 -0
  129. package/src/listen.yaml +12 -0
  130. package/src/lookup.test.ts +681 -0
  131. package/src/lookup.ts +318 -0
  132. package/src/mention.yaml +9 -0
  133. package/src/mod.ts +57 -0
  134. package/src/move.yaml +15 -0
  135. package/src/multikey.yaml +36 -0
  136. package/src/note.yaml +48 -0
  137. package/src/object.yaml +404 -0
  138. package/src/offer.yaml +15 -0
  139. package/src/orderedcollection.yaml +39 -0
  140. package/src/orderedcollectionpage.yaml +50 -0
  141. package/src/organization.yaml +324 -0
  142. package/src/page.yaml +11 -0
  143. package/src/person.yaml +324 -0
  144. package/src/place.yaml +75 -0
  145. package/src/profile.yaml +26 -0
  146. package/src/propertyvalue.yaml +32 -0
  147. package/src/question.yaml +103 -0
  148. package/src/read.yaml +13 -0
  149. package/src/reject.yaml +14 -0
  150. package/src/relationship.yaml +52 -0
  151. package/src/remove.yaml +14 -0
  152. package/src/service.yaml +324 -0
  153. package/src/source.yaml +26 -0
  154. package/src/tentativeaccept.yaml +14 -0
  155. package/src/tentativereject.yaml +14 -0
  156. package/src/tombstone.yaml +24 -0
  157. package/src/travel.yaml +16 -0
  158. package/src/type.test.ts +20 -0
  159. package/src/type.ts +102 -0
  160. package/src/undo.yaml +26 -0
  161. package/src/update.yaml +58 -0
  162. package/src/utils.ts +9 -0
  163. package/src/video.yaml +11 -0
  164. package/src/view.yaml +13 -0
  165. package/src/vocab.bench.ts +204 -0
  166. package/src/vocab.test.ts +2014 -0
  167. package/tsdown.config.ts +65 -0
@@ -0,0 +1,26 @@
1
+ $schema: ../../vocab-tools/schema.yaml
2
+ name: Source
3
+ compactName: as:Source
4
+ uri: "https://www.w3.org/ns/activitystreams#Source"
5
+ entity: false
6
+ description: Contents of {@link Object}'s `source`.
7
+ defaultContext: "https://www.w3.org/ns/activitystreams"
8
+
9
+ properties:
10
+ - pluralName: contents
11
+ singularName: content
12
+ singularAccessor: true
13
+ compactName: content
14
+ uri: "https://www.w3.org/ns/activitystreams#content"
15
+ description: The source content.
16
+ range:
17
+ - "http://www.w3.org/2001/XMLSchema#string"
18
+ - "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
19
+
20
+ - singularName: mediaType
21
+ functional: true
22
+ compactName: mediaType
23
+ uri: "https://www.w3.org/ns/activitystreams#mediaType"
24
+ description: The MIME media type of the source content.
25
+ range:
26
+ - "http://www.w3.org/2001/XMLSchema#string"
@@ -0,0 +1,14 @@
1
+ $schema: ../../vocab-tools/schema.yaml
2
+ name: TentativeAccept
3
+ compactName: TentativeAccept
4
+ uri: "https://www.w3.org/ns/activitystreams#TentativeAccept"
5
+ extends: "https://www.w3.org/ns/activitystreams#Accept"
6
+ entity: true
7
+ description: |
8
+ A specialization of {@link Accept} indicating that
9
+ the acceptance is tentative.
10
+ defaultContext:
11
+ - "https://w3id.org/identity/v1"
12
+ - "https://www.w3.org/ns/activitystreams"
13
+ - "https://w3id.org/security/data-integrity/v1"
14
+ properties: []
@@ -0,0 +1,14 @@
1
+ $schema: ../../vocab-tools/schema.yaml
2
+ name: TentativeReject
3
+ compactName: TentativeReject
4
+ uri: "https://www.w3.org/ns/activitystreams#TentativeReject"
5
+ extends: "https://www.w3.org/ns/activitystreams#Reject"
6
+ entity: true
7
+ description: |
8
+ A specialization of {@link Reject} in which
9
+ the rejection is considered tentative.
10
+ defaultContext:
11
+ - "https://w3id.org/identity/v1"
12
+ - "https://www.w3.org/ns/activitystreams"
13
+ - "https://w3id.org/security/data-integrity/v1"
14
+ properties: []
@@ -0,0 +1,24 @@
1
+ $schema: ../../vocab-tools/schema.yaml
2
+ name: Tombstone
3
+ compactName: Tombstone
4
+ uri: "https://www.w3.org/ns/activitystreams#Tombstone"
5
+ extends: "https://www.w3.org/ns/activitystreams#Object"
6
+ entity: true
7
+ description: |
8
+ A `Tombstone` represents a content object that has been deleted.
9
+ It can be used in {@link Collection}s to signify that there used to be
10
+ an object at this position, but it has been deleted.
11
+ defaultContext:
12
+ - "https://www.w3.org/ns/activitystreams"
13
+ - "https://w3id.org/security/data-integrity/v1"
14
+
15
+ properties:
16
+ - singularName: deleted
17
+ functional: true
18
+ compactName: deleted
19
+ uri: "https://www.w3.org/ns/activitystreams#deleted"
20
+ description: |
21
+ On a `Tombstone` object, the `deleted` property is a timestamp for when
22
+ the object was deleted.
23
+ range:
24
+ - "http://www.w3.org/2001/XMLSchema#dateTime"
@@ -0,0 +1,16 @@
1
+ $schema: ../../vocab-tools/schema.yaml
2
+ name: Travel
3
+ compactName: Travel
4
+ uri: "https://www.w3.org/ns/activitystreams#Travel"
5
+ extends: "https://www.w3.org/ns/activitystreams#IntransitiveActivity"
6
+ entity: true
7
+ description: |
8
+ Indicates that the `actor` is traveling to `target` from `origin`.
9
+ `Travel` is an `IntransitiveObject` whose `actor` specifies the direct object.
10
+ If the `target` or `origin` are not specified,
11
+ either can be determined by context.
12
+ defaultContext:
13
+ - "https://w3id.org/identity/v1"
14
+ - "https://www.w3.org/ns/activitystreams"
15
+ - "https://w3id.org/security/data-integrity/v1"
16
+ properties: []
@@ -0,0 +1,13 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ globalThis.addEventListener = () => {};
4
+
5
+ //#region src/type.ts
6
+ function getTypeId(object) {
7
+ if (object == null) return object;
8
+ const cls = object.constructor;
9
+ return cls.typeId;
10
+ }
11
+
12
+ //#endregion
13
+ export { getTypeId };
@@ -0,0 +1,2 @@
1
+ import { Temporal } from "@js-temporal/polyfill";
2
+ globalThis.addEventListener = () => {};
@@ -0,0 +1,24 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ globalThis.addEventListener = () => {};
4
+
5
+ import { Person } from "./vocab-DBispxj5.js";
6
+ import { getTypeId } from "./type-CNuABalk.js";
7
+ import { test } from "@fedify/fixture";
8
+ import { deepStrictEqual } from "node:assert/strict";
9
+
10
+ //#region src/type.test.ts
11
+ test("getTypeId()", () => {
12
+ const obj = new Person({});
13
+ deepStrictEqual(getTypeId(obj), new URL("https://www.w3.org/ns/activitystreams#Person"));
14
+ const obj2 = null;
15
+ deepStrictEqual(getTypeId(obj2), null);
16
+ const obj3 = void 0;
17
+ deepStrictEqual(getTypeId(obj3), void 0);
18
+ const obj4 = null;
19
+ deepStrictEqual(getTypeId(obj4), null);
20
+ const obj5 = void 0;
21
+ deepStrictEqual(getTypeId(obj5), void 0);
22
+ });
23
+
24
+ //#endregion
package/dist/undo.yaml ADDED
@@ -0,0 +1,26 @@
1
+ $schema: ../../vocab-tools/schema.yaml
2
+ name: Undo
3
+ compactName: Undo
4
+ uri: "https://www.w3.org/ns/activitystreams#Undo"
5
+ extends: "https://www.w3.org/ns/activitystreams#Activity"
6
+ entity: true
7
+ description: |
8
+ Indicates that the `actor` is undoing the `object`. In most cases,
9
+ the `object` will be an {@link Activity} describing some previously performed
10
+ action (for instance, a person may have previously "liked" an article but,
11
+ for whatever reason, might choose to undo that like at some later point in
12
+ time).
13
+
14
+ The `target` and `origin` typically have no defined meaning.
15
+ defaultContext:
16
+ - "https://w3id.org/identity/v1"
17
+ - "https://www.w3.org/ns/activitystreams"
18
+ - "https://w3id.org/security/v1"
19
+ - "https://w3id.org/security/data-integrity/v1"
20
+ - "https://www.w3.org/ns/did/v1"
21
+ - "https://w3id.org/security/multikey/v1"
22
+ - litepub: "http://litepub.social/ns#"
23
+ toot: "http://joinmastodon.org/ns#"
24
+ EmojiReact: "litepub:EmojiReact"
25
+ Emoji: "toot:Emoji"
26
+ properties: []
@@ -0,0 +1,58 @@
1
+ $schema: ../../vocab-tools/schema.yaml
2
+ name: Update
3
+ compactName: Update
4
+ uri: "https://www.w3.org/ns/activitystreams#Update"
5
+ extends: "https://www.w3.org/ns/activitystreams#Activity"
6
+ entity: true
7
+ description: |
8
+ Indicates that the `actor` has updated the `object`. Note, however,
9
+ that this vocabulary does not define a mechanism for describing the actual
10
+ set of modifications made to `object`.
11
+
12
+ The `target` and `origin` typically have no defined meaning.
13
+ defaultContext:
14
+ - "https://w3id.org/identity/v1"
15
+ - "https://www.w3.org/ns/activitystreams"
16
+ - "https://w3id.org/security/v1"
17
+ - "https://w3id.org/security/data-integrity/v1"
18
+ - "https://www.w3.org/ns/did/v1"
19
+ - "https://w3id.org/security/multikey/v1"
20
+ - alsoKnownAs:
21
+ "@id": "as:alsoKnownAs"
22
+ "@type": "@id"
23
+ manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
24
+ sensitive: "as:sensitive"
25
+ movedTo:
26
+ "@id": "as:movedTo"
27
+ "@type": "@id"
28
+ quoteUrl: "as:quoteUrl"
29
+ toot: "http://joinmastodon.org/ns#"
30
+ featured:
31
+ "@id": "toot:featured"
32
+ "@type": "@id"
33
+ featuredTags:
34
+ "@id": "toot:featuredTags"
35
+ "@type": "@id"
36
+ discoverable: "toot:discoverable"
37
+ suspended: "toot:suspended"
38
+ memorial: "toot:memorial"
39
+ indexable: "toot:indexable"
40
+ votersCount:
41
+ "@id": "toot:votersCount"
42
+ "@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
43
+ Emoji: "toot:Emoji"
44
+ Hashtag: "as:Hashtag"
45
+ schema: "http://schema.org#"
46
+ PropertyValue: "schema:PropertyValue"
47
+ value: "schema:value"
48
+ ChatMessage: "http://litepub.social/ns#ChatMessage"
49
+ fedibird: "http://fedibird.com/ns#"
50
+ quoteUri: "fedibird:quoteUri"
51
+ misskey: "https://misskey-hub.net/ns#"
52
+ _misskey_quote: "misskey:_misskey_quote"
53
+ _misskey_followedMessage: "misskey:_misskey_followedMessage"
54
+ isCat: "misskey:isCat"
55
+ emojiReactions:
56
+ "@id": "fedibird:emojiReactions"
57
+ "@type": "@id"
58
+ properties: []
@@ -0,0 +1,13 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ globalThis.addEventListener = () => {};
4
+
5
+ import { ok } from "node:assert";
6
+
7
+ //#region src/utils.ts
8
+ function assertInstanceOf(value, constructor) {
9
+ ok(value instanceof constructor);
10
+ }
11
+
12
+ //#endregion
13
+ export { assertInstanceOf };
@@ -0,0 +1,11 @@
1
+ $schema: ../../vocab-tools/schema.yaml
2
+ name: Video
3
+ compactName: Video
4
+ uri: "https://www.w3.org/ns/activitystreams#Video"
5
+ extends: "https://www.w3.org/ns/activitystreams#Document"
6
+ entity: true
7
+ description: Represents a video document of any kind.
8
+ defaultContext:
9
+ - "https://www.w3.org/ns/activitystreams"
10
+ - "https://w3id.org/security/data-integrity/v1"
11
+ properties: []
package/dist/view.yaml ADDED
@@ -0,0 +1,13 @@
1
+ $schema: ../../vocab-tools/schema.yaml
2
+ name: View
3
+ compactName: View
4
+ uri: "https://www.w3.org/ns/activitystreams#View"
5
+ extends: "https://www.w3.org/ns/activitystreams#Activity"
6
+ entity: true
7
+ description: |
8
+ Indicates that the `actor` has viewed the object.
9
+ defaultContext:
10
+ - "https://w3id.org/identity/v1"
11
+ - "https://www.w3.org/ns/activitystreams"
12
+ - "https://w3id.org/security/data-integrity/v1"
13
+ properties: []