@fedify/fedify 0.13.0-dev.310 → 0.13.0-dev.312
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/CHANGES.md +19 -0
- package/esm/federation/middleware.js +216 -472
- package/esm/vocab/announce.yaml +1 -0
- package/esm/vocab/create.yaml +1 -0
- package/esm/vocab/delete.yaml +6 -1
- package/esm/vocab/question.yaml +12 -2
- package/esm/vocab/update.yaml +1 -0
- package/esm/vocab/vocab.js +79 -1
- package/package.json +1 -1
- package/types/federation/middleware.d.ts +12 -106
- package/types/federation/middleware.d.ts.map +1 -1
- package/types/vocab/vocab.d.ts +6 -0
- package/types/vocab/vocab.d.ts.map +1 -1
package/esm/vocab/announce.yaml
CHANGED
package/esm/vocab/create.yaml
CHANGED
@@ -9,6 +9,7 @@ defaultContext:
|
|
9
9
|
- "https://w3id.org/security/data-integrity/v1"
|
10
10
|
- toot: "http://joinmastodon.org/ns#"
|
11
11
|
sensitive: "as:sensitive"
|
12
|
+
votersCount: "toot:votersCount"
|
12
13
|
Emoji: "toot:Emoji"
|
13
14
|
Hashtag: "as:Hashtag"
|
14
15
|
ChatMessage: "http://litepub.social/ns#ChatMessage"
|
package/esm/vocab/delete.yaml
CHANGED
@@ -9,5 +9,10 @@ description: |
|
|
9
9
|
defaultContext:
|
10
10
|
- "https://www.w3.org/ns/activitystreams"
|
11
11
|
- "https://w3id.org/security/data-integrity/v1"
|
12
|
-
-
|
12
|
+
- toot: "http://joinmastodon.org/ns#"
|
13
|
+
sensitive: "as:sensitive"
|
14
|
+
votersCount: "toot:votersCount"
|
15
|
+
Emoji: "toot:Emoji"
|
16
|
+
Hashtag: "as:Hashtag"
|
17
|
+
ChatMessage: "http://litepub.social/ns#ChatMessage"
|
13
18
|
properties: []
|
package/esm/vocab/question.yaml
CHANGED
@@ -10,12 +10,13 @@ description: |
|
|
10
10
|
contain an `object` property.
|
11
11
|
|
12
12
|
Either of the `anyOf` and `oneOf` properties *may* be used to express possible
|
13
|
-
answers, but a Question object *must not* have both properties.
|
13
|
+
answers, but a Question object *must not* have both properties.
|
14
14
|
defaultContext:
|
15
15
|
- "https://www.w3.org/ns/activitystreams"
|
16
16
|
- "https://w3id.org/security/data-integrity/v1"
|
17
17
|
- toot: "http://joinmastodon.org/ns#"
|
18
18
|
sensitive: "as:sensitive"
|
19
|
+
votersCount: "toot:votersCount"
|
19
20
|
Emoji: "toot:Emoji"
|
20
21
|
Hashtag: "as:Hashtag"
|
21
22
|
|
@@ -27,7 +28,7 @@ properties:
|
|
27
28
|
description: |
|
28
29
|
Identifies an exclusive option for a Question. Use of `exclusiveOptions`
|
29
30
|
implies that the Question can have only a single answer. To indicate that
|
30
|
-
a Question can have multiple answers, use `inclusiveOptions`.
|
31
|
+
a Question can have multiple answers, use `inclusiveOptions`.
|
31
32
|
range:
|
32
33
|
- "https://www.w3.org/ns/activitystreams#Object"
|
33
34
|
|
@@ -41,3 +42,12 @@ properties:
|
|
41
42
|
a Question can have only one answer, use `exclusiveOptions`.
|
42
43
|
range:
|
43
44
|
- "https://www.w3.org/ns/activitystreams#Object"
|
45
|
+
|
46
|
+
- singularName: voters
|
47
|
+
functional: true
|
48
|
+
uri: "http://joinmastodon.org/ns#votersCount"
|
49
|
+
description: |
|
50
|
+
How many people have voted in the poll. Distinct from how many votes have
|
51
|
+
been cast (in the case of multiple-choice polls).
|
52
|
+
range:
|
53
|
+
- "http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
|
package/esm/vocab/update.yaml
CHANGED
@@ -14,6 +14,7 @@ defaultContext:
|
|
14
14
|
- "https://w3id.org/security/data-integrity/v1"
|
15
15
|
- toot: "http://joinmastodon.org/ns#"
|
16
16
|
sensitive: "as:sensitive"
|
17
|
+
votersCount: "toot:votersCount"
|
17
18
|
Emoji: "toot:Emoji"
|
18
19
|
Hashtag: "as:Hashtag"
|
19
20
|
ChatMessage: "http://litepub.social/ns#ChatMessage"
|
package/esm/vocab/vocab.js
CHANGED
@@ -8318,6 +8318,7 @@ export class Announce extends Activity {
|
|
8318
8318
|
{
|
8319
8319
|
"toot": "http://joinmastodon.org/ns#",
|
8320
8320
|
"sensitive": "as:sensitive",
|
8321
|
+
"votersCount": "toot:votersCount",
|
8321
8322
|
"Emoji": "toot:Emoji",
|
8322
8323
|
"Hashtag": "as:Hashtag",
|
8323
8324
|
},
|
@@ -12761,6 +12762,7 @@ export class Create extends Activity {
|
|
12761
12762
|
{
|
12762
12763
|
"toot": "http://joinmastodon.org/ns#",
|
12763
12764
|
"sensitive": "as:sensitive",
|
12765
|
+
"votersCount": "toot:votersCount",
|
12764
12766
|
"Emoji": "toot:Emoji",
|
12765
12767
|
"Hashtag": "as:Hashtag",
|
12766
12768
|
"ChatMessage": "http://litepub.social/ns#ChatMessage",
|
@@ -12892,7 +12894,14 @@ export class Delete extends Activity {
|
|
12892
12894
|
[
|
12893
12895
|
"https://www.w3.org/ns/activitystreams",
|
12894
12896
|
"https://w3id.org/security/data-integrity/v1",
|
12895
|
-
{
|
12897
|
+
{
|
12898
|
+
"toot": "http://joinmastodon.org/ns#",
|
12899
|
+
"sensitive": "as:sensitive",
|
12900
|
+
"votersCount": "toot:votersCount",
|
12901
|
+
"Emoji": "toot:Emoji",
|
12902
|
+
"Hashtag": "as:Hashtag",
|
12903
|
+
"ChatMessage": "http://litepub.social/ns#ChatMessage",
|
12904
|
+
},
|
12896
12905
|
];
|
12897
12906
|
const compacted = await jsonld.compact(values, docContext, { documentLoader: options.contextLoader });
|
12898
12907
|
if (docContext != null) {
|
@@ -23909,6 +23918,7 @@ export class Question extends IntransitiveActivity {
|
|
23909
23918
|
}
|
23910
23919
|
#_2N5scKaVEcdYHFmfKYYacAwUhUgQ = [];
|
23911
23920
|
#_2mV6isMTPRKbWdLCjcpiEysq5dAY = [];
|
23921
|
+
#_3H4RdST7dxfmghccvE3rKD3KgcxG = [];
|
23912
23922
|
/**
|
23913
23923
|
* Constructs a new instance of Question with the given values.
|
23914
23924
|
* @param values The values to initialize the instance with.
|
@@ -23938,6 +23948,17 @@ export class Question extends IntransitiveActivity {
|
|
23938
23948
|
"Object | URL" + ".");
|
23939
23949
|
}
|
23940
23950
|
}
|
23951
|
+
if ("voters" in values && values.voters != null) {
|
23952
|
+
if (typeof values.voters === "number" && Number.isInteger(values.voters) &&
|
23953
|
+
values.voters >= 0) {
|
23954
|
+
// @ts-ignore: type is checked above.
|
23955
|
+
this.#_3H4RdST7dxfmghccvE3rKD3KgcxG = [values.voters];
|
23956
|
+
}
|
23957
|
+
else {
|
23958
|
+
throw new TypeError("The voters must be of type " +
|
23959
|
+
"number" + ".");
|
23960
|
+
}
|
23961
|
+
}
|
23941
23962
|
}
|
23942
23963
|
/**
|
23943
23964
|
* Clones this instance, optionally updating it with the given values.
|
@@ -23971,6 +23992,18 @@ export class Question extends IntransitiveActivity {
|
|
23971
23992
|
"Object | URL" + ".");
|
23972
23993
|
}
|
23973
23994
|
}
|
23995
|
+
clone.#_3H4RdST7dxfmghccvE3rKD3KgcxG = this.#_3H4RdST7dxfmghccvE3rKD3KgcxG;
|
23996
|
+
if ("voters" in values && values.voters != null) {
|
23997
|
+
if (typeof values.voters === "number" && Number.isInteger(values.voters) &&
|
23998
|
+
values.voters >= 0) {
|
23999
|
+
// @ts-ignore: type is checked above.
|
24000
|
+
clone.#_3H4RdST7dxfmghccvE3rKD3KgcxG = [values.voters];
|
24001
|
+
}
|
24002
|
+
else {
|
24003
|
+
throw new TypeError("The voters must be of type " +
|
24004
|
+
"number" + ".");
|
24005
|
+
}
|
24006
|
+
}
|
23974
24007
|
return clone;
|
23975
24008
|
}
|
23976
24009
|
async #fetchExclusiveOption(url, options = {}) {
|
@@ -24081,6 +24114,14 @@ export class Question extends IntransitiveActivity {
|
|
24081
24114
|
yield v;
|
24082
24115
|
}
|
24083
24116
|
}
|
24117
|
+
/** How many people have voted in the poll. Distinct from how many votes have
|
24118
|
+
* been cast (in the case of multiple-choice polls).
|
24119
|
+
*/
|
24120
|
+
get voters() {
|
24121
|
+
if (this.#_3H4RdST7dxfmghccvE3rKD3KgcxG.length < 1)
|
24122
|
+
return null;
|
24123
|
+
return this.#_3H4RdST7dxfmghccvE3rKD3KgcxG[0];
|
24124
|
+
}
|
24084
24125
|
/**
|
24085
24126
|
* Converts this object to a JSON-LD structure.
|
24086
24127
|
* @returns The JSON-LD representation of this object.
|
@@ -24117,6 +24158,17 @@ export class Question extends IntransitiveActivity {
|
|
24117
24158
|
if (array.length > 0) {
|
24118
24159
|
values["https://www.w3.org/ns/activitystreams#anyOf"] = array;
|
24119
24160
|
}
|
24161
|
+
array = [];
|
24162
|
+
for (const v of this.#_3H4RdST7dxfmghccvE3rKD3KgcxG) {
|
24163
|
+
const element = {
|
24164
|
+
"@type": "http://www.w3.org/2001/XMLSchema#nonNegativeInteger",
|
24165
|
+
"@value": v,
|
24166
|
+
};
|
24167
|
+
array.push(element);
|
24168
|
+
}
|
24169
|
+
if (array.length > 0) {
|
24170
|
+
values["http://joinmastodon.org/ns#votersCount"] = array;
|
24171
|
+
}
|
24120
24172
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Question"];
|
24121
24173
|
if (this.id)
|
24122
24174
|
values["@id"] = this.id.href;
|
@@ -24130,6 +24182,7 @@ export class Question extends IntransitiveActivity {
|
|
24130
24182
|
{
|
24131
24183
|
"toot": "http://joinmastodon.org/ns#",
|
24132
24184
|
"sensitive": "as:sensitive",
|
24185
|
+
"votersCount": "toot:votersCount",
|
24133
24186
|
"Emoji": "toot:Emoji",
|
24134
24187
|
"Hashtag": "as:Hashtag",
|
24135
24188
|
},
|
@@ -24227,6 +24280,19 @@ export class Question extends IntransitiveActivity {
|
|
24227
24280
|
_2mV6isMTPRKbWdLCjcpiEysq5dAY.push(await Object.fromJsonLd(v, options));
|
24228
24281
|
}
|
24229
24282
|
instance.#_2mV6isMTPRKbWdLCjcpiEysq5dAY = _2mV6isMTPRKbWdLCjcpiEysq5dAY;
|
24283
|
+
const _3H4RdST7dxfmghccvE3rKD3KgcxG = [];
|
24284
|
+
const _3H4RdST7dxfmghccvE3rKD3KgcxG__array = values["http://joinmastodon.org/ns#votersCount"];
|
24285
|
+
for (const v of _3H4RdST7dxfmghccvE3rKD3KgcxG__array == null
|
24286
|
+
? []
|
24287
|
+
: _3H4RdST7dxfmghccvE3rKD3KgcxG__array.length === 1 &&
|
24288
|
+
"@list" in _3H4RdST7dxfmghccvE3rKD3KgcxG__array[0]
|
24289
|
+
? _3H4RdST7dxfmghccvE3rKD3KgcxG__array[0]["@list"]
|
24290
|
+
: _3H4RdST7dxfmghccvE3rKD3KgcxG__array) {
|
24291
|
+
if (v == null)
|
24292
|
+
continue;
|
24293
|
+
_3H4RdST7dxfmghccvE3rKD3KgcxG.push(v["@value"]);
|
24294
|
+
}
|
24295
|
+
instance.#_3H4RdST7dxfmghccvE3rKD3KgcxG = _3H4RdST7dxfmghccvE3rKD3KgcxG;
|
24230
24296
|
return instance;
|
24231
24297
|
}
|
24232
24298
|
_getCustomInspectProxy() {
|
@@ -24257,6 +24323,17 @@ export class Question extends IntransitiveActivity {
|
|
24257
24323
|
_2mV6isMTPRKbWdLCjcpiEysq5dAY.length > 0) {
|
24258
24324
|
proxy.inclusiveOptions = _2mV6isMTPRKbWdLCjcpiEysq5dAY;
|
24259
24325
|
}
|
24326
|
+
const _3H4RdST7dxfmghccvE3rKD3KgcxG = this.#_3H4RdST7dxfmghccvE3rKD3KgcxG
|
24327
|
+
// deno-lint-ignore no-explicit-any
|
24328
|
+
.map((v) => v instanceof URL
|
24329
|
+
? {
|
24330
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
24331
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
|
24332
|
+
}
|
24333
|
+
: v);
|
24334
|
+
if (_3H4RdST7dxfmghccvE3rKD3KgcxG.length == 1) {
|
24335
|
+
proxy.voters = _3H4RdST7dxfmghccvE3rKD3KgcxG[0];
|
24336
|
+
}
|
24260
24337
|
return proxy;
|
24261
24338
|
}
|
24262
24339
|
[Symbol.for("Deno.customInspect")](inspect, options) {
|
@@ -28023,6 +28100,7 @@ export class Update extends Activity {
|
|
28023
28100
|
{
|
28024
28101
|
"toot": "http://joinmastodon.org/ns#",
|
28025
28102
|
"sensitive": "as:sensitive",
|
28103
|
+
"votersCount": "toot:votersCount",
|
28026
28104
|
"Emoji": "toot:Emoji",
|
28027
28105
|
"Hashtag": "as:Hashtag",
|
28028
28106
|
"ChatMessage": "http://litepub.social/ns#ChatMessage",
|
package/package.json
CHANGED
@@ -5,11 +5,10 @@ import { type AuthenticatedDocumentLoaderFactory, type DocumentLoader } from "..
|
|
5
5
|
import type { Actor, Recipient } from "../vocab/actor.js";
|
6
6
|
import { Activity, type Hashtag, type Like, type Object } from "../vocab/vocab.js";
|
7
7
|
import type { ActorDispatcher, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCounter, CollectionCursor, CollectionDispatcher, InboxErrorHandler, InboxListener, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectDispatcher, OutboxErrorHandler, SharedInboxKeyDispatcher } from "./callback.js";
|
8
|
-
import type { Context, RequestContext
|
8
|
+
import type { Context, RequestContext } from "./context.js";
|
9
9
|
import type { KvKey, KvStore } from "./kv.js";
|
10
10
|
import type { MessageQueue } from "./mq.js";
|
11
11
|
import { type RetryPolicy } from "./retry.js";
|
12
|
-
import { type SenderKeyPair } from "./send.js";
|
13
12
|
/**
|
14
13
|
* Options for {@link createFederation} function.
|
15
14
|
* @since 0.10.0
|
@@ -97,64 +96,6 @@ export interface CreateFederationOptions {
|
|
97
96
|
*/
|
98
97
|
trailingSlashInsensitive?: boolean;
|
99
98
|
}
|
100
|
-
/**
|
101
|
-
* Parameters for initializing a {@link Federation} instance.
|
102
|
-
* @deprecated
|
103
|
-
*/
|
104
|
-
export interface FederationParameters extends Omit<CreateFederationOptions, "outboxRetryPolicy" | "inboxRetryPolicy"> {
|
105
|
-
/**
|
106
|
-
* The message queue for sending activities to recipients' inboxes.
|
107
|
-
* If not provided, activities will not be queued and will be sent
|
108
|
-
* immediately.
|
109
|
-
* @since 0.5.0
|
110
|
-
*/
|
111
|
-
queue?: MessageQueue;
|
112
|
-
/**
|
113
|
-
* A custom JSON-LD context loader. By default, this uses the same loader
|
114
|
-
* as the document loader.
|
115
|
-
* @since 0.8.0
|
116
|
-
*/
|
117
|
-
contextLoader?: DocumentLoader;
|
118
|
-
/**
|
119
|
-
* A factory function that creates an authenticated document loader for a
|
120
|
-
* given identity. This is used for fetching documents that require
|
121
|
-
* authentication.
|
122
|
-
*
|
123
|
-
* @since 0.4.0
|
124
|
-
*/
|
125
|
-
authenticatedDocumentLoaderFactory?: AuthenticatedDocumentLoaderFactory;
|
126
|
-
/**
|
127
|
-
* A callback that handles errors during outbox processing. Note that this
|
128
|
-
* callback can be called multiple times for the same activity, because
|
129
|
-
* the delivery is retried according to the backoff schedule until it
|
130
|
-
* succeeds or reaches the maximum retry count.
|
131
|
-
*
|
132
|
-
* If any errors are thrown in this callback, they are ignored.
|
133
|
-
*
|
134
|
-
* @since 0.6.0
|
135
|
-
*/
|
136
|
-
onOutboxError?: OutboxErrorHandler;
|
137
|
-
/**
|
138
|
-
* The time window for verifying the signature of incoming requests. If the
|
139
|
-
* request is older or newer than this window, it is rejected. By default,
|
140
|
-
* the window is a minute.
|
141
|
-
*/
|
142
|
-
signatureTimeWindow?: dntShim.Temporal.DurationLike;
|
143
|
-
/**
|
144
|
-
* Whether to treat HTTP requests as HTTPS. This is useful for testing and
|
145
|
-
* local development. However, it must be disabled in production.
|
146
|
-
* Turned off by default.
|
147
|
-
*
|
148
|
-
* Note that this option is deprecated and will be removed in a future
|
149
|
-
* release. Instead, use the [x-forwarded-fetch] library to recognize
|
150
|
-
* the `X-Forwarded-Host` and `X-Forwarded-Proto` headers.
|
151
|
-
*
|
152
|
-
* [x-forwarded-fetch]: https://github.com/dahlia/x-forwarded-fetch
|
153
|
-
*
|
154
|
-
* @deprecated
|
155
|
-
*/
|
156
|
-
treatHttps?: boolean;
|
157
|
-
}
|
158
99
|
/**
|
159
100
|
* Prefixes for namespacing keys in the Deno KV store.
|
160
101
|
*/
|
@@ -176,35 +117,22 @@ export interface FederationKvPrefixes {
|
|
176
117
|
*/
|
177
118
|
publicKey: KvKey;
|
178
119
|
}
|
179
|
-
/**
|
180
|
-
* Create a new {@link Federation} instance.
|
181
|
-
* @param parameters Parameters for initializing the instance.
|
182
|
-
* @returns A new {@link Federation} instance.
|
183
|
-
* @since 0.10.0
|
184
|
-
*/
|
185
|
-
export declare function createFederation<TContextData>(options: CreateFederationOptions): Federation<TContextData>;
|
186
120
|
/**
|
187
121
|
* An object that registers federation-related business logic and dispatches
|
188
122
|
* requests to the appropriate handlers.
|
189
123
|
*
|
190
124
|
* It also provides a middleware interface for handling requests before your
|
191
|
-
* web framework's router; see {@link Federation.
|
125
|
+
* web framework's router; see {@link Federation.fetch}.
|
126
|
+
*
|
127
|
+
* @since 0.13.0
|
192
128
|
*/
|
193
|
-
export
|
194
|
-
#private;
|
195
|
-
/**
|
196
|
-
* Create a new {@link Federation} instance.
|
197
|
-
* @param parameters Parameters for initializing the instance.
|
198
|
-
* @deprecated Use {@link createFederation} method instead.
|
199
|
-
*/
|
200
|
-
constructor(parameters: FederationParameters);
|
129
|
+
export interface Federation<TContextData> {
|
201
130
|
/**
|
202
131
|
* Manually start the task queue.
|
203
132
|
*
|
204
133
|
* This method is useful when you set the `manuallyStartQueue` option to
|
205
134
|
* `true` in the {@link createFederation} function.
|
206
135
|
* @param contextData The context data to pass to the context.
|
207
|
-
* @since 0.12.0
|
208
136
|
*/
|
209
137
|
startQueue(contextData: TContextData): Promise<void>;
|
210
138
|
/**
|
@@ -230,7 +158,6 @@ export declare class Federation<TContextData> {
|
|
230
158
|
* must have no variables.
|
231
159
|
* @param dispatcher A NodeInfo dispatcher callback to register.
|
232
160
|
* @throws {RouterError} Thrown if the path pattern is invalid.
|
233
|
-
* @since 0.2.0
|
234
161
|
*/
|
235
162
|
setNodeInfoDispatcher(path: string, dispatcher: NodeInfoDispatcher<TContextData>): void;
|
236
163
|
/**
|
@@ -271,7 +198,6 @@ export declare class Federation<TContextData> {
|
|
271
198
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
272
199
|
* must have one or more variables.
|
273
200
|
* @param dispatcher An object dispatcher callback to register.
|
274
|
-
* @since 0.7.0
|
275
201
|
*/
|
276
202
|
setObjectDispatcher<TObject extends Object, TParam extends string>(cls: (new (...args: any[]) => TObject) & {
|
277
203
|
typeId: URL;
|
@@ -288,7 +214,6 @@ export declare class Federation<TContextData> {
|
|
288
214
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
289
215
|
* must have one or more variables.
|
290
216
|
* @param dispatcher An object dispatcher callback to register.
|
291
|
-
* @since 0.7.0
|
292
217
|
*/
|
293
218
|
setObjectDispatcher<TObject extends Object, TParam extends string>(cls: (new (...args: any[]) => TObject) & {
|
294
219
|
typeId: URL;
|
@@ -305,7 +230,6 @@ export declare class Federation<TContextData> {
|
|
305
230
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
306
231
|
* must have one or more variables.
|
307
232
|
* @param dispatcher An object dispatcher callback to register.
|
308
|
-
* @since 0.7.0
|
309
233
|
*/
|
310
234
|
setObjectDispatcher<TObject extends Object, TParam extends string>(cls: (new (...args: any[]) => TObject) & {
|
311
235
|
typeId: URL;
|
@@ -322,7 +246,6 @@ export declare class Federation<TContextData> {
|
|
322
246
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
323
247
|
* must have one or more variables.
|
324
248
|
* @param dispatcher An object dispatcher callback to register.
|
325
|
-
* @since 0.7.0
|
326
249
|
*/
|
327
250
|
setObjectDispatcher<TObject extends Object, TParam extends string>(cls: (new (...args: any[]) => TObject) & {
|
328
251
|
typeId: URL;
|
@@ -339,7 +262,6 @@ export declare class Federation<TContextData> {
|
|
339
262
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
340
263
|
* must have one or more variables.
|
341
264
|
* @param dispatcher An object dispatcher callback to register.
|
342
|
-
* @since 0.7.0
|
343
265
|
*/
|
344
266
|
setObjectDispatcher<TObject extends Object, TParam extends string>(cls: (new (...args: any[]) => TObject) & {
|
345
267
|
typeId: URL;
|
@@ -356,7 +278,6 @@ export declare class Federation<TContextData> {
|
|
356
278
|
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)). The path
|
357
279
|
* must have one or more variables.
|
358
280
|
* @param dispatcher An object dispatcher callback to register.
|
359
|
-
* @since 0.7.0
|
360
281
|
*/
|
361
282
|
setObjectDispatcher<TObject extends Object, TParam extends string>(cls: (new (...args: any[]) => TObject) & {
|
362
283
|
typeId: URL;
|
@@ -371,7 +292,6 @@ export declare class Federation<TContextData> {
|
|
371
292
|
* listener path.
|
372
293
|
* @param dispatcher An inbox dispatcher callback to register.
|
373
294
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
374
|
-
* @since 0.11.0
|
375
295
|
*/
|
376
296
|
setInboxDispatcher(path: `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Activity, TContextData, void>): CollectionCallbackSetters<TContextData, void>;
|
377
297
|
/**
|
@@ -432,7 +352,6 @@ export declare class Federation<TContextData> {
|
|
432
352
|
* @returns An object with methods to set other liked collection
|
433
353
|
* callbacks.
|
434
354
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
435
|
-
* @since 0.11.0
|
436
355
|
*/
|
437
356
|
setLikedDispatcher(path: `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Like, TContextData, void>): CollectionCallbackSetters<TContextData, void>;
|
438
357
|
/**
|
@@ -445,7 +364,6 @@ export declare class Federation<TContextData> {
|
|
445
364
|
* @returns An object with methods to set other featured collection
|
446
365
|
* callbacks.
|
447
366
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
448
|
-
* @since 0.11.0
|
449
367
|
*/
|
450
368
|
setFeaturedDispatcher(path: `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Object, TContextData, void>): CollectionCallbackSetters<TContextData, void>;
|
451
369
|
/**
|
@@ -458,7 +376,6 @@ export declare class Federation<TContextData> {
|
|
458
376
|
* @returns An object with methods to set other featured tags collection
|
459
377
|
* callbacks.
|
460
378
|
* @throws {@link RouterError} Thrown if the path pattern is invalid.
|
461
|
-
* @since 0.11.0
|
462
379
|
*/
|
463
380
|
setFeaturedTagsDispatcher(path: `${string}{handle}${string}`, dispatcher: CollectionDispatcher<Hashtag, TContextData, void>): CollectionCallbackSetters<TContextData, void>;
|
464
381
|
/**
|
@@ -492,18 +409,6 @@ export declare class Federation<TContextData> {
|
|
492
409
|
* @throws {RouteError} Thrown if the path pattern is invalid.
|
493
410
|
*/
|
494
411
|
setInboxListeners(inboxPath: `${string}{handle}${string}`, sharedInboxPath?: string): InboxListenerSetters<TContextData>;
|
495
|
-
/**
|
496
|
-
* Sends an activity to recipients' inboxes. You would typically use
|
497
|
-
* {@link Context.sendActivity} instead of this method.
|
498
|
-
*
|
499
|
-
* @param keys The sender's key pairs.
|
500
|
-
* @param recipients The recipients of the activity.
|
501
|
-
* @param activity The activity to send.
|
502
|
-
* @param options Options for sending the activity.
|
503
|
-
* @throws {TypeError} If the activity to send does not have an actor.
|
504
|
-
* @deprecated Use {@link Context.sendActivity} instead.
|
505
|
-
*/
|
506
|
-
sendActivity(keys: SenderKeyPair[], recipients: Recipient | Recipient[], activity: Activity, options: SendActivityInternalOptions<TContextData>): Promise<void>;
|
507
412
|
/**
|
508
413
|
* Handles a request related to federation. If a request is not related to
|
509
414
|
* federation, the `onNotFound` or `onNotAcceptable` callback is called.
|
@@ -514,10 +419,16 @@ export declare class Federation<TContextData> {
|
|
514
419
|
* @param request The request object.
|
515
420
|
* @param parameters The parameters for handling the request.
|
516
421
|
* @returns The response to the request.
|
517
|
-
* @since 0.6.0
|
518
422
|
*/
|
519
423
|
fetch(request: Request, options: FederationFetchOptions<TContextData>): Promise<Response>;
|
520
424
|
}
|
425
|
+
/**
|
426
|
+
* Create a new {@link Federation} instance.
|
427
|
+
* @param parameters Parameters for initializing the instance.
|
428
|
+
* @returns A new {@link Federation} instance.
|
429
|
+
* @since 0.10.0
|
430
|
+
*/
|
431
|
+
export declare function createFederation<TContextData>(options: CreateFederationOptions): Federation<TContextData>;
|
521
432
|
/**
|
522
433
|
* Parameters of {@link Federation.fetch} method.
|
523
434
|
*
|
@@ -657,9 +568,4 @@ export interface InboxListenerSetters<TContextData> {
|
|
657
568
|
*/
|
658
569
|
setSharedKeyDispatcher(dispatcher: SharedInboxKeyDispatcher<TContextData>): InboxListenerSetters<TContextData>;
|
659
570
|
}
|
660
|
-
interface SendActivityInternalOptions<TContextData> extends SendActivityOptions {
|
661
|
-
collectionSync?: string;
|
662
|
-
contextData: TContextData;
|
663
|
-
}
|
664
|
-
export {};
|
665
571
|
//# sourceMappingURL=middleware.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/federation/middleware.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EACL,KAAK,kCAAkC,EACvC,KAAK,cAAc,EAIpB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EACL,QAAQ,EAER,KAAK,OAAO,EACZ,KAAK,IAAI,EAET,KAAK,MAAM,EACZ,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAEV,OAAO,EAEP,cAAc,
|
1
|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C,GAC1C,yBAAyB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;CACrD;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB,CAAC,YAAY;IAChD;;;;;;OAMG;IACH,EAAE,CAAC,SAAS,SAAS,QAAQ,EAE3B,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,SAAS,EACvC,QAAQ,EAAE,aAAa,CAAC,YAAY,EAAE,SAAS,CAAC,GAC/C,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAEtC;;;;;;OAMG;IACH,OAAO,CACL,OAAO,EAAE,iBAAiB,CAAC,YAAY,CAAC,GACvC,oBAAoB,CAAC,YAAY,CAAC,CAAC;IAEtC;;;;;;;;OAQG;IACH,sBAAsB,CACpB,UAAU,EAAE,wBAAwB,CAAC,YAAY,CAAC,GACjD,oBAAoB,CAAC,YAAY,CAAC,CAAC;CACvC"}
|
package/types/vocab/vocab.d.ts
CHANGED
@@ -8977,6 +8977,7 @@ export declare class Question extends IntransitiveActivity {
|
|
8977
8977
|
instruments?: (Object | URL)[];
|
8978
8978
|
exclusiveOptions?: (Object | URL)[];
|
8979
8979
|
inclusiveOptions?: (Object | URL)[];
|
8980
|
+
voters?: number | null;
|
8980
8981
|
}, { documentLoader, contextLoader, }?: {
|
8981
8982
|
documentLoader?: DocumentLoader;
|
8982
8983
|
contextLoader?: DocumentLoader;
|
@@ -9047,6 +9048,7 @@ export declare class Question extends IntransitiveActivity {
|
|
9047
9048
|
instruments?: (Object | URL)[];
|
9048
9049
|
exclusiveOptions?: (Object | URL)[];
|
9049
9050
|
inclusiveOptions?: (Object | URL)[];
|
9051
|
+
voters?: number | null;
|
9050
9052
|
}, options?: {
|
9051
9053
|
documentLoader?: DocumentLoader;
|
9052
9054
|
contextLoader?: DocumentLoader;
|
@@ -9081,6 +9083,10 @@ export declare class Question extends IntransitiveActivity {
|
|
9081
9083
|
contextLoader?: DocumentLoader;
|
9082
9084
|
suppressError?: boolean;
|
9083
9085
|
}): AsyncIterable<Object>;
|
9086
|
+
/** How many people have voted in the poll. Distinct from how many votes have
|
9087
|
+
* been cast (in the case of multiple-choice polls).
|
9088
|
+
*/
|
9089
|
+
get voters(): number | null;
|
9084
9090
|
/**
|
9085
9091
|
* Converts this object to a JSON-LD structure.
|
9086
9092
|
* @returns The JSON-LD representation of this object.
|