@fedify/fedify 1.9.0-pr.443.1681 → 1.9.0-pr.455.1742

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.
Files changed (138) hide show
  1. package/dist/{actor-sT_gcgkl.d.ts → actor-C1Euqngb.d.ts} +1 -1
  2. package/dist/{actor-CX1PqLef.js → actor-CL8lYYUx.js} +1 -1
  3. package/dist/{actor-D6yXbYgY.js → actor-CYnaKz6k.js} +6169 -2946
  4. package/dist/{actor-CpDvMeh9.cjs → actor-D_0j9hMV.cjs} +6169 -2946
  5. package/dist/{actor-D8GmZX63.d.cts → actor-Ydzhc8dj.d.cts} +1 -1
  6. package/dist/{authdocloader-B02Yhk89.cjs → authdocloader-AGT1bvSf.cjs} +3 -3
  7. package/dist/{authdocloader-_-SNQ37B.js → authdocloader-BlVoSqyh.js} +3 -3
  8. package/dist/{authdocloader-CtHAAz1D.js → authdocloader-CRuH00Tu.js} +3 -3
  9. package/dist/{builder-C5KrSbKS.js → builder-CqMKWEN0.js} +14 -8
  10. package/dist/{client-DbRgEC98.js → client-BM12q1DJ.js} +1 -1
  11. package/dist/compat/mod.d.cts +7 -7
  12. package/dist/compat/mod.d.ts +7 -7
  13. package/dist/compat/transformers.test.js +16 -16
  14. package/dist/{context-Cp-kboln.d.ts → context-CXUibY4L.d.ts} +179 -116
  15. package/dist/{context-BkqGJwLI.d.cts → context-CwUAkopp.d.cts} +179 -116
  16. package/dist/{docloader-DHrLpvDa.js → docloader-BggS4E4F.js} +1 -1
  17. package/dist/{docloader-B_lWIYhZ.cjs → docloader-CLtA3Ji8.cjs} +1 -1
  18. package/dist/{esm-oDAmb3t0.js → esm-B3jpomik.js} +1 -1
  19. package/dist/federation/builder.test.js +5 -5
  20. package/dist/federation/collection.test.js +3 -3
  21. package/dist/federation/handler.test.js +17 -17
  22. package/dist/federation/idempotency.test.d.ts +3 -0
  23. package/dist/federation/idempotency.test.js +202 -0
  24. package/dist/federation/inbox.test.js +4 -4
  25. package/dist/federation/keycache.test.js +4 -4
  26. package/dist/federation/kv.test.js +3 -3
  27. package/dist/federation/middleware.test.js +18 -18
  28. package/dist/federation/mod.cjs +10 -10
  29. package/dist/federation/mod.d.cts +7 -7
  30. package/dist/federation/mod.d.ts +7 -7
  31. package/dist/federation/mod.js +10 -10
  32. package/dist/federation/mq.test.js +3 -3
  33. package/dist/federation/retry.test.js +3 -3
  34. package/dist/federation/router.test.js +3 -3
  35. package/dist/federation/send.test.js +10 -10
  36. package/dist/fixtures/media.example.com/avatars/test-avatar.jpg.json +6 -0
  37. package/dist/{http-BQ0XHmus.cjs → http-2m_h3SPQ.cjs} +3 -3
  38. package/dist/{http-B9UPBFJz.d.cts → http-B1_DzfAU.d.cts} +1 -1
  39. package/dist/{http-4lxNFaXA.js → http-D53H7oqD.js} +3 -3
  40. package/dist/{http-ABY5j3YT.js → http-DNkYeLxx.js} +2 -2
  41. package/dist/{http-BGqh2jzk.d.ts → http-wsGR6KkT.d.ts} +1 -1
  42. package/dist/{inbox-D34aGNh3.js → inbox-FbqGLKha.js} +29 -7
  43. package/dist/{key-DCCZ0IQz.js → key-B42BY6RL.js} +2 -2
  44. package/dist/{key-B8fuptOf.js → key-BVNVEpXg.js} +2 -2
  45. package/dist/key-CYO3d3Bc.cjs +10 -0
  46. package/dist/{key-CUhjb7ia.cjs → key-CZzEU9nv.cjs} +2 -2
  47. package/dist/{key-BvUiwgvU.js → key-Dj6-orIK.js} +3 -3
  48. package/dist/{key-D5_cYZv8.js → key-NaBDH7FK.js} +4 -4
  49. package/dist/{keycache-DPgak-bY.js → keycache-BLtGOP6f.js} +1 -1
  50. package/dist/{keys-R-SfK3nQ.js → keys-BO3n2h_L.js} +1 -1
  51. package/dist/{ld-Dng9Ri0Z.js → ld-CMWQXDty.js} +2 -2
  52. package/dist/{lookup-CgzIxSqk.js → lookup-B5jlZrQb.js} +21 -12
  53. package/dist/{lookup-Bm9ZRBwj.cjs → lookup-BsOmKssB.cjs} +1 -1
  54. package/dist/{lookup-4DHxuyI4.js → lookup-C-jJgyrW.js} +1 -1
  55. package/dist/middleware-BV1L9XDk.cjs +17 -0
  56. package/dist/{middleware-774Oifc4.js → middleware-CNAH05Vn.js} +78 -47
  57. package/dist/middleware-Cr46LoSG.js +26 -0
  58. package/dist/middleware-DAFFQX5e.js +17 -0
  59. package/dist/{middleware-CpT5VG6o.cjs → middleware-DOd67qPG.cjs} +78 -47
  60. package/dist/{middleware-B7DkslM_.js → middleware-lg47b3mK.js} +43 -40
  61. package/dist/{mod-DxjZ8kbs.d.cts → mod-BUbqxBev.d.cts} +19 -1
  62. package/dist/{mod-OfRtcQo1.d.ts → mod-BcObK1Lz.d.ts} +2 -2
  63. package/dist/{mod-CnEwcmyF.d.ts → mod-CDObsV1d.d.ts} +19 -1
  64. package/dist/{mod-TsyIDkKn.d.ts → mod-CIbqfZW0.d.ts} +1 -1
  65. package/dist/{mod-Cuem8g-I.d.ts → mod-DgcYoyZK.d.ts} +2 -2
  66. package/dist/{mod-bscaBAIo.d.cts → mod-Dt-G9ZOS.d.cts} +1 -1
  67. package/dist/{mod-BihGJmMM.d.cts → mod-fjqfsrty.d.cts} +2 -2
  68. package/dist/{mod-Ds5wiXHw.d.cts → mod-mXx9V0q5.d.cts} +2 -2
  69. package/dist/mod.cjs +10 -10
  70. package/dist/mod.d.cts +10 -10
  71. package/dist/mod.d.ts +10 -10
  72. package/dist/mod.js +10 -10
  73. package/dist/nodeinfo/client.test.js +5 -5
  74. package/dist/nodeinfo/handler.test.js +16 -16
  75. package/dist/nodeinfo/mod.cjs +2 -2
  76. package/dist/nodeinfo/mod.js +2 -2
  77. package/dist/nodeinfo/semver.test.js +3 -3
  78. package/dist/nodeinfo/types.test.js +3 -3
  79. package/dist/{owner-BYxDl2qi.d.cts → owner-6KSEp9eV.d.cts} +2 -2
  80. package/dist/{owner-DOUl7e-t.d.ts → owner-BbeUDvOu.d.ts} +2 -2
  81. package/dist/{owner-BnmJOCds.js → owner-Ch2ApIpq.js} +2 -2
  82. package/dist/{proof-QLd9LtLS.cjs → proof-BtqGVz24.cjs} +3 -3
  83. package/dist/{proof-4d4UTrId.js → proof-Cge6SysA.js} +3 -3
  84. package/dist/{proof-DRGe3kWw.js → proof-DaD7vIAi.js} +2 -2
  85. package/dist/runtime/authdocloader.test.js +9 -9
  86. package/dist/runtime/docloader.test.js +4 -4
  87. package/dist/runtime/key.test.js +5 -5
  88. package/dist/runtime/langstr.test.js +3 -3
  89. package/dist/runtime/link.test.js +3 -3
  90. package/dist/runtime/mod.cjs +6 -6
  91. package/dist/runtime/mod.d.cts +3 -3
  92. package/dist/runtime/mod.d.ts +3 -3
  93. package/dist/runtime/mod.js +6 -6
  94. package/dist/runtime/multibase/multibase.test.js +3 -3
  95. package/dist/runtime/url.test.js +3 -3
  96. package/dist/{send-VTF45d0K.js → send-DE79ptpc.js} +2 -2
  97. package/dist/sig/http.test.js +8 -8
  98. package/dist/sig/key.test.js +6 -6
  99. package/dist/sig/ld.test.js +7 -7
  100. package/dist/sig/mod.cjs +6 -6
  101. package/dist/sig/mod.d.cts +5 -5
  102. package/dist/sig/mod.d.ts +5 -5
  103. package/dist/sig/mod.js +6 -6
  104. package/dist/sig/owner.test.js +7 -7
  105. package/dist/sig/proof.test.js +7 -7
  106. package/dist/testing/docloader.test.js +3 -3
  107. package/dist/testing/mod.d.ts +341 -379
  108. package/dist/testing/mod.js +3 -3
  109. package/dist/{testing-DtlapwX9.js → testing-Bh2wmeXp.js} +2 -2
  110. package/dist/{type-BK1maiHl.js → type-Du-WE8NC.js} +6297 -3074
  111. package/dist/{types-B11Jr68m.cjs → types-B1n1v8Fa.cjs} +1 -1
  112. package/dist/{types-ChXkDqkb.js → types-ChEbJU3f.js} +1 -1
  113. package/dist/vocab/actor.test.js +5 -5
  114. package/dist/vocab/lookup.test.js +255 -5
  115. package/dist/vocab/mod.cjs +4 -4
  116. package/dist/vocab/mod.d.cts +3 -3
  117. package/dist/vocab/mod.d.ts +3 -3
  118. package/dist/vocab/mod.js +4 -4
  119. package/dist/vocab/type.test.js +3 -3
  120. package/dist/vocab/vocab.test.js +395 -8
  121. package/dist/{vocab-BW6SWH9P.d.ts → vocab-CDHNj5zp.d.ts} +158 -497
  122. package/dist/{vocab-qpRpljdS.d.cts → vocab-Cfs0937i.d.cts} +158 -497
  123. package/dist/{vocab-C2kef9JD.cjs → vocab-DY3aCxLN.cjs} +23 -14
  124. package/dist/{vocab-B7TUfvy2.js → vocab-Q8XBm9oV.js} +23 -14
  125. package/dist/webfinger/handler.test.js +16 -16
  126. package/dist/webfinger/lookup.test.js +4 -4
  127. package/dist/webfinger/mod.cjs +2 -2
  128. package/dist/webfinger/mod.js +2 -2
  129. package/dist/x/cfworkers.test.js +3 -3
  130. package/dist/x/hono.d.cts +6 -6
  131. package/dist/x/hono.d.ts +6 -6
  132. package/dist/x/sveltekit.d.cts +6 -6
  133. package/dist/x/sveltekit.d.ts +6 -6
  134. package/package.json +1 -1
  135. package/dist/key-DtzwU8SC.cjs +0 -10
  136. package/dist/middleware-CunKD_hx.js +0 -17
  137. package/dist/middleware-DpW8xh9z.cjs +0 -17
  138. package/dist/middleware-umMExV_X.js +0 -26
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
3
3
  import { KvKey, KvStore } from "./kv-C7sopW2E.js";
4
4
  import { AuthenticatedDocumentLoaderFactory, DocumentLoader, DocumentLoaderFactory, GetUserAgentOptions } from "./docloader-CxWcuWqQ.js";
5
5
  import { GetNodeInfoOptions, JsonValue, NodeInfo } from "./client-DF8anIB5.js";
6
- import { Activity, Collection, CryptographicKey, Hashtag, Link, Multikey, Object as Object$1 } from "./vocab-BW6SWH9P.js";
7
- import { Actor, Recipient } from "./actor-sT_gcgkl.js";
8
- import { HttpMessageSignaturesSpec } from "./http-BGqh2jzk.js";
9
- import { GetKeyOwnerOptions } from "./owner-DOUl7e-t.js";
10
- import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-CnEwcmyF.js";
6
+ import { Activity, Collection, CryptographicKey, Hashtag, Link, Multikey, Object as Object$1 } from "./vocab-CDHNj5zp.js";
7
+ import { Actor, Recipient } from "./actor-C1Euqngb.js";
8
+ import { HttpMessageSignaturesSpec } from "./http-wsGR6KkT.js";
9
+ import { GetKeyOwnerOptions } from "./owner-BbeUDvOu.js";
10
+ import { LookupObjectOptions, TraverseCollectionOptions } from "./mod-CDObsV1d.js";
11
11
  import { Link as Link$1, LookupWebFingerOptions, ResourceDescriptor } from "./mod-DBzN0aCM.js";
12
12
  import { MessageQueue } from "./mq-CRGm1e_F.js";
13
13
  import { Span, TracerProvider } from "@opentelemetry/api";
@@ -283,7 +283,7 @@ type ObjectAuthorizePredicate<TContextData, TParam extends string> = (context: R
283
283
  * the entire collection without pagination.
284
284
  * @since 1.8.0
285
285
  */
286
- type CustomCollectionDispatcher<TItem, TParams extends Record<string, string>, TContext extends Context<TContextData>, TContextData> = (context: TContext, values: TParams, cursor: string | null) => PageItems<TItem> | null | Promise<PageItems<TItem> | null>;
286
+ 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
287
  /**
288
288
  * A callback that counts the number of items in a custom collection.
289
289
  *
@@ -293,7 +293,7 @@ type CustomCollectionDispatcher<TItem, TParams extends Record<string, string>, T
293
293
  * @param values The parameters of the requested URL.
294
294
  * @since 1.8.0
295
295
  */
296
- type CustomCollectionCounter<TParams extends Record<string, string>, TContextData> = (context: RequestContext<TContextData>, values: TParams) => number | bigint | null | Promise<number | bigint | null>;
296
+ type CustomCollectionCounter<TParam extends string, TContextData> = (context: RequestContext<TContextData>, values: Record<TParam, string>) => number | bigint | null | Promise<number | bigint | null>;
297
297
  /**
298
298
  * A callback that returns a cursor for a custom collection.
299
299
  *
@@ -306,7 +306,7 @@ type CustomCollectionCounter<TParams extends Record<string, string>, TContextDat
306
306
  * @param values The parameters of the requested URL.
307
307
  * @since 1.8.0
308
308
  */
309
- type CustomCollectionCursor<TParams extends Record<string, string>, TContext extends Context<TContextData>, TContextData> = (context: TContext, values: TParams) => string | null | Promise<string | null>;
309
+ type CustomCollectionCursor<TParam extends string, TContext extends Context<TContextData>, TContextData> = (context: TContext, values: Record<TParam, string>) => string | null | Promise<string | null>;
310
310
  //#endregion
311
311
  //#region src/federation/handler.d.ts
312
312
 
@@ -704,7 +704,7 @@ interface Federatable<TContextData> {
704
704
  * @returns An object with methods to set other actor dispatcher callbacks.
705
705
  * @throws {RouterError} Thrown if the path pattern is invalid.
706
706
  */
707
- setActorDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: ActorDispatcher<TContextData>): ActorCallbackSetters<TContextData>;
707
+ setActorDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: ActorDispatcher<TContextData>): ActorCallbackSetters<TContextData>;
708
708
  /**
709
709
  * Registers an object dispatcher.
710
710
  *
@@ -718,9 +718,7 @@ interface Federatable<TContextData> {
718
718
  * must have one or more variables.
719
719
  * @param dispatcher An object dispatcher callback to register.
720
720
  */
721
- setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: (new (...args: any[]) => TObject) & {
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>;
721
+ 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
722
  /**
725
723
  * Registers an object dispatcher.
726
724
  *
@@ -734,9 +732,7 @@ interface Federatable<TContextData> {
734
732
  * must have one or more variables.
735
733
  * @param dispatcher An object dispatcher callback to register.
736
734
  */
737
- setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: (new (...args: any[]) => TObject) & {
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>;
735
+ 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
736
  /**
741
737
  * Registers an object dispatcher.
742
738
  *
@@ -750,9 +746,7 @@ interface Federatable<TContextData> {
750
746
  * must have one or more variables.
751
747
  * @param dispatcher An object dispatcher callback to register.
752
748
  */
753
- setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: (new (...args: any[]) => TObject) & {
754
- typeId: URL;
755
- }, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
749
+ 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
750
  /**
757
751
  * Registers an object dispatcher.
758
752
  *
@@ -766,9 +760,7 @@ interface Federatable<TContextData> {
766
760
  * must have one or more variables.
767
761
  * @param dispatcher An object dispatcher callback to register.
768
762
  */
769
- setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: (new (...args: any[]) => TObject) & {
770
- typeId: URL;
771
- }, path: `${string}{${TParam}}${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
763
+ 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
764
  /**
773
765
  * Registers an object dispatcher.
774
766
  *
@@ -782,9 +774,7 @@ interface Federatable<TContextData> {
782
774
  * must have one or more variables.
783
775
  * @param dispatcher An object dispatcher callback to register.
784
776
  */
785
- setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: (new (...args: any[]) => TObject) & {
786
- typeId: URL;
787
- }, path: `${string}{${TParam}}${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
777
+ 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
778
  /**
789
779
  * Registers an object dispatcher.
790
780
  *
@@ -798,9 +788,7 @@ interface Federatable<TContextData> {
798
788
  * must have one or more variables.
799
789
  * @param dispatcher An object dispatcher callback to register.
800
790
  */
801
- setObjectDispatcher<TObject extends Object$1, TParam extends string>(cls: (new (...args: any[]) => TObject) & {
802
- typeId: URL;
803
- }, path: `${string}{${TParam}}${string}`, dispatcher: ObjectDispatcher<TContextData, TObject, TParam>): ObjectCallbackSetters<TContextData, TObject, TParam>;
791
+ 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
792
  /**
805
793
  * Registers an inbox dispatcher.
806
794
  *
@@ -812,7 +800,7 @@ interface Federatable<TContextData> {
812
800
  * @param dispatcher An inbox dispatcher callback to register.
813
801
  * @throws {@link RouterError} Thrown if the path pattern is invalid.
814
802
  */
815
- setInboxDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
803
+ setInboxDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
816
804
  /**
817
805
  * Registers an outbox dispatcher.
818
806
  *
@@ -836,7 +824,7 @@ interface Federatable<TContextData> {
836
824
  * @param dispatcher An outbox dispatcher callback to register.
837
825
  * @throws {@link RouterError} Thrown if the path pattern is invalid.
838
826
  */
839
- setOutboxDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
827
+ setOutboxDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
840
828
  /**
841
829
  * Registers a following collection dispatcher.
842
830
  * @param path The URI path pattern for the following collection. The syntax
@@ -848,7 +836,7 @@ interface Federatable<TContextData> {
848
836
  * callbacks.
849
837
  * @throws {RouterError} Thrown if the path pattern is invalid.
850
838
  */
851
- setFollowingDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Actor | URL, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
839
+ setFollowingDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Actor | URL, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
852
840
  /**
853
841
  * Registers a followers collection dispatcher.
854
842
  * @param path The URI path pattern for the followers collection. The syntax
@@ -860,7 +848,7 @@ interface Federatable<TContextData> {
860
848
  * callbacks.
861
849
  * @throws {@link RouterError} Thrown if the path pattern is invalid.
862
850
  */
863
- setFollowersDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Recipient, Context<TContextData>, TContextData, URL>): CollectionCallbackSetters<Context<TContextData>, TContextData, URL>;
851
+ setFollowersDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Recipient, Context<TContextData>, TContextData, URL>): CollectionCallbackSetters<Context<TContextData>, TContextData, URL>;
864
852
  /**
865
853
  * Registers a liked collection dispatcher.
866
854
  * @param path The URI path pattern for the liked collection. The syntax
@@ -872,7 +860,7 @@ interface Federatable<TContextData> {
872
860
  * callbacks.
873
861
  * @throws {@link RouterError} Thrown if the path pattern is invalid.
874
862
  */
875
- setLikedDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Object$1 | URL, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
863
+ 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
864
  /**
877
865
  * Registers a featured collection dispatcher.
878
866
  * @param path The URI path pattern for the featured collection. The syntax
@@ -884,7 +872,7 @@ interface Federatable<TContextData> {
884
872
  * callbacks.
885
873
  * @throws {@link RouterError} Thrown if the path pattern is invalid.
886
874
  */
887
- setFeaturedDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Object$1, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
875
+ setFeaturedDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Object$1, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
888
876
  /**
889
877
  * Registers a featured tags collection dispatcher.
890
878
  * @param path The URI path pattern for the featured tags collection.
@@ -896,7 +884,7 @@ interface Federatable<TContextData> {
896
884
  * callbacks.
897
885
  * @throws {@link RouterError} Thrown if the path pattern is invalid.
898
886
  */
899
- setFeaturedTagsDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Hashtag, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
887
+ setFeaturedTagsDispatcher(path: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, dispatcher: CollectionDispatcher<Hashtag, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
900
888
  /**
901
889
  * Assigns the URL path for the inbox and starts setting inbox listeners.
902
890
  *
@@ -926,7 +914,7 @@ interface Federatable<TContextData> {
926
914
  * @returns An object to register inbox listeners.
927
915
  * @throws {RouteError} Thrown if the path pattern is invalid.
928
916
  */
929
- setInboxListeners(inboxPath: `${string}{identifier}${string}` | `${string}{handle}${string}`, sharedInboxPath?: string): InboxListenerSetters<TContextData>;
917
+ setInboxListeners(inboxPath: `${string}${Rfc6570Expression<"identifier">}${string}` | `${string}${Rfc6570Expression<"handle">}${string}`, sharedInboxPath?: string): InboxListenerSetters<TContextData>;
930
918
  /**
931
919
  * Registers a collection of objects dispatcher.
932
920
  *
@@ -941,7 +929,67 @@ interface Federatable<TContextData> {
941
929
  * The path must have one or more variables.
942
930
  * @param dispatcher A collection dispatcher callback to register.
943
931
  */
944
- setCollectionDispatcher<TObject extends Object$1, TParams extends Record<string, string>>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: ParamsKeyPath<TParams>, dispatcher: CustomCollectionDispatcher<TObject, TParams, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParams, RequestContext<TContextData>, TContextData>;
932
+ 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>;
933
+ /**
934
+ * Registers a collection of objects dispatcher.
935
+ *
936
+ * @template TContextData The context data to pass to the {@link Context}.
937
+ * @template TObject The type of objects to dispatch.
938
+ * @template TParam The parameter names of the requested URL.
939
+ * @param name A unique name for the collection dispatcher.
940
+ * @param itemType The Activity Vocabulary class of the object to dispatch.
941
+ * @param path The URI path pattern for the collection dispatcher.
942
+ * The syntax is based on URI Template
943
+ * ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
944
+ * The path must have one or more variables.
945
+ * @param dispatcher A collection dispatcher callback to register.
946
+ */
947
+ 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>;
948
+ /**
949
+ * Registers a collection of objects dispatcher.
950
+ *
951
+ * @template TContextData The context data to pass to the {@link Context}.
952
+ * @template TObject The type of objects to dispatch.
953
+ * @template TParam The parameter names of the requested URL.
954
+ * @param name A unique name for the collection dispatcher.
955
+ * @param itemType The Activity Vocabulary class of the object to dispatch.
956
+ * @param path The URI path pattern for the collection dispatcher.
957
+ * The syntax is based on URI Template
958
+ * ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
959
+ * The path must have one or more variables.
960
+ * @param dispatcher A collection dispatcher callback to register.
961
+ */
962
+ 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>;
963
+ /**
964
+ * Registers an ordered collection of objects dispatcher.
965
+ *
966
+ * @template TContextData The context data to pass to the {@link Context}.
967
+ * @template TObject The type of objects to dispatch.
968
+ * @template TParam The parameter names of the requested URL.
969
+ * @param name A unique name for the collection dispatcher.
970
+ * @param itemType The Activity Vocabulary class of the object to dispatch.
971
+ * @param path The URI path pattern for the collection dispatcher.
972
+ * The syntax is based on URI Template
973
+ * ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
974
+ * The path must have one or more variables.
975
+ * @param dispatcher A collection dispatcher callback to register.
976
+ */
977
+ 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>;
978
+ /**
979
+ * Registers an ordered collection of objects dispatcher.
980
+ *
981
+ * @template TContextData The context data to pass to the {@link Context}.
982
+ * @template TObject The type of objects to dispatch.
983
+ * @template TParam The parameter names of the requested URL.
984
+ * @param name A unique name for the collection dispatcher.
985
+ * @param itemType The Activity Vocabulary class of the object to dispatch.
986
+ * @param path The URI path pattern for the collection dispatcher.
987
+ * The syntax is based on URI Template
988
+ * ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
989
+ * The path must have one or more variables.
990
+ * @param dispatcher A collection dispatcher callback to register.
991
+ */
992
+ 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
993
  /**
946
994
  * Registers an ordered collection of objects dispatcher.
947
995
  *
@@ -956,7 +1004,7 @@ interface Federatable<TContextData> {
956
1004
  * The path must have one or more variables.
957
1005
  * @param dispatcher A collection dispatcher callback to register.
958
1006
  */
959
- setOrderedCollectionDispatcher<TObject extends Object$1, TParams extends Record<string, string>>(name: string | symbol, itemType: ConstructorWithTypeId<TObject>, path: ParamsKeyPath<TParams>, dispatcher: CustomCollectionDispatcher<TObject, TParams, RequestContext<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParams, RequestContext<TContextData>, TContextData>;
1007
+ 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
1008
  }
961
1009
  /**
962
1010
  * An object that registers federation-related business logic and dispatches
@@ -1312,6 +1360,36 @@ interface CollectionCallbackSetters<TContext extends Context<TContextData>, TCon
1312
1360
  */
1313
1361
  authorize(predicate: AuthorizePredicate<TContextData>): CollectionCallbackSetters<TContext, TContextData, TFilter>;
1314
1362
  }
1363
+ /**
1364
+ * The strategy for handling activity idempotency in inbox processing.
1365
+ *
1366
+ * - `"global"`: Activities are deduplicated globally across all inboxes and
1367
+ * origins. The same activity ID will be processed only once, regardless
1368
+ * of which inbox receives it or which server sent it.
1369
+ *
1370
+ * - `"per-origin"`: Activities are deduplicated per receiving server's origin.
1371
+ * The same activity ID will be processed only once on each receiving server,
1372
+ * but can be processed separately on different receiving servers. This was
1373
+ * the default behavior in Fedify 1.x versions.
1374
+ *
1375
+ * - `"per-inbox"`: Activities are deduplicated per inbox. The same activity
1376
+ * ID can be processed once per inbox, allowing the same activity to be
1377
+ * delivered to multiple inboxes independently. This follows standard
1378
+ * ActivityPub behavior and will be the default in Fedify 2.0.
1379
+ *
1380
+ * @since 1.9.0
1381
+ */
1382
+ type IdempotencyStrategy = "global" | "per-origin" | "per-inbox";
1383
+ /**
1384
+ * A callback to generate a custom idempotency key for an activity.
1385
+ * Returns the cache key to use, or null to skip idempotency checking.
1386
+ * @template TContextData The context data to pass to the {@link InboxContext}.
1387
+ * @param ctx The inbox context.
1388
+ * @param activity The activity being processed.
1389
+ * @returns The idempotency key to use for caching, or null to skip caching.
1390
+ * @since 1.9.0
1391
+ */
1392
+ type IdempotencyKeyCallback<TContextData> = (ctx: InboxContext<TContextData>, activity: Activity) => string | null | Promise<string | null>;
1315
1393
  /**
1316
1394
  * Registry for inbox listeners for different activity types.
1317
1395
  */
@@ -1342,6 +1420,36 @@ interface InboxListenerSetters<TContextData> {
1342
1420
  * @since 0.11.0
1343
1421
  */
1344
1422
  setSharedKeyDispatcher(dispatcher: SharedInboxKeyDispatcher<TContextData>): InboxListenerSetters<TContextData>;
1423
+ /**
1424
+ * Configures the strategy for handling activity idempotency in inbox processing.
1425
+ *
1426
+ * @example
1427
+ * Use per-inbox strategy (standard ActivityPub behavior):
1428
+ * ```
1429
+ * federation
1430
+ * .setInboxListeners("/users/{identifier}/inbox", "/inbox")
1431
+ * .withIdempotency("per-inbox");
1432
+ * ```
1433
+ *
1434
+ * Use custom strategy:
1435
+ * ```
1436
+ * federation
1437
+ * .setInboxListeners("/users/{identifier}/inbox", "/inbox")
1438
+ * .withIdempotency((ctx, activity) => {
1439
+ * // Return null to skip idempotency
1440
+ * return `${ctx.origin}:${activity.id?.href}:${ctx.recipient}`;
1441
+ * });
1442
+ * ```
1443
+ *
1444
+ * @param strategy The idempotency strategy to use. Can be:
1445
+ * - `"global"`: Activities are deduplicated across all inboxes and origins
1446
+ * - `"per-origin"`: Activities are deduplicated per inbox origin
1447
+ * - `"per-inbox"`: Activities are deduplicated per inbox
1448
+ * - A custom callback function that returns the cache key to use
1449
+ * @returns The setters object so that settings can be chained.
1450
+ * @since 1.9.0
1451
+ */
1452
+ withIdempotency(strategy: IdempotencyStrategy | IdempotencyKeyCallback<TContextData>): InboxListenerSetters<TContextData>;
1345
1453
  }
1346
1454
  /**
1347
1455
  * Parameters of {@link Federation.fetch} method.
@@ -1380,38 +1488,38 @@ interface FederationFetchOptions<TContextData> {
1380
1488
  /**
1381
1489
  * Additional settings for a custom collection dispatcher.
1382
1490
  *
1383
- * @template TParams The type of the parameters in the URL path.
1491
+ * @template TParam The type of the parameters in the URL path.
1384
1492
  * @template TContext The type of the context. {@link Context} or
1385
1493
  * {@link RequestContext}.
1386
1494
  * @template TContextData The context data to pass to the {@link Context}.
1387
1495
  * @template TFilter The type of filter for the collection.
1388
1496
  */
1389
- interface CustomCollectionCallbackSetters<TParams extends Record<string, string>, TContext extends Context<TContextData>, TContextData> {
1497
+ interface CustomCollectionCallbackSetters<TParam extends string, TContext extends Context<TContextData>, TContextData> {
1390
1498
  /**
1391
1499
  * Sets the counter for the custom collection.
1392
1500
  * @param counter A callback that returns the number of items in the custom collection.
1393
1501
  * @returns The setters object so that settings can be chained.
1394
1502
  */
1395
- setCounter(counter: CustomCollectionCounter<TParams, TContextData>): CustomCollectionCallbackSetters<TParams, TContext, TContextData>;
1503
+ setCounter(counter: CustomCollectionCounter<TParam, TContextData>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>;
1396
1504
  /**
1397
1505
  * Sets the first cursor for the custom collection.
1398
1506
  * @param cursor The cursor for the first item in the custom collection.
1399
1507
  * @returns The setters object so that settings can be chained.
1400
1508
  */
1401
- setFirstCursor(cursor: CustomCollectionCursor<TParams, TContext, TContextData>): CustomCollectionCallbackSetters<TParams, TContext, TContextData>;
1509
+ setFirstCursor(cursor: CustomCollectionCursor<TParam, TContext, TContextData>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>;
1402
1510
  /**
1403
1511
  * Sets the last cursor for the custom collection.
1404
1512
  * @param cursor The cursor for the last item in the custom collection.
1405
1513
  * @returns The setters object so that settings can be chained.
1406
1514
  */
1407
- setLastCursor(cursor: CustomCollectionCursor<TParams, TContext, TContextData>): CustomCollectionCallbackSetters<TParams, TContext, TContextData>;
1515
+ setLastCursor(cursor: CustomCollectionCursor<TParam, TContext, TContextData>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>;
1408
1516
  /**
1409
1517
  * Specifies the conditions under which requests are authorized.
1410
1518
  * @param predicate A callback that returns whether a request is authorized.
1411
1519
  * @returns The setters object so that settings can be chained.
1412
1520
  * @since 0.7.0
1413
1521
  */
1414
- authorize(predicate: ObjectAuthorizePredicate<TContextData, string>): CustomCollectionCallbackSetters<TParams, TContext, TContextData>;
1522
+ authorize(predicate: ObjectAuthorizePredicate<TContextData, string>): CustomCollectionCallbackSetters<TParam, TContext, TContextData>;
1415
1523
  }
1416
1524
  /**
1417
1525
  * Represents an object with a type ID, which is either a constructor or an
@@ -1423,73 +1531,34 @@ type ConstructorWithTypeId<TObject extends Object$1> = (new (...args: any[]) =>
1423
1531
  typeId: URL;
1424
1532
  };
1425
1533
  /**
1426
- * Represents a path from the key of parameter objects.
1427
- * @param Params - A record of parameters where keys are parameter names and
1428
- * values are their string representations.
1429
- * @returns A string representing the path with all parameters.
1430
- * @example
1431
- * ```ts
1432
- * type UserPostPath = ParamsKeyPath<{ userId: string; postId: string }>;
1433
- * let userPostPath: UserPostPath;
1434
- * // userPostPath = "/posts/{postId}"; // invalid - does not contain `{userId}`
1435
- * // userPostPath = "/users/{userId}"; // invalid - does not contain `{postId}`
1436
- * userPostPath = "/users/{userId}/posts/{postId}"; // valid
1437
- * userPostPath = "/posts/{postId}/users/{userId}"; // valid
1438
- * ```
1439
- */
1440
- type ParamsKeyPath<Params extends Record<string, string>> = ParamsPath<Extract<keyof Params, string>> & string;
1441
- /**
1442
- * Represents a path with multiple parameters.
1443
- * All permutations of the parameters are included in the union type.
1444
- * The path must have all parameters in the form of `{paramName}`.
1445
- * @param Params - A union of parameter names.
1446
- * @returns A string representing the path with all parameters.
1447
- * @example
1448
- * ```ts
1449
- * type UserPostPath = ParamsPath<"userId" | "postId">;
1450
- * // = `${string}{userId}${string}` & `${string}{postId}${string}`
1451
- * // =
1452
- * // | `${string}{userId}${string}{postId}${string}`
1453
- * // | `${string}{postId}${string}{userId}${string}`
1454
- * let userPostPath: UserPostPath;
1455
- * userPostPath = "/users/posts"; // ❌ invalid
1456
- * userPostPath = "/users/{userId}"; // ❌ invalid
1457
- * userPostPath = "/posts/{postId}"; // ❌ invalid
1458
- * userPostPath = "/users/{userId}/posts/{postId}"; // ✅ valid
1459
- * userPostPath = "/posts/{postId}/users/{userId}"; // ✅ valid
1460
- */
1461
- type ParamsPath<Params extends string> = UnionToIntersection<ParamPath<Params>>;
1462
- /**
1463
- * Represents a path with a single parameter.
1464
- * The path must have at least one of the parameters in the form of `{paramName}`.
1465
- * @param Param - The name of the parameter.
1466
- * @returns A string representing the path with the parameter.
1467
- * @example
1468
- * ```ts
1469
- * type UserPostPath = ParamPath<"userId" | "postId">;
1470
- * // = `${string}{userId}${string}` | `${string}{postId}${string}`
1471
- * let userPostPath: UserPostPath;
1472
- * userPostPath = "/users/posts"; // ❌ invalid
1473
- * userPostPath = "/users/{userId}"; // ✅ valid
1474
- * userPostPath = "/posts/{postId}"; // ✅ valid
1475
- * userPostPath = "/users/{userId}/posts/{postId}"; // ✅ valid
1476
- * userPostPath = "/posts/{postId}/users/{userId}"; // ✅ valid
1477
- */
1478
- type ParamPath<Param extends string> = `${string}{${Param}}${string}`;
1479
- /**
1480
- * Converts union types to intersection types.
1534
+ * Defines a union of all valid RFC 6570 URI Template expressions for a given
1535
+ * parameter name.
1481
1536
  *
1482
- * @template U - The union type to convert.
1483
- * @returns The intersection type of the union.
1537
+ * RFC 6570 specifies a syntax for URI templates, allowing for variable
1538
+ * expansion. This type captures all Level 1-4 operator expressions for a
1539
+ * single, named variable.
1540
+ *
1541
+ * The supported expression types are:
1542
+ * - `{Param}`: Simple string expansion
1543
+ * - `+{Param}`: Reserved string expansion
1544
+ * - `#{Param}`: Fragment expansion
1545
+ * - `{.Param}`: Label expansion with a dot-prefix
1546
+ * - `{/Param}`: Path segment expansion
1547
+ * - `{;Param}`: Path-style parameter expansion
1548
+ * - `{?Param}`: Query component expansion
1549
+ * - `{&Param}`: Query continuation expansion
1550
+ *
1551
+ * @template Param The name of the parameter to be used in the expressions.
1484
1552
  * @example
1485
1553
  * ```ts
1486
- * type A = { a: string };
1487
- * type B = { b: number };
1488
- * type AorB = A | B;
1489
- * type AandB = UnionToIntersection<AorB>;
1490
- * // AandB = { a: string; b: number }
1554
+ * type UserIdExpression = Rfc6570Expression<"userId">;
1555
+ *
1556
+ * // The variable `userPath` can be assigned any of the valid expressions.
1557
+ * const userPath: UserIdExpression = "{/userId}";
1558
+ * ```
1559
+ * @see {@link https://tools.ietf.org/html/rfc6570} for the full specification.
1491
1560
  */
1492
- type UnionToIntersection<U> = (U extends unknown ? (x: U) => void : never) extends ((x: infer I) => void) ? I : never;
1561
+ type Rfc6570Expression<Param extends string> = `{${Param}}` | `{+${Param}}` | `{#${Param}}` | `{.${Param}}` | `{/${Param}}` | `{;${Param}}` | `{?${Param}}` | `{&${Param}}`;
1493
1562
  //#endregion
1494
1563
  //#region src/federation/context.d.ts
1495
1564
  /**
@@ -1578,9 +1647,7 @@ interface Context<TContextData> {
1578
1647
  * @throws {TypeError} If values are invalid.
1579
1648
  * @since 0.7.0
1580
1649
  */
1581
- getObjectUri<TObject extends Object$1>(cls: (new (...args: any[]) => TObject) & {
1582
- typeId: URL;
1583
- }, values: Record<string, string>): URL;
1650
+ getObjectUri<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>): URL;
1584
1651
  /**
1585
1652
  * Builds the URI of an actor's outbox with the given identifier.
1586
1653
  * @param identifier The actor's identifier.
@@ -1894,9 +1961,7 @@ interface RequestContext<TContextData> extends Context<TContextData> {
1894
1961
  * @throws {TypeError} If values are invalid.
1895
1962
  * @since 0.7.0
1896
1963
  */
1897
- getObject<TObject extends Object$1>(cls: (new (...args: any[]) => TObject) & {
1898
- typeId: URL;
1899
- }, values: Record<string, string>): Promise<TObject | null>;
1964
+ getObject<TObject extends Object$1>(cls: ConstructorWithTypeId<TObject>, values: Record<string, string>): Promise<TObject | null>;
1900
1965
  /**
1901
1966
  * Gets the public key of the sender, if any exists and it is verified.
1902
1967
  * Otherwise, `null` is returned.
@@ -2040,9 +2105,7 @@ type ParseUriResult =
2040
2105
  * The case of an object URI.
2041
2106
  */ | {
2042
2107
  readonly type: "object";
2043
- readonly class: (new (...args: any[]) => Object$1) & {
2044
- typeId: URL;
2045
- };
2108
+ readonly class: ConstructorWithTypeId<Object$1>;
2046
2109
  readonly typeId: URL;
2047
2110
  readonly values: Record<string, string>;
2048
2111
  }
@@ -2260,4 +2323,4 @@ interface ActorKeyPair extends CryptoKeyPair {
2260
2323
  multikey: Multikey;
2261
2324
  }
2262
2325
  //#endregion
2263
- 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, ParamsKeyPath, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };
2326
+ 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, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable };