@fedify/fedify 1.8.14-pr.470.1821 → 1.8.14-pr.470.1832
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/dist/{actor-Cu50MqL4.js → actor-9s3WvbFp.js} +1 -1
- package/dist/{actor-ztUqTDfz.js → actor-CQun2LMl.js} +179 -179
- package/dist/{actor-Uh1YDuVl.d.ts → actor-WPWqtDNJ.d.ts} +1 -1
- package/dist/{authdocloader-N5MV5jBP.js → authdocloader-BgYRnN3Q.js} +3 -3
- package/dist/{authdocloader-B1iVIUuX.js → authdocloader-Bqmp0UcQ.js} +3 -3
- package/dist/{builder-mOkzk9Ju.js → builder-KRZXPPWM.js} +4 -4
- package/dist/{client-CMSV39oT.js → client-DhSHvGlU.js} +1 -1
- package/dist/compat/mod.d.ts +9 -9
- package/dist/compat/transformers.test.js +16 -16
- package/dist/{context-CnveeHUR.d.ts → context-BVXh6U8x.d.ts} +29 -25
- package/dist/{docloader-C27GNp4N.js → docloader-B3-PAoGx.js} +1 -1
- package/dist/{esm-DWXUb77h.js → esm-D4Y3V3TX.js} +1 -1
- package/dist/federation/builder.test.js +5 -5
- package/dist/federation/collection.test.js +3 -3
- package/dist/federation/handler.test.js +17 -17
- package/dist/federation/inbox.test.js +4 -4
- package/dist/federation/keycache.test.js +4 -4
- package/dist/federation/kv.test.js +3 -3
- package/dist/federation/middleware.test.js +18 -18
- package/dist/federation/mod.d.ts +8 -8
- package/dist/federation/mod.js +10 -10
- package/dist/federation/mq.test.js +3 -3
- package/dist/federation/retry.test.js +3 -3
- package/dist/federation/router.test.js +3 -3
- package/dist/federation/send.test.js +10 -10
- package/dist/{http-Dt6oANaV.js → http-BqfZ3DiV.js} +2 -2
- package/dist/{http-BFn7Ce7c.js → http-Clle8OhQ.js} +3 -3
- package/dist/{http-DtG44GdM.d.ts → http-e1180cSn.d.ts} +1 -1
- package/dist/{inbox-w84JcJs_.js → inbox-pY_0KiG-.js} +1 -1
- package/dist/{key-BUv-SwTH.js → key-2kt7ohj3.js} +4 -4
- package/dist/{key-DAb0Ecz8.js → key-DPDQaDw5.js} +3 -3
- package/dist/{key-tdrJdfhZ.js → key-Zp-T0bhP.js} +2 -2
- package/dist/{key-WJWzWFuV.js → key-toTNLBm1.js} +2 -2
- package/dist/{keycache-CLCElFOq.js → keycache-B9bzg6VQ.js} +1 -1
- package/dist/{keys-tDdO2TfK.js → keys-4zM5Up9R.js} +1 -1
- package/dist/{ld-CNlh5l3f.js → ld-CPeQLxZy.js} +2 -2
- package/dist/{lookup-oOBITEFO.js → lookup-Akl5ucko.js} +1 -1
- package/dist/{lookup-DIWtHeDu.js → lookup-gy112MkU.js} +1 -1
- package/dist/middleware-BBSyhnc7.js +17 -0
- package/dist/{middleware-DA1k5gyl.js → middleware-CKOUGNAC.js} +13 -13
- package/dist/{middleware-Ccd9lESS.js → middleware-CSft86O_.js} +10 -10
- package/dist/middleware-D0tzF2Wo.js +26 -0
- package/dist/{mod-DPpunL8j.d.ts → mod-BCP9zDgV.d.ts} +2 -2
- package/dist/{mod-cz-tNIqP.d.ts → mod-BZ1k6aCD.d.ts} +86 -86
- package/dist/{mod-mSMqo9JU.d.ts → mod-DEZNLUj-.d.ts} +1 -1
- package/dist/{mod-tQVUxQ_D.d.ts → mod-ltCoOz0H.d.ts} +2 -2
- package/dist/mod.d.ts +11 -11
- package/dist/mod.js +10 -10
- package/dist/nodeinfo/client.test.js +5 -5
- package/dist/nodeinfo/handler.test.js +16 -16
- package/dist/nodeinfo/mod.d.ts +1 -1
- package/dist/nodeinfo/mod.js +2 -2
- package/dist/nodeinfo/semver.test.js +3 -3
- package/dist/nodeinfo/types.test.js +3 -3
- package/dist/{owner-C12klfeG.d.ts → owner-CB8DneNI.d.ts} +2 -2
- package/dist/{owner-DgHFGjqx.js → owner-D0hzHvfW.js} +2 -2
- package/dist/{proof-DWMl-cID.js → proof-DQsTTtYV.js} +3 -3
- package/dist/{proof-h1ofU43n.js → proof-seBFgbXH.js} +2 -2
- package/dist/runtime/authdocloader.test.js +9 -9
- package/dist/runtime/docloader.test.js +4 -4
- package/dist/runtime/key.test.js +5 -5
- package/dist/runtime/langstr.test.js +3 -3
- package/dist/runtime/mod.d.ts +3 -3
- package/dist/runtime/mod.js +6 -6
- package/dist/runtime/multibase/multibase.test.js +3 -3
- package/dist/runtime/url.test.js +3 -3
- package/dist/{send-LzV2TMVE.js → send-D59NCngn.js} +2 -2
- package/dist/sig/http.test.js +8 -8
- package/dist/sig/key.test.js +6 -6
- package/dist/sig/ld.test.js +7 -7
- package/dist/sig/mod.d.ts +5 -5
- package/dist/sig/mod.js +6 -6
- package/dist/sig/owner.test.js +7 -7
- package/dist/sig/proof.test.js +7 -7
- package/dist/testing/docloader.test.js +3 -3
- package/dist/testing/mod.d.ts +356 -352
- package/dist/testing/mod.js +3 -3
- package/dist/{testing-BtcruKb-.js → testing-kXBTYzVX.js} +2 -2
- package/dist/{type-D_KqkB8n.js → type-wUeR1KOP.js} +178 -178
- package/dist/{types-Ba37TzAW.js → types-DsANHy_R.js} +1 -1
- package/dist/vocab/actor.test.js +5 -5
- package/dist/vocab/lookup.test.js +4 -4
- package/dist/vocab/mod.d.ts +3 -3
- package/dist/vocab/mod.js +4 -4
- package/dist/vocab/type.test.js +3 -3
- package/dist/vocab/vocab.test.js +4 -4
- package/dist/{vocab-CxW5aDR-.js → vocab-MJte5oO1.js} +3 -3
- package/dist/webfinger/handler.test.js +16 -16
- package/dist/webfinger/lookup.test.js +4 -4
- package/dist/webfinger/mod.js +2 -2
- package/dist/x/cfworkers.d.ts +1 -1
- package/dist/x/cfworkers.test.js +3 -3
- package/dist/x/hono.d.ts +8 -8
- package/dist/x/sveltekit.d.ts +8 -8
- package/package.json +1 -1
- package/dist/middleware-8Tf5rScu.js +0 -26
- package/dist/middleware-BpSDg88n.js +0 -17
- /package/dist/{client-DF8anIB5.d.ts → client-BsnHpE32.d.ts} +0 -0
- /package/dist/{mq-CRGm1e_F.d.ts → mq-D5smmAMS.d.ts} +0 -0
- /package/dist/{vocab-Ukxjz3TM.d.ts → vocab-BzWpjxBs.d.ts} +0 -0
package/dist/testing/mod.d.ts
CHANGED
|
@@ -71,211 +71,6 @@ 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
|
|
279
74
|
//#region src/runtime/langstr.d.ts
|
|
280
75
|
/**
|
|
281
76
|
* A language-tagged string which corresponds to the `rdf:langString` type.
|
|
@@ -6605,47 +6400,173 @@ interface Recipient {
|
|
|
6605
6400
|
} | null;
|
|
6606
6401
|
}
|
|
6607
6402
|
//#endregion
|
|
6608
|
-
//#region src/
|
|
6403
|
+
//#region src/nodeinfo/semver.d.ts
|
|
6609
6404
|
/**
|
|
6610
|
-
*
|
|
6611
|
-
* @since
|
|
6405
|
+
* A SemVer object parsed into its constituent parts.
|
|
6406
|
+
* @since 1.2.0
|
|
6612
6407
|
*/
|
|
6613
|
-
interface
|
|
6614
|
-
/**
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6408
|
+
interface SemVer {
|
|
6409
|
+
/** The major version */
|
|
6410
|
+
major: number;
|
|
6411
|
+
/** The minor version */
|
|
6412
|
+
minor: number;
|
|
6413
|
+
/** The patch version */
|
|
6414
|
+
patch: number;
|
|
6618
6415
|
/**
|
|
6619
|
-
* The
|
|
6416
|
+
* The prerelease version
|
|
6417
|
+
*
|
|
6418
|
+
* @default {[]}
|
|
6620
6419
|
*/
|
|
6621
|
-
|
|
6420
|
+
prerelease?: (string | number)[];
|
|
6622
6421
|
/**
|
|
6623
|
-
* The
|
|
6624
|
-
*
|
|
6625
|
-
* @
|
|
6422
|
+
* The build metadata
|
|
6423
|
+
*
|
|
6424
|
+
* @default {[]}
|
|
6626
6425
|
*/
|
|
6627
|
-
|
|
6426
|
+
build?: string[];
|
|
6628
6427
|
}
|
|
6629
|
-
/**
|
|
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
|
|
6638
|
-
*/
|
|
6639
6428
|
//#endregion
|
|
6640
|
-
//#region src/
|
|
6429
|
+
//#region src/nodeinfo/types.d.ts
|
|
6641
6430
|
/**
|
|
6642
|
-
*
|
|
6643
|
-
*
|
|
6644
|
-
* @since 0.2.0
|
|
6431
|
+
* The type of the result of parsing JSON.
|
|
6645
6432
|
*/
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
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
|
|
6562
|
+
/**
|
|
6563
|
+
* Options for the {@link lookupObject} function.
|
|
6564
|
+
*
|
|
6565
|
+
* @since 0.2.0
|
|
6566
|
+
*/
|
|
6567
|
+
interface LookupObjectOptions {
|
|
6568
|
+
/**
|
|
6569
|
+
* The document loader for loading remote JSON-LD documents.
|
|
6649
6570
|
*/
|
|
6650
6571
|
documentLoader?: DocumentLoader;
|
|
6651
6572
|
/**
|
|
@@ -6753,107 +6674,6 @@ interface TraverseCollectionOptions {
|
|
|
6753
6674
|
* @since 1.1.0
|
|
6754
6675
|
*/
|
|
6755
6676
|
//#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
|
|
6857
6677
|
//#region src/federation/collection.d.ts
|
|
6858
6678
|
/**
|
|
6859
6679
|
* A page of items.
|
|
@@ -7125,6 +6945,154 @@ type CustomCollectionCounter<TParams extends Record<string, string>, TContextDat
|
|
|
7125
6945
|
*/
|
|
7126
6946
|
type CustomCollectionCursor<TParams extends Record<string, string>, TContext extends Context<TContextData>, TContextData> = (context: TContext, values: TParams) => string | null | Promise<string | null>;
|
|
7127
6947
|
//#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
|
|
7128
7096
|
//#region src/federation/queue.d.ts
|
|
7129
7097
|
interface SenderKeyJwkPair {
|
|
7130
7098
|
keyId: string;
|
|
@@ -7182,6 +7150,8 @@ interface InboxMessage {
|
|
|
7182
7150
|
}
|
|
7183
7151
|
//#endregion
|
|
7184
7152
|
//#region src/federation/federation.d.ts
|
|
7153
|
+
type Context$1<TContextData> = Context<TContextData>;
|
|
7154
|
+
type RequestContext$1<TContextData> = RequestContext<TContextData>;
|
|
7185
7155
|
/**
|
|
7186
7156
|
* Options for {@link Federation.startQueue} method.
|
|
7187
7157
|
* @since 1.0.0
|
|
@@ -7347,7 +7317,7 @@ interface Federatable<TContextData> {
|
|
|
7347
7317
|
* @param dispatcher An inbox dispatcher callback to register.
|
|
7348
7318
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
|
7349
7319
|
*/
|
|
7350
|
-
setInboxDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
7320
|
+
setInboxDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext$1<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext$1<TContextData>, TContextData, void>;
|
|
7351
7321
|
/**
|
|
7352
7322
|
* Registers an outbox dispatcher.
|
|
7353
7323
|
*
|
|
@@ -7371,7 +7341,7 @@ interface Federatable<TContextData> {
|
|
|
7371
7341
|
* @param dispatcher An outbox dispatcher callback to register.
|
|
7372
7342
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
|
7373
7343
|
*/
|
|
7374
|
-
setOutboxDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
7344
|
+
setOutboxDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, RequestContext$1<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext$1<TContextData>, TContextData, void>;
|
|
7375
7345
|
/**
|
|
7376
7346
|
* Registers a following collection dispatcher.
|
|
7377
7347
|
* @param path The URI path pattern for the following collection. The syntax
|
|
@@ -7383,7 +7353,7 @@ interface Federatable<TContextData> {
|
|
|
7383
7353
|
* callbacks.
|
|
7384
7354
|
* @throws {RouterError} Thrown if the path pattern is invalid.
|
|
7385
7355
|
*/
|
|
7386
|
-
setFollowingDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Actor | URL, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
7356
|
+
setFollowingDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Actor | URL, RequestContext$1<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext$1<TContextData>, TContextData, void>;
|
|
7387
7357
|
/**
|
|
7388
7358
|
* Registers a followers collection dispatcher.
|
|
7389
7359
|
* @param path The URI path pattern for the followers collection. The syntax
|
|
@@ -7395,7 +7365,7 @@ interface Federatable<TContextData> {
|
|
|
7395
7365
|
* callbacks.
|
|
7396
7366
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
|
7397
7367
|
*/
|
|
7398
|
-
setFollowersDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Recipient, Context<TContextData>, TContextData, URL>): CollectionCallbackSetters<Context<TContextData>, TContextData, URL>;
|
|
7368
|
+
setFollowersDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Recipient, Context$1<TContextData>, TContextData, URL>): CollectionCallbackSetters<Context$1<TContextData>, TContextData, URL>;
|
|
7399
7369
|
/**
|
|
7400
7370
|
* Registers a liked collection dispatcher.
|
|
7401
7371
|
* @param path The URI path pattern for the liked collection. The syntax
|
|
@@ -7407,7 +7377,7 @@ interface Federatable<TContextData> {
|
|
|
7407
7377
|
* callbacks.
|
|
7408
7378
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
|
7409
7379
|
*/
|
|
7410
|
-
setLikedDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Object$1 | URL, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
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>;
|
|
7411
7381
|
/**
|
|
7412
7382
|
* Registers a featured collection dispatcher.
|
|
7413
7383
|
* @param path The URI path pattern for the featured collection. The syntax
|
|
@@ -7419,7 +7389,7 @@ interface Federatable<TContextData> {
|
|
|
7419
7389
|
* callbacks.
|
|
7420
7390
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
|
7421
7391
|
*/
|
|
7422
|
-
setFeaturedDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Object$1, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
7392
|
+
setFeaturedDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Object$1, RequestContext$1<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext$1<TContextData>, TContextData, void>;
|
|
7423
7393
|
/**
|
|
7424
7394
|
* Registers a featured tags collection dispatcher.
|
|
7425
7395
|
* @param path The URI path pattern for the featured tags collection.
|
|
@@ -7431,7 +7401,7 @@ interface Federatable<TContextData> {
|
|
|
7431
7401
|
* callbacks.
|
|
7432
7402
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
|
7433
7403
|
*/
|
|
7434
|
-
setFeaturedTagsDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Hashtag, RequestContext<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext<TContextData>, TContextData, void>;
|
|
7404
|
+
setFeaturedTagsDispatcher(path: `${string}{identifier}${string}` | `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Hashtag, RequestContext$1<TContextData>, TContextData, void>): CollectionCallbackSetters<RequestContext$1<TContextData>, TContextData, void>;
|
|
7435
7405
|
/**
|
|
7436
7406
|
* Assigns the URL path for the inbox and starts setting inbox listeners.
|
|
7437
7407
|
*
|
|
@@ -7476,7 +7446,7 @@ interface Federatable<TContextData> {
|
|
|
7476
7446
|
* The path must have one or more variables.
|
|
7477
7447
|
* @param dispatcher A collection dispatcher callback to register.
|
|
7478
7448
|
*/
|
|
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>;
|
|
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>;
|
|
7480
7450
|
/**
|
|
7481
7451
|
* Registers an ordered collection of objects dispatcher.
|
|
7482
7452
|
*
|
|
@@ -7491,7 +7461,7 @@ interface Federatable<TContextData> {
|
|
|
7491
7461
|
* The path must have one or more variables.
|
|
7492
7462
|
* @param dispatcher A collection dispatcher callback to register.
|
|
7493
7463
|
*/
|
|
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>;
|
|
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>;
|
|
7495
7465
|
}
|
|
7496
7466
|
/**
|
|
7497
7467
|
* An object that registers federation-related business logic and dispatches
|
|
@@ -7532,14 +7502,14 @@ interface Federation<TContextData> extends Federatable<TContextData> {
|
|
|
7532
7502
|
* @param contextData The context data to pass to the context.
|
|
7533
7503
|
* @returns The new context.
|
|
7534
7504
|
*/
|
|
7535
|
-
createContext(baseUrl: URL, contextData: TContextData): Context<TContextData>;
|
|
7505
|
+
createContext(baseUrl: URL, contextData: TContextData): Context$1<TContextData>;
|
|
7536
7506
|
/**
|
|
7537
7507
|
* Create a new context for a request.
|
|
7538
7508
|
* @param request The request object.
|
|
7539
7509
|
* @param contextData The context data to pass to the context.
|
|
7540
7510
|
* @returns The new request context.
|
|
7541
7511
|
*/
|
|
7542
|
-
createContext(request: Request, contextData: TContextData): RequestContext<TContextData>;
|
|
7512
|
+
createContext(request: Request, contextData: TContextData): RequestContext$1<TContextData>;
|
|
7543
7513
|
/**
|
|
7544
7514
|
* Handles a request related to federation. If a request is not related to
|
|
7545
7515
|
* federation, the `onNotFound` or `onNotAcceptable` callback is called.
|
|
@@ -7635,7 +7605,7 @@ interface ObjectCallbackSetters<TContextData, TObject extends Object$1, TParam e
|
|
|
7635
7605
|
* @template TContextData The context data to pass to the {@link Context}.
|
|
7636
7606
|
* @template TFilter The type of filter for the collection.
|
|
7637
7607
|
*/
|
|
7638
|
-
interface CollectionCallbackSetters<TContext extends Context<TContextData>, TContextData, TFilter> {
|
|
7608
|
+
interface CollectionCallbackSetters<TContext extends Context$1<TContextData>, TContextData, TFilter> {
|
|
7639
7609
|
/**
|
|
7640
7610
|
* Sets the counter for the collection.
|
|
7641
7611
|
* @param counter A callback that returns the number of items in the collection.
|
|
@@ -7736,7 +7706,7 @@ interface FederationFetchOptions<TContextData> {
|
|
|
7736
7706
|
* @template TContextData The context data to pass to the {@link Context}.
|
|
7737
7707
|
* @template TFilter The type of filter for the collection.
|
|
7738
7708
|
*/
|
|
7739
|
-
interface CustomCollectionCallbackSetters<TParams extends Record<string, string>, TContext extends Context<TContextData>, TContextData> {
|
|
7709
|
+
interface CustomCollectionCallbackSetters<TParams extends Record<string, string>, TContext extends Context$1<TContextData>, TContextData> {
|
|
7740
7710
|
/**
|
|
7741
7711
|
* Sets the counter for the custom collection.
|
|
7742
7712
|
* @param counter A callback that returns the number of items in the custom collection.
|
|
@@ -7769,7 +7739,7 @@ interface CustomCollectionCallbackSetters<TParams extends Record<string, string>
|
|
|
7769
7739
|
*
|
|
7770
7740
|
* @template TObject The type of the object.
|
|
7771
7741
|
*/
|
|
7772
|
-
type ConstructorWithTypeId<TObject extends Object$1> = (new (...args: any[]) => TObject) & {
|
|
7742
|
+
type ConstructorWithTypeId$1<TObject extends Object$1> = (new (...args: any[]) => TObject) & {
|
|
7773
7743
|
typeId: URL;
|
|
7774
7744
|
};
|
|
7775
7745
|
/**
|
|
@@ -7841,7 +7811,41 @@ type ParamPath<Param extends string> = `${string}{${Param}}${string}`;
|
|
|
7841
7811
|
*/
|
|
7842
7812
|
type UnionToIntersection<U> = (U extends unknown ? (x: U) => void : never) extends ((x: infer I) => void) ? I : never;
|
|
7843
7813
|
//#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
|
|
7844
7846
|
//#region src/federation/context.d.ts
|
|
7847
|
+
type Federation$1<TContextData> = Federation<TContextData>;
|
|
7848
|
+
type ConstructorWithTypeId<T extends Object$1> = ConstructorWithTypeId$1<T>;
|
|
7845
7849
|
/**
|
|
7846
7850
|
* A context.
|
|
7847
7851
|
*/
|
|
@@ -7895,7 +7899,7 @@ interface Context<TContextData> {
|
|
|
7895
7899
|
* The federation object that this context belongs to.
|
|
7896
7900
|
* @since 1.6.0
|
|
7897
7901
|
*/
|
|
7898
|
-
readonly federation: Federation<TContextData>;
|
|
7902
|
+
readonly federation: Federation$1<TContextData>;
|
|
7899
7903
|
/**
|
|
7900
7904
|
* Creates a new context with the same properties as this one,
|
|
7901
7905
|
* but with the given data.
|