@fedify/fedify 0.11.0-dev.241 → 0.11.0-dev.243

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGES.md CHANGED
@@ -26,7 +26,7 @@ To be released.
26
26
  - Added `{ type: "featured"; handle: string }` case to `ParseUriResult`
27
27
  type.
28
28
 
29
- - Frequently used JSON-LD contexts are now preloaded. [[74]]
29
+ - Frequently used JSON-LD contexts are now preloaded. [[#74]]
30
30
 
31
31
  - The `fetchDocumentLoader()` function now preloads the following JSON-LD
32
32
  contexts:
@@ -43,6 +43,57 @@ To be released.
43
43
  - Added `Offer` class to Activity Vocabulary API.
44
44
  [[#65], [#76] by Lee Dogeon]
45
45
 
46
+ - The below properties of `Collection` and `CollectionPage` in Activity
47
+ Vocabulary API now do not accept `Link` objects:
48
+
49
+ - `Collection.current`
50
+ - `Collection.first`
51
+ - `Collection.last`
52
+ - `Collection.items`
53
+ - `CollectionPage.partOf`
54
+ - `CollectionPage.next`
55
+ - `CollectionPage.prev`
56
+
57
+ - Added `target` property to `Activity` class in Activity Vocabulary API.
58
+
59
+ - Added `Activity.getTarget()` method.
60
+ - Added `Activity.getTargets()` method.
61
+ - `new Activity()` constructor now accepts `target` option.
62
+ - `new Activity()` constructor now accepts `targets` option.
63
+ - `Activity.clone()` method now accepts `target` option.
64
+ - `Activity.clone()` method now accepts `targets` option.
65
+
66
+ - Added `result` property to `Activity` class in Activity Vocabulary API.
67
+
68
+ - Added `Activity.getResult()` method.
69
+ - Added `Activity.getResults()` method.
70
+ - `new Activity()` constructor now accepts `result` option.
71
+ - `new Activity()` constructor now accepts `results` option.
72
+ - `Activity.clone()` method now accepts `result` option.
73
+ - `Activity.clone()` method now accepts `results` option.
74
+
75
+ - Added `origin` property to `Activity` class in Activity Vocabulary API.
76
+
77
+ - Added `Activity.getOrigin()` method.
78
+ - Added `Activity.getOrigins()` method.
79
+ - `new Activity()` constructor now accepts `origin` option.
80
+ - `new Activity()` constructor now accepts `origins` option.
81
+ - `Activity.clone()` method now accepts `origin` option.
82
+ - `Activity.clone()` method now accepts `origins` option.
83
+
84
+ - Added `instrument` property to `Activity` class in Activity Vocabulary API.
85
+
86
+ - Added `Activity.getInstrument()` method.
87
+ - Added `Activity.getInstruments()` method.
88
+ - `new Activity()` constructor now accepts `instrument` option.
89
+ - `new Activity()` constructor now accepts `instruments` option.
90
+ - `Activity.clone()` method now accepts `instrument` option.
91
+ - `Activity.clone()` method now accepts `instruments` option.
92
+
93
+ - The `items` property of `OrderedCollection` and `OrderedCollectionPage`
94
+ in Activity Vocabulary API is now represented as `orderedItems`
95
+ (was `items`) in JSON-LD.
96
+
46
97
  - The key pair or the key pair for signing outgoing HTTP requests made from
47
98
  the shared inbox now can be configured. This improves the compatibility
48
99
  with other ActivityPub implementations that require authorized fetches
@@ -32,7 +32,9 @@ $defs:
32
32
  container:
33
33
  description: >-
34
34
  The container type of the property values. It can be unspecified.
35
- const: "graph"
35
+ enum:
36
+ - graph
37
+ - list
36
38
  required:
37
39
  - pluralName
38
40
  - allOf:
@@ -4,7 +4,7 @@ import { accepts } from "../deps/jsr.io/@std/http/0.224.5/negotiation.js";
4
4
  import { verifyRequest } from "../sig/http.js";
5
5
  import { doesActorOwnKey } from "../sig/owner.js";
6
6
  import { verifyObject } from "../sig/proof.js";
7
- import { Activity, Link, Object, OrderedCollection, OrderedCollectionPage, } from "../vocab/vocab.js";
7
+ import { Activity, Object, OrderedCollection, OrderedCollectionPage, } from "../vocab/vocab.js";
8
8
  export function acceptsJsonLd(request) {
9
9
  const types = accepts(request);
10
10
  if (types == null)
@@ -146,7 +146,7 @@ function filterCollectionItems(items, collectionName, filterPredicate) {
146
146
  let logged = false;
147
147
  for (const item of items) {
148
148
  let mappedItem;
149
- if (item instanceof Object || item instanceof Link || item instanceof URL) {
149
+ if (item instanceof Object || item instanceof URL) {
150
150
  mappedItem = item;
151
151
  }
152
152
  else if (item.id == null)
@@ -41,3 +41,50 @@ properties:
41
41
  wishlist", the object of the activity is the movie added.
42
42
  range:
43
43
  - "https://www.w3.org/ns/activitystreams#Object"
44
+
45
+ - pluralName: targets
46
+ singularName: target
47
+ singularAccessor: true
48
+ uri: "https://www.w3.org/ns/activitystreams#target"
49
+ description: |
50
+ Describes the indirect object, or target, of the activity. The precise
51
+ meaning of the target is largely dependent on the type of action being
52
+ described but will often be the object of the English preposition "to".
53
+ For instance, in the activity "John added a movie to his wishlist",
54
+ the target of the activity is John's wishlist. An activity can have more
55
+ than one target.
56
+ range:
57
+ - "https://www.w3.org/ns/activitystreams#Object"
58
+
59
+ - pluralName: results
60
+ singularName: result
61
+ singularAccessor: true
62
+ uri: "https://www.w3.org/ns/activitystreams#result"
63
+ description: |
64
+ Describes the result of the activity. For instance, if a particular action
65
+ results in the creation of a new resource, the result property can be used
66
+ to describe that new resource.
67
+ range:
68
+ - "https://www.w3.org/ns/activitystreams#Object"
69
+
70
+ - pluralName: origins
71
+ singularName: origin
72
+ singularAccessor: true
73
+ uri: "https://www.w3.org/ns/activitystreams#origin"
74
+ description: |
75
+ Describes an indirect object of the activity from which the activity is
76
+ directed. The precise meaning of the origin is the object of the English
77
+ preposition "from". For instance, in the activity "John moved an item to
78
+ List B from List A", the origin of the activity is "List A".
79
+ range:
80
+ - "https://www.w3.org/ns/activitystreams#Object"
81
+
82
+ - pluralName: instruments
83
+ singularName: instrument
84
+ singularAccessor: true
85
+ uri: "https://www.w3.org/ns/activitystreams#instrument"
86
+ description: |
87
+ Identifies one or more objects used (or to be used) in the completion of
88
+ an {@link Activity}.
89
+ range:
90
+ - "https://www.w3.org/ns/activitystreams#Object"
@@ -30,7 +30,6 @@ properties:
30
30
  the most recently updated member items.
31
31
  range:
32
32
  - "https://www.w3.org/ns/activitystreams#CollectionPage"
33
- - "https://www.w3.org/ns/activitystreams#Link"
34
33
 
35
34
  - singularName: first
36
35
  functional: true
@@ -40,7 +39,6 @@ properties:
40
39
  items in the collection.
41
40
  range:
42
41
  - "https://www.w3.org/ns/activitystreams#CollectionPage"
43
- - "https://www.w3.org/ns/activitystreams#Link"
44
42
 
45
43
  - singularName: last
46
44
  functional: true
@@ -50,7 +48,6 @@ properties:
50
48
  the collection.
51
49
  range:
52
50
  - "https://www.w3.org/ns/activitystreams#CollectionPage"
53
- - "https://www.w3.org/ns/activitystreams#Link"
54
51
 
55
52
  - pluralName: items
56
53
  singularName: item
@@ -60,4 +57,3 @@ properties:
60
57
  or unordered.
61
58
  range:
62
59
  - "https://www.w3.org/ns/activitystreams#Object"
63
- - "https://www.w3.org/ns/activitystreams#Link"
@@ -17,7 +17,6 @@ properties:
17
17
  Identifies the {@link Collection} to which a {@link CollectionPage} objects
18
18
  items belong.
19
19
  range:
20
- - "https://www.w3.org/ns/activitystreams#Link"
21
20
  - "https://www.w3.org/ns/activitystreams#Collection"
22
21
 
23
22
  - singularName: next
@@ -26,7 +25,6 @@ properties:
26
25
  description: In a paged {@link Collection}, indicates the next page of items.
27
26
  range:
28
27
  - "https://www.w3.org/ns/activitystreams#CollectionPage"
29
- - "https://www.w3.org/ns/activitystreams#Link"
30
28
 
31
29
  - singularName: prev
32
30
  functional: true
@@ -35,4 +33,3 @@ properties:
35
33
  In a paged {@link Collection}, identifies the previous page of items.
36
34
  range:
37
35
  - "https://www.w3.org/ns/activitystreams#CollectionPage"
38
- - "https://www.w3.org/ns/activitystreams#Link"
@@ -8,4 +8,13 @@ description: |
8
8
  are assumed to always be strictly ordered.
9
9
  defaultContext: "https://www.w3.org/ns/activitystreams"
10
10
 
11
- properties: []
11
+ properties:
12
+ - pluralName: items
13
+ singularName: item
14
+ uri: "https://www.w3.org/ns/activitystreams#items"
15
+ container: list
16
+ description: |
17
+ Identifies the items contained in a collection. The items might be ordered
18
+ or unordered.
19
+ range:
20
+ - "https://www.w3.org/ns/activitystreams#Object"