@fedify/fedify 2.0.0-pr.490.2 → 2.0.0-pr.559.4
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/LICENSE +1 -1
- package/README.md +64 -37
- package/dist/{builder-4syLV1-z.js → builder-DTlQwmVF.js} +10 -3
- package/dist/{client-BsGzbnV-.d.ts → client-CUTUGgvJ.d.ts} +18 -18
- package/dist/{client-pY7-3icS.js → client-Dg7OfUDA.js} +28 -23
- package/dist/{client-94iWEfQa.d.cts → client-by-PEGAJ.d.cts} +18 -18
- package/dist/compat/mod.cjs +1 -1
- package/dist/compat/mod.d.cts +6 -10
- package/dist/compat/mod.d.ts +6 -10
- package/dist/compat/mod.js +1 -1
- package/dist/compat/transformers.test.js +22 -21
- package/dist/{context-PxGADCsD.d.cts → context-B6X-7loD.d.cts} +206 -74
- package/dist/{context-V-XS2_6O.d.ts → context-CJaICYPw.d.ts} +206 -74
- package/dist/context-CZ5llAss.js +109 -0
- package/dist/deno-DGx1JZHr.js +124 -0
- package/dist/{testing-BslrM_9E.js → dist-B5f6a8Tt.js} +90 -110
- package/dist/{docloader-DndkGj0O.js → docloader-D8UHsyqD.js} +3 -3
- package/dist/{esm-VlKMJQqV.js → esm-DGl7uK1r.js} +1 -1
- package/dist/federation/builder.test.js +7 -5
- package/dist/federation/collection.test.js +2 -3
- package/dist/federation/handler.test.js +24 -23
- package/dist/federation/idempotency.test.js +59 -22
- package/dist/federation/inbox.test.js +4 -3
- package/dist/federation/keycache.test.js +4 -4
- package/dist/federation/kv.test.js +56 -3
- package/dist/federation/middleware.test.js +307 -93
- package/dist/federation/mod.cjs +9 -10
- package/dist/federation/mod.d.cts +7 -11
- package/dist/federation/mod.d.ts +7 -11
- package/dist/federation/mod.js +8 -11
- package/dist/federation/mq.test.js +167 -16
- package/dist/federation/negotiation.test.js +2 -3
- package/dist/federation/retry.test.js +2 -3
- package/dist/federation/router.test.js +2 -2
- package/dist/federation/send.test.js +93 -11
- package/dist/{webfinger/handler.test.js → federation/webfinger.test.js} +24 -22
- package/dist/{federation-CRpdnOMS.cjs → federation-CE0CJ_0G.cjs} +116 -10
- package/dist/{federation-jcR8-ZxP.js → federation-D6FVaeAR.js} +122 -16
- package/dist/{http-YhR_TMMQ.js → http-CL3G0rnf.js} +126 -9
- package/dist/{http-M8k5mKc0.d.cts → http-ClB3pLcL.d.cts} +1 -1
- package/dist/{http-Dxpqz4hE.cjs → http-DKBUv5zZ.cjs} +139 -16
- package/dist/{http-BbO0ejuk.d.ts → http-DLBDPal9.d.ts} +1 -1
- package/dist/{http-DH47B-h3.js → http-LGtYlSfN.js} +3 -2
- package/dist/{inbox-CEyHvxOo.js → inbox-DbtWQY2D.js} +2 -1
- package/dist/{key-x7E5PYI0.js → key-BCtt1Ugy.js} +3 -3
- package/dist/{keycache-BRXuBDuy.js → keycache-DRxpZ5r9.js} +1 -1
- package/dist/{keys-DLk_8H-l.js → keys-ZbcByPg9.js} +1 -1
- package/dist/{kv-Bxr0Q87_.d.cts → kv-B4vFhIYL.d.cts} +30 -1
- package/dist/{kv-BKNZ-Tb-.d.ts → kv-CYySNrsn.d.ts} +30 -1
- package/dist/{kv-CRZrzyXm.js → kv-QzKcOQgP.js} +22 -0
- package/dist/{kv-cache-HFnFIjSD.js → kv-cache-0786BfqY.js} +3 -3
- package/dist/{kv-cache-DN9pfMBe.js → kv-cache-B__dHl7g.js} +15 -2
- package/dist/{kv-cache-BMpfJFTx.cjs → kv-cache-DCJojeTn.cjs} +3 -3
- package/dist/{ld-CRPaU6c8.js → ld-QlZPwGEH.js} +4 -3
- package/dist/middleware-B3jUPnDa.js +12 -0
- package/dist/middleware-BFiwWMA2.cjs +12 -0
- package/dist/middleware-DMx6DyIw.js +26 -0
- package/dist/{middleware-DfLpMu7C.js → middleware-Dm58nObp.js} +280 -166
- package/dist/{middleware-BIqFwRwI.js → middleware-WokE4qxc.js} +245 -178
- package/dist/{middleware-Ck7O6mb0.cjs → middleware-hWyKOO_6.cjs} +332 -206
- package/dist/{mod-DMpuiKXi.d.cts → mod-BHXq4Q3x.d.cts} +7 -7
- package/dist/{mod-DgxG-byT.d.cts → mod-BrS8tiad.d.cts} +2 -2
- package/dist/mod-CoMP50Rf.d.ts +64 -0
- package/dist/{mod-BoRKfJPE.d.cts → mod-DScazwCW.d.cts} +4 -4
- package/dist/mod-DTzN6Pv3.d.cts +62 -0
- package/dist/{mod-aAE2wOWV.d.ts → mod-DZmuPaKv.d.ts} +7 -7
- package/dist/{mod-D5Z2tISD.d.ts → mod-jOa7W503.d.ts} +2 -2
- package/dist/{mod-Cdo6SYlJ.d.ts → mod-xKJ57rwu.d.ts} +4 -4
- package/dist/mod.cjs +12 -93
- package/dist/mod.d.cts +11 -15
- package/dist/mod.d.ts +11 -15
- package/dist/mod.js +11 -15
- package/dist/nodeinfo/client.test.js +3 -4
- package/dist/nodeinfo/handler.test.js +22 -21
- package/dist/nodeinfo/mod.cjs +2 -2
- package/dist/nodeinfo/mod.d.cts +2 -2
- package/dist/nodeinfo/mod.d.ts +2 -2
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/types.test.js +2 -3
- package/dist/otel/exporter.test.js +893 -0
- package/dist/otel/mod.cjs +256 -0
- package/dist/otel/mod.d.cts +230 -0
- package/dist/otel/mod.d.ts +232 -0
- package/dist/otel/mod.js +255 -0
- package/dist/{owner-kQRGVXG1.d.ts → owner-BgI8C-VY.d.ts} +1 -2
- package/dist/{owner-B4HbyP8s.d.cts → owner-C-zfmVAD.d.cts} +1 -2
- package/dist/{owner-CIWnopkT.js → owner-Cejm-F7S.js} +2 -2
- package/dist/{proof-D-5ri6rf.js → proof-BOQBHd-i.js} +3 -2
- package/dist/{proof-fEwcA7LA.cjs → proof-Bmi8ZIcW.cjs} +24 -25
- package/dist/{proof-C8-2l0zH.js → proof-CnaEQ_Ev.js} +4 -5
- package/dist/router-D9eI0s4b.js +118 -0
- package/dist/{send-CPGk9QKZ.js → send-jFxXfsN8.js} +38 -4
- package/dist/sig/http.test.js +6 -7
- package/dist/sig/key.test.js +5 -5
- package/dist/sig/ld.test.js +6 -6
- package/dist/sig/mod.cjs +3 -5
- package/dist/sig/mod.d.cts +3 -5
- package/dist/sig/mod.d.ts +3 -5
- package/dist/sig/mod.js +3 -5
- package/dist/sig/owner.test.js +6 -7
- package/dist/sig/proof.test.js +6 -6
- package/dist/testing/mod.d.ts +173 -7006
- package/dist/testing/mod.js +4 -3
- package/dist/{transformers-CoBS-oFG.cjs → transformers-BjBg6Lag.cjs} +2 -2
- package/dist/{transformers-BFT6d7J5.js → transformers-N_ip_y4P.js} +2 -2
- package/dist/{types-BtUjyi5y.js → types-8l28uC8o.js} +30 -25
- package/dist/{types-CWgzGaqk.cjs → types-B6z6CqIz.cjs} +30 -25
- package/dist/{types-C2XVl6gj.js → types-CPz01LGH.js} +3 -3
- package/dist/utils/docloader.test.js +7 -8
- package/dist/utils/kv-cache.test.js +5 -3
- package/dist/utils/mod.cjs +3 -5
- package/dist/utils/mod.d.cts +3 -4
- package/dist/utils/mod.d.ts +3 -4
- package/dist/utils/mod.js +3 -5
- package/dist/vocab/mod.cjs +8 -81
- package/dist/vocab/mod.d.cts +1 -4
- package/dist/vocab/mod.d.ts +1 -4
- package/dist/vocab/mod.js +1 -5
- package/package.json +27 -27
- package/dist/actor-BT-e5fn9.js +0 -146
- package/dist/actor-B_gRMloq.js +0 -41647
- package/dist/actor-CBfPjuWj.cjs +0 -42079
- package/dist/actor-DqFajh9s.d.ts +0 -130
- package/dist/actor-f2NtjyCg.d.cts +0 -128
- package/dist/fixtures/activitypub.academy/users/brauca_darradiul.json +0 -83
- package/dist/fixtures/example.com/announce.json +0 -6
- package/dist/fixtures/example.com/collection.json +0 -19
- package/dist/fixtures/example.com/create.json +0 -6
- package/dist/fixtures/example.com/cross-origin-actor.json +0 -6
- package/dist/fixtures/example.com/hong-gildong.json +0 -11
- package/dist/fixtures/example.com/invite.json +0 -7
- package/dist/fixtures/example.com/key.json +0 -7
- package/dist/fixtures/example.com/key2.json +0 -6
- package/dist/fixtures/example.com/object.json +0 -6
- package/dist/fixtures/example.com/orderedcollectionpage.json +0 -24
- package/dist/fixtures/example.com/paged/a.json +0 -13
- package/dist/fixtures/example.com/paged/b.json +0 -16
- package/dist/fixtures/example.com/paged-collection.json +0 -6
- package/dist/fixtures/example.com/person.json +0 -22
- package/dist/fixtures/example.com/person2.json +0 -40
- package/dist/fixtures/example.com/test.json +0 -5
- package/dist/fixtures/example.com/users/handle.json +0 -16
- package/dist/fixtures/example.com/wrong-type.json +0 -3
- package/dist/fixtures/media.example.com/avatars/test-avatar.jpg.json +0 -6
- package/dist/fixtures/oeee.cafe/ap/users/3609fd4e-d51d-4db8-9f04-4189815864dd.json +0 -24
- package/dist/fixtures/remote.domain/users/bob.json +0 -20
- package/dist/fixtures/server.example/users/alice.json +0 -20
- package/dist/fixtures/w3id.org/identity/v1.json +0 -152
- package/dist/fixtures/w3id.org/security/data-integrity/v1.json +0 -74
- package/dist/fixtures/w3id.org/security/multikey/v1.json +0 -35
- package/dist/fixtures/w3id.org/security/v1.json +0 -50
- package/dist/fixtures/wizard.casa/users/hongminhee.json +0 -69
- package/dist/fixtures/www.w3.org/ns/activitystreams.json +0 -379
- package/dist/fixtures/www.w3.org/ns/did/v1.json +0 -58
- package/dist/lookup-BTqtVATt.cjs +0 -266
- package/dist/lookup-DOSnR912.js +0 -254
- package/dist/lookup-Dj9-mgOn.js +0 -42184
- package/dist/middleware-CxswDtQn.js +0 -15
- package/dist/middleware-CyITsnX0.js +0 -26
- package/dist/middleware-Z8lc_drL.cjs +0 -15
- package/dist/mod-BlVovdcy.d.ts +0 -309
- package/dist/mod-BxRCHTz-.d.cts +0 -307
- package/dist/mod-C58MZ7Wx.d.cts +0 -113
- package/dist/mod-CcDPcLJW.d.cts +0 -1
- package/dist/mod-Ds0mpFZU.d.ts +0 -115
- package/dist/mod-bjzj5QIb.d.ts +0 -2
- package/dist/otel-1BmGPuZc.js +0 -64
- package/dist/src/vocab/accept.yaml +0 -15
- package/dist/src/vocab/activity.yaml +0 -98
- package/dist/src/vocab/add.yaml +0 -16
- package/dist/src/vocab/announce.yaml +0 -30
- package/dist/src/vocab/application.yaml +0 -324
- package/dist/src/vocab/arrive.yaml +0 -15
- package/dist/src/vocab/article.yaml +0 -46
- package/dist/src/vocab/audio.yaml +0 -11
- package/dist/src/vocab/block.yaml +0 -16
- package/dist/src/vocab/chatmessage.yaml +0 -50
- package/dist/src/vocab/collection.yaml +0 -154
- package/dist/src/vocab/collectionpage.yaml +0 -55
- package/dist/src/vocab/create.yaml +0 -28
- package/dist/src/vocab/dataintegrityproof.yaml +0 -56
- package/dist/src/vocab/delete.yaml +0 -27
- package/dist/src/vocab/didservice.yaml +0 -22
- package/dist/src/vocab/dislike.yaml +0 -14
- package/dist/src/vocab/document.yaml +0 -31
- package/dist/src/vocab/emoji.yaml +0 -12
- package/dist/src/vocab/emojireact.yaml +0 -17
- package/dist/src/vocab/endpoints.yaml +0 -85
- package/dist/src/vocab/event.yaml +0 -11
- package/dist/src/vocab/export.yaml +0 -9
- package/dist/src/vocab/flag.yaml +0 -15
- package/dist/src/vocab/follow.yaml +0 -19
- package/dist/src/vocab/group.yaml +0 -324
- package/dist/src/vocab/hashtag.yaml +0 -14
- package/dist/src/vocab/ignore.yaml +0 -14
- package/dist/src/vocab/image.yaml +0 -9
- package/dist/src/vocab/intransitiveactivity.yaml +0 -15
- package/dist/src/vocab/invite.yaml +0 -14
- package/dist/src/vocab/join.yaml +0 -14
- package/dist/src/vocab/key.yaml +0 -28
- package/dist/src/vocab/leave.yaml +0 -14
- package/dist/src/vocab/like.yaml +0 -16
- package/dist/src/vocab/link.yaml +0 -101
- package/dist/src/vocab/listen.yaml +0 -12
- package/dist/src/vocab/mention.yaml +0 -9
- package/dist/src/vocab/move.yaml +0 -15
- package/dist/src/vocab/multikey.yaml +0 -36
- package/dist/src/vocab/note.yaml +0 -48
- package/dist/src/vocab/object.yaml +0 -404
- package/dist/src/vocab/offer.yaml +0 -15
- package/dist/src/vocab/orderedcollection.yaml +0 -39
- package/dist/src/vocab/orderedcollectionpage.yaml +0 -50
- package/dist/src/vocab/organization.yaml +0 -324
- package/dist/src/vocab/page.yaml +0 -11
- package/dist/src/vocab/person.yaml +0 -324
- package/dist/src/vocab/place.yaml +0 -75
- package/dist/src/vocab/profile.yaml +0 -26
- package/dist/src/vocab/propertyvalue.yaml +0 -32
- package/dist/src/vocab/question.yaml +0 -103
- package/dist/src/vocab/read.yaml +0 -13
- package/dist/src/vocab/reject.yaml +0 -14
- package/dist/src/vocab/relationship.yaml +0 -52
- package/dist/src/vocab/remove.yaml +0 -14
- package/dist/src/vocab/service.yaml +0 -324
- package/dist/src/vocab/source.yaml +0 -26
- package/dist/src/vocab/tentativeaccept.yaml +0 -14
- package/dist/src/vocab/tentativereject.yaml +0 -14
- package/dist/src/vocab/tombstone.yaml +0 -24
- package/dist/src/vocab/travel.yaml +0 -16
- package/dist/src/vocab/undo.yaml +0 -26
- package/dist/src/vocab/update.yaml +0 -58
- package/dist/src/vocab/video.yaml +0 -11
- package/dist/src/vocab/view.yaml +0 -13
- package/dist/testing/docloader.test.js +0 -22
- package/dist/vocab/actor.test.js +0 -5963
- package/dist/vocab/lookup.test.d.ts +0 -3
- package/dist/vocab/lookup.test.js +0 -476
- package/dist/vocab/type.test.d.ts +0 -3
- package/dist/vocab/type.test.js +0 -24
- package/dist/vocab/vocab.test.d.ts +0 -3
- package/dist/vocab/vocab.test.js +0 -9397
- package/dist/vocab-BCWe1Ih5.d.ts +0 -14905
- package/dist/vocab-ByUp-A2_.js +0 -260
- package/dist/vocab-CeDBzu-f.d.cts +0 -14903
- package/dist/vocab-X_X5T8D3.cjs +0 -296
- package/dist/webfinger/handler.test.d.ts +0 -3
- package/dist/webfinger/lookup.test.d.ts +0 -3
- package/dist/webfinger/lookup.test.js +0 -193
- package/dist/webfinger/mod.cjs +0 -8
- package/dist/webfinger/mod.d.cts +0 -2
- package/dist/webfinger/mod.d.ts +0 -4
- package/dist/webfinger/mod.js +0 -8
- package/dist/webfinger-C72Y8lrh.js +0 -4
- package/dist/webfinger-vAtLmxOF.cjs +0 -4
- /package/dist/{collection-BzWsN9pB.js → collection-CcnIw1qY.js} +0 -0
- /package/dist/{testing/docloader.test.d.ts → federation/webfinger.test.d.ts} +0 -0
- /package/dist/{mod-CVgZgliM.d.ts → mod-1E3W847c.d.ts} +0 -0
- /package/dist/{mod-B-hUPT2N.d.cts → mod-C81L6_lQ.d.cts} +0 -0
- /package/dist/{negotiation-C4nFufNk.js → negotiation-5NPJL6zp.js} +0 -0
- /package/dist/{nodeinfo-BnthBobC.js → nodeinfo-BlLsRSiT.js} +0 -0
- /package/dist/{nodeinfo-CdN0rEnZ.cjs → nodeinfo-DuMYTpbZ.cjs} +0 -0
- /package/dist/{vocab/actor.test.d.ts → otel/exporter.test.d.ts} +0 -0
- /package/dist/{retry-CfF8Gn4d.js → retry-D4GJ670a.js} +0 -0
- /package/dist/{sig-C34-oHBl.js → sig-CwuONEzF.js} +0 -0
- /package/dist/{sig-YYj5tCnr.cjs → sig-DeXX2xnj.cjs} +0 -0
- /package/dist/{utils-DyRU1gdZ.cjs → utils-Db0ZmjcD.cjs} +0 -0
- /package/dist/{utils-D-Va7aXC.js → utils-Wranxuoe.js} +0 -0
package/dist/compat/mod.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Temporal } from "@js-temporal/polyfill";
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
|
|
5
|
-
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../transformers-
|
|
5
|
+
import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "../transformers-N_ip_y4P.js";
|
|
6
6
|
import "../compat-nxUqe4Z-.js";
|
|
7
7
|
|
|
8
8
|
export { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers };
|
|
@@ -3,30 +3,31 @@
|
|
|
3
3
|
import { URLPattern } from "urlpattern-polyfill";
|
|
4
4
|
globalThis.addEventListener = () => {};
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { test } from "../dist-B5f6a8Tt.js";
|
|
7
7
|
import { assertEquals } from "../assert_equals-DSbWqCm3.js";
|
|
8
8
|
import { assert } from "../assert-MZs1qjMx.js";
|
|
9
9
|
import { assertInstanceOf } from "../assert_instance_of-DHz7EHNU.js";
|
|
10
|
-
import { MemoryKvStore } from "../kv-
|
|
11
|
-
import
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import "../
|
|
16
|
-
import "../
|
|
17
|
-
import "../
|
|
18
|
-
import "../
|
|
19
|
-
import "../
|
|
20
|
-
import "../
|
|
21
|
-
import "../
|
|
22
|
-
import "../
|
|
23
|
-
import "../
|
|
24
|
-
import "../
|
|
25
|
-
import "../
|
|
26
|
-
import "../
|
|
27
|
-
import "../
|
|
28
|
-
import "../
|
|
29
|
-
import
|
|
10
|
+
import { MemoryKvStore } from "../kv-QzKcOQgP.js";
|
|
11
|
+
import "../deno-DGx1JZHr.js";
|
|
12
|
+
import { FederationImpl, actorDehydrator, autoIdAssigner } from "../middleware-WokE4qxc.js";
|
|
13
|
+
import "../client-Dg7OfUDA.js";
|
|
14
|
+
import "../router-D9eI0s4b.js";
|
|
15
|
+
import "../types-CPz01LGH.js";
|
|
16
|
+
import "../key-BCtt1Ugy.js";
|
|
17
|
+
import "../http-LGtYlSfN.js";
|
|
18
|
+
import "../ld-QlZPwGEH.js";
|
|
19
|
+
import "../owner-Cejm-F7S.js";
|
|
20
|
+
import "../proof-BOQBHd-i.js";
|
|
21
|
+
import "../docloader-D8UHsyqD.js";
|
|
22
|
+
import "../kv-cache-B__dHl7g.js";
|
|
23
|
+
import "../inbox-DbtWQY2D.js";
|
|
24
|
+
import "../builder-DTlQwmVF.js";
|
|
25
|
+
import "../collection-CcnIw1qY.js";
|
|
26
|
+
import "../keycache-DRxpZ5r9.js";
|
|
27
|
+
import "../negotiation-5NPJL6zp.js";
|
|
28
|
+
import "../retry-D4GJ670a.js";
|
|
29
|
+
import "../send-jFxXfsN8.js";
|
|
30
|
+
import { Follow, Person } from "@fedify/vocab";
|
|
30
31
|
|
|
31
32
|
//#region src/compat/transformers.test.ts
|
|
32
33
|
const federation = new FederationImpl({ kv: new MemoryKvStore() });
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-BxRCHTz-.cjs";
|
|
7
|
-
import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "./mod-C58MZ7Wx.cjs";
|
|
8
|
-
import { KvKey, KvStore } from "./kv-Bxr0Q87_.cjs";
|
|
1
|
+
import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-by-PEGAJ.cjs";
|
|
2
|
+
import { HttpMessageSignaturesSpec } from "./http-ClB3pLcL.cjs";
|
|
3
|
+
import { GetKeyOwnerOptions } from "./owner-C-zfmVAD.cjs";
|
|
4
|
+
import { KvKey, KvStore } from "./kv-B4vFhIYL.cjs";
|
|
5
|
+
import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, TraverseCollectionOptions } from "@fedify/vocab";
|
|
9
6
|
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
|
|
10
|
-
import {
|
|
7
|
+
import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "@fedify/webfinger";
|
|
8
|
+
import { Span, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
11
9
|
|
|
12
10
|
//#region src/compat/types.d.ts
|
|
13
11
|
/**
|
|
@@ -21,9 +19,9 @@ type ActivityTransformer<TContextData> = (activity: Activity, context: Context<T
|
|
|
21
19
|
* A page of items.
|
|
22
20
|
*/
|
|
23
21
|
interface PageItems<TItem> {
|
|
24
|
-
prevCursor?: string | null;
|
|
25
|
-
nextCursor?: string | null;
|
|
26
|
-
items: TItem[];
|
|
22
|
+
readonly prevCursor?: string | null;
|
|
23
|
+
readonly nextCursor?: string | null;
|
|
24
|
+
readonly items: readonly TItem[];
|
|
27
25
|
}
|
|
28
26
|
/**
|
|
29
27
|
* Calculates the [partial follower collection digest][1].
|
|
@@ -53,15 +51,44 @@ interface SenderKeyPair {
|
|
|
53
51
|
/**
|
|
54
52
|
* The actor's private key to sign the request.
|
|
55
53
|
*/
|
|
56
|
-
privateKey: CryptoKey;
|
|
54
|
+
readonly privateKey: CryptoKey;
|
|
57
55
|
/**
|
|
58
56
|
* The public key ID that corresponds to the private key.
|
|
59
57
|
*/
|
|
60
|
-
keyId: URL;
|
|
58
|
+
readonly keyId: URL;
|
|
61
59
|
}
|
|
62
60
|
/**
|
|
63
61
|
* Parameters for {@link sendActivity}.
|
|
64
62
|
*/
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* An error that is thrown when an activity fails to send to a remote inbox.
|
|
66
|
+
* It contains structured information about the failure, including the HTTP
|
|
67
|
+
* status code, the inbox URL, and the response body.
|
|
68
|
+
* @since 2.0.0
|
|
69
|
+
*/
|
|
70
|
+
declare class SendActivityError extends Error {
|
|
71
|
+
/**
|
|
72
|
+
* The inbox URL that the activity was being sent to.
|
|
73
|
+
*/
|
|
74
|
+
readonly inbox: URL;
|
|
75
|
+
/**
|
|
76
|
+
* The HTTP status code returned by the inbox.
|
|
77
|
+
*/
|
|
78
|
+
readonly statusCode: number;
|
|
79
|
+
/**
|
|
80
|
+
* The response body from the inbox, if any.
|
|
81
|
+
*/
|
|
82
|
+
readonly responseBody: string;
|
|
83
|
+
/**
|
|
84
|
+
* Creates a new {@link SendActivityError}.
|
|
85
|
+
* @param inbox The inbox URL.
|
|
86
|
+
* @param statusCode The HTTP status code.
|
|
87
|
+
* @param message The error message.
|
|
88
|
+
* @param responseBody The response body.
|
|
89
|
+
*/
|
|
90
|
+
constructor(inbox: URL, statusCode: number, message: string, responseBody: string);
|
|
91
|
+
}
|
|
65
92
|
//#endregion
|
|
66
93
|
//#region src/federation/callback.d.ts
|
|
67
94
|
/**
|
|
@@ -224,6 +251,40 @@ type SharedInboxKeyDispatcher<TContextData> = (context: Context<TContextData>) =
|
|
|
224
251
|
* @since 0.6.0
|
|
225
252
|
*/
|
|
226
253
|
type OutboxErrorHandler = (error: Error, activity: Activity | null) => void | Promise<void>;
|
|
254
|
+
/**
|
|
255
|
+
* A callback that handles permanent delivery failures when sending activities
|
|
256
|
+
* to remote inboxes.
|
|
257
|
+
*
|
|
258
|
+
* This handler is called when an inbox returns an HTTP status code that
|
|
259
|
+
* indicates permanent failure (such as `410 Gone` or `404 Not Found`),
|
|
260
|
+
* allowing the application to clean up followers that are no longer reachable.
|
|
261
|
+
*
|
|
262
|
+
* Unlike {@link OutboxErrorHandler}, which is called for every delivery failure
|
|
263
|
+
* (including retries), this handler is called only once for permanent failures,
|
|
264
|
+
* after which delivery is not retried.
|
|
265
|
+
*
|
|
266
|
+
* If any errors are thrown in this callback, they are caught, logged,
|
|
267
|
+
* and ignored.
|
|
268
|
+
*
|
|
269
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
270
|
+
* @param context The context.
|
|
271
|
+
* @param values The delivery failure information.
|
|
272
|
+
* @since 2.0.0
|
|
273
|
+
*/
|
|
274
|
+
type OutboxPermanentFailureHandler<TContextData> = (context: Context<TContextData>, values: {
|
|
275
|
+
/** The inbox URL that failed. */
|
|
276
|
+
readonly inbox: URL;
|
|
277
|
+
/** The activity that failed to deliver. */
|
|
278
|
+
readonly activity: Activity;
|
|
279
|
+
/** The error that occurred. */
|
|
280
|
+
readonly error: SendActivityError;
|
|
281
|
+
/** The HTTP status code returned by the inbox. */
|
|
282
|
+
readonly statusCode: number;
|
|
283
|
+
/**
|
|
284
|
+
* The actor IDs that were supposed to receive the activity at this inbox.
|
|
285
|
+
*/
|
|
286
|
+
readonly actorIds: readonly URL[];
|
|
287
|
+
}) => void | Promise<void>;
|
|
227
288
|
/**
|
|
228
289
|
* A callback that determines if a request is authorized or not.
|
|
229
290
|
*
|
|
@@ -317,7 +378,19 @@ interface MessageQueueEnqueueOptions {
|
|
|
317
378
|
*
|
|
318
379
|
* It must not be negative.
|
|
319
380
|
*/
|
|
320
|
-
delay?: Temporal.Duration;
|
|
381
|
+
readonly delay?: Temporal.Duration;
|
|
382
|
+
/**
|
|
383
|
+
* An optional key that ensures messages with the same ordering key are
|
|
384
|
+
* processed sequentially (one at a time). Messages with different ordering
|
|
385
|
+
* keys (or no ordering key) may be processed in parallel.
|
|
386
|
+
*
|
|
387
|
+
* This is useful for ensuring that related messages are processed in order,
|
|
388
|
+
* such as ensuring that a `Delete` activity is processed after a `Create`
|
|
389
|
+
* activity for the same object.
|
|
390
|
+
*
|
|
391
|
+
* @since 2.0.0
|
|
392
|
+
*/
|
|
393
|
+
readonly orderingKey?: string;
|
|
321
394
|
}
|
|
322
395
|
/**
|
|
323
396
|
* Additional options for listening to a message queue.
|
|
@@ -360,7 +433,7 @@ interface MessageQueue {
|
|
|
360
433
|
* @param messages The messages to enqueue.
|
|
361
434
|
* @param options Additional options for enqueuing the messages.
|
|
362
435
|
*/
|
|
363
|
-
enqueueMany?: (messages: any[], options?: MessageQueueEnqueueOptions) => Promise<void>;
|
|
436
|
+
enqueueMany?: (messages: readonly any[], options?: MessageQueueEnqueueOptions) => Promise<void>;
|
|
364
437
|
/**
|
|
365
438
|
* Listens for messages in the queue.
|
|
366
439
|
* @param handler The handler for messages in the queue.
|
|
@@ -402,7 +475,7 @@ declare class InProcessMessageQueue implements MessageQueue {
|
|
|
402
475
|
*/
|
|
403
476
|
constructor(options?: InProcessMessageQueueOptions);
|
|
404
477
|
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
405
|
-
enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
478
|
+
enqueueMany(messages: readonly any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
406
479
|
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
|
407
480
|
}
|
|
408
481
|
/**
|
|
@@ -418,6 +491,21 @@ declare class InProcessMessageQueue implements MessageQueue {
|
|
|
418
491
|
* for I/O-bound tasks, but not for CPU-bound tasks, which is okay for Fedify's
|
|
419
492
|
* workloads.
|
|
420
493
|
*
|
|
494
|
+
* When using `ParallelMessageQueue`, the ordering guarantee is preserved
|
|
495
|
+
* *only if* the underlying queue implementation delivers messages in a wrapper
|
|
496
|
+
* format that includes the `__fedify_ordering_key__` property. Currently,
|
|
497
|
+
* only `DenoKvMessageQueue` and `WorkersMessageQueue` use this format.
|
|
498
|
+
* For other queue implementations (e.g., `InProcessMessageQueue`,
|
|
499
|
+
* `RedisMessageQueue`, `PostgresMessageQueue`, `SqliteMessageQueue`,
|
|
500
|
+
* `AmqpMessageQueue`), the ordering key cannot be detected by
|
|
501
|
+
* `ParallelMessageQueue`, so ordering guarantees are handled by those
|
|
502
|
+
* implementations directly rather than at the `ParallelMessageQueue` level.
|
|
503
|
+
*
|
|
504
|
+
* Messages with the same ordering key will never be processed concurrently
|
|
505
|
+
* by different workers, ensuring sequential processing within each key.
|
|
506
|
+
* Messages with different ordering keys (or no ordering key) can still be
|
|
507
|
+
* processed in parallel.
|
|
508
|
+
*
|
|
421
509
|
* @since 1.0.0
|
|
422
510
|
*/
|
|
423
511
|
declare class ParallelMessageQueue implements MessageQueue {
|
|
@@ -440,7 +528,7 @@ declare class ParallelMessageQueue implements MessageQueue {
|
|
|
440
528
|
*/
|
|
441
529
|
constructor(queue: MessageQueue, workers: number);
|
|
442
530
|
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
443
|
-
enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
531
|
+
enqueueMany(messages: readonly any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
444
532
|
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
|
445
533
|
}
|
|
446
534
|
//#endregion
|
|
@@ -571,8 +659,8 @@ declare function createFederationBuilder<TContextData>(): FederationBuilder<TCon
|
|
|
571
659
|
//#endregion
|
|
572
660
|
//#region src/federation/queue.d.ts
|
|
573
661
|
interface SenderKeyJwkPair {
|
|
574
|
-
keyId: string;
|
|
575
|
-
privateKey: JsonWebKey;
|
|
662
|
+
readonly keyId: string;
|
|
663
|
+
readonly privateKey: JsonWebKey;
|
|
576
664
|
}
|
|
577
665
|
/**
|
|
578
666
|
* A message that represents a task to be processed by the background worker.
|
|
@@ -585,44 +673,47 @@ interface SenderKeyJwkPair {
|
|
|
585
673
|
*/
|
|
586
674
|
type Message = FanoutMessage | OutboxMessage | InboxMessage;
|
|
587
675
|
interface FanoutMessage {
|
|
588
|
-
type: "fanout";
|
|
589
|
-
id: ReturnType<typeof crypto.randomUUID>;
|
|
590
|
-
baseUrl: string;
|
|
591
|
-
keys: SenderKeyJwkPair[];
|
|
592
|
-
inboxes: Record<string, {
|
|
593
|
-
actorIds: string[];
|
|
594
|
-
sharedInbox: boolean;
|
|
595
|
-
}
|
|
596
|
-
activity: unknown;
|
|
597
|
-
activityId?: string;
|
|
598
|
-
activityType: string;
|
|
599
|
-
collectionSync?: string;
|
|
600
|
-
|
|
676
|
+
readonly type: "fanout";
|
|
677
|
+
readonly id: ReturnType<typeof crypto.randomUUID>;
|
|
678
|
+
readonly baseUrl: string;
|
|
679
|
+
readonly keys: readonly SenderKeyJwkPair[];
|
|
680
|
+
readonly inboxes: Readonly<Record<string, {
|
|
681
|
+
readonly actorIds: readonly string[];
|
|
682
|
+
readonly sharedInbox: boolean;
|
|
683
|
+
}>>;
|
|
684
|
+
readonly activity: unknown;
|
|
685
|
+
readonly activityId?: string;
|
|
686
|
+
readonly activityType: string;
|
|
687
|
+
readonly collectionSync?: string;
|
|
688
|
+
readonly orderingKey?: string;
|
|
689
|
+
readonly traceContext: Readonly<Record<string, string>>;
|
|
601
690
|
}
|
|
602
691
|
interface OutboxMessage {
|
|
603
|
-
type: "outbox";
|
|
604
|
-
id: ReturnType<typeof crypto.randomUUID>;
|
|
605
|
-
baseUrl: string;
|
|
606
|
-
keys: SenderKeyJwkPair[];
|
|
607
|
-
activity: unknown;
|
|
608
|
-
activityId?: string;
|
|
609
|
-
activityType: string;
|
|
610
|
-
inbox: string;
|
|
611
|
-
sharedInbox: boolean;
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
692
|
+
readonly type: "outbox";
|
|
693
|
+
readonly id: ReturnType<typeof crypto.randomUUID>;
|
|
694
|
+
readonly baseUrl: string;
|
|
695
|
+
readonly keys: readonly SenderKeyJwkPair[];
|
|
696
|
+
readonly activity: unknown;
|
|
697
|
+
readonly activityId?: string;
|
|
698
|
+
readonly activityType: string;
|
|
699
|
+
readonly inbox: string;
|
|
700
|
+
readonly sharedInbox: boolean;
|
|
701
|
+
readonly actorIds?: readonly string[];
|
|
702
|
+
readonly started: string;
|
|
703
|
+
readonly attempt: number;
|
|
704
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
705
|
+
readonly orderingKey?: string;
|
|
706
|
+
readonly traceContext: Readonly<Record<string, string>>;
|
|
616
707
|
}
|
|
617
708
|
interface InboxMessage {
|
|
618
|
-
type: "inbox";
|
|
619
|
-
id: ReturnType<typeof crypto.randomUUID>;
|
|
620
|
-
baseUrl: string;
|
|
621
|
-
activity: unknown;
|
|
622
|
-
started: string;
|
|
623
|
-
attempt: number;
|
|
624
|
-
identifier: string | null;
|
|
625
|
-
traceContext: Record<string, string
|
|
709
|
+
readonly type: "inbox";
|
|
710
|
+
readonly id: ReturnType<typeof crypto.randomUUID>;
|
|
711
|
+
readonly baseUrl: string;
|
|
712
|
+
readonly activity: unknown;
|
|
713
|
+
readonly started: string;
|
|
714
|
+
readonly attempt: number;
|
|
715
|
+
readonly identifier: string | null;
|
|
716
|
+
readonly traceContext: Readonly<Record<string, string>>;
|
|
626
717
|
}
|
|
627
718
|
//#endregion
|
|
628
719
|
//#region src/federation/retry.d.ts
|
|
@@ -706,19 +797,19 @@ interface FederationQueueOptions {
|
|
|
706
797
|
* The message queue for incoming activities. If not provided, incoming
|
|
707
798
|
* activities will not be queued and will be processed immediately.
|
|
708
799
|
*/
|
|
709
|
-
inbox?: MessageQueue;
|
|
800
|
+
readonly inbox?: MessageQueue;
|
|
710
801
|
/**
|
|
711
802
|
* The message queue for outgoing activities. If not provided, outgoing
|
|
712
803
|
* activities will not be queued and will be sent immediately.
|
|
713
804
|
*/
|
|
714
|
-
outbox?: MessageQueue;
|
|
805
|
+
readonly outbox?: MessageQueue;
|
|
715
806
|
/**
|
|
716
807
|
* The message queue for fanning out outgoing activities. If not provided,
|
|
717
808
|
* outgoing activities will not be fanned out in the background, but will be
|
|
718
809
|
* fanned out immediately, which causes slow response times on
|
|
719
810
|
* {@link Context.sendActivity} calls.
|
|
720
811
|
*/
|
|
721
|
-
fanout?: MessageQueue;
|
|
812
|
+
readonly fanout?: MessageQueue;
|
|
722
813
|
}
|
|
723
814
|
/**
|
|
724
815
|
* Prefixes for namespacing keys in the Deno KV store.
|
|
@@ -729,18 +820,18 @@ interface FederationKvPrefixes {
|
|
|
729
820
|
* processed or not.
|
|
730
821
|
* @default `["_fedify", "activityIdempotence"]`
|
|
731
822
|
*/
|
|
732
|
-
activityIdempotence: KvKey;
|
|
823
|
+
readonly activityIdempotence: KvKey;
|
|
733
824
|
/**
|
|
734
825
|
* The key prefix used for storing remote JSON-LD documents.
|
|
735
826
|
* @default `["_fedify", "remoteDocument"]`
|
|
736
827
|
*/
|
|
737
|
-
remoteDocument: KvKey;
|
|
828
|
+
readonly remoteDocument: KvKey;
|
|
738
829
|
/**
|
|
739
830
|
* The key prefix used for caching public keys.
|
|
740
831
|
* @default `["_fedify", "publicKey"]`
|
|
741
832
|
* @since 0.12.0
|
|
742
833
|
*/
|
|
743
|
-
publicKey: KvKey;
|
|
834
|
+
readonly publicKey: KvKey;
|
|
744
835
|
/**
|
|
745
836
|
* The key prefix used for caching HTTP Message Signatures specs.
|
|
746
837
|
* The cached spec is used to reduce the number of requests to make signed
|
|
@@ -748,7 +839,7 @@ interface FederationKvPrefixes {
|
|
|
748
839
|
* @default `["_fedify", "httpMessageSignaturesSpec"]`
|
|
749
840
|
* @since 1.6.0
|
|
750
841
|
*/
|
|
751
|
-
httpMessageSignaturesSpec: KvKey;
|
|
842
|
+
readonly httpMessageSignaturesSpec: KvKey;
|
|
752
843
|
}
|
|
753
844
|
/**
|
|
754
845
|
* Options for {@link CreateFederationOptions.origin} when it is not a string.
|
|
@@ -1047,7 +1138,7 @@ interface Federatable<TContextData> {
|
|
|
1047
1138
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
|
|
1048
1139
|
* The path must have no variables.
|
|
1049
1140
|
* @returns An object to register inbox listeners.
|
|
1050
|
-
* @throws {
|
|
1141
|
+
* @throws {RouterError} Thrown if the path pattern is invalid.
|
|
1051
1142
|
*/
|
|
1052
1143
|
setInboxListeners(inboxPath: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, sharedInboxPath?: string): InboxListenerSetters<TContextData>;
|
|
1053
1144
|
/**
|
|
@@ -1140,6 +1231,22 @@ interface Federatable<TContextData> {
|
|
|
1140
1231
|
* @param dispatcher A collection dispatcher callback to register.
|
|
1141
1232
|
*/
|
|
1142
1233
|
setOrderedCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
|
1234
|
+
/**
|
|
1235
|
+
* Registers a handler for permanent delivery failures.
|
|
1236
|
+
*
|
|
1237
|
+
* This handler is called when an inbox returns an HTTP status code
|
|
1238
|
+
* that indicates permanent failure (`410 Gone`, `404 Not Found`, etc.),
|
|
1239
|
+
* allowing the application to clean up followers that are no longer
|
|
1240
|
+
* reachable.
|
|
1241
|
+
*
|
|
1242
|
+
* Unlike `onOutboxError`, which is called for every delivery failure
|
|
1243
|
+
* (including retries), this handler is called only once for permanent
|
|
1244
|
+
* failures, after which delivery is not retried.
|
|
1245
|
+
*
|
|
1246
|
+
* @param handler A callback to handle permanent failures.
|
|
1247
|
+
* @since 2.0.0
|
|
1248
|
+
*/
|
|
1249
|
+
setOutboxPermanentFailureHandler(handler: OutboxPermanentFailureHandler<TContextData>): void;
|
|
1143
1250
|
}
|
|
1144
1251
|
/**
|
|
1145
1252
|
* An object that registers federation-related business logic and dispatches
|
|
@@ -1312,6 +1419,17 @@ interface FederationOptions<TContextData> {
|
|
|
1312
1419
|
* If any errors are thrown in this callback, they are ignored.
|
|
1313
1420
|
*/
|
|
1314
1421
|
onOutboxError?: OutboxErrorHandler;
|
|
1422
|
+
/**
|
|
1423
|
+
* HTTP status codes that should be treated as permanent delivery failures.
|
|
1424
|
+
* When an inbox returns one of these codes, the delivery will not be retried
|
|
1425
|
+
* and the permanent failure handler (if registered via
|
|
1426
|
+
* {@link Federatable.setOutboxPermanentFailureHandler}) will be called.
|
|
1427
|
+
*
|
|
1428
|
+
* By default, `[404, 410]`.
|
|
1429
|
+
*
|
|
1430
|
+
* @since 2.0.0
|
|
1431
|
+
*/
|
|
1432
|
+
permanentFailureStatusCodes?: readonly number[];
|
|
1315
1433
|
/**
|
|
1316
1434
|
* The time window for verifying HTTP Signatures of incoming requests. If the
|
|
1317
1435
|
* request is older or newer than this window, it is rejected. Or if it is
|
|
@@ -1766,7 +1884,7 @@ interface Context<TContextData> {
|
|
|
1766
1884
|
* @param cls The class of the object.
|
|
1767
1885
|
* @param values The values to pass to the object dispatcher.
|
|
1768
1886
|
* @returns The object's URI.
|
|
1769
|
-
* @throws {
|
|
1887
|
+
* @throws {RouterError} If no object dispatcher is available for the class.
|
|
1770
1888
|
* @throws {TypeError} If values are invalid.
|
|
1771
1889
|
* @since 0.7.0
|
|
1772
1890
|
*/
|
|
@@ -1998,7 +2116,7 @@ interface Context<TContextData> {
|
|
|
1998
2116
|
handle: string;
|
|
1999
2117
|
}, recipients: Recipient | Recipient[], activity: Activity, options?: SendActivityOptions): Promise<void>;
|
|
2000
2118
|
/**
|
|
2001
|
-
* Sends an activity to the
|
|
2119
|
+
* Sends an activity to the inboxes of the sender's followers.
|
|
2002
2120
|
* @param sender The sender's identifier or the sender's username.
|
|
2003
2121
|
* @param recipients In this case, it must be `"followers"`.
|
|
2004
2122
|
* @param activity The activity to send.
|
|
@@ -2039,7 +2157,7 @@ interface Context<TContextData> {
|
|
|
2039
2157
|
* @param name The name of the collection, which can be a string or a symbol.
|
|
2040
2158
|
* @param values The values of the URI parameters.
|
|
2041
2159
|
* @return The URI of the collection.
|
|
2042
|
-
* @throws {
|
|
2160
|
+
* @throws {RouterError} If no object dispatcher is available for the name.
|
|
2043
2161
|
* @throws {TypeError} If values are invalid.
|
|
2044
2162
|
* @since 1.8.0
|
|
2045
2163
|
*/
|
|
@@ -2162,7 +2280,7 @@ interface InboxContext<TContextData> extends Context<TContextData> {
|
|
|
2162
2280
|
* inbox, it is `null`.
|
|
2163
2281
|
* @since 1.2.0
|
|
2164
2282
|
*/
|
|
2165
|
-
recipient: string | null;
|
|
2283
|
+
readonly recipient: string | null;
|
|
2166
2284
|
/**
|
|
2167
2285
|
* Creates a new context with the same properties as this one,
|
|
2168
2286
|
* but with the given data.
|
|
@@ -2318,7 +2436,7 @@ interface SendActivityOptions {
|
|
|
2318
2436
|
/**
|
|
2319
2437
|
* Whether to prefer the shared inbox for the recipients.
|
|
2320
2438
|
*/
|
|
2321
|
-
preferSharedInbox?: boolean;
|
|
2439
|
+
readonly preferSharedInbox?: boolean;
|
|
2322
2440
|
/**
|
|
2323
2441
|
* Whether to send the activity immediately, without enqueuing it.
|
|
2324
2442
|
* If `true`, the activity will be sent immediately and the retrial
|
|
@@ -2326,7 +2444,7 @@ interface SendActivityOptions {
|
|
|
2326
2444
|
*
|
|
2327
2445
|
* @since 0.3.0
|
|
2328
2446
|
*/
|
|
2329
|
-
immediate?: boolean;
|
|
2447
|
+
readonly immediate?: boolean;
|
|
2330
2448
|
/**
|
|
2331
2449
|
* Determines how activities are queued when sent to multiple recipients.
|
|
2332
2450
|
*
|
|
@@ -2343,7 +2461,7 @@ interface SendActivityOptions {
|
|
|
2343
2461
|
* @default `"auto"`
|
|
2344
2462
|
* @since 1.5.0
|
|
2345
2463
|
*/
|
|
2346
|
-
fanout?: "auto" | "skip" | "force";
|
|
2464
|
+
readonly fanout?: "auto" | "skip" | "force";
|
|
2347
2465
|
/**
|
|
2348
2466
|
* The base URIs to exclude from the recipients' inboxes. It is useful
|
|
2349
2467
|
* for excluding the recipients having the same shared inbox with the sender.
|
|
@@ -2352,7 +2470,21 @@ interface SendActivityOptions {
|
|
|
2352
2470
|
*
|
|
2353
2471
|
* @since 0.9.0
|
|
2354
2472
|
*/
|
|
2355
|
-
excludeBaseUris?: URL[];
|
|
2473
|
+
readonly excludeBaseUris?: readonly URL[];
|
|
2474
|
+
/**
|
|
2475
|
+
* An optional key to ensure ordered delivery of activities. Activities with
|
|
2476
|
+
* the same `orderingKey` are guaranteed to be delivered in the order they
|
|
2477
|
+
* were enqueued, per recipient server.
|
|
2478
|
+
*
|
|
2479
|
+
* Typical use case: pass the object ID (e.g., `Note` ID) to ensure that
|
|
2480
|
+
* `Create`, `Update`, and `Delete` activities for the same object are
|
|
2481
|
+
* delivered in order.
|
|
2482
|
+
*
|
|
2483
|
+
* When omitted, no ordering is guaranteed (maximum parallelism).
|
|
2484
|
+
*
|
|
2485
|
+
* @since 2.0.0
|
|
2486
|
+
*/
|
|
2487
|
+
readonly orderingKey?: string;
|
|
2356
2488
|
}
|
|
2357
2489
|
/**
|
|
2358
2490
|
* Options for {@link Context.sendActivity} method when sending to a collection.
|
|
@@ -2435,15 +2567,15 @@ interface ActorKeyPair extends CryptoKeyPair {
|
|
|
2435
2567
|
/**
|
|
2436
2568
|
* The URI of the public key, which is used for verifying HTTP Signatures.
|
|
2437
2569
|
*/
|
|
2438
|
-
keyId: URL;
|
|
2570
|
+
readonly keyId: URL;
|
|
2439
2571
|
/**
|
|
2440
2572
|
* A {@link CryptographicKey} instance of the public key.
|
|
2441
2573
|
*/
|
|
2442
|
-
cryptographicKey: CryptographicKey;
|
|
2574
|
+
readonly cryptographicKey: CryptographicKey;
|
|
2443
2575
|
/**
|
|
2444
2576
|
* A {@link Multikey} instance of the public key.
|
|
2445
2577
|
*/
|
|
2446
|
-
multikey: Multikey;
|
|
2578
|
+
readonly multikey: Multikey;
|
|
2447
2579
|
}
|
|
2448
2580
|
//#endregion
|
|
2449
|
-
export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|
|
2581
|
+
export { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, OutboxPermanentFailureHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityError, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
|