@fedify/fedify 2.0.0-dev.1566 → 2.0.0-dev.159
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 +66 -30
- package/dist/{assert_rejects-DiIiJbZn.js → assert_rejects-Ce45JcFg.js} +1 -1
- package/dist/{assert_is_error-BPGph1Jx.js → assert_throws-BNXdRGWP.js} +31 -1
- package/dist/{builder-B2I70zuM.js → builder-oZcZfn1d.js} +15 -8
- package/dist/chunk-DqRYRqnO.cjs +34 -0
- package/dist/client-94iWEfQa.d.cts +222 -0
- package/dist/{client-DF8anIB5.d.ts → client-BivSNrEg.d.ts} +3 -75
- package/dist/{client-BVDUd3WA.js → client-CgMTXmAD.js} +3 -22
- package/dist/compat/mod.cjs +10 -0
- package/dist/compat/mod.d.cts +7 -0
- package/dist/compat/mod.d.ts +6 -12
- package/dist/compat/mod.js +5 -5
- package/dist/compat/transformers.test.js +21 -20
- package/dist/compat-DmDDELst.cjs +4 -0
- package/dist/compat-nxUqe4Z-.js +4 -0
- package/dist/context-Bns6uTJq.js +109 -0
- package/dist/{context-9gCpIkiz.d.ts → context-CYZ2i00R.d.ts} +321 -129
- package/dist/context-D2MrtLch.d.cts +2447 -0
- package/dist/deno-CGe3r5lB.js +117 -0
- package/dist/{testing-CWE5Nn0S.js → dist-B5f6a8Tt.js} +90 -111
- package/dist/{authdocloader-BilVqAPe.js → docloader-Bh4ZzxTs.js} +17 -8
- package/dist/{esm-eH43VACi.js → esm-DGl7uK1r.js} +32 -17
- package/dist/federation/builder.test.js +12 -13
- package/dist/federation/collection.test.js +6 -9
- package/dist/federation/handler.test.js +115 -148
- package/dist/federation/idempotency.test.js +202 -0
- package/dist/federation/inbox.test.js +5 -6
- package/dist/federation/keycache.test.js +4 -5
- package/dist/federation/kv.test.js +61 -9
- package/dist/federation/middleware.test.js +311 -131
- package/dist/federation/mod.cjs +25 -0
- package/dist/federation/mod.d.cts +7 -0
- package/dist/federation/mod.d.ts +7 -13
- package/dist/federation/mod.js +11 -16
- package/dist/federation/mq.test.js +9 -10
- package/dist/federation/negotiation.test.js +25 -0
- package/dist/federation/retry.test.js +2 -4
- package/dist/federation/router.test.js +6 -8
- package/dist/federation/send.test.js +55 -15
- package/dist/{webfinger/handler.test.js → federation/webfinger.test.js} +27 -26
- package/dist/federation-B431K2gm.cjs +266 -0
- package/dist/{federation-CMX7WzeL.js → federation-BbZwNNWj.js} +31 -9
- package/dist/http-AW19epBO.cjs +1222 -0
- package/dist/{http-BE2S7wC2.js → http-CN7c23sh.js} +4 -3
- package/dist/{http-Cdjyj7h1.js → http-CZ24XIWJ.js} +375 -15
- package/dist/http-ClB3pLcL.d.cts +253 -0
- package/dist/{http-DqSNLFNY.d.ts → http-DLBDPal9.d.ts} +2 -2
- package/dist/{inbox-CtcEN1S1.js → inbox-DLgz90Tj.js} +25 -7
- package/dist/{key-q4xxkABj.js → key-fb8Ovh-p.js} +3 -2
- package/dist/{keycache-CtCHz6HR.js → keycache-DRxpZ5r9.js} +1 -1
- package/dist/{keys-BiuLoxwK.js → keys-ZbcByPg9.js} +2 -1
- package/dist/{kv-C7sopW2E.d.ts → kv-CtOmTRNc.d.ts} +30 -1
- package/dist/kv-D8q9fLkA.d.cts +110 -0
- package/dist/{kv-CRZrzyXm.js → kv-QzKcOQgP.js} +22 -0
- package/dist/kv-cache-8rnKI8DT.cjs +134 -0
- package/dist/kv-cache-BEeqyGER.js +107 -0
- package/dist/kv-cache-DGCF5il_.js +122 -0
- package/dist/{ld-PkXepnwg.js → ld-9If_eMWm.js} +6 -4
- package/dist/{middleware-BQHcEUgM.js → middleware-BpTxdimj.js} +230 -327
- package/dist/middleware-DR-CCeAc.cjs +12 -0
- package/dist/{middleware-HDts7zkt.js → middleware-DdBvEeAn.js} +272 -271
- package/dist/middleware-DrwTlwzK.js +12 -0
- package/dist/middleware-psDtCgD-.cjs +4242 -0
- package/dist/middleware-vXfeY_vA.js +26 -0
- package/dist/mod-BrS8tiad.d.cts +266 -0
- package/dist/mod-C81L6_lQ.d.cts +1 -0
- package/dist/mod-CJgbdSqb.d.ts +109 -0
- package/dist/mod-CNNTHyBC.d.cts +80 -0
- package/dist/mod-CS-MS7gZ.d.cts +62 -0
- package/dist/{mod-Bqxcp7eN.d.ts → mod-D_cmv2il.d.ts} +4 -4
- package/dist/mod-DcPRcifg.d.cts +107 -0
- package/dist/mod-DqFSzJA0.d.ts +64 -0
- package/dist/{mod-Drmz72EK.d.ts → mod-jOa7W503.d.ts} +3 -3
- package/dist/mod.cjs +55 -0
- package/dist/mod.d.cts +11 -0
- package/dist/mod.d.ts +11 -17
- package/dist/mod.js +15 -21
- package/dist/negotiation-5NPJL6zp.js +71 -0
- package/dist/nodeinfo/client.test.js +29 -111
- package/dist/nodeinfo/handler.test.js +26 -26
- package/dist/nodeinfo/mod.cjs +10 -0
- package/dist/nodeinfo/mod.d.cts +3 -0
- package/dist/nodeinfo/mod.d.ts +3 -5
- package/dist/nodeinfo/mod.js +6 -7
- package/dist/nodeinfo/types.test.js +7 -15
- package/dist/nodeinfo-BlLsRSiT.js +4 -0
- package/dist/nodeinfo-DuMYTpbZ.cjs +4 -0
- package/dist/otel/exporter.test.js +899 -0
- package/dist/otel/mod.cjs +262 -0
- package/dist/otel/mod.d.cts +230 -0
- package/dist/otel/mod.d.ts +232 -0
- package/dist/otel/mod.js +261 -0
- package/dist/{owner-CQPnQVtf.d.ts → owner-BgI8C-VY.d.ts} +2 -3
- package/dist/owner-C-zfmVAD.d.cts +66 -0
- package/dist/{owner-DZ5zP8JS.js → owner-CCSlDz_P.js} +45 -8
- package/dist/{proof-D8S7qgEZ.js → proof-1s5PweRC.js} +53 -17
- package/dist/proof-DCmRymP1.cjs +709 -0
- package/dist/{proof-ohtusUSV.js → proof-WPbBCoJ-.js} +4 -3
- package/dist/router-D9eI0s4b.js +118 -0
- package/dist/{send-BBi1tzS8.js → send-DBgPrFik.js} +9 -4
- package/dist/sig/http.test.js +12 -14
- package/dist/sig/key.test.js +9 -11
- package/dist/sig/ld.test.js +8 -10
- package/dist/sig/mod.cjs +26 -0
- package/dist/sig/mod.d.cts +4 -0
- package/dist/sig/mod.d.ts +3 -7
- package/dist/sig/mod.js +6 -10
- package/dist/sig/owner.test.js +33 -12
- package/dist/sig/proof.test.js +13 -14
- package/dist/sig-CwuONEzF.js +4 -0
- package/dist/sig-DeXX2xnj.cjs +4 -0
- package/dist/testing/mod.d.ts +180 -6946
- package/dist/testing/mod.js +4 -4
- package/dist/transformers-BjBg6Lag.cjs +116 -0
- package/dist/{transformers-Dna8Fg7k.js → transformers-N_ip_y4P.js} +5 -5
- package/dist/{types-BIgY6c-l.js → types-BEdCLHqP.js} +1 -3
- package/dist/types-Q-qkJXBV.cjs +315 -0
- package/dist/{types-CTYFFnQp.js → types-hKTi53FO.js} +8 -169
- package/dist/{runtime/authdocloader.test.js → utils/docloader.test.js} +13 -15
- package/dist/utils/kv-cache.test.js +211 -0
- package/dist/utils/mod.cjs +10 -0
- package/dist/utils/mod.d.cts +4 -0
- package/dist/utils/mod.d.ts +6 -0
- package/dist/utils/mod.js +9 -0
- package/dist/utils-Db0ZmjcD.cjs +4 -0
- package/dist/utils-Wranxuoe.js +4 -0
- package/package.json +69 -55
- package/dist/actor-BKxX_F1w.js +0 -37311
- package/dist/actor-C22bXuuC.d.ts +0 -130
- package/dist/actor-DI_YpFlI.js +0 -146
- package/dist/assert_throws-BOO88avQ.js +0 -39
- package/dist/authdocloader-UdvnssIx.js +0 -52
- package/dist/compat-Bb5myD13.js +0 -4
- package/dist/denokv-Bv33Xxea.js +0 -57
- package/dist/docloader-4XS4XdXc.js +0 -4615
- package/dist/docloader-CxWcuWqQ.d.ts +0 -221
- 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/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/key-C2_QSigr.js +0 -260
- package/dist/key-Ck2-lYS5.js +0 -10
- package/dist/key-II1NsE_S.js +0 -10
- package/dist/lookup-DCIN2EFw.js +0 -322
- package/dist/lookup-DVlWgAsd.js +0 -131
- package/dist/middleware-CTQfgVW8.js +0 -17
- package/dist/middleware-D3rOl6Au.js +0 -26
- package/dist/mod-Cxt4Kpf6.d.ts +0 -291
- package/dist/mod-DBzN0aCM.d.ts +0 -115
- package/dist/mod-TFoH2Ql8.d.ts +0 -104
- package/dist/mod-g0xFzAP9.d.ts +0 -2
- package/dist/mq-CRGm1e_F.d.ts +0 -143
- package/dist/nodeinfo/semver.test.js +0 -143
- package/dist/nodeinfo-CyEbLjHs.js +0 -4
- package/dist/runtime/docloader.test.js +0 -522
- package/dist/runtime/key.test.js +0 -103
- package/dist/runtime/langstr.test.js +0 -39
- package/dist/runtime/mod.d.ts +0 -8
- package/dist/runtime/mod.js +0 -13
- package/dist/runtime/multibase/multibase.test.d.ts +0 -3
- package/dist/runtime/multibase/multibase.test.js +0 -358
- package/dist/runtime/url.test.d.ts +0 -3
- package/dist/runtime/url.test.js +0 -45
- package/dist/runtime-BSkOVUWM.js +0 -4
- package/dist/semver-dArNLkR9.js +0 -149
- package/dist/sig-BXJO--F9.js +0 -4
- 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 -24
- package/dist/type-B7_rMIU9.js +0 -42006
- package/dist/vocab/actor.test.d.ts +0 -3
- package/dist/vocab/actor.test.js +0 -5965
- package/dist/vocab/lookup.test.d.ts +0 -3
- package/dist/vocab/lookup.test.js +0 -206
- package/dist/vocab/mod.d.ts +0 -8
- package/dist/vocab/mod.js +0 -10
- package/dist/vocab/schema.yaml +0 -247
- package/dist/vocab/type.test.d.ts +0 -3
- package/dist/vocab/type.test.js +0 -25
- package/dist/vocab/vocab.test.d.ts +0 -3
- package/dist/vocab/vocab.test.js +0 -3363
- package/dist/vocab-3Eie7Ze4.js +0 -246
- package/dist/vocab-SOE1ifCr.d.ts +0 -14634
- 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 -195
- package/dist/webfinger/mod.d.ts +0 -6
- package/dist/webfinger/mod.js +0 -9
- package/dist/webfinger-C3GIyXIg.js +0 -4
- package/dist/x/cfworkers.d.ts +0 -61
- package/dist/x/cfworkers.js +0 -98
- package/dist/x/cfworkers.test.d.ts +0 -3
- package/dist/x/cfworkers.test.js +0 -179
- package/dist/x/hono.d.ts +0 -56
- package/dist/x/hono.js +0 -60
- package/dist/x/sveltekit.d.ts +0 -48
- package/dist/x/sveltekit.js +0 -68
- /package/dist/{assert_not_equals-f3m3epl3.js → assert_not_equals-C80BG-_5.js} +0 -0
- /package/dist/{collection-CSzG2j1P.js → collection-CcnIw1qY.js} +0 -0
- /package/dist/{nodeinfo/semver.test.d.ts → federation/idempotency.test.d.ts} +0 -0
- /package/dist/{runtime/authdocloader.test.d.ts → federation/negotiation.test.d.ts} +0 -0
- /package/dist/{runtime/docloader.test.d.ts → federation/webfinger.test.d.ts} +0 -0
- /package/dist/{mod-1pDWKvUL.d.ts → mod-1E3W847c.d.ts} +0 -0
- /package/dist/{runtime/key.test.d.ts → otel/exporter.test.d.ts} +0 -0
- /package/dist/{std__assert-X-_kMxKM.js → std__assert-DWivtrGR.js} +0 -0
- /package/dist/{testing → utils}/docloader.test.d.ts +0 -0
- /package/dist/{runtime/langstr.test.d.ts → utils/kv-cache.test.d.ts} +0 -0
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Actor, Recipient } from "
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "./mod-DBzN0aCM.js";
|
|
12
|
-
import { MessageQueue } from "./mq-CRGm1e_F.js";
|
|
13
|
-
import { Span, TracerProvider } from "@opentelemetry/api";
|
|
3
|
+
import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-BivSNrEg.js";
|
|
4
|
+
import { HttpMessageSignaturesSpec } from "./http-DLBDPal9.js";
|
|
5
|
+
import { GetKeyOwnerOptions } from "./owner-BgI8C-VY.js";
|
|
6
|
+
import { KvKey, KvStore } from "./kv-CtOmTRNc.js";
|
|
7
|
+
import { Activity, Actor, Collection, CryptographicKey, Hashtag, Link, LookupObjectOptions, Multikey, Object as Object$1, Recipient, TraverseCollectionOptions } from "@fedify/vocab";
|
|
8
|
+
import { Span, Tracer, TracerProvider } from "@opentelemetry/api";
|
|
9
|
+
import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "@fedify/vocab-runtime";
|
|
10
|
+
import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "@fedify/webfinger";
|
|
14
11
|
|
|
15
12
|
//#region src/compat/types.d.ts
|
|
16
13
|
/**
|
|
@@ -283,7 +280,7 @@ type ObjectAuthorizePredicate<TContextData, TParam extends string> = (context: R
|
|
|
283
280
|
* the entire collection without pagination.
|
|
284
281
|
* @since 1.8.0
|
|
285
282
|
*/
|
|
286
|
-
type CustomCollectionDispatcher<TItem,
|
|
283
|
+
type CustomCollectionDispatcher<TItem, TParam extends string, TContext extends Context<TContextData>, TContextData> = (context: TContext, values: Record<TParam, string>, cursor: string | null) => PageItems<TItem> | null | Promise<PageItems<TItem> | null>;
|
|
287
284
|
/**
|
|
288
285
|
* A callback that counts the number of items in a custom collection.
|
|
289
286
|
*
|
|
@@ -293,7 +290,7 @@ type CustomCollectionDispatcher<TItem, TParams extends Record<string, string>, T
|
|
|
293
290
|
* @param values The parameters of the requested URL.
|
|
294
291
|
* @since 1.8.0
|
|
295
292
|
*/
|
|
296
|
-
type CustomCollectionCounter<
|
|
293
|
+
type CustomCollectionCounter<TParam extends string, TContextData> = (context: RequestContext<TContextData>, values: Record<TParam, string>) => number | bigint | null | Promise<number | bigint | null>;
|
|
297
294
|
/**
|
|
298
295
|
* A callback that returns a cursor for a custom collection.
|
|
299
296
|
*
|
|
@@ -306,10 +303,148 @@ type CustomCollectionCounter<TParams extends Record<string, string>, TContextDat
|
|
|
306
303
|
* @param values The parameters of the requested URL.
|
|
307
304
|
* @since 1.8.0
|
|
308
305
|
*/
|
|
309
|
-
type CustomCollectionCursor<
|
|
306
|
+
type CustomCollectionCursor<TParam extends string, TContext extends Context<TContextData>, TContextData> = (context: TContext, values: Record<TParam, string>) => string | null | Promise<string | null>;
|
|
307
|
+
//#endregion
|
|
308
|
+
//#region src/federation/mq.d.ts
|
|
309
|
+
/**
|
|
310
|
+
* Additional options for enqueuing a message in a queue.
|
|
311
|
+
*
|
|
312
|
+
* @since 0.5.0
|
|
313
|
+
*/
|
|
314
|
+
interface MessageQueueEnqueueOptions {
|
|
315
|
+
/**
|
|
316
|
+
* The delay before the message is enqueued. No delay by default.
|
|
317
|
+
*
|
|
318
|
+
* It must not be negative.
|
|
319
|
+
*/
|
|
320
|
+
delay?: Temporal.Duration;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Additional options for listening to a message queue.
|
|
324
|
+
*
|
|
325
|
+
* @since 1.0.0
|
|
326
|
+
*/
|
|
327
|
+
interface MessageQueueListenOptions {
|
|
328
|
+
/**
|
|
329
|
+
* The signal to abort listening to the message queue.
|
|
330
|
+
*/
|
|
331
|
+
signal?: AbortSignal;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* An abstract interface for a message queue.
|
|
335
|
+
*
|
|
336
|
+
* @since 0.5.0
|
|
337
|
+
*/
|
|
338
|
+
interface MessageQueue {
|
|
339
|
+
/**
|
|
340
|
+
* Whether the message queue backend provides native retry mechanisms.
|
|
341
|
+
* When `true`, Fedify will skip its own retry logic and rely on the backend
|
|
342
|
+
* to handle retries. When `false` or omitted, Fedify will handle retries
|
|
343
|
+
* using its own retry policies.
|
|
344
|
+
*
|
|
345
|
+
* @default `false`
|
|
346
|
+
* @since 1.7.0
|
|
347
|
+
*/
|
|
348
|
+
readonly nativeRetrial?: boolean;
|
|
349
|
+
/**
|
|
350
|
+
* Enqueues a message in the queue.
|
|
351
|
+
* @param message The message to enqueue.
|
|
352
|
+
* @param options Additional options for enqueuing the message.
|
|
353
|
+
*/
|
|
354
|
+
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
355
|
+
/**
|
|
356
|
+
* Enqueues multiple messages in the queue. This operation is optional,
|
|
357
|
+
* and may not be supported by all implementations. If not supported,
|
|
358
|
+
* Fedify will invoke {@link enqueue} for each message.
|
|
359
|
+
*
|
|
360
|
+
* @param messages The messages to enqueue.
|
|
361
|
+
* @param options Additional options for enqueuing the messages.
|
|
362
|
+
*/
|
|
363
|
+
enqueueMany?: (messages: any[], options?: MessageQueueEnqueueOptions) => Promise<void>;
|
|
364
|
+
/**
|
|
365
|
+
* Listens for messages in the queue.
|
|
366
|
+
* @param handler The handler for messages in the queue.
|
|
367
|
+
* @param options Additional options for listening to the message queue.
|
|
368
|
+
* @returns A promise that resolves when the listening is done. It never
|
|
369
|
+
* rejects, and is resolved when the signal is aborted. If no
|
|
370
|
+
* signal is provided, it never resolves.
|
|
371
|
+
*/
|
|
372
|
+
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Additional options for {@link InProcessMessageQueue}.
|
|
376
|
+
* @since 1.0.0
|
|
377
|
+
*/
|
|
378
|
+
interface InProcessMessageQueueOptions {
|
|
379
|
+
/**
|
|
380
|
+
* The interval to poll for messages in the queue. 5 seconds by default.
|
|
381
|
+
* @default `{ seconds: 5 }`
|
|
382
|
+
*/
|
|
383
|
+
pollInterval?: Temporal.Duration | Temporal.DurationLike;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* A message queue that processes messages in the same process.
|
|
387
|
+
* Do not use this in production as it does neither persist messages nor
|
|
388
|
+
* distribute them across multiple processes.
|
|
389
|
+
*
|
|
390
|
+
* @since 0.5.0
|
|
391
|
+
*/
|
|
392
|
+
declare class InProcessMessageQueue implements MessageQueue {
|
|
393
|
+
#private;
|
|
394
|
+
/**
|
|
395
|
+
* In-process message queue does not provide native retry mechanisms.
|
|
396
|
+
* @since 1.7.0
|
|
397
|
+
*/
|
|
398
|
+
readonly nativeRetrial = false;
|
|
399
|
+
/**
|
|
400
|
+
* Constructs a new {@link InProcessMessageQueue} with the given options.
|
|
401
|
+
* @param options Additional options for the in-process message queue.
|
|
402
|
+
*/
|
|
403
|
+
constructor(options?: InProcessMessageQueueOptions);
|
|
404
|
+
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
405
|
+
enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
406
|
+
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* A message queue that processes messages in parallel. It takes another
|
|
410
|
+
* {@link MessageQueue}, and processes messages in parallel up to a certain
|
|
411
|
+
* number of workers.
|
|
412
|
+
*
|
|
413
|
+
* Actually, it's rather a decorator than a queue itself.
|
|
414
|
+
*
|
|
415
|
+
* Note that the workers do not run in truly parallel, in the sense that they
|
|
416
|
+
* are not running in separate threads or processes. They are running in the
|
|
417
|
+
* same process, but are scheduled to run in parallel. Hence, this is useful
|
|
418
|
+
* for I/O-bound tasks, but not for CPU-bound tasks, which is okay for Fedify's
|
|
419
|
+
* workloads.
|
|
420
|
+
*
|
|
421
|
+
* @since 1.0.0
|
|
422
|
+
*/
|
|
423
|
+
declare class ParallelMessageQueue implements MessageQueue {
|
|
424
|
+
#private;
|
|
425
|
+
readonly queue: MessageQueue;
|
|
426
|
+
readonly workers: number;
|
|
427
|
+
/**
|
|
428
|
+
* Inherits the native retry capability from the wrapped queue.
|
|
429
|
+
* @since 1.7.0
|
|
430
|
+
*/
|
|
431
|
+
readonly nativeRetrial?: boolean;
|
|
432
|
+
/**
|
|
433
|
+
* Constructs a new {@link ParallelMessageQueue} with the given queue and
|
|
434
|
+
* number of workers.
|
|
435
|
+
* @param queue The message queue to use under the hood. Note that
|
|
436
|
+
* {@link ParallelMessageQueue} cannot be nested.
|
|
437
|
+
* @param workers The number of workers to process messages in parallel.
|
|
438
|
+
* @throws {TypeError} If the given queue is an instance of
|
|
439
|
+
* {@link ParallelMessageQueue}.
|
|
440
|
+
*/
|
|
441
|
+
constructor(queue: MessageQueue, workers: number);
|
|
442
|
+
enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
443
|
+
enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
|
|
444
|
+
listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
|
|
445
|
+
}
|
|
310
446
|
//#endregion
|
|
311
447
|
//#region src/federation/handler.d.ts
|
|
312
|
-
|
|
313
448
|
/**
|
|
314
449
|
* Options for the {@link respondWithObject} and
|
|
315
450
|
* {@link respondWithObjectIfAcceptable} functions.
|
|
@@ -704,7 +839,7 @@ interface Federatable<TContextData> {
|
|
|
704
839
|
* @returns An object with methods to set other actor dispatcher callbacks.
|
|
705
840
|
* @throws {RouterError} Thrown if the path pattern is invalid.
|
|
706
841
|
*/
|
|
707
|
-
setActorDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: ActorDispatcher<TContextData>): ActorCallbackSetters<TContextData>;
|
|
842
|
+
setActorDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: ActorDispatcher<TContextData>): ActorCallbackSetters<TContextData>;
|
|
708
843
|
/**
|
|
709
844
|
* Registers an object dispatcher.
|
|
710
845
|
*
|
|
@@ -718,9 +853,7 @@ interface Federatable<TContextData> {
|
|
|
718
853
|
* must have one or more variables.
|
|
719
854
|
* @param dispatcher An object dispatcher callback to register.
|
|
720
855
|
*/
|
|
721
|
-
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls:
|
|
722
|
-
typeId: URL;
|
|
723
|
-
}, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
856
|
+
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
724
857
|
/**
|
|
725
858
|
* Registers an object dispatcher.
|
|
726
859
|
*
|
|
@@ -734,9 +867,7 @@ interface Federatable<TContextData> {
|
|
|
734
867
|
* must have one or more variables.
|
|
735
868
|
* @param dispatcher An object dispatcher callback to register.
|
|
736
869
|
*/
|
|
737
|
-
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls:
|
|
738
|
-
typeId: URL;
|
|
739
|
-
}, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
870
|
+
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
740
871
|
/**
|
|
741
872
|
* Registers an object dispatcher.
|
|
742
873
|
*
|
|
@@ -750,9 +881,7 @@ interface Federatable<TContextData> {
|
|
|
750
881
|
* must have one or more variables.
|
|
751
882
|
* @param dispatcher An object dispatcher callback to register.
|
|
752
883
|
*/
|
|
753
|
-
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls:
|
|
754
|
-
typeId: URL;
|
|
755
|
-
}, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
884
|
+
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
756
885
|
/**
|
|
757
886
|
* Registers an object dispatcher.
|
|
758
887
|
*
|
|
@@ -766,9 +895,7 @@ interface Federatable<TContextData> {
|
|
|
766
895
|
* must have one or more variables.
|
|
767
896
|
* @param dispatcher An object dispatcher callback to register.
|
|
768
897
|
*/
|
|
769
|
-
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls:
|
|
770
|
-
typeId: URL;
|
|
771
|
-
}, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
898
|
+
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
772
899
|
/**
|
|
773
900
|
* Registers an object dispatcher.
|
|
774
901
|
*
|
|
@@ -782,9 +909,7 @@ interface Federatable<TContextData> {
|
|
|
782
909
|
* must have one or more variables.
|
|
783
910
|
* @param dispatcher An object dispatcher callback to register.
|
|
784
911
|
*/
|
|
785
|
-
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls:
|
|
786
|
-
typeId: URL;
|
|
787
|
-
}, path: `${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
912
|
+
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
788
913
|
/**
|
|
789
914
|
* Registers an object dispatcher.
|
|
790
915
|
*
|
|
@@ -798,9 +923,7 @@ interface Federatable<TContextData> {
|
|
|
798
923
|
* must have one or more variables.
|
|
799
924
|
* @param dispatcher An object dispatcher callback to register.
|
|
800
925
|
*/
|
|
801
|
-
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls:
|
|
802
|
-
typeId: URL;
|
|
803
|
-
}, path: `${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
926
|
+
setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
|
|
804
927
|
/**
|
|
805
928
|
* Registers an inbox dispatcher.
|
|
806
929
|
*
|
|
@@ -812,7 +935,7 @@ interface Federatable<TContextData> {
|
|
|
812
935
|
* @param dispatcher An inbox dispatcher callback to register.
|
|
813
936
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
|
814
937
|
*/
|
|
815
|
-
setInboxDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
938
|
+
setInboxDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
816
939
|
/**
|
|
817
940
|
* Registers an outbox dispatcher.
|
|
818
941
|
*
|
|
@@ -836,7 +959,7 @@ interface Federatable<TContextData> {
|
|
|
836
959
|
* @param dispatcher An outbox dispatcher callback to register.
|
|
837
960
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
|
838
961
|
*/
|
|
839
|
-
setOutboxDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
962
|
+
setOutboxDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
840
963
|
/**
|
|
841
964
|
* Registers a following collection dispatcher.
|
|
842
965
|
* @param path The URI path pattern for the following collection. The syntax
|
|
@@ -848,7 +971,7 @@ interface Federatable<TContextData> {
|
|
|
848
971
|
* callbacks.
|
|
849
972
|
* @throws {RouterError} Thrown if the path pattern is invalid.
|
|
850
973
|
*/
|
|
851
|
-
setFollowingDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Actor | URL, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
974
|
+
setFollowingDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Actor | URL, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
852
975
|
/**
|
|
853
976
|
* Registers a followers collection dispatcher.
|
|
854
977
|
* @param path The URI path pattern for the followers collection. The syntax
|
|
@@ -860,7 +983,7 @@ interface Federatable<TContextData> {
|
|
|
860
983
|
* callbacks.
|
|
861
984
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
|
862
985
|
*/
|
|
863
|
-
setFollowersDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Recipient, Context<TContextData>, TContextData, URL>): CollectionCallbackSetters<Context<TContextData>, TContextData, URL>;
|
|
986
|
+
setFollowersDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Recipient, Context<TContextData>, TContextData, URL>): CollectionCallbackSetters<Context<TContextData>, TContextData, URL>;
|
|
864
987
|
/**
|
|
865
988
|
* Registers a liked collection dispatcher.
|
|
866
989
|
* @param path The URI path pattern for the liked collection. The syntax
|
|
@@ -872,7 +995,7 @@ interface Federatable<TContextData> {
|
|
|
872
995
|
* callbacks.
|
|
873
996
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
|
874
997
|
*/
|
|
875
|
-
setLikedDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Object$1 | URL, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
998
|
+
setLikedDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Object$1 | URL, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
876
999
|
/**
|
|
877
1000
|
* Registers a featured collection dispatcher.
|
|
878
1001
|
* @param path The URI path pattern for the featured collection. The syntax
|
|
@@ -884,7 +1007,7 @@ interface Federatable<TContextData> {
|
|
|
884
1007
|
* callbacks.
|
|
885
1008
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
|
886
1009
|
*/
|
|
887
|
-
setFeaturedDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Object$1, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
1010
|
+
setFeaturedDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Object$1, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
888
1011
|
/**
|
|
889
1012
|
* Registers a featured tags collection dispatcher.
|
|
890
1013
|
* @param path The URI path pattern for the featured tags collection.
|
|
@@ -896,7 +1019,7 @@ interface Federatable<TContextData> {
|
|
|
896
1019
|
* callbacks.
|
|
897
1020
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
|
898
1021
|
*/
|
|
899
|
-
setFeaturedTagsDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Hashtag, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
1022
|
+
setFeaturedTagsDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Hashtag, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
900
1023
|
/**
|
|
901
1024
|
* Assigns the URL path for the inbox and starts setting inbox listeners.
|
|
902
1025
|
*
|
|
@@ -926,7 +1049,37 @@ interface Federatable<TContextData> {
|
|
|
926
1049
|
* @returns An object to register inbox listeners.
|
|
927
1050
|
* @throws {RouteError} Thrown if the path pattern is invalid.
|
|
928
1051
|
*/
|
|
929
|
-
setInboxListeners(inboxPath: `${string}{identifier}${string}` | `${string}{handle}${string}`, sharedInboxPath?: string): InboxListenerSetters<TContextData>;
|
|
1052
|
+
setInboxListeners(inboxPath: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, sharedInboxPath?: string): InboxListenerSetters<TContextData>;
|
|
1053
|
+
/**
|
|
1054
|
+
* Registers a collection of objects dispatcher.
|
|
1055
|
+
*
|
|
1056
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
1057
|
+
* @template TObject The type of objects to dispatch.
|
|
1058
|
+
* @template TParam The parameter names of the requested URL.
|
|
1059
|
+
* @param name A unique name for the collection dispatcher.
|
|
1060
|
+
* @param itemType The Activity Vocabulary class of the object to dispatch.
|
|
1061
|
+
* @param path The URI path pattern for the collection dispatcher.
|
|
1062
|
+
* The syntax is based on URI Template
|
|
1063
|
+
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
|
|
1064
|
+
* The path must have one or more variables.
|
|
1065
|
+
* @param dispatcher A collection dispatcher callback to register.
|
|
1066
|
+
*/
|
|
1067
|
+
setCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
|
1068
|
+
/**
|
|
1069
|
+
* Registers a collection of objects dispatcher.
|
|
1070
|
+
*
|
|
1071
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
1072
|
+
* @template TObject The type of objects to dispatch.
|
|
1073
|
+
* @template TParam The parameter names of the requested URL.
|
|
1074
|
+
* @param name A unique name for the collection dispatcher.
|
|
1075
|
+
* @param itemType The Activity Vocabulary class of the object to dispatch.
|
|
1076
|
+
* @param path The URI path pattern for the collection dispatcher.
|
|
1077
|
+
* The syntax is based on URI Template
|
|
1078
|
+
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
|
|
1079
|
+
* The path must have one or more variables.
|
|
1080
|
+
* @param dispatcher A collection dispatcher callback to register.
|
|
1081
|
+
*/
|
|
1082
|
+
setCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
|
930
1083
|
/**
|
|
931
1084
|
* Registers a collection of objects dispatcher.
|
|
932
1085
|
*
|
|
@@ -941,7 +1094,37 @@ interface Federatable<TContextData> {
|
|
|
941
1094
|
* The path must have one or more variables.
|
|
942
1095
|
* @param dispatcher A collection dispatcher callback to register.
|
|
943
1096
|
*/
|
|
944
|
-
setCollectionDispatcher<TObject extends Object$1,
|
|
1097
|
+
setCollectionDispatcher<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>;
|
|
1098
|
+
/**
|
|
1099
|
+
* Registers an ordered collection of objects dispatcher.
|
|
1100
|
+
*
|
|
1101
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
1102
|
+
* @template TObject The type of objects to dispatch.
|
|
1103
|
+
* @template TParam The parameter names of the requested URL.
|
|
1104
|
+
* @param name A unique name for the collection dispatcher.
|
|
1105
|
+
* @param itemType The Activity Vocabulary class of the object to dispatch.
|
|
1106
|
+
* @param path The URI path pattern for the collection dispatcher.
|
|
1107
|
+
* The syntax is based on URI Template
|
|
1108
|
+
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
|
|
1109
|
+
* The path must have one or more variables.
|
|
1110
|
+
* @param dispatcher A collection dispatcher callback to register.
|
|
1111
|
+
*/
|
|
1112
|
+
setOrderedCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
|
1113
|
+
/**
|
|
1114
|
+
* Registers an ordered collection of objects dispatcher.
|
|
1115
|
+
*
|
|
1116
|
+
* @template TContextData The context data to pass to the {@link Context}.
|
|
1117
|
+
* @template TObject The type of objects to dispatch.
|
|
1118
|
+
* @template TParam The parameter names of the requested URL.
|
|
1119
|
+
* @param name A unique name for the collection dispatcher.
|
|
1120
|
+
* @param itemType The Activity Vocabulary class of the object to dispatch.
|
|
1121
|
+
* @param path The URI path pattern for the collection dispatcher.
|
|
1122
|
+
* The syntax is based on URI Template
|
|
1123
|
+
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
|
|
1124
|
+
* The path must have one or more variables.
|
|
1125
|
+
* @param dispatcher A collection dispatcher callback to register.
|
|
1126
|
+
*/
|
|
1127
|
+
setOrderedCollectionDispatcher<TObject extends Object$1, TParam extends string>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: `${string}${Rfc6570Expression<TParam>}${string}${Rfc6570Expression<TParam>}${string}`, dispatcher: CustomCollectionDispatcher<TObject, TParam, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParam, RequestContext<TContextData>, TContextData>;
|
|
945
1128
|
/**
|
|
946
1129
|
* Registers an ordered collection of objects dispatcher.
|
|
947
1130
|
*
|
|
@@ -956,7 +1139,7 @@ interface Federatable<TContextData> {
|
|
|
956
1139
|
* The path must have one or more variables.
|
|
957
1140
|
* @param dispatcher A collection dispatcher callback to register.
|
|
958
1141
|
*/
|
|
959
|
-
setOrderedCollectionDispatcher<TObject extends Object$1,
|
|
1142
|
+
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>;
|
|
960
1143
|
}
|
|
961
1144
|
/**
|
|
962
1145
|
* An object that registers federation-related business logic and dispatches
|
|
@@ -1092,12 +1275,6 @@ interface FederationOptions<TContextData> {
|
|
|
1092
1275
|
* @since 1.4.0
|
|
1093
1276
|
*/
|
|
1094
1277
|
contextLoaderFactory?: DocumentLoaderFactory;
|
|
1095
|
-
/**
|
|
1096
|
-
* A custom JSON-LD context loader. By default, this uses the same loader
|
|
1097
|
-
* as the document loader.
|
|
1098
|
-
* @deprecated Use {@link contextLoaderFactory} instead.
|
|
1099
|
-
*/
|
|
1100
|
-
contextLoader?: DocumentLoader;
|
|
1101
1278
|
/**
|
|
1102
1279
|
* A factory function that creates an authenticated document loader for a
|
|
1103
1280
|
* given identity. This is used for fetching documents that require
|
|
@@ -1306,6 +1483,36 @@ interface CollectionCallbackSetters<TContext extends Context<TContextData>, TCon
|
|
|
1306
1483
|
*/
|
|
1307
1484
|
authorize(predicate: AuthorizePredicate<TContextData>): CollectionCallbackSetters<TContext, TContextData, TFilter>;
|
|
1308
1485
|
}
|
|
1486
|
+
/**
|
|
1487
|
+
* The strategy for handling activity idempotency in inbox processing.
|
|
1488
|
+
*
|
|
1489
|
+
* - `"global"`: Activities are deduplicated globally across all inboxes and
|
|
1490
|
+
* origins. The same activity ID will be processed only once, regardless
|
|
1491
|
+
* of which inbox receives it or which server sent it.
|
|
1492
|
+
*
|
|
1493
|
+
* - `"per-origin"`: Activities are deduplicated per receiving server's origin.
|
|
1494
|
+
* The same activity ID will be processed only once on each receiving server,
|
|
1495
|
+
* but can be processed separately on different receiving servers. This had
|
|
1496
|
+
* been the default behavior in Fedify 1.x versions.
|
|
1497
|
+
*
|
|
1498
|
+
* - `"per-inbox"`: Activities are deduplicated per inbox. The same activity
|
|
1499
|
+
* ID can be processed once per inbox, allowing the same activity to be
|
|
1500
|
+
* delivered to multiple inboxes independently. This follows standard
|
|
1501
|
+
* ActivityPub behavior and is the default strategy since Fedify 2.0.0.
|
|
1502
|
+
*
|
|
1503
|
+
* @since 1.9.0
|
|
1504
|
+
*/
|
|
1505
|
+
type IdempotencyStrategy = "global" | "per-origin" | "per-inbox";
|
|
1506
|
+
/**
|
|
1507
|
+
* A callback to generate a custom idempotency key for an activity.
|
|
1508
|
+
* Returns the cache key to use, or null to skip idempotency checking.
|
|
1509
|
+
* @template TContextData The context data to pass to the {@link InboxContext}.
|
|
1510
|
+
* @param ctx The inbox context.
|
|
1511
|
+
* @param activity The activity being processed.
|
|
1512
|
+
* @returns The idempotency key to use for caching, or null to skip caching.
|
|
1513
|
+
* @since 1.9.0
|
|
1514
|
+
*/
|
|
1515
|
+
type IdempotencyKeyCallback<TContextData> = (ctx: InboxContext<TContextData>, activity: Activity) => string | null | Promise<string | null>;
|
|
1309
1516
|
/**
|
|
1310
1517
|
* Registry for inbox listeners for different activity types.
|
|
1311
1518
|
*/
|
|
@@ -1336,6 +1543,36 @@ interface InboxListenerSetters<TContextData> {
|
|
|
1336
1543
|
* @since 0.11.0
|
|
1337
1544
|
*/
|
|
1338
1545
|
setSharedKeyDispatcher(dispatcher: SharedInboxKeyDispatcher<TContextData>): InboxListenerSetters<TContextData>;
|
|
1546
|
+
/**
|
|
1547
|
+
* Configures the strategy for handling activity idempotency in inbox processing.
|
|
1548
|
+
*
|
|
1549
|
+
* @example
|
|
1550
|
+
* Use per-inbox strategy (standard ActivityPub behavior):
|
|
1551
|
+
* ```
|
|
1552
|
+
* federation
|
|
1553
|
+
* .setInboxListeners("/users/{identifier}/inbox", "/inbox")
|
|
1554
|
+
* .withIdempotency("per-inbox");
|
|
1555
|
+
* ```
|
|
1556
|
+
*
|
|
1557
|
+
* Use custom strategy:
|
|
1558
|
+
* ```
|
|
1559
|
+
* federation
|
|
1560
|
+
* .setInboxListeners("/users/{identifier}/inbox", "/inbox")
|
|
1561
|
+
* .withIdempotency((ctx, activity) => {
|
|
1562
|
+
* // Return null to skip idempotency
|
|
1563
|
+
* return `${ctx.origin}:${activity.id?.href}:${ctx.recipient}`;
|
|
1564
|
+
* });
|
|
1565
|
+
* ```
|
|
1566
|
+
*
|
|
1567
|
+
* @param strategy The idempotency strategy to use. Can be:
|
|
1568
|
+
* - `"global"`: Activities are deduplicated across all inboxes and origins
|
|
1569
|
+
* - `"per-origin"`: Activities are deduplicated per inbox origin
|
|
1570
|
+
* - `"per-inbox"`: Activities are deduplicated per inbox
|
|
1571
|
+
* - A custom callback function that returns the cache key to use
|
|
1572
|
+
* @returns The setters object so that settings can be chained.
|
|
1573
|
+
* @since 1.9.0
|
|
1574
|
+
*/
|
|
1575
|
+
withIdempotency(strategy: IdempotencyStrategy | IdempotencyKeyCallback<TContextData>): InboxListenerSetters<TContextData>;
|
|
1339
1576
|
}
|
|
1340
1577
|
/**
|
|
1341
1578
|
* Parameters of {@link Federation.fetch} method.
|
|
@@ -1374,38 +1611,38 @@ interface FederationFetchOptions<TContextData> {
|
|
|
1374
1611
|
/**
|
|
1375
1612
|
* Additional settings for a custom collection dispatcher.
|
|
1376
1613
|
*
|
|
1377
|
-
* @template
|
|
1614
|
+
* @template TParam The type of the parameters in the URL path.
|
|
1378
1615
|
* @template TContext The type of the context. {@link Context} or
|
|
1379
1616
|
* {@link RequestContext}.
|
|
1380
1617
|
* @template TContextData The context data to pass to the {@link Context}.
|
|
1381
1618
|
* @template TFilter The type of filter for the collection.
|
|
1382
1619
|
*/
|
|
1383
|
-
interface CustomCollectionCallbackSetters<
|
|
1620
|
+
interface CustomCollectionCallbackSetters<TParam extends string, TContext extends Context<TContextData>, TContextData> {
|
|
1384
1621
|
/**
|
|
1385
1622
|
* Sets the counter for the custom collection.
|
|
1386
1623
|
* @param counter A callback that returns the number of items in the custom collection.
|
|
1387
1624
|
* @returns The setters object so that settings can be chained.
|
|
1388
1625
|
*/
|
|
1389
|
-
setCounter(counter: CustomCollectionCounter<
|
|
1626
|
+
setCounter(counter: CustomCollectionCounter<TParam, TContextData>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>;
|
|
1390
1627
|
/**
|
|
1391
1628
|
* Sets the first cursor for the custom collection.
|
|
1392
1629
|
* @param cursor The cursor for the first item in the custom collection.
|
|
1393
1630
|
* @returns The setters object so that settings can be chained.
|
|
1394
1631
|
*/
|
|
1395
|
-
setFirstCursor(cursor: CustomCollectionCursor<
|
|
1632
|
+
setFirstCursor(cursor: CustomCollectionCursor<TParam, TContext, TContextData>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>;
|
|
1396
1633
|
/**
|
|
1397
1634
|
* Sets the last cursor for the custom collection.
|
|
1398
1635
|
* @param cursor The cursor for the last item in the custom collection.
|
|
1399
1636
|
* @returns The setters object so that settings can be chained.
|
|
1400
1637
|
*/
|
|
1401
|
-
setLastCursor(cursor: CustomCollectionCursor<
|
|
1638
|
+
setLastCursor(cursor: CustomCollectionCursor<TParam, TContext, TContextData>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>;
|
|
1402
1639
|
/**
|
|
1403
1640
|
* Specifies the conditions under which requests are authorized.
|
|
1404
1641
|
* @param predicate A callback that returns whether a request is authorized.
|
|
1405
1642
|
* @returns The setters object so that settings can be chained.
|
|
1406
1643
|
* @since 0.7.0
|
|
1407
1644
|
*/
|
|
1408
|
-
authorize(predicate: ObjectAuthorizePredicate<TContextData, string>): CustomCollectionCallbackSetters<
|
|
1645
|
+
authorize(predicate: ObjectAuthorizePredicate<TContextData, string>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>;
|
|
1409
1646
|
}
|
|
1410
1647
|
/**
|
|
1411
1648
|
* Represents an object with a type ID, which is either a constructor or an
|
|
@@ -1417,73 +1654,34 @@ type ConstructorWithTypeId<TObject extends Object$1> = (new (...args: any[]) =>
|
|
|
1417
1654
|
typeId: URL;
|
|
1418
1655
|
};
|
|
1419
1656
|
/**
|
|
1420
|
-
*
|
|
1421
|
-
*
|
|
1422
|
-
*
|
|
1423
|
-
*
|
|
1424
|
-
*
|
|
1425
|
-
*
|
|
1426
|
-
* type UserPostPath = ParamsKeyPath<{ userId: string; postId: string }>;
|
|
1427
|
-
* let userPostPath: UserPostPath;
|
|
1428
|
-
* // userPostPath = "/posts/{postId}"; // invalid - does not contain `{userId}`
|
|
1429
|
-
* // userPostPath = "/users/{userId}"; // invalid - does not contain `{postId}`
|
|
1430
|
-
* userPostPath = "/users/{userId}/posts/{postId}"; // valid
|
|
1431
|
-
* userPostPath = "/posts/{postId}/users/{userId}"; // valid
|
|
1432
|
-
* ```
|
|
1433
|
-
*/
|
|
1434
|
-
type ParamsKeyPath<Params extends Record<string, string>> = ParamsPath<Extract<keyof Params, string>> & string;
|
|
1435
|
-
/**
|
|
1436
|
-
* Represents a path with multiple parameters.
|
|
1437
|
-
* All permutations of the parameters are included in the union type.
|
|
1438
|
-
* The path must have all parameters in the form of `{paramName}`.
|
|
1439
|
-
* @param Params - A union of parameter names.
|
|
1440
|
-
* @returns A string representing the path with all parameters.
|
|
1441
|
-
* @example
|
|
1442
|
-
* ```ts
|
|
1443
|
-
* type UserPostPath = ParamsPath<"userId" | "postId">;
|
|
1444
|
-
* // = `${string}{userId}${string}` & `${string}{postId}${string}`
|
|
1445
|
-
* // =
|
|
1446
|
-
* // | `${string}{userId}${string}{postId}${string}`
|
|
1447
|
-
* // | `${string}{postId}${string}{userId}${string}`
|
|
1448
|
-
* let userPostPath: UserPostPath;
|
|
1449
|
-
* userPostPath = "/users/posts"; // ❌ invalid
|
|
1450
|
-
* userPostPath = "/users/{userId}"; // ❌ invalid
|
|
1451
|
-
* userPostPath = "/posts/{postId}"; // ❌ invalid
|
|
1452
|
-
* userPostPath = "/users/{userId}/posts/{postId}"; // ✅ valid
|
|
1453
|
-
* userPostPath = "/posts/{postId}/users/{userId}"; // ✅ valid
|
|
1454
|
-
*/
|
|
1455
|
-
type ParamsPath<Params extends string> = UnionToIntersection<ParamPath<Params>>;
|
|
1456
|
-
/**
|
|
1457
|
-
* Represents a path with a single parameter.
|
|
1458
|
-
* The path must have at least one of the parameters in the form of `{paramName}`.
|
|
1459
|
-
* @param Param - The name of the parameter.
|
|
1460
|
-
* @returns A string representing the path with the parameter.
|
|
1461
|
-
* @example
|
|
1462
|
-
* ```ts
|
|
1463
|
-
* type UserPostPath = ParamPath<"userId" | "postId">;
|
|
1464
|
-
* // = `${string}{userId}${string}` | `${string}{postId}${string}`
|
|
1465
|
-
* let userPostPath: UserPostPath;
|
|
1466
|
-
* userPostPath = "/users/posts"; // ❌ invalid
|
|
1467
|
-
* userPostPath = "/users/{userId}"; // ✅ valid
|
|
1468
|
-
* userPostPath = "/posts/{postId}"; // ✅ valid
|
|
1469
|
-
* userPostPath = "/users/{userId}/posts/{postId}"; // ✅ valid
|
|
1470
|
-
* userPostPath = "/posts/{postId}/users/{userId}"; // ✅ valid
|
|
1471
|
-
*/
|
|
1472
|
-
type ParamPath<Param extends string> = `${string}{${Param}}${string}`;
|
|
1473
|
-
/**
|
|
1474
|
-
* Converts union types to intersection types.
|
|
1657
|
+
* Defines a union of all valid RFC 6570 URI Template expressions for a given
|
|
1658
|
+
* parameter name.
|
|
1659
|
+
*
|
|
1660
|
+
* RFC 6570 specifies a syntax for URI templates, allowing for variable
|
|
1661
|
+
* expansion. This type captures all Level 1-4 operator expressions for a
|
|
1662
|
+
* single, named variable.
|
|
1475
1663
|
*
|
|
1476
|
-
*
|
|
1477
|
-
*
|
|
1664
|
+
* The supported expression types are:
|
|
1665
|
+
* - `{Param}`: Simple string expansion
|
|
1666
|
+
* - `+{Param}`: Reserved string expansion
|
|
1667
|
+
* - `#{Param}`: Fragment expansion
|
|
1668
|
+
* - `{.Param}`: Label expansion with a dot-prefix
|
|
1669
|
+
* - `{/Param}`: Path segment expansion
|
|
1670
|
+
* - `{;Param}`: Path-style parameter expansion
|
|
1671
|
+
* - `{?Param}`: Query component expansion
|
|
1672
|
+
* - `{&Param}`: Query continuation expansion
|
|
1673
|
+
*
|
|
1674
|
+
* @template Param The name of the parameter to be used in the expressions.
|
|
1478
1675
|
* @example
|
|
1479
1676
|
* ```ts
|
|
1480
|
-
* type
|
|
1481
|
-
*
|
|
1482
|
-
*
|
|
1483
|
-
*
|
|
1484
|
-
*
|
|
1677
|
+
* type UserIdExpression = Rfc6570Expression<"userId">;
|
|
1678
|
+
*
|
|
1679
|
+
* // The variable `userPath` can be assigned any of the valid expressions.
|
|
1680
|
+
* const userPath: UserIdExpression = "{/userId}";
|
|
1681
|
+
* ```
|
|
1682
|
+
* @see {@link https://tools.ietf.org/html/rfc6570} for the full specification.
|
|
1485
1683
|
*/
|
|
1486
|
-
type
|
|
1684
|
+
type Rfc6570Expression<Param extends string> = `{${Param}}` | `{+${Param}}` | `{#${Param}}` | `{.${Param}}` | `{/${Param}}` | `{;${Param}}` | `{?${Param}}` | `{&${Param}}`;
|
|
1487
1685
|
//#endregion
|
|
1488
1686
|
//#region src/federation/context.d.ts
|
|
1489
1687
|
/**
|
|
@@ -1572,9 +1770,7 @@ interface Context<TContextData> {
|
|
|
1572
1770
|
* @throws {TypeError} If values are invalid.
|
|
1573
1771
|
* @since 0.7.0
|
|
1574
1772
|
*/
|
|
1575
|
-
getObjectUri<TObject extends Object$1>(cls:
|
|
1576
|
-
typeId: URL;
|
|
1577
|
-
}, values: Record<string, string>): URL;
|
|
1773
|
+
getObjectUri<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>): URL;
|
|
1578
1774
|
/**
|
|
1579
1775
|
* Builds the URI of an actor's outbox with the given identifier.
|
|
1580
1776
|
* @param identifier The actor's identifier.
|
|
@@ -1888,9 +2084,7 @@ interface RequestContext<TContextData> extends Context<TContextData> {
|
|
|
1888
2084
|
* @throws {TypeError} If values are invalid.
|
|
1889
2085
|
* @since 0.7.0
|
|
1890
2086
|
*/
|
|
1891
|
-
getObject<TObject extends Object$1>(cls:
|
|
1892
|
-
typeId: URL;
|
|
1893
|
-
}, values: Record<string, string>): Promise<TObject | null>;
|
|
2087
|
+
getObject<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>): Promise<TObject | null>;
|
|
1894
2088
|
/**
|
|
1895
2089
|
* Gets the public key of the sender, if any exists and it is verified.
|
|
1896
2090
|
* Otherwise, `null` is returned.
|
|
@@ -2034,9 +2228,7 @@ type ParseUriResult =
|
|
|
2034
2228
|
* The case of an object URI.
|
|
2035
2229
|
*/ | {
|
|
2036
2230
|
readonly type: "object";
|
|
2037
|
-
readonly class:
|
|
2038
|
-
typeId: URL;
|
|
2039
|
-
};
|
|
2231
|
+
readonly class: ConstructorWithTypeId<Object$1>;
|
|
2040
2232
|
readonly typeId: URL;
|
|
2041
2233
|
readonly values: Record<string, string>;
|
|
2042
2234
|
}
|
|
@@ -2254,4 +2446,4 @@ interface ActorKeyPair extends CryptoKeyPair {
|
|
|
2254
2446
|
multikey: Multikey;
|
|
2255
2447
|
}
|
|
2256
2448
|
//#endregion
|
|
2257
|
-
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, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems,
|
|
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 };
|