@fedify/vocab 2.2.0-dev.731 → 2.2.0-dev.768
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/deno.json +1 -1
- package/dist/mod.cjs +3371 -472
- package/dist/mod.d.cts +618 -6
- package/dist/mod.d.ts +618 -6
- package/dist/mod.js +3368 -473
- package/dist-tests/actor.test.mjs +2 -2
- package/dist-tests/announce.yaml +8 -0
- package/dist-tests/article.yaml +28 -0
- package/dist-tests/chatmessage.yaml +28 -0
- package/dist-tests/collection.yaml +8 -0
- package/dist-tests/collectionpage.yaml +8 -0
- package/dist-tests/create.yaml +8 -0
- package/dist-tests/delete.yaml +8 -0
- package/dist-tests/{deno-D3oW1uY5.mjs → deno-BK-iAbfe.mjs} +2 -2
- package/dist-tests/interactionpolicy.yaml +16 -2
- package/dist-tests/lookup.test.mjs +2 -2
- package/dist-tests/note.yaml +28 -0
- package/dist-tests/object.yaml +3 -3
- package/dist-tests/orderedcollection.yaml +8 -0
- package/dist-tests/orderedcollectionpage.yaml +8 -0
- package/dist-tests/question.yaml +28 -0
- package/dist-tests/quoteauthorization.yaml +39 -0
- package/dist-tests/quoterequest.yaml +47 -0
- package/dist-tests/tombstone.yaml +10 -0
- package/dist-tests/type.test.mjs +10 -1
- package/dist-tests/update.yaml +8 -0
- package/dist-tests/{vocab-CGZuHaxe.mjs → vocab-DKp-OcRQ.mjs} +3372 -473
- package/dist-tests/vocab.test.mjs +356 -42
- package/package.json +4 -4
- package/src/__snapshots__/vocab.test.ts.snap +327 -15
- package/src/announce.yaml +8 -0
- package/src/article.yaml +28 -0
- package/src/chatmessage.yaml +28 -0
- package/src/collection.yaml +8 -0
- package/src/collectionpage.yaml +8 -0
- package/src/create.yaml +8 -0
- package/src/delete.yaml +8 -0
- package/src/interactionpolicy.yaml +16 -2
- package/src/note.yaml +28 -0
- package/src/object.yaml +3 -3
- package/src/orderedcollection.yaml +8 -0
- package/src/orderedcollectionpage.yaml +8 -0
- package/src/question.yaml +28 -0
- package/src/quoteauthorization.yaml +39 -0
- package/src/quoterequest.yaml +47 -0
- package/src/tombstone.yaml +10 -0
- package/src/type.test.ts +17 -1
- package/src/update.yaml +8 -0
- package/src/vocab.test.ts +498 -40
package/src/note.yaml
CHANGED
|
@@ -17,14 +17,32 @@ defaultContext:
|
|
|
17
17
|
sensitive: "as:sensitive"
|
|
18
18
|
Emoji: "toot:Emoji"
|
|
19
19
|
Hashtag: "as:Hashtag"
|
|
20
|
+
quote:
|
|
21
|
+
"@id": "https://w3id.org/fep/044f#quote"
|
|
22
|
+
"@type": "@id"
|
|
20
23
|
quoteUrl: "as:quoteUrl"
|
|
21
24
|
_misskey_quote: "misskey:_misskey_quote"
|
|
22
25
|
quoteUri: "fedibird:quoteUri"
|
|
26
|
+
QuoteAuthorization: "https://w3id.org/fep/044f#QuoteAuthorization"
|
|
27
|
+
quoteAuthorization:
|
|
28
|
+
"@id": "https://w3id.org/fep/044f#quoteAuthorization"
|
|
29
|
+
"@type": "@id"
|
|
23
30
|
emojiReactions:
|
|
24
31
|
"@id": "fedibird:emojiReactions"
|
|
25
32
|
"@type": "@id"
|
|
26
33
|
|
|
27
34
|
properties:
|
|
35
|
+
- singularName: quote
|
|
36
|
+
functional: true
|
|
37
|
+
compactName: quote
|
|
38
|
+
uri: "https://w3id.org/fep/044f#quote"
|
|
39
|
+
description: |
|
|
40
|
+
The quoted ActivityStreams object.
|
|
41
|
+
|
|
42
|
+
This property is serialized as an IRI-valued JSON-LD property.
|
|
43
|
+
range:
|
|
44
|
+
- "https://www.w3.org/ns/activitystreams#Object"
|
|
45
|
+
|
|
28
46
|
- singularName: quoteUrl
|
|
29
47
|
functional: true
|
|
30
48
|
compactName: quoteUrl
|
|
@@ -47,3 +65,13 @@ properties:
|
|
|
47
65
|
the values of those three properties in order.
|
|
48
66
|
range:
|
|
49
67
|
- "fedify:url"
|
|
68
|
+
|
|
69
|
+
- singularName: quoteAuthorization
|
|
70
|
+
functional: true
|
|
71
|
+
compactName: quoteAuthorization
|
|
72
|
+
uri: "https://w3id.org/fep/044f#quoteAuthorization"
|
|
73
|
+
description: |
|
|
74
|
+
A {@link QuoteAuthorization} object that proves this quote was approved
|
|
75
|
+
by the quoted object's author.
|
|
76
|
+
range:
|
|
77
|
+
- "https://w3id.org/fep/044f#QuoteAuthorization"
|
package/src/object.yaml
CHANGED
|
@@ -411,9 +411,9 @@ properties:
|
|
|
411
411
|
untyped: true
|
|
412
412
|
description: |
|
|
413
413
|
The interaction policy for this object, specifying who can like, reply to,
|
|
414
|
-
or
|
|
415
|
-
`canAnnounce`) each defining `automaticApproval` and
|
|
416
|
-
lists.
|
|
414
|
+
announce, or quote it. Contains sub-policies (`canLike`, `canReply`,
|
|
415
|
+
`canAnnounce`, `canQuote`) each defining `automaticApproval` and
|
|
416
|
+
`manualApproval` lists.
|
|
417
417
|
|
|
418
418
|
When absent, implementations should assume anyone can interact with
|
|
419
419
|
the object. Setting this property signals that the server understands
|
|
@@ -19,9 +19,17 @@ defaultContext:
|
|
|
19
19
|
votersCount: "toot:votersCount"
|
|
20
20
|
Emoji: "toot:Emoji"
|
|
21
21
|
Hashtag: "as:Hashtag"
|
|
22
|
+
quote:
|
|
23
|
+
"@id": "https://w3id.org/fep/044f#quote"
|
|
24
|
+
"@type": "@id"
|
|
22
25
|
quoteUrl: "as:quoteUrl"
|
|
23
26
|
_misskey_quote: "misskey:_misskey_quote"
|
|
24
27
|
quoteUri: "fedibird:quoteUri"
|
|
28
|
+
QuoteAuthorization: "https://w3id.org/fep/044f#QuoteAuthorization"
|
|
29
|
+
QuoteRequest: "https://w3id.org/fep/044f#QuoteRequest"
|
|
30
|
+
quoteAuthorization:
|
|
31
|
+
"@id": "https://w3id.org/fep/044f#quoteAuthorization"
|
|
32
|
+
"@type": "@id"
|
|
25
33
|
emojiReactions:
|
|
26
34
|
"@id": "fedibird:emojiReactions"
|
|
27
35
|
"@type": "@id"
|
|
@@ -20,9 +20,17 @@ defaultContext:
|
|
|
20
20
|
votersCount: "toot:votersCount"
|
|
21
21
|
Emoji: "toot:Emoji"
|
|
22
22
|
Hashtag: "as:Hashtag"
|
|
23
|
+
quote:
|
|
24
|
+
"@id": "https://w3id.org/fep/044f#quote"
|
|
25
|
+
"@type": "@id"
|
|
23
26
|
quoteUrl: "as:quoteUrl"
|
|
24
27
|
_misskey_quote: "misskey:_misskey_quote"
|
|
25
28
|
quoteUri: "fedibird:quoteUri"
|
|
29
|
+
QuoteAuthorization: "https://w3id.org/fep/044f#QuoteAuthorization"
|
|
30
|
+
QuoteRequest: "https://w3id.org/fep/044f#QuoteRequest"
|
|
31
|
+
quoteAuthorization:
|
|
32
|
+
"@id": "https://w3id.org/fep/044f#quoteAuthorization"
|
|
33
|
+
"@type": "@id"
|
|
26
34
|
emojiReactions:
|
|
27
35
|
"@id": "fedibird:emojiReactions"
|
|
28
36
|
"@type": "@id"
|
package/src/question.yaml
CHANGED
|
@@ -27,9 +27,16 @@ defaultContext:
|
|
|
27
27
|
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
|
|
28
28
|
Emoji: "toot:Emoji"
|
|
29
29
|
Hashtag: "as:Hashtag"
|
|
30
|
+
quote:
|
|
31
|
+
"@id": "https://w3id.org/fep/044f#quote"
|
|
32
|
+
"@type": "@id"
|
|
30
33
|
quoteUrl: "as:quoteUrl"
|
|
31
34
|
_misskey_quote: "misskey:_misskey_quote"
|
|
32
35
|
quoteUri: "fedibird:quoteUri"
|
|
36
|
+
QuoteAuthorization: "https://w3id.org/fep/044f#QuoteAuthorization"
|
|
37
|
+
quoteAuthorization:
|
|
38
|
+
"@id": "https://w3id.org/fep/044f#quoteAuthorization"
|
|
39
|
+
"@type": "@id"
|
|
33
40
|
emojiReactions:
|
|
34
41
|
"@id": "fedibird:emojiReactions"
|
|
35
42
|
"@type": "@id"
|
|
@@ -80,6 +87,17 @@ properties:
|
|
|
80
87
|
range:
|
|
81
88
|
- "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
|
|
82
89
|
|
|
90
|
+
- singularName: quote
|
|
91
|
+
functional: true
|
|
92
|
+
compactName: quote
|
|
93
|
+
uri: "https://w3id.org/fep/044f#quote"
|
|
94
|
+
description: |
|
|
95
|
+
The quoted ActivityStreams object.
|
|
96
|
+
|
|
97
|
+
This property is serialized as an IRI-valued JSON-LD property.
|
|
98
|
+
range:
|
|
99
|
+
- "https://www.w3.org/ns/activitystreams#Object"
|
|
100
|
+
|
|
83
101
|
- singularName: quoteUrl
|
|
84
102
|
functional: true
|
|
85
103
|
compactName: quoteUrl
|
|
@@ -102,3 +120,13 @@ properties:
|
|
|
102
120
|
the values of those three properties in order.
|
|
103
121
|
range:
|
|
104
122
|
- "fedify:url"
|
|
123
|
+
|
|
124
|
+
- singularName: quoteAuthorization
|
|
125
|
+
functional: true
|
|
126
|
+
compactName: quoteAuthorization
|
|
127
|
+
uri: "https://w3id.org/fep/044f#quoteAuthorization"
|
|
128
|
+
description: |
|
|
129
|
+
A {@link QuoteAuthorization} object that proves this quote was approved
|
|
130
|
+
by the quoted object's author.
|
|
131
|
+
range:
|
|
132
|
+
- "https://w3id.org/fep/044f#QuoteAuthorization"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
$schema: ../../vocab-tools/schema.yaml
|
|
2
|
+
name: QuoteAuthorization
|
|
3
|
+
compactName: QuoteAuthorization
|
|
4
|
+
uri: "https://w3id.org/fep/044f#QuoteAuthorization"
|
|
5
|
+
extends: "https://www.w3.org/ns/activitystreams#Object"
|
|
6
|
+
entity: true
|
|
7
|
+
description: |
|
|
8
|
+
Proves that a quote interaction has been approved by the quoted object's
|
|
9
|
+
author.
|
|
10
|
+
|
|
11
|
+
This object is dereferenceable and is used by third parties to verify that a
|
|
12
|
+
quote was authorized. The `attributedTo` property identifies the author who
|
|
13
|
+
granted the authorization.
|
|
14
|
+
|
|
15
|
+
See [FEP-044f](https://w3id.org/fep/044f) for details.
|
|
16
|
+
defaultContext:
|
|
17
|
+
- "https://www.w3.org/ns/activitystreams"
|
|
18
|
+
- "https://w3id.org/security/data-integrity/v1"
|
|
19
|
+
- "https://gotosocial.org/ns"
|
|
20
|
+
- QuoteAuthorization: "https://w3id.org/fep/044f#QuoteAuthorization"
|
|
21
|
+
|
|
22
|
+
properties:
|
|
23
|
+
- singularName: interactingObject
|
|
24
|
+
functional: true
|
|
25
|
+
compactName: interactingObject
|
|
26
|
+
uri: "https://gotosocial.org/ns#interactingObject"
|
|
27
|
+
description: |
|
|
28
|
+
The URI of the quote object that has been authorized.
|
|
29
|
+
range:
|
|
30
|
+
- "https://www.w3.org/ns/activitystreams#Object"
|
|
31
|
+
|
|
32
|
+
- singularName: interactionTarget
|
|
33
|
+
functional: true
|
|
34
|
+
compactName: interactionTarget
|
|
35
|
+
uri: "https://gotosocial.org/ns#interactionTarget"
|
|
36
|
+
description: |
|
|
37
|
+
The URI of the object that is the target of the authorized quote.
|
|
38
|
+
range:
|
|
39
|
+
- "https://www.w3.org/ns/activitystreams#Object"
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
$schema: ../../vocab-tools/schema.yaml
|
|
2
|
+
name: QuoteRequest
|
|
3
|
+
compactName: QuoteRequest
|
|
4
|
+
uri: "https://w3id.org/fep/044f#QuoteRequest"
|
|
5
|
+
extends: "https://www.w3.org/ns/activitystreams#Activity"
|
|
6
|
+
entity: true
|
|
7
|
+
description: |
|
|
8
|
+
A request to quote an object that requires approval from the quoted object's
|
|
9
|
+
author.
|
|
10
|
+
|
|
11
|
+
The `object` property references the quoted object, and the `instrument`
|
|
12
|
+
property contains the quote post itself.
|
|
13
|
+
|
|
14
|
+
The quoted object's author responds with an {@link Accept} (with a
|
|
15
|
+
{@link QuoteAuthorization} as `result`) or a {@link Reject}.
|
|
16
|
+
|
|
17
|
+
See [FEP-044f](https://w3id.org/fep/044f) for details.
|
|
18
|
+
defaultContext:
|
|
19
|
+
- "https://w3id.org/identity/v1"
|
|
20
|
+
- "https://www.w3.org/ns/activitystreams"
|
|
21
|
+
- "https://w3id.org/security/data-integrity/v1"
|
|
22
|
+
- "https://gotosocial.org/ns"
|
|
23
|
+
- toot: "http://joinmastodon.org/ns#"
|
|
24
|
+
misskey: "https://misskey-hub.net/ns#"
|
|
25
|
+
fedibird: "http://fedibird.com/ns#"
|
|
26
|
+
sensitive: "as:sensitive"
|
|
27
|
+
votersCount:
|
|
28
|
+
"@id": "toot:votersCount"
|
|
29
|
+
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
|
|
30
|
+
Emoji: "toot:Emoji"
|
|
31
|
+
Hashtag: "as:Hashtag"
|
|
32
|
+
ChatMessage: "http://litepub.social/ns#ChatMessage"
|
|
33
|
+
QuoteRequest: "https://w3id.org/fep/044f#QuoteRequest"
|
|
34
|
+
quote:
|
|
35
|
+
"@id": "https://w3id.org/fep/044f#quote"
|
|
36
|
+
"@type": "@id"
|
|
37
|
+
quoteUrl: "as:quoteUrl"
|
|
38
|
+
_misskey_quote: "misskey:_misskey_quote"
|
|
39
|
+
quoteUri: "fedibird:quoteUri"
|
|
40
|
+
QuoteAuthorization: "https://w3id.org/fep/044f#QuoteAuthorization"
|
|
41
|
+
quoteAuthorization:
|
|
42
|
+
"@id": "https://w3id.org/fep/044f#quoteAuthorization"
|
|
43
|
+
"@type": "@id"
|
|
44
|
+
emojiReactions:
|
|
45
|
+
"@id": "fedibird:emojiReactions"
|
|
46
|
+
"@type": "@id"
|
|
47
|
+
properties: []
|
package/src/tombstone.yaml
CHANGED
|
@@ -14,6 +14,16 @@ defaultContext:
|
|
|
14
14
|
- "https://gotosocial.org/ns"
|
|
15
15
|
|
|
16
16
|
properties:
|
|
17
|
+
- pluralName: formerTypes
|
|
18
|
+
singularName: formerType
|
|
19
|
+
singularAccessor: true
|
|
20
|
+
compactName: formerType
|
|
21
|
+
uri: "https://www.w3.org/ns/activitystreams#formerType"
|
|
22
|
+
description: |
|
|
23
|
+
On a `Tombstone` object, the `formerType` property identifies the type of
|
|
24
|
+
the object that was deleted.
|
|
25
|
+
range:
|
|
26
|
+
- "fedify:vocabEntityType"
|
|
17
27
|
- singularName: deleted
|
|
18
28
|
functional: true
|
|
19
29
|
compactName: deleted
|
package/src/type.test.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { test } from "@fedify/fixture";
|
|
2
2
|
import { deepStrictEqual } from "node:assert/strict";
|
|
3
3
|
import { getTypeId } from "./type.ts";
|
|
4
|
-
import { Person } from "./vocab.ts";
|
|
4
|
+
import { getEntityTypeById, isEntityType, Link, Person } from "./vocab.ts";
|
|
5
5
|
|
|
6
6
|
test("getTypeId()", () => {
|
|
7
7
|
const obj = new Person({});
|
|
@@ -18,3 +18,19 @@ test("getTypeId()", () => {
|
|
|
18
18
|
const obj5: Person | null | undefined = undefined;
|
|
19
19
|
deepStrictEqual(getTypeId(obj5), undefined);
|
|
20
20
|
});
|
|
21
|
+
|
|
22
|
+
test("entity type helpers", () => {
|
|
23
|
+
deepStrictEqual(isEntityType(Person), true);
|
|
24
|
+
deepStrictEqual(isEntityType(Link), false);
|
|
25
|
+
deepStrictEqual(getEntityTypeById(Person.typeId), Person);
|
|
26
|
+
deepStrictEqual(getEntityTypeById(Person.typeId.href), Person);
|
|
27
|
+
deepStrictEqual(getEntityTypeById(Link.typeId), undefined);
|
|
28
|
+
deepStrictEqual(
|
|
29
|
+
getEntityTypeById(null as unknown as string | URL),
|
|
30
|
+
undefined,
|
|
31
|
+
);
|
|
32
|
+
deepStrictEqual(
|
|
33
|
+
getEntityTypeById(undefined as unknown as string | URL),
|
|
34
|
+
undefined,
|
|
35
|
+
);
|
|
36
|
+
});
|
package/src/update.yaml
CHANGED
|
@@ -47,8 +47,16 @@ defaultContext:
|
|
|
47
47
|
PropertyValue: "schema:PropertyValue"
|
|
48
48
|
value: "schema:value"
|
|
49
49
|
ChatMessage: "http://litepub.social/ns#ChatMessage"
|
|
50
|
+
quote:
|
|
51
|
+
"@id": "https://w3id.org/fep/044f#quote"
|
|
52
|
+
"@type": "@id"
|
|
50
53
|
fedibird: "http://fedibird.com/ns#"
|
|
51
54
|
quoteUri: "fedibird:quoteUri"
|
|
55
|
+
QuoteAuthorization: "https://w3id.org/fep/044f#QuoteAuthorization"
|
|
56
|
+
QuoteRequest: "https://w3id.org/fep/044f#QuoteRequest"
|
|
57
|
+
quoteAuthorization:
|
|
58
|
+
"@id": "https://w3id.org/fep/044f#quoteAuthorization"
|
|
59
|
+
"@type": "@id"
|
|
52
60
|
misskey: "https://misskey-hub.net/ns#"
|
|
53
61
|
_misskey_quote: "misskey:_misskey_quote"
|
|
54
62
|
_misskey_followedMessage: "misskey:_misskey_followedMessage"
|