@fedify/vocab 2.4.0-dev.1570 → 2.4.0-dev.1573
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 +13961 -10045
- package/dist/mod.d.cts +1618 -665
- package/dist/mod.d.ts +1618 -665
- package/dist/mod.js +13959 -10047
- package/dist-tests/{actor-BTMC-aMT.mjs → actor-BG608PxT.mjs} +2 -2
- package/dist-tests/actor.test.mjs +2 -2
- package/dist-tests/application.yaml +13 -0
- package/dist-tests/featureauthorization.yaml +33 -0
- package/dist-tests/featuredcollection.yaml +41 -0
- package/dist-tests/featureditem.yaml +34 -0
- package/dist-tests/featurerequest.yaml +21 -0
- package/dist-tests/group.yaml +13 -0
- package/dist-tests/interactionpolicy.yaml +16 -1
- package/dist-tests/lookup.test.mjs +7 -5
- package/dist-tests/organization.yaml +13 -0
- package/dist-tests/person.yaml +13 -0
- package/dist-tests/service.yaml +13 -0
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/{vocab-XnSGFOqq.mjs → vocab-DOHLQ4UQ.mjs} +13958 -10044
- package/dist-tests/vocab.test.mjs +986 -1
- package/package.json +4 -4
- package/src/__snapshots__/vocab.test.ts.snap +609 -0
- package/src/application.yaml +13 -0
- package/src/featureauthorization.yaml +33 -0
- package/src/featuredcollection.yaml +41 -0
- package/src/featureditem.yaml +34 -0
- package/src/featurerequest.yaml +21 -0
- package/src/group.yaml +13 -0
- package/src/interactionpolicy.yaml +16 -1
- package/src/lookup.ts +6 -2
- package/src/organization.yaml +13 -0
- package/src/person.yaml +13 -0
- package/src/service.yaml +13 -0
- package/src/vocab.test.ts +1534 -116
package/src/application.yaml
CHANGED
|
@@ -12,9 +12,13 @@ defaultContext:
|
|
|
12
12
|
- "https://www.w3.org/ns/did/v1"
|
|
13
13
|
- "https://w3id.org/security/multikey/v1"
|
|
14
14
|
- "https://gotosocial.org/ns"
|
|
15
|
+
- "https://w3id.org/fep/7aa9"
|
|
15
16
|
- alsoKnownAs:
|
|
16
17
|
"@id": "as:alsoKnownAs"
|
|
17
18
|
"@type": "@id"
|
|
19
|
+
featuredCollections:
|
|
20
|
+
"@id": "https://w3id.org/fep/7aa9#featuredCollections"
|
|
21
|
+
"@type": "@id"
|
|
18
22
|
manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
|
|
19
23
|
movedTo:
|
|
20
24
|
"@id": "as:movedTo"
|
|
@@ -196,6 +200,15 @@ properties:
|
|
|
196
200
|
range:
|
|
197
201
|
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
198
202
|
|
|
203
|
+
- singularName: featuredCollections
|
|
204
|
+
functional: true
|
|
205
|
+
compactName: featuredCollections
|
|
206
|
+
uri: "https://w3id.org/fep/7aa9#featuredCollections"
|
|
207
|
+
description: |
|
|
208
|
+
A collection of {@link FeaturedCollection}s created by this actor.
|
|
209
|
+
range:
|
|
210
|
+
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
211
|
+
|
|
199
212
|
- pluralName: streams
|
|
200
213
|
singularName: stream
|
|
201
214
|
singularAccessor: false
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
$schema: ../../vocab-tools/schema.yaml
|
|
2
|
+
name: FeatureAuthorization
|
|
3
|
+
compactName: FeatureAuthorization
|
|
4
|
+
uri: "https://w3id.org/fep/7aa9#FeatureAuthorization"
|
|
5
|
+
extends: "https://www.w3.org/ns/activitystreams#Object"
|
|
6
|
+
entity: true
|
|
7
|
+
description: |
|
|
8
|
+
Proves that an actor consented to being included in a
|
|
9
|
+
{@link FeaturedCollection}.
|
|
10
|
+
|
|
11
|
+
See [FEP-7aa9](https://w3id.org/fep/7aa9) for details.
|
|
12
|
+
defaultContext:
|
|
13
|
+
- "https://www.w3.org/ns/activitystreams"
|
|
14
|
+
- "https://w3id.org/security/data-integrity/v1"
|
|
15
|
+
- "https://gotosocial.org/ns"
|
|
16
|
+
- "https://w3id.org/fep/7aa9"
|
|
17
|
+
|
|
18
|
+
properties:
|
|
19
|
+
- singularName: interactingObject
|
|
20
|
+
functional: true
|
|
21
|
+
compactName: interactingObject
|
|
22
|
+
uri: "https://gotosocial.org/ns#interactingObject"
|
|
23
|
+
description: The featured collection for which the authorization was granted.
|
|
24
|
+
range:
|
|
25
|
+
- "https://www.w3.org/ns/activitystreams#Object"
|
|
26
|
+
|
|
27
|
+
- singularName: interactionTarget
|
|
28
|
+
functional: true
|
|
29
|
+
compactName: interactionTarget
|
|
30
|
+
uri: "https://gotosocial.org/ns#interactionTarget"
|
|
31
|
+
description: The actor that was authorized to be featured.
|
|
32
|
+
range:
|
|
33
|
+
- "https://www.w3.org/ns/activitystreams#Object"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
$schema: ../../vocab-tools/schema.yaml
|
|
2
|
+
name: FeaturedCollection
|
|
3
|
+
compactName: FeaturedCollection
|
|
4
|
+
uri: "https://w3id.org/fep/7aa9#FeaturedCollection"
|
|
5
|
+
extends: "https://www.w3.org/ns/activitystreams#OrderedCollection"
|
|
6
|
+
entity: true
|
|
7
|
+
description: |
|
|
8
|
+
A curated collection of recommended actors or other objects.
|
|
9
|
+
|
|
10
|
+
See [FEP-7aa9](https://w3id.org/fep/7aa9) for details.
|
|
11
|
+
defaultContext:
|
|
12
|
+
- "https://www.w3.org/ns/activitystreams"
|
|
13
|
+
- "https://w3id.org/security/data-integrity/v1"
|
|
14
|
+
- "https://gotosocial.org/ns"
|
|
15
|
+
- "https://w3id.org/fep/7aa9"
|
|
16
|
+
- toot: "http://joinmastodon.org/ns#"
|
|
17
|
+
sensitive: "as:sensitive"
|
|
18
|
+
discoverable: "toot:discoverable"
|
|
19
|
+
Hashtag: "as:Hashtag"
|
|
20
|
+
|
|
21
|
+
properties:
|
|
22
|
+
- singularName: topic
|
|
23
|
+
functional: true
|
|
24
|
+
compactName: topic
|
|
25
|
+
uri: "https://w3id.org/fep/7aa9#topic"
|
|
26
|
+
description: |
|
|
27
|
+
A single {@link Hashtag} object that represents the main topic or category
|
|
28
|
+
of this featured collection.
|
|
29
|
+
range:
|
|
30
|
+
- "https://www.w3.org/ns/activitystreams#Hashtag"
|
|
31
|
+
|
|
32
|
+
- singularName: discoverable
|
|
33
|
+
functional: true
|
|
34
|
+
compactName: discoverable
|
|
35
|
+
uri: "http://joinmastodon.org/ns#discoverable"
|
|
36
|
+
description: |
|
|
37
|
+
When present and set to `false`, signals that this featured collection is
|
|
38
|
+
not meant to be discovered by search, onboarding, or similar discovery
|
|
39
|
+
features.
|
|
40
|
+
range:
|
|
41
|
+
- "http://www.w3.org/2001/XMLSchema#boolean"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
$schema: ../../vocab-tools/schema.yaml
|
|
2
|
+
name: FeaturedItem
|
|
3
|
+
compactName: FeaturedItem
|
|
4
|
+
uri: "https://w3id.org/fep/7aa9#FeaturedItem"
|
|
5
|
+
extends: "https://www.w3.org/ns/activitystreams#Object"
|
|
6
|
+
entity: true
|
|
7
|
+
description: |
|
|
8
|
+
A single entry in a {@link FeaturedCollection}.
|
|
9
|
+
|
|
10
|
+
See [FEP-7aa9](https://w3id.org/fep/7aa9) for details.
|
|
11
|
+
defaultContext:
|
|
12
|
+
- "https://www.w3.org/ns/activitystreams"
|
|
13
|
+
- "https://w3id.org/security/data-integrity/v1"
|
|
14
|
+
- "https://gotosocial.org/ns"
|
|
15
|
+
- "https://w3id.org/fep/7aa9"
|
|
16
|
+
|
|
17
|
+
properties:
|
|
18
|
+
- singularName: featuredObject
|
|
19
|
+
functional: true
|
|
20
|
+
compactName: featuredObject
|
|
21
|
+
uri: "https://w3id.org/fep/7aa9#featuredObject"
|
|
22
|
+
description: The object being featured.
|
|
23
|
+
range:
|
|
24
|
+
- "https://www.w3.org/ns/activitystreams#Object"
|
|
25
|
+
|
|
26
|
+
- singularName: featureAuthorization
|
|
27
|
+
functional: true
|
|
28
|
+
compactName: featureAuthorization
|
|
29
|
+
uri: "https://w3id.org/fep/7aa9#featureAuthorization"
|
|
30
|
+
description: |
|
|
31
|
+
The {@link FeatureAuthorization} proving that the featured actor consented
|
|
32
|
+
to inclusion in the featured collection.
|
|
33
|
+
range:
|
|
34
|
+
- "https://w3id.org/fep/7aa9#FeatureAuthorization"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
$schema: ../../vocab-tools/schema.yaml
|
|
2
|
+
name: FeatureRequest
|
|
3
|
+
compactName: FeatureRequest
|
|
4
|
+
uri: "https://w3id.org/fep/7aa9#FeatureRequest"
|
|
5
|
+
extends: "https://www.w3.org/ns/activitystreams#Activity"
|
|
6
|
+
entity: true
|
|
7
|
+
description: |
|
|
8
|
+
A request for consent before featuring an actor in a
|
|
9
|
+
{@link FeaturedCollection}.
|
|
10
|
+
|
|
11
|
+
The `object` property references the actor to be included, and the
|
|
12
|
+
`instrument` property references the featured collection.
|
|
13
|
+
|
|
14
|
+
See [FEP-7aa9](https://w3id.org/fep/7aa9) for details.
|
|
15
|
+
defaultContext:
|
|
16
|
+
- "https://w3id.org/identity/v1"
|
|
17
|
+
- "https://www.w3.org/ns/activitystreams"
|
|
18
|
+
- "https://w3id.org/security/data-integrity/v1"
|
|
19
|
+
- "https://gotosocial.org/ns"
|
|
20
|
+
- "https://w3id.org/fep/7aa9"
|
|
21
|
+
properties: []
|
package/src/group.yaml
CHANGED
|
@@ -12,9 +12,13 @@ defaultContext:
|
|
|
12
12
|
- "https://www.w3.org/ns/did/v1"
|
|
13
13
|
- "https://w3id.org/security/multikey/v1"
|
|
14
14
|
- "https://gotosocial.org/ns"
|
|
15
|
+
- "https://w3id.org/fep/7aa9"
|
|
15
16
|
- alsoKnownAs:
|
|
16
17
|
"@id": "as:alsoKnownAs"
|
|
17
18
|
"@type": "@id"
|
|
19
|
+
featuredCollections:
|
|
20
|
+
"@id": "https://w3id.org/fep/7aa9#featuredCollections"
|
|
21
|
+
"@type": "@id"
|
|
18
22
|
manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
|
|
19
23
|
movedTo:
|
|
20
24
|
"@id": "as:movedTo"
|
|
@@ -196,6 +200,15 @@ properties:
|
|
|
196
200
|
range:
|
|
197
201
|
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
198
202
|
|
|
203
|
+
- singularName: featuredCollections
|
|
204
|
+
functional: true
|
|
205
|
+
compactName: featuredCollections
|
|
206
|
+
uri: "https://w3id.org/fep/7aa9#featuredCollections"
|
|
207
|
+
description: |
|
|
208
|
+
A collection of {@link FeaturedCollection}s created by this actor.
|
|
209
|
+
range:
|
|
210
|
+
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
211
|
+
|
|
199
212
|
- pluralName: streams
|
|
200
213
|
singularName: stream
|
|
201
214
|
singularAccessor: false
|
|
@@ -12,9 +12,24 @@ description: |
|
|
|
12
12
|
|
|
13
13
|
See [GoToSocial interaction controls](https://docs.gotosocial.org/en/latest/federation/interaction_controls/)
|
|
14
14
|
for details.
|
|
15
|
-
defaultContext:
|
|
15
|
+
defaultContext:
|
|
16
|
+
- "https://gotosocial.org/ns"
|
|
17
|
+
- "https://w3id.org/fep/7aa9"
|
|
16
18
|
|
|
17
19
|
properties:
|
|
20
|
+
- singularName: canFeature
|
|
21
|
+
functional: true
|
|
22
|
+
compactName: canFeature
|
|
23
|
+
uri: "https://w3id.org/fep/7aa9#canFeature"
|
|
24
|
+
untyped: true
|
|
25
|
+
description: |
|
|
26
|
+
The sub-policy specifying who can feature the actor in a
|
|
27
|
+
{@link FeaturedCollection}.
|
|
28
|
+
|
|
29
|
+
See [FEP-7aa9](https://w3id.org/fep/7aa9) for details.
|
|
30
|
+
range:
|
|
31
|
+
- "https://gotosocial.org/ns#InteractionRule"
|
|
32
|
+
|
|
18
33
|
- singularName: canLike
|
|
19
34
|
functional: true
|
|
20
35
|
compactName: canLike
|
package/src/lookup.ts
CHANGED
|
@@ -2,6 +2,8 @@ import type { GetUserAgentOptions } from "@fedify/vocab-runtime";
|
|
|
2
2
|
import {
|
|
3
3
|
type DocumentLoader,
|
|
4
4
|
getDocumentLoader,
|
|
5
|
+
haveSameIriOrigin,
|
|
6
|
+
parseIri,
|
|
5
7
|
type RemoteDocument,
|
|
6
8
|
} from "@fedify/vocab-runtime";
|
|
7
9
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
@@ -312,12 +314,14 @@ async function lookupObjectInternal(
|
|
|
312
314
|
}
|
|
313
315
|
if (remoteDoc == null) return null;
|
|
314
316
|
let object: Object;
|
|
317
|
+
let documentUrl: URL;
|
|
315
318
|
try {
|
|
319
|
+
documentUrl = parseIri(remoteDoc.documentUrl);
|
|
316
320
|
object = await Object.fromJsonLd(remoteDoc.document, {
|
|
317
321
|
documentLoader,
|
|
318
322
|
contextLoader: options.contextLoader,
|
|
319
323
|
tracerProvider: options.tracerProvider,
|
|
320
|
-
baseUrl:
|
|
324
|
+
baseUrl: documentUrl,
|
|
321
325
|
});
|
|
322
326
|
} catch (error) {
|
|
323
327
|
if (error instanceof TypeError) {
|
|
@@ -331,7 +335,7 @@ async function lookupObjectInternal(
|
|
|
331
335
|
}
|
|
332
336
|
if (
|
|
333
337
|
options.crossOrigin !== "trust" && object.id != null &&
|
|
334
|
-
object.id
|
|
338
|
+
!haveSameIriOrigin(object.id, documentUrl)
|
|
335
339
|
) {
|
|
336
340
|
if (options.crossOrigin === "throw") {
|
|
337
341
|
throw new Error(
|
package/src/organization.yaml
CHANGED
|
@@ -12,9 +12,13 @@ defaultContext:
|
|
|
12
12
|
- "https://www.w3.org/ns/did/v1"
|
|
13
13
|
- "https://w3id.org/security/multikey/v1"
|
|
14
14
|
- "https://gotosocial.org/ns"
|
|
15
|
+
- "https://w3id.org/fep/7aa9"
|
|
15
16
|
- alsoKnownAs:
|
|
16
17
|
"@id": "as:alsoKnownAs"
|
|
17
18
|
"@type": "@id"
|
|
19
|
+
featuredCollections:
|
|
20
|
+
"@id": "https://w3id.org/fep/7aa9#featuredCollections"
|
|
21
|
+
"@type": "@id"
|
|
18
22
|
manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
|
|
19
23
|
movedTo:
|
|
20
24
|
"@id": "as:movedTo"
|
|
@@ -196,6 +200,15 @@ properties:
|
|
|
196
200
|
range:
|
|
197
201
|
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
198
202
|
|
|
203
|
+
- singularName: featuredCollections
|
|
204
|
+
functional: true
|
|
205
|
+
compactName: featuredCollections
|
|
206
|
+
uri: "https://w3id.org/fep/7aa9#featuredCollections"
|
|
207
|
+
description: |
|
|
208
|
+
A collection of {@link FeaturedCollection}s created by this actor.
|
|
209
|
+
range:
|
|
210
|
+
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
211
|
+
|
|
199
212
|
- pluralName: streams
|
|
200
213
|
singularName: stream
|
|
201
214
|
singularAccessor: false
|
package/src/person.yaml
CHANGED
|
@@ -12,9 +12,13 @@ defaultContext:
|
|
|
12
12
|
- "https://www.w3.org/ns/did/v1"
|
|
13
13
|
- "https://w3id.org/security/multikey/v1"
|
|
14
14
|
- "https://gotosocial.org/ns"
|
|
15
|
+
- "https://w3id.org/fep/7aa9"
|
|
15
16
|
- alsoKnownAs:
|
|
16
17
|
"@id": "as:alsoKnownAs"
|
|
17
18
|
"@type": "@id"
|
|
19
|
+
featuredCollections:
|
|
20
|
+
"@id": "https://w3id.org/fep/7aa9#featuredCollections"
|
|
21
|
+
"@type": "@id"
|
|
18
22
|
manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
|
|
19
23
|
movedTo:
|
|
20
24
|
"@id": "as:movedTo"
|
|
@@ -196,6 +200,15 @@ properties:
|
|
|
196
200
|
range:
|
|
197
201
|
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
198
202
|
|
|
203
|
+
- singularName: featuredCollections
|
|
204
|
+
functional: true
|
|
205
|
+
compactName: featuredCollections
|
|
206
|
+
uri: "https://w3id.org/fep/7aa9#featuredCollections"
|
|
207
|
+
description: |
|
|
208
|
+
A collection of {@link FeaturedCollection}s created by this actor.
|
|
209
|
+
range:
|
|
210
|
+
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
211
|
+
|
|
199
212
|
- pluralName: streams
|
|
200
213
|
singularName: stream
|
|
201
214
|
singularAccessor: false
|
package/src/service.yaml
CHANGED
|
@@ -12,9 +12,13 @@ defaultContext:
|
|
|
12
12
|
- "https://www.w3.org/ns/did/v1"
|
|
13
13
|
- "https://w3id.org/security/multikey/v1"
|
|
14
14
|
- "https://gotosocial.org/ns"
|
|
15
|
+
- "https://w3id.org/fep/7aa9"
|
|
15
16
|
- alsoKnownAs:
|
|
16
17
|
"@id": "as:alsoKnownAs"
|
|
17
18
|
"@type": "@id"
|
|
19
|
+
featuredCollections:
|
|
20
|
+
"@id": "https://w3id.org/fep/7aa9#featuredCollections"
|
|
21
|
+
"@type": "@id"
|
|
18
22
|
manuallyApprovesFollowers: "as:manuallyApprovesFollowers"
|
|
19
23
|
movedTo:
|
|
20
24
|
"@id": "as:movedTo"
|
|
@@ -196,6 +200,15 @@ properties:
|
|
|
196
200
|
range:
|
|
197
201
|
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
198
202
|
|
|
203
|
+
- singularName: featuredCollections
|
|
204
|
+
functional: true
|
|
205
|
+
compactName: featuredCollections
|
|
206
|
+
uri: "https://w3id.org/fep/7aa9#featuredCollections"
|
|
207
|
+
description: |
|
|
208
|
+
A collection of {@link FeaturedCollection}s created by this actor.
|
|
209
|
+
range:
|
|
210
|
+
- "https://www.w3.org/ns/activitystreams#Collection"
|
|
211
|
+
|
|
199
212
|
- pluralName: streams
|
|
200
213
|
singularName: stream
|
|
201
214
|
singularAccessor: false
|