@fedify/fedify 1.8.14-pr.470.1832 → 1.8.14-pr.470.1835

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 (100) hide show
  1. package/dist/{actor-CQun2LMl.js → actor-7YV266f1.js} +179 -179
  2. package/dist/{actor-WPWqtDNJ.d.ts → actor-Uh1YDuVl.d.ts} +1 -1
  3. package/dist/{actor-9s3WvbFp.js → actor-kNsYanj6.js} +1 -1
  4. package/dist/{authdocloader-Bqmp0UcQ.js → authdocloader-BNL0PCsp.js} +3 -3
  5. package/dist/{authdocloader-BgYRnN3Q.js → authdocloader-Dw6isGiN.js} +3 -3
  6. package/dist/{builder-KRZXPPWM.js → builder-13BL2y25.js} +4 -4
  7. package/dist/{client-DhSHvGlU.js → client-Q-sLUxCh.js} +1 -1
  8. package/dist/compat/mod.d.ts +9 -9
  9. package/dist/compat/transformers.test.js +16 -16
  10. package/dist/{context-BVXh6U8x.d.ts → context-CnveeHUR.d.ts} +25 -29
  11. package/dist/{docloader-B3-PAoGx.js → docloader-DcTzXQ35.js} +1 -1
  12. package/dist/{esm-D4Y3V3TX.js → esm-CkS75k2_.js} +1 -1
  13. package/dist/federation/builder.test.js +5 -5
  14. package/dist/federation/collection.test.js +3 -3
  15. package/dist/federation/handler.test.js +17 -17
  16. package/dist/federation/inbox.test.js +4 -4
  17. package/dist/federation/keycache.test.js +4 -4
  18. package/dist/federation/kv.test.js +3 -3
  19. package/dist/federation/middleware.test.js +18 -18
  20. package/dist/federation/mod.d.ts +8 -8
  21. package/dist/federation/mod.js +10 -10
  22. package/dist/federation/mq.test.js +3 -3
  23. package/dist/federation/retry.test.js +3 -3
  24. package/dist/federation/router.test.js +3 -3
  25. package/dist/federation/send.test.js +10 -10
  26. package/dist/{http-BqfZ3DiV.js → http-BdNu0ORR.js} +2 -2
  27. package/dist/{http-e1180cSn.d.ts → http-DtG44GdM.d.ts} +1 -1
  28. package/dist/{http-Clle8OhQ.js → http-W5kSmT8n.js} +3 -3
  29. package/dist/{inbox-pY_0KiG-.js → inbox-C4wSr224.js} +1 -1
  30. package/dist/{key-DPDQaDw5.js → key-BXSJt4So.js} +3 -3
  31. package/dist/{key-Zp-T0bhP.js → key-BjSxApvl.js} +2 -2
  32. package/dist/{key-toTNLBm1.js → key-lj-EeFGh.js} +2 -2
  33. package/dist/{key-2kt7ohj3.js → key-peWlmKje.js} +4 -4
  34. package/dist/{keycache-B9bzg6VQ.js → keycache-Bz6XnJHB.js} +1 -1
  35. package/dist/{keys-4zM5Up9R.js → keys-7k1jnaW7.js} +1 -1
  36. package/dist/{ld-CPeQLxZy.js → ld-7F3GAVgl.js} +2 -2
  37. package/dist/{lookup-gy112MkU.js → lookup-B5J-YtGW.js} +1 -1
  38. package/dist/{lookup-Akl5ucko.js → lookup-DEx2HD7Z.js} +1 -1
  39. package/dist/{middleware-CKOUGNAC.js → middleware-B9paI-O7.js} +13 -13
  40. package/dist/middleware-BiYBkcnD.js +17 -0
  41. package/dist/{middleware-CSft86O_.js → middleware-DZcMt7tI.js} +10 -10
  42. package/dist/middleware-VaUw2tA0.js +26 -0
  43. package/dist/{mod-BCP9zDgV.d.ts → mod-DPpunL8j.d.ts} +2 -2
  44. package/dist/{mod-BZ1k6aCD.d.ts → mod-cz-tNIqP.d.ts} +86 -86
  45. package/dist/{mod-DEZNLUj-.d.ts → mod-mSMqo9JU.d.ts} +1 -1
  46. package/dist/{mod-ltCoOz0H.d.ts → mod-tQVUxQ_D.d.ts} +2 -2
  47. package/dist/mod.d.ts +11 -11
  48. package/dist/mod.js +10 -10
  49. package/dist/nodeinfo/client.test.js +5 -5
  50. package/dist/nodeinfo/handler.test.js +16 -16
  51. package/dist/nodeinfo/mod.d.ts +1 -1
  52. package/dist/nodeinfo/mod.js +2 -2
  53. package/dist/nodeinfo/semver.test.js +3 -3
  54. package/dist/nodeinfo/types.test.js +3 -3
  55. package/dist/{owner-CB8DneNI.d.ts → owner-C12klfeG.d.ts} +2 -2
  56. package/dist/{owner-D0hzHvfW.js → owner-D0gMOw5k.js} +2 -2
  57. package/dist/{proof-seBFgbXH.js → proof-2jcii9qJ.js} +2 -2
  58. package/dist/{proof-DQsTTtYV.js → proof-CepXPgtj.js} +3 -3
  59. package/dist/runtime/authdocloader.test.js +9 -9
  60. package/dist/runtime/docloader.test.js +4 -4
  61. package/dist/runtime/key.test.js +5 -5
  62. package/dist/runtime/langstr.test.js +3 -3
  63. package/dist/runtime/mod.d.ts +3 -3
  64. package/dist/runtime/mod.js +6 -6
  65. package/dist/runtime/multibase/multibase.test.js +3 -3
  66. package/dist/runtime/url.test.js +3 -3
  67. package/dist/{send-D59NCngn.js → send-CR0gkB-m.js} +2 -2
  68. package/dist/sig/http.test.js +8 -8
  69. package/dist/sig/key.test.js +6 -6
  70. package/dist/sig/ld.test.js +7 -7
  71. package/dist/sig/mod.d.ts +5 -5
  72. package/dist/sig/mod.js +6 -6
  73. package/dist/sig/owner.test.js +7 -7
  74. package/dist/sig/proof.test.js +7 -7
  75. package/dist/testing/docloader.test.js +3 -3
  76. package/dist/testing/mod.d.ts +345 -349
  77. package/dist/testing/mod.js +3 -3
  78. package/dist/{testing-kXBTYzVX.js → testing-CtJY-KPr.js} +2 -2
  79. package/dist/{type-wUeR1KOP.js → type-geidmXZc.js} +178 -178
  80. package/dist/{types-DsANHy_R.js → types-HMuM33tm.js} +1 -1
  81. package/dist/vocab/actor.test.js +5 -5
  82. package/dist/vocab/lookup.test.js +4 -4
  83. package/dist/vocab/mod.d.ts +3 -3
  84. package/dist/vocab/mod.js +4 -4
  85. package/dist/vocab/type.test.js +3 -3
  86. package/dist/vocab/vocab.test.js +4 -4
  87. package/dist/{vocab-MJte5oO1.js → vocab-z0q3f-S2.js} +3 -3
  88. package/dist/webfinger/handler.test.js +16 -16
  89. package/dist/webfinger/lookup.test.js +4 -4
  90. package/dist/webfinger/mod.js +2 -2
  91. package/dist/x/cfworkers.d.ts +1 -1
  92. package/dist/x/cfworkers.test.js +3 -3
  93. package/dist/x/hono.d.ts +8 -8
  94. package/dist/x/sveltekit.d.ts +8 -8
  95. package/package.json +1 -1
  96. package/dist/middleware-BBSyhnc7.js +0 -17
  97. package/dist/middleware-D0tzF2Wo.js +0 -26
  98. /package/dist/{client-BsnHpE32.d.ts → client-DF8anIB5.d.ts} +0 -0
  99. /package/dist/{mq-D5smmAMS.d.ts → mq-CRGm1e_F.d.ts} +0 -0
  100. /package/dist/{vocab-BzWpjxBs.d.ts → vocab-Ukxjz3TM.d.ts} +0 -0
@@ -71,6 +71,211 @@ interface GetUserAgentOptions {
71
71
  * @since 1.3.0
72
72
  */
73
73
  //#endregion
74
+ //#region src/nodeinfo/semver.d.ts
75
+ /**
76
+ * A SemVer object parsed into its constituent parts.
77
+ * @since 1.2.0
78
+ */
79
+ interface SemVer {
80
+ /** The major version */
81
+ major: number;
82
+ /** The minor version */
83
+ minor: number;
84
+ /** The patch version */
85
+ patch: number;
86
+ /**
87
+ * The prerelease version
88
+ *
89
+ * @default {[]}
90
+ */
91
+ prerelease?: (string | number)[];
92
+ /**
93
+ * The build metadata
94
+ *
95
+ * @default {[]}
96
+ */
97
+ build?: string[];
98
+ }
99
+ //#endregion
100
+ //#region src/nodeinfo/types.d.ts
101
+ /**
102
+ * The type of the result of parsing JSON.
103
+ */
104
+ type JsonValue = {
105
+ [key: string]: JsonValue | undefined;
106
+ } | JsonValue[] | string | number | boolean | null;
107
+ /**
108
+ * A NodeInfo object as defined in the NodeInfo 2.1 schema.
109
+ */
110
+ interface NodeInfo {
111
+ /**
112
+ * Metadata about server software in use.
113
+ */
114
+ software: Software;
115
+ /**
116
+ * The protocols supported on this server. At least one protocol must be
117
+ * supported.
118
+ */
119
+ protocols: Protocol[];
120
+ /**
121
+ * The third party sites this server can connect to via their application API.
122
+ */
123
+ services?: Services;
124
+ /**
125
+ * Whether this server allows open self-registration. Defaults to `false`.
126
+ */
127
+ openRegistrations?: boolean;
128
+ /**
129
+ * Usage statistics for this server.
130
+ */
131
+ usage: Usage;
132
+ /**
133
+ * Free form key value pairs for software specific values.
134
+ * Clients should not rely on any specific key present.
135
+ */
136
+ metadata?: Record<string, JsonValue>;
137
+ }
138
+ /**
139
+ * Metadata about server software in use.
140
+ */
141
+ interface Software {
142
+ /**
143
+ * The canonical name of this server software. This must comply with
144
+ * pattern `/^[a-z0-9-]+$/`.
145
+ */
146
+ name: string;
147
+ /**
148
+ * The version of this server software.
149
+ * @see {@link parseSemVer}
150
+ */
151
+ version: SemVer;
152
+ /**
153
+ * The URL of the source code repository of this server software.
154
+ */
155
+ repository?: URL;
156
+ /**
157
+ * The URL of the homepage of this server software.
158
+ */
159
+ homepage?: URL;
160
+ }
161
+ /**
162
+ * The protocols supported on this server.
163
+ */
164
+ type Protocol = "activitypub" | "buddycloud" | "dfrn" | "diaspora" | "libertree" | "ostatus" | "pumpio" | "tent" | "xmpp" | "zot";
165
+ /**
166
+ * The third party sites this server can connect to via their application API.
167
+ */
168
+ interface Services {
169
+ /**
170
+ * The third party sites this server can retrieve messages from for combined
171
+ * display with regular traffic.
172
+ */
173
+ inbound?: InboundService[];
174
+ /**
175
+ * The third party sites this server can publish messages to on the behalf
176
+ * of a user.
177
+ */
178
+ outbound?: OutboundService[];
179
+ }
180
+ /**
181
+ * The third party sites this server can retrieve messages from for combined
182
+ * display with regular traffic.
183
+ */
184
+ type InboundService = "atom1.0" | "gnusocial" | "imap" | "pnut" | "pop3" | "pumpio" | "rss2.0" | "twitter";
185
+ /**
186
+ * The third party sites this server can publish messages to on the behalf
187
+ * of a user.
188
+ */
189
+ type OutboundService = "atom1.0" | "blogger" | "buddycloud" | "diaspora" | "dreamwidth" | "drupal" | "facebook" | "friendica" | "gnusocial" | "google" | "insanejournal" | "libertree" | "linkedin" | "livejournal" | "mediagoblin" | "myspace" | "pinterest" | "pnut" | "posterous" | "pumpio" | "redmatrix" | "rss2.0" | "smtp" | "tent" | "tumblr" | "twitter" | "wordpress" | "xmpp";
190
+ /**
191
+ * Usage statistics for this server.
192
+ */
193
+ interface Usage {
194
+ /**
195
+ * Statistics about the users of this server.
196
+ */
197
+ users: {
198
+ /**
199
+ * The total amount of on this server registered users. This number
200
+ * has to be an integer greater than or equal to zero.
201
+ */
202
+ total?: number;
203
+ /**
204
+ * The amount of users that signed in at least once in the last 180 days.
205
+ * This number has to be an integer greater than or equal to zero.
206
+ */
207
+ activeHalfyear?: number;
208
+ /**
209
+ * The amount of users that signed in at least once in the last 30 days.
210
+ * This number has to be an integer greater than or equal to zero.
211
+ */
212
+ activeMonth?: number;
213
+ };
214
+ /**
215
+ * The amount of posts that were made by users that are registered on this
216
+ * server. This number has to be an integer greater than or equal to zero.
217
+ */
218
+ localPosts: number;
219
+ /**
220
+ * The amount of comments that were made by users that are registered on this
221
+ * server. This number has to be an integer greater than or equal to zero.
222
+ */
223
+ localComments: number;
224
+ }
225
+ /**
226
+ * Converts a {@link NodeInfo} object to a JSON value.
227
+ * @param nodeInfo The {@link NodeInfo} object to convert.
228
+ * @returns The JSON value that complies with the NodeInfo schema.
229
+ * @throws {TypeError} If the {@link NodeInfo} object is invalid.
230
+ */
231
+ //#endregion
232
+ //#region src/nodeinfo/client.d.ts
233
+ /**
234
+ * Options for {@link getNodeInfo} function.
235
+ * @since 1.2.0
236
+ */
237
+ interface GetNodeInfoOptions {
238
+ /**
239
+ * Whether to directly fetch the NodeInfo document from the given URL.
240
+ * Otherwise, the NodeInfo document will be fetched from the `.well-known`
241
+ * location of the given URL.
242
+ *
243
+ * Turned off by default.
244
+ */
245
+ direct?: boolean;
246
+ /**
247
+ * How strictly to parse the NodeInfo document.
248
+ *
249
+ * - `"strict"`: Parse the NodeInfo document strictly. If the document is
250
+ * invalid, `undefined` is returned. This is the default.
251
+ * - `"best-effort"`: Try to parse the NodeInfo document even if it is
252
+ * invalid.
253
+ * - `"none"`: Do not parse the NodeInfo document. The function will return
254
+ * the raw JSON value.
255
+ */
256
+ parse?: "strict" | "best-effort" | "none";
257
+ /**
258
+ * The options for making `User-Agent` header.
259
+ * If a string is given, it is used as the `User-Agent` header value.
260
+ * If an object is given, it is passed to {@link getUserAgent} to generate
261
+ * the `User-Agent` header value.
262
+ * @since 1.3.0
263
+ */
264
+ userAgent?: GetUserAgentOptions | string;
265
+ }
266
+ /**
267
+ * Fetches a NodeInfo document from the given URL.
268
+ * @param url The base URL of the server. If `options.direct` is turned off
269
+ * (default), the NodeInfo document will be fetched from
270
+ * the `.well-known` location of this URL (hence the only origin
271
+ * of the URL is used). If `options.direct` is turned on,
272
+ * the NodeInfo document will be fetched from the given URL.
273
+ * @param options Options for fetching the NodeInfo document.
274
+ * @returns The NodeInfo document if it could be fetched successfully.
275
+ * Otherwise, `undefined` is returned.
276
+ * @since 1.2.0
277
+ */
278
+ //#endregion
74
279
  //#region src/runtime/langstr.d.ts
75
280
  /**
76
281
  * A language-tagged string which corresponds to the `rdf:langString` type.
@@ -6400,165 +6605,39 @@ interface Recipient {
6400
6605
  } | null;
6401
6606
  }
6402
6607
  //#endregion
6403
- //#region src/nodeinfo/semver.d.ts
6608
+ //#region src/sig/owner.d.ts
6404
6609
  /**
6405
- * A SemVer object parsed into its constituent parts.
6406
- * @since 1.2.0
6610
+ * Options for {@link getKeyOwner}.
6611
+ * @since 0.8.0
6407
6612
  */
6408
- interface SemVer {
6409
- /** The major version */
6410
- major: number;
6411
- /** The minor version */
6412
- minor: number;
6413
- /** The patch version */
6414
- patch: number;
6613
+ interface GetKeyOwnerOptions {
6415
6614
  /**
6416
- * The prerelease version
6417
- *
6418
- * @default {[]}
6615
+ * The document loader to use for fetching the key and its owner.
6419
6616
  */
6420
- prerelease?: (string | number)[];
6617
+ documentLoader?: DocumentLoader;
6421
6618
  /**
6422
- * The build metadata
6423
- *
6424
- * @default {[]}
6619
+ * The context loader to use for JSON-LD context retrieval.
6425
6620
  */
6426
- build?: string[];
6621
+ contextLoader?: DocumentLoader;
6622
+ /**
6623
+ * The OpenTelemetry tracer provider to use for tracing. If omitted,
6624
+ * the global tracer provider is used.
6625
+ * @since 1.3.0
6626
+ */
6627
+ tracerProvider?: TracerProvider;
6427
6628
  }
6428
- //#endregion
6429
- //#region src/nodeinfo/types.d.ts
6430
6629
  /**
6431
- * The type of the result of parsing JSON.
6630
+ * Gets the actor that owns the specified key. Returns `null` if the key has no
6631
+ * known owner.
6632
+ *
6633
+ * @param keyId The ID of the key to check, or the key itself.
6634
+ * @param options Options for getting the key owner.
6635
+ * @returns The actor that owns the key, or `null` if the key has no known
6636
+ * owner.
6637
+ * @since 0.7.0
6432
6638
  */
6433
- type JsonValue = {
6434
- [key: string]: JsonValue | undefined;
6435
- } | JsonValue[] | string | number | boolean | null;
6436
- /**
6437
- * A NodeInfo object as defined in the NodeInfo 2.1 schema.
6438
- */
6439
- interface NodeInfo {
6440
- /**
6441
- * Metadata about server software in use.
6442
- */
6443
- software: Software;
6444
- /**
6445
- * The protocols supported on this server. At least one protocol must be
6446
- * supported.
6447
- */
6448
- protocols: Protocol[];
6449
- /**
6450
- * The third party sites this server can connect to via their application API.
6451
- */
6452
- services?: Services;
6453
- /**
6454
- * Whether this server allows open self-registration. Defaults to `false`.
6455
- */
6456
- openRegistrations?: boolean;
6457
- /**
6458
- * Usage statistics for this server.
6459
- */
6460
- usage: Usage;
6461
- /**
6462
- * Free form key value pairs for software specific values.
6463
- * Clients should not rely on any specific key present.
6464
- */
6465
- metadata?: Record<string, JsonValue>;
6466
- }
6467
- /**
6468
- * Metadata about server software in use.
6469
- */
6470
- interface Software {
6471
- /**
6472
- * The canonical name of this server software. This must comply with
6473
- * pattern `/^[a-z0-9-]+$/`.
6474
- */
6475
- name: string;
6476
- /**
6477
- * The version of this server software.
6478
- * @see {@link parseSemVer}
6479
- */
6480
- version: SemVer;
6481
- /**
6482
- * The URL of the source code repository of this server software.
6483
- */
6484
- repository?: URL;
6485
- /**
6486
- * The URL of the homepage of this server software.
6487
- */
6488
- homepage?: URL;
6489
- }
6490
- /**
6491
- * The protocols supported on this server.
6492
- */
6493
- type Protocol = "activitypub" | "buddycloud" | "dfrn" | "diaspora" | "libertree" | "ostatus" | "pumpio" | "tent" | "xmpp" | "zot";
6494
- /**
6495
- * The third party sites this server can connect to via their application API.
6496
- */
6497
- interface Services {
6498
- /**
6499
- * The third party sites this server can retrieve messages from for combined
6500
- * display with regular traffic.
6501
- */
6502
- inbound?: InboundService[];
6503
- /**
6504
- * The third party sites this server can publish messages to on the behalf
6505
- * of a user.
6506
- */
6507
- outbound?: OutboundService[];
6508
- }
6509
- /**
6510
- * The third party sites this server can retrieve messages from for combined
6511
- * display with regular traffic.
6512
- */
6513
- type InboundService = "atom1.0" | "gnusocial" | "imap" | "pnut" | "pop3" | "pumpio" | "rss2.0" | "twitter";
6514
- /**
6515
- * The third party sites this server can publish messages to on the behalf
6516
- * of a user.
6517
- */
6518
- type OutboundService = "atom1.0" | "blogger" | "buddycloud" | "diaspora" | "dreamwidth" | "drupal" | "facebook" | "friendica" | "gnusocial" | "google" | "insanejournal" | "libertree" | "linkedin" | "livejournal" | "mediagoblin" | "myspace" | "pinterest" | "pnut" | "posterous" | "pumpio" | "redmatrix" | "rss2.0" | "smtp" | "tent" | "tumblr" | "twitter" | "wordpress" | "xmpp";
6519
- /**
6520
- * Usage statistics for this server.
6521
- */
6522
- interface Usage {
6523
- /**
6524
- * Statistics about the users of this server.
6525
- */
6526
- users: {
6527
- /**
6528
- * The total amount of on this server registered users. This number
6529
- * has to be an integer greater than or equal to zero.
6530
- */
6531
- total?: number;
6532
- /**
6533
- * The amount of users that signed in at least once in the last 180 days.
6534
- * This number has to be an integer greater than or equal to zero.
6535
- */
6536
- activeHalfyear?: number;
6537
- /**
6538
- * The amount of users that signed in at least once in the last 30 days.
6539
- * This number has to be an integer greater than or equal to zero.
6540
- */
6541
- activeMonth?: number;
6542
- };
6543
- /**
6544
- * The amount of posts that were made by users that are registered on this
6545
- * server. This number has to be an integer greater than or equal to zero.
6546
- */
6547
- localPosts: number;
6548
- /**
6549
- * The amount of comments that were made by users that are registered on this
6550
- * server. This number has to be an integer greater than or equal to zero.
6551
- */
6552
- localComments: number;
6553
- }
6554
- /**
6555
- * Converts a {@link NodeInfo} object to a JSON value.
6556
- * @param nodeInfo The {@link NodeInfo} object to convert.
6557
- * @returns The JSON value that complies with the NodeInfo schema.
6558
- * @throws {TypeError} If the {@link NodeInfo} object is invalid.
6559
- */
6560
- //#endregion
6561
- //#region src/vocab/lookup.d.ts
6639
+ //#endregion
6640
+ //#region src/vocab/lookup.d.ts
6562
6641
  /**
6563
6642
  * Options for the {@link lookupObject} function.
6564
6643
  *
@@ -6674,6 +6753,107 @@ interface TraverseCollectionOptions {
6674
6753
  * @since 1.1.0
6675
6754
  */
6676
6755
  //#endregion
6756
+ //#region src/webfinger/jrd.d.ts
6757
+ /**
6758
+ * Describes a resource. See also
6759
+ * [RFC 7033 section 4.4](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4).
6760
+ */
6761
+ interface ResourceDescriptor {
6762
+ /**
6763
+ * A URI that identifies the entity that this descriptor describes.
6764
+ */
6765
+ subject?: string;
6766
+ /**
6767
+ * URIs that identify the same entity as the `subject`.
6768
+ */
6769
+ aliases?: string[];
6770
+ /**
6771
+ * Conveys additional information about the `subject` of this descriptor.
6772
+ */
6773
+ properties?: Record<string, string>;
6774
+ /**
6775
+ * Links to other resources.
6776
+ */
6777
+ links?: Link$1[];
6778
+ }
6779
+ /**
6780
+ * Represents a link. See also
6781
+ * [RFC 7033 section 4.4.4](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4.4).
6782
+ */
6783
+ interface Link$1 {
6784
+ /**
6785
+ * The link's relation type, which is either a URI or a registered relation
6786
+ * type (see [RFC 5988](https://datatracker.ietf.org/doc/html/rfc5988)).
6787
+ */
6788
+ rel: string;
6789
+ /**
6790
+ * The media type of the target resource (see
6791
+ * [RFC 6838](https://datatracker.ietf.org/doc/html/rfc6838)).
6792
+ */
6793
+ type?: string;
6794
+ /**
6795
+ * A URI pointing to the target resource.
6796
+ */
6797
+ href: string;
6798
+ /**
6799
+ * Human-readable titles describing the link relation. If the language is
6800
+ * unknown or unspecified, the key is `"und"`.
6801
+ */
6802
+ titles?: Record<string, string>;
6803
+ /**
6804
+ * Conveys additional information about the link relation.
6805
+ */
6806
+ properties?: Record<string, string>;
6807
+ }
6808
+ //#endregion
6809
+ //#region src/webfinger/lookup.d.ts
6810
+ /**
6811
+ * Options for {@link lookupWebFinger}.
6812
+ * @since 1.3.0
6813
+ */
6814
+ interface LookupWebFingerOptions {
6815
+ /**
6816
+ * The options for making `User-Agent` header.
6817
+ * If a string is given, it is used as the `User-Agent` header value.
6818
+ * If an object is given, it is passed to {@link getUserAgent} to generate
6819
+ * the `User-Agent` header value.
6820
+ */
6821
+ userAgent?: GetUserAgentOptions | string;
6822
+ /**
6823
+ * Whether to allow private IP addresses in the URL.
6824
+ *
6825
+ * Mostly useful for testing purposes. *Do not use this in production.*
6826
+ *
6827
+ * Turned off by default.
6828
+ * @since 1.4.0
6829
+ */
6830
+ allowPrivateAddress?: boolean;
6831
+ /**
6832
+ * The maximum number of redirections to follow.
6833
+ * @default `5`
6834
+ * @since 1.8.0
6835
+ */
6836
+ maxRedirection?: number;
6837
+ /**
6838
+ * The OpenTelemetry tracer provider. If omitted, the global tracer provider
6839
+ * is used.
6840
+ */
6841
+ tracerProvider?: TracerProvider;
6842
+ /**
6843
+ * AbortSignal for cancelling the request.
6844
+ * @since 1.8.0
6845
+ * @
6846
+ */
6847
+ signal?: AbortSignal;
6848
+ }
6849
+ /**
6850
+ * Looks up a WebFinger resource.
6851
+ * @param resource The resource URL to look up.
6852
+ * @param options Extra options for looking up the resource.
6853
+ * @returns The resource descriptor, or `null` if not found.
6854
+ * @since 0.2.0
6855
+ */
6856
+ //#endregion
6677
6857
  //#region src/federation/collection.d.ts
6678
6858
  /**
6679
6859
  * A page of items.
@@ -6945,154 +7125,6 @@ type CustomCollectionCounter<TParams extends Record<string, string>, TContextDat
6945
7125
  */
6946
7126
  type CustomCollectionCursor<TParams extends Record<string, string>, TContext extends Context<TContextData>, TContextData> = (context: TContext, values: TParams) => string | null | Promise<string | null>;
6947
7127
  //#endregion
6948
- //#region src/nodeinfo/client.d.ts
6949
- /**
6950
- * Options for {@link getNodeInfo} function.
6951
- * @since 1.2.0
6952
- */
6953
- interface GetNodeInfoOptions {
6954
- /**
6955
- * Whether to directly fetch the NodeInfo document from the given URL.
6956
- * Otherwise, the NodeInfo document will be fetched from the `.well-known`
6957
- * location of the given URL.
6958
- *
6959
- * Turned off by default.
6960
- */
6961
- direct?: boolean;
6962
- /**
6963
- * How strictly to parse the NodeInfo document.
6964
- *
6965
- * - `"strict"`: Parse the NodeInfo document strictly. If the document is
6966
- * invalid, `undefined` is returned. This is the default.
6967
- * - `"best-effort"`: Try to parse the NodeInfo document even if it is
6968
- * invalid.
6969
- * - `"none"`: Do not parse the NodeInfo document. The function will return
6970
- * the raw JSON value.
6971
- */
6972
- parse?: "strict" | "best-effort" | "none";
6973
- /**
6974
- * The options for making `User-Agent` header.
6975
- * If a string is given, it is used as the `User-Agent` header value.
6976
- * If an object is given, it is passed to {@link getUserAgent} to generate
6977
- * the `User-Agent` header value.
6978
- * @since 1.3.0
6979
- */
6980
- userAgent?: GetUserAgentOptions | string;
6981
- }
6982
- /**
6983
- * Fetches a NodeInfo document from the given URL.
6984
- * @param url The base URL of the server. If `options.direct` is turned off
6985
- * (default), the NodeInfo document will be fetched from
6986
- * the `.well-known` location of this URL (hence the only origin
6987
- * of the URL is used). If `options.direct` is turned on,
6988
- * the NodeInfo document will be fetched from the given URL.
6989
- * @param options Options for fetching the NodeInfo document.
6990
- * @returns The NodeInfo document if it could be fetched successfully.
6991
- * Otherwise, `undefined` is returned.
6992
- * @since 1.2.0
6993
- */
6994
- //#endregion
6995
- //#region src/webfinger/jrd.d.ts
6996
- /**
6997
- * Describes a resource. See also
6998
- * [RFC 7033 section 4.4](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4).
6999
- */
7000
- interface ResourceDescriptor {
7001
- /**
7002
- * A URI that identifies the entity that this descriptor describes.
7003
- */
7004
- subject?: string;
7005
- /**
7006
- * URIs that identify the same entity as the `subject`.
7007
- */
7008
- aliases?: string[];
7009
- /**
7010
- * Conveys additional information about the `subject` of this descriptor.
7011
- */
7012
- properties?: Record<string, string>;
7013
- /**
7014
- * Links to other resources.
7015
- */
7016
- links?: Link$1[];
7017
- }
7018
- /**
7019
- * Represents a link. See also
7020
- * [RFC 7033 section 4.4.4](https://datatracker.ietf.org/doc/html/rfc7033#section-4.4.4).
7021
- */
7022
- interface Link$1 {
7023
- /**
7024
- * The link's relation type, which is either a URI or a registered relation
7025
- * type (see [RFC 5988](https://datatracker.ietf.org/doc/html/rfc5988)).
7026
- */
7027
- rel: string;
7028
- /**
7029
- * The media type of the target resource (see
7030
- * [RFC 6838](https://datatracker.ietf.org/doc/html/rfc6838)).
7031
- */
7032
- type?: string;
7033
- /**
7034
- * A URI pointing to the target resource.
7035
- */
7036
- href: string;
7037
- /**
7038
- * Human-readable titles describing the link relation. If the language is
7039
- * unknown or unspecified, the key is `"und"`.
7040
- */
7041
- titles?: Record<string, string>;
7042
- /**
7043
- * Conveys additional information about the link relation.
7044
- */
7045
- properties?: Record<string, string>;
7046
- }
7047
- //#endregion
7048
- //#region src/webfinger/lookup.d.ts
7049
- /**
7050
- * Options for {@link lookupWebFinger}.
7051
- * @since 1.3.0
7052
- */
7053
- interface LookupWebFingerOptions {
7054
- /**
7055
- * The options for making `User-Agent` header.
7056
- * If a string is given, it is used as the `User-Agent` header value.
7057
- * If an object is given, it is passed to {@link getUserAgent} to generate
7058
- * the `User-Agent` header value.
7059
- */
7060
- userAgent?: GetUserAgentOptions | string;
7061
- /**
7062
- * Whether to allow private IP addresses in the URL.
7063
- *
7064
- * Mostly useful for testing purposes. *Do not use this in production.*
7065
- *
7066
- * Turned off by default.
7067
- * @since 1.4.0
7068
- */
7069
- allowPrivateAddress?: boolean;
7070
- /**
7071
- * The maximum number of redirections to follow.
7072
- * @default `5`
7073
- * @since 1.8.0
7074
- */
7075
- maxRedirection?: number;
7076
- /**
7077
- * The OpenTelemetry tracer provider. If omitted, the global tracer provider
7078
- * is used.
7079
- */
7080
- tracerProvider?: TracerProvider;
7081
- /**
7082
- * AbortSignal for cancelling the request.
7083
- * @since 1.8.0
7084
- * @
7085
- */
7086
- signal?: AbortSignal;
7087
- }
7088
- /**
7089
- * Looks up a WebFinger resource.
7090
- * @param resource The resource URL to look up.
7091
- * @param options Extra options for looking up the resource.
7092
- * @returns The resource descriptor, or `null` if not found.
7093
- * @since 0.2.0
7094
- */
7095
- //#endregion
7096
7128
  //#region src/federation/queue.d.ts
7097
7129
  interface SenderKeyJwkPair {
7098
7130
  keyId: string;
@@ -7150,8 +7182,6 @@ interface InboxMessage {
7150
7182
  }
7151
7183
  //#endregion
7152
7184
  //#region src/federation/federation.d.ts
7153
- type Context$1<TContextData> = Context<TContextData>;
7154
- type RequestContext$1<TContextData> = RequestContext<TContextData>;
7155
7185
  /**
7156
7186
  * Options for {@link Federation.startQueue} method.
7157
7187
  * @since 1.0.0
@@ -7317,7 +7347,7 @@ interface Federatable<TContextData> {
7317
7347
  * @param dispatcher An inbox dispatcher callback to register.
7318
7348
  * @throws {@link RouterError} Thrown if the path pattern is invalid.
7319
7349
  */
7320
- setInboxDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext$1<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext$1<TContextData>, TContextData, void>;
7350
+ setInboxDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
7321
7351
  /**
7322
7352
  * Registers an outbox dispatcher.
7323
7353
  *
@@ -7341,7 +7371,7 @@ interface Federatable<TContextData> {
7341
7371
  * @param dispatcher An outbox dispatcher callback to register.
7342
7372
  * @throws {@link RouterError} Thrown if the path pattern is invalid.
7343
7373
  */
7344
- setOutboxDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext$1<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext$1<TContextData>, TContextData, void>;
7374
+ setOutboxDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
7345
7375
  /**
7346
7376
  * Registers a following collection dispatcher.
7347
7377
  * @param path The URI path pattern for the following collection. The syntax
@@ -7353,7 +7383,7 @@ interface Federatable<TContextData> {
7353
7383
  * callbacks.
7354
7384
  * @throws {RouterError} Thrown if the path pattern is invalid.
7355
7385
  */
7356
- setFollowingDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Actor | URL, RequestContext$1<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext$1<TContextData>, TContextData, void>;
7386
+ setFollowingDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Actor | URL, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
7357
7387
  /**
7358
7388
  * Registers a followers collection dispatcher.
7359
7389
  * @param path The URI path pattern for the followers collection. The syntax
@@ -7365,7 +7395,7 @@ interface Federatable<TContextData> {
7365
7395
  * callbacks.
7366
7396
  * @throws {@link RouterError} Thrown if the path pattern is invalid.
7367
7397
  */
7368
- setFollowersDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Recipient, Context$1<TContextData>, TContextData, URL>): CollectionCallbackSetters<Context$1<TContextData>, TContextData, URL>;
7398
+ setFollowersDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Recipient, Context<TContextData>, TContextData, URL>): CollectionCallbackSetters<Context<TContextData>, TContextData, URL>;
7369
7399
  /**
7370
7400
  * Registers a liked collection dispatcher.
7371
7401
  * @param path The URI path pattern for the liked collection. The syntax
@@ -7377,7 +7407,7 @@ interface Federatable<TContextData> {
7377
7407
  * callbacks.
7378
7408
  * @throws {@link RouterError} Thrown if the path pattern is invalid.
7379
7409
  */
7380
- setLikedDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Object$1 | URL, RequestContext$1<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext$1<TContextData>, TContextData, void>;
7410
+ setLikedDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Object$1 | URL, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
7381
7411
  /**
7382
7412
  * Registers a featured collection dispatcher.
7383
7413
  * @param path The URI path pattern for the featured collection. The syntax
@@ -7389,7 +7419,7 @@ interface Federatable<TContextData> {
7389
7419
  * callbacks.
7390
7420
  * @throws {@link RouterError} Thrown if the path pattern is invalid.
7391
7421
  */
7392
- setFeaturedDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Object$1, RequestContext$1<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext$1<TContextData>, TContextData, void>;
7422
+ setFeaturedDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Object$1, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
7393
7423
  /**
7394
7424
  * Registers a featured tags collection dispatcher.
7395
7425
  * @param path The URI path pattern for the featured tags collection.
@@ -7401,7 +7431,7 @@ interface Federatable<TContextData> {
7401
7431
  * callbacks.
7402
7432
  * @throws {@link RouterError} Thrown if the path pattern is invalid.
7403
7433
  */
7404
- setFeaturedTagsDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Hashtag, RequestContext$1<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext$1<TContextData>, TContextData, void>;
7434
+ setFeaturedTagsDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Hashtag, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
7405
7435
  /**
7406
7436
  * Assigns the URL path for the inbox and starts setting inbox listeners.
7407
7437
  *
@@ -7446,7 +7476,7 @@ interface Federatable<TContextData> {
7446
7476
  * The path must have one or more variables.
7447
7477
  * @param dispatcher A collection dispatcher callback to register.
7448
7478
  */
7449
- setCollectionDispatcher<TObject extends Object$1, TParams extends Record<string, string>>(name: string | symbol, itemType: ConstructorWithTypeId$1<TObject>, path: ParamsKeyPath<TParams>, dispatcher: CustomCollectionDispatcher<TObject, TParams, RequestContext$1<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParams, RequestContext$1<TContextData>, TContextData>;
7479
+ 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>;
7450
7480
  /**
7451
7481
  * Registers an ordered collection of objects dispatcher.
7452
7482
  *
@@ -7461,7 +7491,7 @@ interface Federatable<TContextData> {
7461
7491
  * The path must have one or more variables.
7462
7492
  * @param dispatcher A collection dispatcher callback to register.
7463
7493
  */
7464
- setOrderedCollectionDispatcher<TObject extends Object$1, TParams extends Record<string, string>>(name: string | symbol, itemType: ConstructorWithTypeId$1<TObject>, path: ParamsKeyPath<TParams>, dispatcher: CustomCollectionDispatcher<TObject, TParams, RequestContext$1<TContextData>, TContextData>): CustomCollectionCallbackSetters<TParams, RequestContext$1<TContextData>, TContextData>;
7494
+ 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>;
7465
7495
  }
7466
7496
  /**
7467
7497
  * An object that registers federation-related business logic and dispatches
@@ -7502,14 +7532,14 @@ interface Federation<TContextData> extends Federatable<TContextData> {
7502
7532
  * @param contextData The context data to pass to the context.
7503
7533
  * @returns The new context.
7504
7534
  */
7505
- createContext(baseUrl: URL, contextData: TContextData): Context$1<TContextData>;
7535
+ createContext(baseUrl: URL, contextData: TContextData): Context<TContextData>;
7506
7536
  /**
7507
7537
  * Create a new context for a request.
7508
7538
  * @param request The request object.
7509
7539
  * @param contextData The context data to pass to the context.
7510
7540
  * @returns The new request context.
7511
7541
  */
7512
- createContext(request: Request, contextData: TContextData): RequestContext$1<TContextData>;
7542
+ createContext(request: Request, contextData: TContextData): RequestContext<TContextData>;
7513
7543
  /**
7514
7544
  * Handles a request related to federation. If a request is not related to
7515
7545
  * federation, the `onNotFound` or `onNotAcceptable` callback is called.
@@ -7605,7 +7635,7 @@ interface ObjectCallbackSetters<TContextData, TObject extends Object$1, TParam e
7605
7635
  * @template TContextData The context data to pass to the {@link Context}.
7606
7636
  * @template TFilter The type of filter for the collection.
7607
7637
  */
7608
- interface CollectionCallbackSetters<TContext extends Context$1<TContextData>, TContextData, TFilter> {
7638
+ interface CollectionCallbackSetters<TContext extends Context<TContextData>, TContextData, TFilter> {
7609
7639
  /**
7610
7640
  * Sets the counter for the collection.
7611
7641
  * @param counter A callback that returns the number of items in the collection.
@@ -7706,7 +7736,7 @@ interface FederationFetchOptions<TContextData> {
7706
7736
  * @template TContextData The context data to pass to the {@link Context}.
7707
7737
  * @template TFilter The type of filter for the collection.
7708
7738
  */
7709
- interface CustomCollectionCallbackSetters<TParams extends Record<string, string>, TContext extends Context$1<TContextData>, TContextData> {
7739
+ interface CustomCollectionCallbackSetters<TParams extends Record<string, string>, TContext extends Context<TContextData>, TContextData> {
7710
7740
  /**
7711
7741
  * Sets the counter for the custom collection.
7712
7742
  * @param counter A callback that returns the number of items in the custom collection.
@@ -7739,7 +7769,7 @@ interface CustomCollectionCallbackSetters<TParams extends Record<string, string>
7739
7769
  *
7740
7770
  * @template TObject The type of the object.
7741
7771
  */
7742
- type ConstructorWithTypeId$1<TObject extends Object$1> = (new (...args: any[]) => TObject) & {
7772
+ type ConstructorWithTypeId<TObject extends Object$1> = (new (...args: any[]) => TObject) & {
7743
7773
  typeId: URL;
7744
7774
  };
7745
7775
  /**
@@ -7811,41 +7841,7 @@ type ParamPath<Param extends string> = `${string}{${Param}}${string}`;
7811
7841
  */
7812
7842
  type UnionToIntersection<U> = (U extends unknown ? (x: U) => void : never) extends ((x: infer I) => void) ? I : never;
7813
7843
  //#endregion
7814
- //#region src/sig/owner.d.ts
7815
- /**
7816
- * Options for {@link getKeyOwner}.
7817
- * @since 0.8.0
7818
- */
7819
- interface GetKeyOwnerOptions {
7820
- /**
7821
- * The document loader to use for fetching the key and its owner.
7822
- */
7823
- documentLoader?: DocumentLoader;
7824
- /**
7825
- * The context loader to use for JSON-LD context retrieval.
7826
- */
7827
- contextLoader?: DocumentLoader;
7828
- /**
7829
- * The OpenTelemetry tracer provider to use for tracing. If omitted,
7830
- * the global tracer provider is used.
7831
- * @since 1.3.0
7832
- */
7833
- tracerProvider?: TracerProvider;
7834
- }
7835
- /**
7836
- * Gets the actor that owns the specified key. Returns `null` if the key has no
7837
- * known owner.
7838
- *
7839
- * @param keyId The ID of the key to check, or the key itself.
7840
- * @param options Options for getting the key owner.
7841
- * @returns The actor that owns the key, or `null` if the key has no known
7842
- * owner.
7843
- * @since 0.7.0
7844
- */
7845
- //#endregion
7846
7844
  //#region src/federation/context.d.ts
7847
- type Federation$1<TContextData> = Federation<TContextData>;
7848
- type ConstructorWithTypeId<T extends Object$1> = ConstructorWithTypeId$1<T>;
7849
7845
  /**
7850
7846
  * A context.
7851
7847
  */
@@ -7899,7 +7895,7 @@ interface Context<TContextData> {
7899
7895
  * The federation object that this context belongs to.
7900
7896
  * @since 1.6.0
7901
7897
  */
7902
- readonly federation: Federation$1<TContextData>;
7898
+ readonly federation: Federation<TContextData>;
7903
7899
  /**
7904
7900
  * Creates a new context with the same properties as this one,
7905
7901
  * but with the given data.