@fedify/vocab 2.4.0-dev.1618 → 2.4.0-dev.1655
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/deno.json +1 -1
- package/dist/mod.cjs +425 -15
- package/dist/mod.d.cts +109 -1
- package/dist/mod.d.ts +109 -1
- package/dist/mod.js +426 -16
- package/dist-tests/{actor-COnJgcOw.mjs → actor-D_oGj9t4.mjs} +2 -2
- package/dist-tests/actor.test.mjs +2 -2
- package/dist-tests/application.yaml +15 -0
- package/dist-tests/audio.yaml +2 -1
- package/dist-tests/document.yaml +14 -1
- package/dist-tests/group.yaml +15 -0
- package/dist-tests/image.yaml +2 -1
- package/dist-tests/link.yaml +14 -1
- package/dist-tests/lookup.test.mjs +2 -2
- package/dist-tests/organization.yaml +15 -0
- package/dist-tests/page.yaml +2 -1
- package/dist-tests/person.yaml +15 -0
- package/dist-tests/service.yaml +15 -0
- package/dist-tests/type.test.mjs +1 -1
- package/dist-tests/video.yaml +2 -1
- package/dist-tests/{vocab-OU5GYbNg.mjs → vocab-Bjwctrxn.mjs} +426 -16
- package/dist-tests/vocab.test.mjs +152 -1
- package/package.json +4 -4
- package/src/__snapshots__/vocab.test.ts.snap +54 -15
- package/src/application.yaml +15 -0
- package/src/audio.yaml +2 -1
- package/src/document.yaml +14 -1
- package/src/group.yaml +15 -0
- package/src/image.yaml +2 -1
- package/src/link.yaml +14 -1
- package/src/organization.yaml +15 -0
- package/src/page.yaml +2 -1
- package/src/person.yaml +15 -0
- package/src/preprocessors.ts +3 -1
- package/src/service.yaml +15 -0
- package/src/video.yaml +2 -1
- package/src/vocab.test.ts +244 -0
package/dist/mod.cjs
CHANGED
|
@@ -34,7 +34,7 @@ let _fedify_vocab_runtime_temporal = require("@fedify/vocab-runtime/temporal");
|
|
|
34
34
|
let es_toolkit = require("es-toolkit");
|
|
35
35
|
//#region deno.json
|
|
36
36
|
var name = "@fedify/vocab";
|
|
37
|
-
var version = "2.4.0-dev.
|
|
37
|
+
var version = "2.4.0-dev.1655+b8f3c3d5";
|
|
38
38
|
//#endregion
|
|
39
39
|
//#region src/type.ts
|
|
40
40
|
function getTypeId(object) {
|
|
@@ -3607,7 +3607,8 @@ NativeTemporal && Date.prototype.toTemporalInstant;
|
|
|
3607
3607
|
* When an `icon` or `image` property on a vocabulary object contains an
|
|
3608
3608
|
* explicit ActivityStreams `Link` rather than an `Image`, this preprocessor
|
|
3609
3609
|
* converts it into an `Image` by mapping `href` to `url`, copying
|
|
3610
|
-
* `mediaType`, `name`, `width`,
|
|
3610
|
+
* `mediaType`, `name`, `width`, `height`, and `digestMultibase`, and
|
|
3611
|
+
* discarding the rest.
|
|
3611
3612
|
*
|
|
3612
3613
|
* If the value is not a Link, or the Link has no `href`, it returns
|
|
3613
3614
|
* `undefined` so the normal range decoder continues.
|
|
@@ -3628,7 +3629,8 @@ const normalizeLinkToImage = async (value, context) => {
|
|
|
3628
3629
|
mediaType: link.mediaType,
|
|
3629
3630
|
names: link.names != null && link.names.length > 0 ? link.names : void 0,
|
|
3630
3631
|
width: link.width,
|
|
3631
|
-
height: link.height
|
|
3632
|
+
height: link.height,
|
|
3633
|
+
digestMultibase: link.digestMultibase
|
|
3632
3634
|
});
|
|
3633
3635
|
};
|
|
3634
3636
|
//#endregion
|
|
@@ -25553,6 +25555,7 @@ var Application = class Application extends Object$1 {
|
|
|
25553
25555
|
#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
|
|
25554
25556
|
#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
|
|
25555
25557
|
#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
|
|
25558
|
+
#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
25556
25559
|
#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
25557
25560
|
#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
|
|
25558
25561
|
#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
|
|
@@ -25621,6 +25624,13 @@ var Application = class Application extends Object$1 {
|
|
|
25621
25624
|
for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
25622
25625
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
25623
25626
|
}
|
|
25627
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
25628
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
25629
|
+
if ("gateways" in values && values.gateways != null) {
|
|
25630
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
|
|
25631
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
25632
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
25633
|
+
}
|
|
25624
25634
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
25625
25635
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
25626
25636
|
if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
|
|
@@ -25751,6 +25761,14 @@ var Application = class Application extends Object$1 {
|
|
|
25751
25761
|
for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
25752
25762
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
25753
25763
|
}
|
|
25764
|
+
clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
25765
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
25766
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
25767
|
+
if ("gateways" in values && values.gateways != null) {
|
|
25768
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
|
|
25769
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
25770
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
25771
|
+
}
|
|
25754
25772
|
clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
|
|
25755
25773
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
25756
25774
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
@@ -26224,6 +26242,24 @@ var Application = class Application extends Object$1 {
|
|
|
26224
26242
|
yield v;
|
|
26225
26243
|
}
|
|
26226
26244
|
}
|
|
26245
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
26246
|
+
* retrieved.
|
|
26247
|
+
*
|
|
26248
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
26249
|
+
*/
|
|
26250
|
+
get gateway() {
|
|
26251
|
+
if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
26252
|
+
if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
|
|
26253
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
26254
|
+
}
|
|
26255
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
26256
|
+
* retrieved.
|
|
26257
|
+
*
|
|
26258
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
26259
|
+
*/
|
|
26260
|
+
get gateways() {
|
|
26261
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
26262
|
+
}
|
|
26227
26263
|
/** When `true`, conveys that for this actor, follow requests are not usually
|
|
26228
26264
|
* automatically approved, but instead are examined by a person who may accept
|
|
26229
26265
|
* or reject the request, at some time in the future. Setting of `false`
|
|
@@ -28093,6 +28129,12 @@ var Application = class Application extends Object$1 {
|
|
|
28093
28129
|
}
|
|
28094
28130
|
if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
28095
28131
|
compactItems = [];
|
|
28132
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
28133
|
+
const item = (0, _fedify_vocab_runtime.formatIri)(v);
|
|
28134
|
+
compactItems.push(item);
|
|
28135
|
+
}
|
|
28136
|
+
if (compactItems.length > 0) result["gateways"] = compactItems;
|
|
28137
|
+
compactItems = [];
|
|
28096
28138
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
28097
28139
|
const item = v;
|
|
28098
28140
|
compactItems.push(item);
|
|
@@ -28308,6 +28350,7 @@ var Application = class Application extends Object$1 {
|
|
|
28308
28350
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
28309
28351
|
result["@context"] = [
|
|
28310
28352
|
"https://www.w3.org/ns/activitystreams",
|
|
28353
|
+
"https://w3id.org/fep/ef61",
|
|
28311
28354
|
"https://w3id.org/security/v1",
|
|
28312
28355
|
"https://w3id.org/security/data-integrity/v1",
|
|
28313
28356
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -28380,6 +28423,12 @@ var Application = class Application extends Object$1 {
|
|
|
28380
28423
|
}
|
|
28381
28424
|
if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
|
|
28382
28425
|
array = [];
|
|
28426
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
28427
|
+
const element = { "@id": (0, _fedify_vocab_runtime.formatIri)(v) };
|
|
28428
|
+
array.push(element);
|
|
28429
|
+
}
|
|
28430
|
+
if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
|
|
28431
|
+
array = [];
|
|
28383
28432
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
28384
28433
|
const element = { "@value": v };
|
|
28385
28434
|
array.push(element);
|
|
@@ -28504,6 +28553,7 @@ var Application = class Application extends Object$1 {
|
|
|
28504
28553
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
|
|
28505
28554
|
const docContext = options.context ?? [
|
|
28506
28555
|
"https://www.w3.org/ns/activitystreams",
|
|
28556
|
+
"https://w3id.org/fep/ef61",
|
|
28507
28557
|
"https://w3id.org/security/v1",
|
|
28508
28558
|
"https://w3id.org/security/data-integrity/v1",
|
|
28509
28559
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -28667,6 +28717,15 @@ var Application = class Application extends Object$1 {
|
|
|
28667
28717
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
|
|
28668
28718
|
}
|
|
28669
28719
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
28720
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
28721
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
|
|
28722
|
+
for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
|
|
28723
|
+
if (v == null) continue;
|
|
28724
|
+
const decoded = (0, _fedify_vocab_runtime.parseGatewayUrl)(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
|
|
28725
|
+
if (typeof decoded === "undefined") continue;
|
|
28726
|
+
_hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
|
|
28727
|
+
}
|
|
28728
|
+
instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
28670
28729
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
28671
28730
|
let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
|
|
28672
28731
|
for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
|
|
@@ -29008,6 +29067,12 @@ var Application = class Application extends Object$1 {
|
|
|
29008
29067
|
} : v);
|
|
29009
29068
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
|
|
29010
29069
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
29070
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
|
|
29071
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
29072
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
29073
|
+
} : v);
|
|
29074
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
29075
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
29011
29076
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
|
|
29012
29077
|
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
29013
29078
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
@@ -30098,6 +30163,7 @@ var Document = class Document extends Object$1 {
|
|
|
30098
30163
|
}
|
|
30099
30164
|
#_2e9AP7WdHBJYAgXG6GEyq7nSkNMe_width = [];
|
|
30100
30165
|
#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [];
|
|
30166
|
+
#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [];
|
|
30101
30167
|
/**
|
|
30102
30168
|
* Constructs a new instance of Document with the given values.
|
|
30103
30169
|
* @param values The values to initialize the instance with.
|
|
@@ -30109,6 +30175,8 @@ var Document = class Document extends Object$1 {
|
|
|
30109
30175
|
else throw new TypeError("The width must be of type number.");
|
|
30110
30176
|
if ("height" in values && values.height != null) if (typeof values.height === "number" && Number.isInteger(values.height) && values.height >= 0) this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [values.height];
|
|
30111
30177
|
else throw new TypeError("The height must be of type number.");
|
|
30178
|
+
if ("digestMultibase" in values && values.digestMultibase != null) if (typeof values.digestMultibase === "string") this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [values.digestMultibase];
|
|
30179
|
+
else throw new TypeError("The digestMultibase must be of type string.");
|
|
30112
30180
|
}
|
|
30113
30181
|
/**
|
|
30114
30182
|
* Clones this instance, optionally updating it with the given values.
|
|
@@ -30131,6 +30199,9 @@ var Document = class Document extends Object$1 {
|
|
|
30131
30199
|
clone.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height;
|
|
30132
30200
|
if ("height" in values && values.height != null) if (typeof values.height === "number" && Number.isInteger(values.height) && values.height >= 0) clone.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [values.height];
|
|
30133
30201
|
else throw new TypeError("The height must be of type number.");
|
|
30202
|
+
clone.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase;
|
|
30203
|
+
if ("digestMultibase" in values && values.digestMultibase != null) if (typeof values.digestMultibase === "string") clone.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [values.digestMultibase];
|
|
30204
|
+
else throw new TypeError("The digestMultibase must be of type string.");
|
|
30134
30205
|
return clone;
|
|
30135
30206
|
}
|
|
30136
30207
|
/** Specifies a hint as to the rendering width in
|
|
@@ -30149,6 +30220,16 @@ var Document = class Document extends Object$1 {
|
|
|
30149
30220
|
if (this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.length < 1) return null;
|
|
30150
30221
|
return this.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height[0];
|
|
30151
30222
|
}
|
|
30223
|
+
/** The multibase-encoded integrity digest of an external resource represented
|
|
30224
|
+
* by this document.
|
|
30225
|
+
*
|
|
30226
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
30227
|
+
*/
|
|
30228
|
+
get digestMultibase() {
|
|
30229
|
+
if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
30230
|
+
if (this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.length < 1) return null;
|
|
30231
|
+
return this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase[0];
|
|
30232
|
+
}
|
|
30152
30233
|
/**
|
|
30153
30234
|
* Converts this object to a JSON-LD structure.
|
|
30154
30235
|
* @param options The options to use.
|
|
@@ -30184,11 +30265,18 @@ var Document = class Document extends Object$1 {
|
|
|
30184
30265
|
compactItems.push(item);
|
|
30185
30266
|
}
|
|
30186
30267
|
if (compactItems.length > 0) result["height"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
30268
|
+
compactItems = [];
|
|
30269
|
+
for (const v of this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase) {
|
|
30270
|
+
const item = v;
|
|
30271
|
+
compactItems.push(item);
|
|
30272
|
+
}
|
|
30273
|
+
if (compactItems.length > 0) result["digestMultibase"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
30187
30274
|
result["type"] = "Document";
|
|
30188
30275
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
30189
30276
|
result["@context"] = [
|
|
30190
30277
|
"https://www.w3.org/ns/activitystreams",
|
|
30191
|
-
"https://w3id.org/security/data-integrity/
|
|
30278
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
30279
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
30192
30280
|
"https://gotosocial.org/ns"
|
|
30193
30281
|
];
|
|
30194
30282
|
return result;
|
|
@@ -30217,12 +30305,19 @@ var Document = class Document extends Object$1 {
|
|
|
30217
30305
|
array.push(element);
|
|
30218
30306
|
}
|
|
30219
30307
|
if (array.length > 0) values["https://www.w3.org/ns/activitystreams#height"] = array;
|
|
30308
|
+
array = [];
|
|
30309
|
+
for (const v of this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase) {
|
|
30310
|
+
const element = { "@value": v };
|
|
30311
|
+
array.push(element);
|
|
30312
|
+
}
|
|
30313
|
+
if (array.length > 0) values["https://www.w3.org/ns/credentials/v2#digestMultibase"] = array;
|
|
30220
30314
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Document"];
|
|
30221
30315
|
if (this.id != null) values["@id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
30222
30316
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
|
|
30223
30317
|
const docContext = options.context ?? [
|
|
30224
30318
|
"https://www.w3.org/ns/activitystreams",
|
|
30225
|
-
"https://w3id.org/security/data-integrity/
|
|
30319
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
30320
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
30226
30321
|
"https://gotosocial.org/ns"
|
|
30227
30322
|
];
|
|
30228
30323
|
const compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
@@ -30323,6 +30418,15 @@ var Document = class Document extends Object$1 {
|
|
|
30323
30418
|
_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.push(decoded);
|
|
30324
30419
|
}
|
|
30325
30420
|
instance.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height;
|
|
30421
|
+
const _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [];
|
|
30422
|
+
let _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array = values["https://www.w3.org/ns/credentials/v2#digestMultibase"];
|
|
30423
|
+
for (const v of _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array == null ? [] : _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array.length === 1 && "@list" in _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array[0] ? _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array[0]["@list"] : _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array) {
|
|
30424
|
+
if (v == null) continue;
|
|
30425
|
+
const decoded = v["@value"];
|
|
30426
|
+
if (typeof decoded === "undefined") continue;
|
|
30427
|
+
_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.push(decoded);
|
|
30428
|
+
}
|
|
30429
|
+
instance.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase;
|
|
30326
30430
|
if (!("_fromSubclass" in options) || !options._fromSubclass) try {
|
|
30327
30431
|
if (cacheJsonLd != null && cacheJsonLd !== expanded) {
|
|
30328
30432
|
const compactArray = Array.isArray(json) && json.length === 1;
|
|
@@ -30347,6 +30451,11 @@ var Document = class Document extends Object$1 {
|
|
|
30347
30451
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
30348
30452
|
} : v);
|
|
30349
30453
|
if (_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height.length == 1) proxy.height = _2cGKFeFJMmiNpGZFEF75mCwFQsKb_height[0];
|
|
30454
|
+
const _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.map((v) => v instanceof URL ? {
|
|
30455
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
30456
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
30457
|
+
} : v);
|
|
30458
|
+
if (_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.length == 1) proxy.digestMultibase = _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase[0];
|
|
30350
30459
|
return proxy;
|
|
30351
30460
|
}
|
|
30352
30461
|
};
|
|
@@ -30416,7 +30525,8 @@ var Audio = class Audio extends Document {
|
|
|
30416
30525
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
30417
30526
|
result["@context"] = [
|
|
30418
30527
|
"https://www.w3.org/ns/activitystreams",
|
|
30419
|
-
"https://w3id.org/security/data-integrity/
|
|
30528
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
30529
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
30420
30530
|
"https://gotosocial.org/ns"
|
|
30421
30531
|
];
|
|
30422
30532
|
return result;
|
|
@@ -30431,7 +30541,8 @@ var Audio = class Audio extends Document {
|
|
|
30431
30541
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
|
|
30432
30542
|
const docContext = options.context ?? [
|
|
30433
30543
|
"https://www.w3.org/ns/activitystreams",
|
|
30434
|
-
"https://w3id.org/security/data-integrity/
|
|
30544
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
30545
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
30435
30546
|
"https://gotosocial.org/ns"
|
|
30436
30547
|
];
|
|
30437
30548
|
const compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
@@ -33182,6 +33293,7 @@ var Group = class Group extends Object$1 {
|
|
|
33182
33293
|
#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
|
|
33183
33294
|
#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
|
|
33184
33295
|
#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
|
|
33296
|
+
#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
33185
33297
|
#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
33186
33298
|
#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
|
|
33187
33299
|
#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
|
|
@@ -33250,6 +33362,13 @@ var Group = class Group extends Object$1 {
|
|
|
33250
33362
|
for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
33251
33363
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
33252
33364
|
}
|
|
33365
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
33366
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
33367
|
+
if ("gateways" in values && values.gateways != null) {
|
|
33368
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
|
|
33369
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
33370
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
33371
|
+
}
|
|
33253
33372
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
33254
33373
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
33255
33374
|
if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
|
|
@@ -33380,6 +33499,14 @@ var Group = class Group extends Object$1 {
|
|
|
33380
33499
|
for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
33381
33500
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
33382
33501
|
}
|
|
33502
|
+
clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
33503
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
33504
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
33505
|
+
if ("gateways" in values && values.gateways != null) {
|
|
33506
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
|
|
33507
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
33508
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
33509
|
+
}
|
|
33383
33510
|
clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
|
|
33384
33511
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
33385
33512
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
@@ -33853,6 +33980,24 @@ var Group = class Group extends Object$1 {
|
|
|
33853
33980
|
yield v;
|
|
33854
33981
|
}
|
|
33855
33982
|
}
|
|
33983
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
33984
|
+
* retrieved.
|
|
33985
|
+
*
|
|
33986
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
33987
|
+
*/
|
|
33988
|
+
get gateway() {
|
|
33989
|
+
if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
33990
|
+
if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
|
|
33991
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
33992
|
+
}
|
|
33993
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
33994
|
+
* retrieved.
|
|
33995
|
+
*
|
|
33996
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
33997
|
+
*/
|
|
33998
|
+
get gateways() {
|
|
33999
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
34000
|
+
}
|
|
33856
34001
|
/** When `true`, conveys that for this actor, follow requests are not usually
|
|
33857
34002
|
* automatically approved, but instead are examined by a person who may accept
|
|
33858
34003
|
* or reject the request, at some time in the future. Setting of `false`
|
|
@@ -35722,6 +35867,12 @@ var Group = class Group extends Object$1 {
|
|
|
35722
35867
|
}
|
|
35723
35868
|
if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
35724
35869
|
compactItems = [];
|
|
35870
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
35871
|
+
const item = (0, _fedify_vocab_runtime.formatIri)(v);
|
|
35872
|
+
compactItems.push(item);
|
|
35873
|
+
}
|
|
35874
|
+
if (compactItems.length > 0) result["gateways"] = compactItems;
|
|
35875
|
+
compactItems = [];
|
|
35725
35876
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
35726
35877
|
const item = v;
|
|
35727
35878
|
compactItems.push(item);
|
|
@@ -35937,6 +36088,7 @@ var Group = class Group extends Object$1 {
|
|
|
35937
36088
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
35938
36089
|
result["@context"] = [
|
|
35939
36090
|
"https://www.w3.org/ns/activitystreams",
|
|
36091
|
+
"https://w3id.org/fep/ef61",
|
|
35940
36092
|
"https://w3id.org/security/v1",
|
|
35941
36093
|
"https://w3id.org/security/data-integrity/v1",
|
|
35942
36094
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -36009,6 +36161,12 @@ var Group = class Group extends Object$1 {
|
|
|
36009
36161
|
}
|
|
36010
36162
|
if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
|
|
36011
36163
|
array = [];
|
|
36164
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
36165
|
+
const element = { "@id": (0, _fedify_vocab_runtime.formatIri)(v) };
|
|
36166
|
+
array.push(element);
|
|
36167
|
+
}
|
|
36168
|
+
if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
|
|
36169
|
+
array = [];
|
|
36012
36170
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
36013
36171
|
const element = { "@value": v };
|
|
36014
36172
|
array.push(element);
|
|
@@ -36133,6 +36291,7 @@ var Group = class Group extends Object$1 {
|
|
|
36133
36291
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
|
|
36134
36292
|
const docContext = options.context ?? [
|
|
36135
36293
|
"https://www.w3.org/ns/activitystreams",
|
|
36294
|
+
"https://w3id.org/fep/ef61",
|
|
36136
36295
|
"https://w3id.org/security/v1",
|
|
36137
36296
|
"https://w3id.org/security/data-integrity/v1",
|
|
36138
36297
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -36296,6 +36455,15 @@ var Group = class Group extends Object$1 {
|
|
|
36296
36455
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
|
|
36297
36456
|
}
|
|
36298
36457
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
36458
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
36459
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
|
|
36460
|
+
for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
|
|
36461
|
+
if (v == null) continue;
|
|
36462
|
+
const decoded = (0, _fedify_vocab_runtime.parseGatewayUrl)(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
|
|
36463
|
+
if (typeof decoded === "undefined") continue;
|
|
36464
|
+
_hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
|
|
36465
|
+
}
|
|
36466
|
+
instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
36299
36467
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
36300
36468
|
let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
|
|
36301
36469
|
for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
|
|
@@ -36637,6 +36805,12 @@ var Group = class Group extends Object$1 {
|
|
|
36637
36805
|
} : v);
|
|
36638
36806
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
|
|
36639
36807
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
36808
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
|
|
36809
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
36810
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
36811
|
+
} : v);
|
|
36812
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
36813
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
36640
36814
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
|
|
36641
36815
|
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
36642
36816
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
@@ -36795,6 +36969,7 @@ var Link = class Link {
|
|
|
36795
36969
|
#_pVjLsybKQdmkjuU7MHjiVmNnuj7_href = [];
|
|
36796
36970
|
#_2a1c5GkfkQsnyyLybF8UXBQfFuHZ_rel = [];
|
|
36797
36971
|
#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = [];
|
|
36972
|
+
#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [];
|
|
36798
36973
|
#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [];
|
|
36799
36974
|
#_f57HKWCp1YRBbTJE8PF12RbDJGf_hreflang = [];
|
|
36800
36975
|
#_2cGKFeFJMmiNpGZFEF75mCwFQsKb_height = [];
|
|
@@ -36826,6 +37001,8 @@ var Link = class Link {
|
|
|
36826
37001
|
}
|
|
36827
37002
|
if ("mediaType" in values && values.mediaType != null) if (typeof values.mediaType === "string") this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = [values.mediaType];
|
|
36828
37003
|
else throw new TypeError("The mediaType must be of type string.");
|
|
37004
|
+
if ("digestMultibase" in values && values.digestMultibase != null) if (typeof values.digestMultibase === "string") this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [values.digestMultibase];
|
|
37005
|
+
else throw new TypeError("The digestMultibase must be of type string.");
|
|
36829
37006
|
if ("name" in values && values.name != null) if (typeof values.name === "string" || values.name instanceof _fedify_vocab_runtime.LanguageString) this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [values.name];
|
|
36830
37007
|
else throw new TypeError("The name must be of type string | LanguageString.");
|
|
36831
37008
|
if ("names" in values && values.names != null) {
|
|
@@ -36873,6 +37050,9 @@ var Link = class Link {
|
|
|
36873
37050
|
clone.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType;
|
|
36874
37051
|
if ("mediaType" in values && values.mediaType != null) if (typeof values.mediaType === "string") clone.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = [values.mediaType];
|
|
36875
37052
|
else throw new TypeError("The mediaType must be of type string.");
|
|
37053
|
+
clone.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase;
|
|
37054
|
+
if ("digestMultibase" in values && values.digestMultibase != null) if (typeof values.digestMultibase === "string") clone.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [values.digestMultibase];
|
|
37055
|
+
else throw new TypeError("The digestMultibase must be of type string.");
|
|
36876
37056
|
clone.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name;
|
|
36877
37057
|
if ("name" in values && values.name != null) if (typeof values.name === "string" || values.name instanceof _fedify_vocab_runtime.LanguageString) clone.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [values.name];
|
|
36878
37058
|
else throw new TypeError("The name must be of type string | LanguageString.");
|
|
@@ -36936,6 +37116,15 @@ var Link = class Link {
|
|
|
36936
37116
|
if (this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.length < 1) return null;
|
|
36937
37117
|
return this.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType[0];
|
|
36938
37118
|
}
|
|
37119
|
+
/** The multibase-encoded integrity digest of the linked resource.
|
|
37120
|
+
*
|
|
37121
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
37122
|
+
*/
|
|
37123
|
+
get digestMultibase() {
|
|
37124
|
+
if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
37125
|
+
if (this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.length < 1) return null;
|
|
37126
|
+
return this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase[0];
|
|
37127
|
+
}
|
|
36939
37128
|
/** A simple, human-readable, plain-text name for the object. HTML markup MUST
|
|
36940
37129
|
* NOT be included. The name MAY be expressed using multiple language-tagged
|
|
36941
37130
|
* values.
|
|
@@ -37148,6 +37337,12 @@ var Link = class Link {
|
|
|
37148
37337
|
}
|
|
37149
37338
|
if (compactItems.length > 0) result["mediaType"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
37150
37339
|
compactItems = [];
|
|
37340
|
+
for (const v of this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase) {
|
|
37341
|
+
const item = v;
|
|
37342
|
+
compactItems.push(item);
|
|
37343
|
+
}
|
|
37344
|
+
if (compactItems.length > 0) result["digestMultibase"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
37345
|
+
compactItems = [];
|
|
37151
37346
|
for (const v of this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name) {
|
|
37152
37347
|
const item = typeof v === "string" ? v : {
|
|
37153
37348
|
"@value": v.toString(),
|
|
@@ -37190,7 +37385,7 @@ var Link = class Link {
|
|
|
37190
37385
|
if (compactItems.length > 0) result["preview"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
37191
37386
|
result["type"] = "Link";
|
|
37192
37387
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
37193
|
-
result["@context"] = "https://www.w3.org/ns/activitystreams";
|
|
37388
|
+
result["@context"] = ["https://www.w3.org/ns/activitystreams", "https://w3id.org/fep/ef61"];
|
|
37194
37389
|
return result;
|
|
37195
37390
|
}
|
|
37196
37391
|
let array;
|
|
@@ -37214,6 +37409,12 @@ var Link = class Link {
|
|
|
37214
37409
|
}
|
|
37215
37410
|
if (array.length > 0) values["https://www.w3.org/ns/activitystreams#mediaType"] = array;
|
|
37216
37411
|
array = [];
|
|
37412
|
+
for (const v of this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase) {
|
|
37413
|
+
const element = { "@value": v };
|
|
37414
|
+
array.push(element);
|
|
37415
|
+
}
|
|
37416
|
+
if (array.length > 0) values["https://www.w3.org/ns/credentials/v2#digestMultibase"] = array;
|
|
37417
|
+
array = [];
|
|
37217
37418
|
for (const v of this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name) {
|
|
37218
37419
|
const element = typeof v === "string" ? { "@value": v } : {
|
|
37219
37420
|
"@value": v.toString(),
|
|
@@ -37255,7 +37456,7 @@ var Link = class Link {
|
|
|
37255
37456
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Link"];
|
|
37256
37457
|
if (this.id != null) values["@id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
37257
37458
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
|
|
37258
|
-
const docContext = options.context ?? "https://www.w3.org/ns/activitystreams";
|
|
37459
|
+
const docContext = options.context ?? ["https://www.w3.org/ns/activitystreams", "https://w3id.org/fep/ef61"];
|
|
37259
37460
|
const compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
37260
37461
|
if (docContext != null) {}
|
|
37261
37462
|
return compacted;
|
|
@@ -37354,6 +37555,15 @@ var Link = class Link {
|
|
|
37354
37555
|
_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.push(decoded);
|
|
37355
37556
|
}
|
|
37356
37557
|
instance.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType = _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType;
|
|
37558
|
+
const _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = [];
|
|
37559
|
+
let _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array = values["https://www.w3.org/ns/credentials/v2#digestMultibase"];
|
|
37560
|
+
for (const v of _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array == null ? [] : _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array.length === 1 && "@list" in _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array[0] ? _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array[0]["@list"] : _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase__array) {
|
|
37561
|
+
if (v == null) continue;
|
|
37562
|
+
const decoded = v["@value"];
|
|
37563
|
+
if (typeof decoded === "undefined") continue;
|
|
37564
|
+
_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.push(decoded);
|
|
37565
|
+
}
|
|
37566
|
+
instance.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase;
|
|
37357
37567
|
const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = [];
|
|
37358
37568
|
let _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array = values["https://www.w3.org/ns/activitystreams#name"];
|
|
37359
37569
|
for (const v of _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array == null ? [] : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array.length === 1 && "@list" in _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array[0] ? _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array[0]["@list"] : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name__array) {
|
|
@@ -37518,6 +37728,11 @@ var Link = class Link {
|
|
|
37518
37728
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
37519
37729
|
} : v);
|
|
37520
37730
|
if (_3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType.length == 1) proxy.mediaType = _3BLrzmscsjHCw8TF5BHRW9WkPnX8_mediaType[0];
|
|
37731
|
+
const _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase = this.#_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.map((v) => v instanceof URL ? {
|
|
37732
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
37733
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
37734
|
+
} : v);
|
|
37735
|
+
if (_2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase.length == 1) proxy.digestMultibase = _2ydcBe182LRq82jFGE6Rxw6VfvEM_digestMultibase[0];
|
|
37521
37736
|
const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name = this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.map((v) => v instanceof URL ? {
|
|
37522
37737
|
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
37523
37738
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
@@ -37780,7 +37995,8 @@ var Image = class Image extends Document {
|
|
|
37780
37995
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
37781
37996
|
result["@context"] = [
|
|
37782
37997
|
"https://www.w3.org/ns/activitystreams",
|
|
37783
|
-
"https://w3id.org/security/data-integrity/
|
|
37998
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
37999
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
37784
38000
|
"https://gotosocial.org/ns"
|
|
37785
38001
|
];
|
|
37786
38002
|
return result;
|
|
@@ -37795,7 +38011,8 @@ var Image = class Image extends Document {
|
|
|
37795
38011
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
|
|
37796
38012
|
const docContext = options.context ?? [
|
|
37797
38013
|
"https://www.w3.org/ns/activitystreams",
|
|
37798
|
-
"https://w3id.org/security/data-integrity/
|
|
38014
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
38015
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
37799
38016
|
"https://gotosocial.org/ns"
|
|
37800
38017
|
];
|
|
37801
38018
|
const compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
@@ -40406,6 +40623,7 @@ var Organization = class Organization extends Object$1 {
|
|
|
40406
40623
|
#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
|
|
40407
40624
|
#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
|
|
40408
40625
|
#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
|
|
40626
|
+
#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
40409
40627
|
#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
40410
40628
|
#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
|
|
40411
40629
|
#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
|
|
@@ -40474,6 +40692,13 @@ var Organization = class Organization extends Object$1 {
|
|
|
40474
40692
|
for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
40475
40693
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
40476
40694
|
}
|
|
40695
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
40696
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
40697
|
+
if ("gateways" in values && values.gateways != null) {
|
|
40698
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
|
|
40699
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
40700
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
40701
|
+
}
|
|
40477
40702
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
40478
40703
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
40479
40704
|
if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
|
|
@@ -40604,6 +40829,14 @@ var Organization = class Organization extends Object$1 {
|
|
|
40604
40829
|
for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
40605
40830
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
40606
40831
|
}
|
|
40832
|
+
clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
40833
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
40834
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
40835
|
+
if ("gateways" in values && values.gateways != null) {
|
|
40836
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
|
|
40837
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
40838
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
40839
|
+
}
|
|
40607
40840
|
clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
|
|
40608
40841
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
40609
40842
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
@@ -41077,6 +41310,24 @@ var Organization = class Organization extends Object$1 {
|
|
|
41077
41310
|
yield v;
|
|
41078
41311
|
}
|
|
41079
41312
|
}
|
|
41313
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
41314
|
+
* retrieved.
|
|
41315
|
+
*
|
|
41316
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
41317
|
+
*/
|
|
41318
|
+
get gateway() {
|
|
41319
|
+
if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
41320
|
+
if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
|
|
41321
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
41322
|
+
}
|
|
41323
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
41324
|
+
* retrieved.
|
|
41325
|
+
*
|
|
41326
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
41327
|
+
*/
|
|
41328
|
+
get gateways() {
|
|
41329
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
41330
|
+
}
|
|
41080
41331
|
/** When `true`, conveys that for this actor, follow requests are not usually
|
|
41081
41332
|
* automatically approved, but instead are examined by a person who may accept
|
|
41082
41333
|
* or reject the request, at some time in the future. Setting of `false`
|
|
@@ -42946,6 +43197,12 @@ var Organization = class Organization extends Object$1 {
|
|
|
42946
43197
|
}
|
|
42947
43198
|
if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
42948
43199
|
compactItems = [];
|
|
43200
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
43201
|
+
const item = (0, _fedify_vocab_runtime.formatIri)(v);
|
|
43202
|
+
compactItems.push(item);
|
|
43203
|
+
}
|
|
43204
|
+
if (compactItems.length > 0) result["gateways"] = compactItems;
|
|
43205
|
+
compactItems = [];
|
|
42949
43206
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
42950
43207
|
const item = v;
|
|
42951
43208
|
compactItems.push(item);
|
|
@@ -43161,6 +43418,7 @@ var Organization = class Organization extends Object$1 {
|
|
|
43161
43418
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
43162
43419
|
result["@context"] = [
|
|
43163
43420
|
"https://www.w3.org/ns/activitystreams",
|
|
43421
|
+
"https://w3id.org/fep/ef61",
|
|
43164
43422
|
"https://w3id.org/security/v1",
|
|
43165
43423
|
"https://w3id.org/security/data-integrity/v1",
|
|
43166
43424
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -43233,6 +43491,12 @@ var Organization = class Organization extends Object$1 {
|
|
|
43233
43491
|
}
|
|
43234
43492
|
if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
|
|
43235
43493
|
array = [];
|
|
43494
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
43495
|
+
const element = { "@id": (0, _fedify_vocab_runtime.formatIri)(v) };
|
|
43496
|
+
array.push(element);
|
|
43497
|
+
}
|
|
43498
|
+
if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
|
|
43499
|
+
array = [];
|
|
43236
43500
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
43237
43501
|
const element = { "@value": v };
|
|
43238
43502
|
array.push(element);
|
|
@@ -43357,6 +43621,7 @@ var Organization = class Organization extends Object$1 {
|
|
|
43357
43621
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
|
|
43358
43622
|
const docContext = options.context ?? [
|
|
43359
43623
|
"https://www.w3.org/ns/activitystreams",
|
|
43624
|
+
"https://w3id.org/fep/ef61",
|
|
43360
43625
|
"https://w3id.org/security/v1",
|
|
43361
43626
|
"https://w3id.org/security/data-integrity/v1",
|
|
43362
43627
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -43520,6 +43785,15 @@ var Organization = class Organization extends Object$1 {
|
|
|
43520
43785
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
|
|
43521
43786
|
}
|
|
43522
43787
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
43788
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
43789
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
|
|
43790
|
+
for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
|
|
43791
|
+
if (v == null) continue;
|
|
43792
|
+
const decoded = (0, _fedify_vocab_runtime.parseGatewayUrl)(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
|
|
43793
|
+
if (typeof decoded === "undefined") continue;
|
|
43794
|
+
_hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
|
|
43795
|
+
}
|
|
43796
|
+
instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
43523
43797
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
43524
43798
|
let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
|
|
43525
43799
|
for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
|
|
@@ -43861,6 +44135,12 @@ var Organization = class Organization extends Object$1 {
|
|
|
43861
44135
|
} : v);
|
|
43862
44136
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
|
|
43863
44137
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
44138
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
|
|
44139
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
44140
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
44141
|
+
} : v);
|
|
44142
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
44143
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
43864
44144
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
|
|
43865
44145
|
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
43866
44146
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
@@ -44032,7 +44312,8 @@ var Page = class Page extends Document {
|
|
|
44032
44312
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
44033
44313
|
result["@context"] = [
|
|
44034
44314
|
"https://www.w3.org/ns/activitystreams",
|
|
44035
|
-
"https://w3id.org/security/data-integrity/
|
|
44315
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
44316
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
44036
44317
|
"https://gotosocial.org/ns"
|
|
44037
44318
|
];
|
|
44038
44319
|
return result;
|
|
@@ -44047,7 +44328,8 @@ var Page = class Page extends Document {
|
|
|
44047
44328
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
|
|
44048
44329
|
const docContext = options.context ?? [
|
|
44049
44330
|
"https://www.w3.org/ns/activitystreams",
|
|
44050
|
-
"https://w3id.org/security/data-integrity/
|
|
44331
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
44332
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
44051
44333
|
"https://gotosocial.org/ns"
|
|
44052
44334
|
];
|
|
44053
44335
|
const compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|
|
@@ -44162,6 +44444,7 @@ var Person = class Person extends Object$1 {
|
|
|
44162
44444
|
#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
|
|
44163
44445
|
#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
|
|
44164
44446
|
#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
|
|
44447
|
+
#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
44165
44448
|
#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
44166
44449
|
#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
|
|
44167
44450
|
#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
|
|
@@ -44230,6 +44513,13 @@ var Person = class Person extends Object$1 {
|
|
|
44230
44513
|
for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
44231
44514
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
44232
44515
|
}
|
|
44516
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
44517
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
44518
|
+
if ("gateways" in values && values.gateways != null) {
|
|
44519
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
|
|
44520
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
44521
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
44522
|
+
}
|
|
44233
44523
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
44234
44524
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
44235
44525
|
if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
|
|
@@ -44360,6 +44650,14 @@ var Person = class Person extends Object$1 {
|
|
|
44360
44650
|
for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
44361
44651
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
44362
44652
|
}
|
|
44653
|
+
clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
44654
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
44655
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
44656
|
+
if ("gateways" in values && values.gateways != null) {
|
|
44657
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
|
|
44658
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
44659
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
44660
|
+
}
|
|
44363
44661
|
clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
|
|
44364
44662
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
44365
44663
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
@@ -44833,6 +45131,24 @@ var Person = class Person extends Object$1 {
|
|
|
44833
45131
|
yield v;
|
|
44834
45132
|
}
|
|
44835
45133
|
}
|
|
45134
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
45135
|
+
* retrieved.
|
|
45136
|
+
*
|
|
45137
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
45138
|
+
*/
|
|
45139
|
+
get gateway() {
|
|
45140
|
+
if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
45141
|
+
if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
|
|
45142
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
45143
|
+
}
|
|
45144
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
45145
|
+
* retrieved.
|
|
45146
|
+
*
|
|
45147
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
45148
|
+
*/
|
|
45149
|
+
get gateways() {
|
|
45150
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
45151
|
+
}
|
|
44836
45152
|
/** When `true`, conveys that for this actor, follow requests are not usually
|
|
44837
45153
|
* automatically approved, but instead are examined by a person who may accept
|
|
44838
45154
|
* or reject the request, at some time in the future. Setting of `false`
|
|
@@ -46702,6 +47018,12 @@ var Person = class Person extends Object$1 {
|
|
|
46702
47018
|
}
|
|
46703
47019
|
if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
46704
47020
|
compactItems = [];
|
|
47021
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
47022
|
+
const item = (0, _fedify_vocab_runtime.formatIri)(v);
|
|
47023
|
+
compactItems.push(item);
|
|
47024
|
+
}
|
|
47025
|
+
if (compactItems.length > 0) result["gateways"] = compactItems;
|
|
47026
|
+
compactItems = [];
|
|
46705
47027
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
46706
47028
|
const item = v;
|
|
46707
47029
|
compactItems.push(item);
|
|
@@ -46917,6 +47239,7 @@ var Person = class Person extends Object$1 {
|
|
|
46917
47239
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
46918
47240
|
result["@context"] = [
|
|
46919
47241
|
"https://www.w3.org/ns/activitystreams",
|
|
47242
|
+
"https://w3id.org/fep/ef61",
|
|
46920
47243
|
"https://w3id.org/security/v1",
|
|
46921
47244
|
"https://w3id.org/security/data-integrity/v1",
|
|
46922
47245
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -46989,6 +47312,12 @@ var Person = class Person extends Object$1 {
|
|
|
46989
47312
|
}
|
|
46990
47313
|
if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
|
|
46991
47314
|
array = [];
|
|
47315
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
47316
|
+
const element = { "@id": (0, _fedify_vocab_runtime.formatIri)(v) };
|
|
47317
|
+
array.push(element);
|
|
47318
|
+
}
|
|
47319
|
+
if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
|
|
47320
|
+
array = [];
|
|
46992
47321
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
46993
47322
|
const element = { "@value": v };
|
|
46994
47323
|
array.push(element);
|
|
@@ -47113,6 +47442,7 @@ var Person = class Person extends Object$1 {
|
|
|
47113
47442
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
|
|
47114
47443
|
const docContext = options.context ?? [
|
|
47115
47444
|
"https://www.w3.org/ns/activitystreams",
|
|
47445
|
+
"https://w3id.org/fep/ef61",
|
|
47116
47446
|
"https://w3id.org/security/v1",
|
|
47117
47447
|
"https://w3id.org/security/data-integrity/v1",
|
|
47118
47448
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -47276,6 +47606,15 @@ var Person = class Person extends Object$1 {
|
|
|
47276
47606
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
|
|
47277
47607
|
}
|
|
47278
47608
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
47609
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
47610
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
|
|
47611
|
+
for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
|
|
47612
|
+
if (v == null) continue;
|
|
47613
|
+
const decoded = (0, _fedify_vocab_runtime.parseGatewayUrl)(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
|
|
47614
|
+
if (typeof decoded === "undefined") continue;
|
|
47615
|
+
_hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
|
|
47616
|
+
}
|
|
47617
|
+
instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
47279
47618
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
47280
47619
|
let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
|
|
47281
47620
|
for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
|
|
@@ -47617,6 +47956,12 @@ var Person = class Person extends Object$1 {
|
|
|
47617
47956
|
} : v);
|
|
47618
47957
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
|
|
47619
47958
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
47959
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
|
|
47960
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
47961
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
47962
|
+
} : v);
|
|
47963
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
47964
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
47620
47965
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
|
|
47621
47966
|
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
47622
47967
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
@@ -50851,6 +51196,7 @@ var Service = class Service extends Object$1 {
|
|
|
50851
51196
|
#_trust_axq166E2eZADq34V4MYUc8KMZdC_publicKey = /* @__PURE__ */ new Set();
|
|
50852
51197
|
#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = [];
|
|
50853
51198
|
#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = /* @__PURE__ */ new Set();
|
|
51199
|
+
#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
50854
51200
|
#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
50855
51201
|
#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [];
|
|
50856
51202
|
#_trust_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = /* @__PURE__ */ new Set();
|
|
@@ -50919,6 +51265,13 @@ var Service = class Service extends Object$1 {
|
|
|
50919
51265
|
for (let i = 0; i < values.assertionMethods.length; i++) this.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
50920
51266
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
50921
51267
|
}
|
|
51268
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(values.gateway)) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
51269
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
51270
|
+
if ("gateways" in values && values.gateways != null) {
|
|
51271
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot initialize both gateway and gateways at the same time.");
|
|
51272
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(v))) this.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
51273
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
51274
|
+
}
|
|
50922
51275
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
50923
51276
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
50924
51277
|
if ("inbox" in values && values.inbox != null) if (values.inbox instanceof OrderedCollection || values.inbox instanceof OrderedCollectionPage || values.inbox instanceof URL) {
|
|
@@ -51049,6 +51402,14 @@ var Service = class Service extends Object$1 {
|
|
|
51049
51402
|
for (let i = 0; i < values.assertionMethods.length; i++) clone.#_trust_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.add(i);
|
|
51050
51403
|
} else throw new TypeError("The assertionMethods must be an array of type Multikey | URL.");
|
|
51051
51404
|
}
|
|
51405
|
+
clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
51406
|
+
if ("gateway" in values && values.gateway != null) if (values.gateway instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(values.gateway)) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = [values.gateway];
|
|
51407
|
+
else throw new TypeError("The gateway must be of type URL.");
|
|
51408
|
+
if ("gateways" in values && values.gateways != null) {
|
|
51409
|
+
if ("gateway" in values && values.gateway != null) throw new TypeError("Cannot update both gateway and gateways at the same time.");
|
|
51410
|
+
if (Array.isArray(values.gateways) && values.gateways.every((v) => v instanceof URL && (0, _fedify_vocab_runtime.isGatewayUrl)(v))) clone.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = values.gateways;
|
|
51411
|
+
else throw new TypeError("The gateways must be an array of type URL.");
|
|
51412
|
+
}
|
|
51052
51413
|
clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers;
|
|
51053
51414
|
if ("manuallyApprovesFollowers" in values && values.manuallyApprovesFollowers != null) if (typeof values.manuallyApprovesFollowers === "boolean") clone.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [values.manuallyApprovesFollowers];
|
|
51054
51415
|
else throw new TypeError("The manuallyApprovesFollowers must be of type boolean.");
|
|
@@ -51522,6 +51883,24 @@ var Service = class Service extends Object$1 {
|
|
|
51522
51883
|
yield v;
|
|
51523
51884
|
}
|
|
51524
51885
|
}
|
|
51886
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
51887
|
+
* retrieved.
|
|
51888
|
+
*
|
|
51889
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
51890
|
+
*/
|
|
51891
|
+
get gateway() {
|
|
51892
|
+
if (this._warning != null) (0, _logtape_logtape.getLogger)(this._warning.category).warn(this._warning.message, this._warning.values);
|
|
51893
|
+
if (this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.length < 1) return null;
|
|
51894
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
51895
|
+
}
|
|
51896
|
+
/** Gateways where the latest version of this portable actor object can be
|
|
51897
|
+
* retrieved.
|
|
51898
|
+
*
|
|
51899
|
+
* See [FEP-ef61](https://w3id.org/fep/ef61) for details.
|
|
51900
|
+
*/
|
|
51901
|
+
get gateways() {
|
|
51902
|
+
return this.#_hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
51903
|
+
}
|
|
51525
51904
|
/** When `true`, conveys that for this actor, follow requests are not usually
|
|
51526
51905
|
* automatically approved, but instead are examined by a person who may accept
|
|
51527
51906
|
* or reject the request, at some time in the future. Setting of `false`
|
|
@@ -53391,6 +53770,12 @@ var Service = class Service extends Object$1 {
|
|
|
53391
53770
|
}
|
|
53392
53771
|
if (compactItems.length > 0) result["assertionMethod"] = compactItems.length > 1 ? compactItems : compactItems[0];
|
|
53393
53772
|
compactItems = [];
|
|
53773
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
53774
|
+
const item = (0, _fedify_vocab_runtime.formatIri)(v);
|
|
53775
|
+
compactItems.push(item);
|
|
53776
|
+
}
|
|
53777
|
+
if (compactItems.length > 0) result["gateways"] = compactItems;
|
|
53778
|
+
compactItems = [];
|
|
53394
53779
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
53395
53780
|
const item = v;
|
|
53396
53781
|
compactItems.push(item);
|
|
@@ -53606,6 +53991,7 @@ var Service = class Service extends Object$1 {
|
|
|
53606
53991
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
53607
53992
|
result["@context"] = [
|
|
53608
53993
|
"https://www.w3.org/ns/activitystreams",
|
|
53994
|
+
"https://w3id.org/fep/ef61",
|
|
53609
53995
|
"https://w3id.org/security/v1",
|
|
53610
53996
|
"https://w3id.org/security/data-integrity/v1",
|
|
53611
53997
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -53678,6 +54064,12 @@ var Service = class Service extends Object$1 {
|
|
|
53678
54064
|
}
|
|
53679
54065
|
if (array.length > 0) values["https://w3id.org/security#assertionMethod"] = array;
|
|
53680
54066
|
array = [];
|
|
54067
|
+
for (const v of this.#_hQiaHhZP8hqxckxTBrpsGNs57E3) {
|
|
54068
|
+
const element = { "@id": (0, _fedify_vocab_runtime.formatIri)(v) };
|
|
54069
|
+
array.push(element);
|
|
54070
|
+
}
|
|
54071
|
+
if (array.length > 0) values["https://w3id.org/fep/ef61/gateways"] = { "@list": array };
|
|
54072
|
+
array = [];
|
|
53681
54073
|
for (const v of this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers) {
|
|
53682
54074
|
const element = { "@value": v };
|
|
53683
54075
|
array.push(element);
|
|
@@ -53802,6 +54194,7 @@ var Service = class Service extends Object$1 {
|
|
|
53802
54194
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
|
|
53803
54195
|
const docContext = options.context ?? [
|
|
53804
54196
|
"https://www.w3.org/ns/activitystreams",
|
|
54197
|
+
"https://w3id.org/fep/ef61",
|
|
53805
54198
|
"https://w3id.org/security/v1",
|
|
53806
54199
|
"https://w3id.org/security/data-integrity/v1",
|
|
53807
54200
|
"https://www.w3.org/ns/did/v1",
|
|
@@ -53965,6 +54358,15 @@ var Service = class Service extends Object$1 {
|
|
|
53965
54358
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(decoded);
|
|
53966
54359
|
}
|
|
53967
54360
|
instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
54361
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = [];
|
|
54362
|
+
let _hQiaHhZP8hqxckxTBrpsGNs57E3__array = values["https://w3id.org/fep/ef61/gateways"];
|
|
54363
|
+
for (const v of _hQiaHhZP8hqxckxTBrpsGNs57E3__array == null ? [] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array.length === 1 && "@list" in _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0] ? _hQiaHhZP8hqxckxTBrpsGNs57E3__array[0]["@list"] : _hQiaHhZP8hqxckxTBrpsGNs57E3__array) {
|
|
54364
|
+
if (v == null) continue;
|
|
54365
|
+
const decoded = (0, _fedify_vocab_runtime.parseGatewayUrl)(typeof v["@id"] === "string" ? v["@id"] : v["@value"]);
|
|
54366
|
+
if (typeof decoded === "undefined") continue;
|
|
54367
|
+
_hQiaHhZP8hqxckxTBrpsGNs57E3.push(decoded);
|
|
54368
|
+
}
|
|
54369
|
+
instance.#_hQiaHhZP8hqxckxTBrpsGNs57E3 = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
53968
54370
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = [];
|
|
53969
54371
|
let _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
|
|
53970
54372
|
for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array == null ? [] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array.length === 1 && "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0] ? _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array[0]["@list"] : _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers__array) {
|
|
@@ -54306,6 +54708,12 @@ var Service = class Service extends Object$1 {
|
|
|
54306
54708
|
} : v);
|
|
54307
54709
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length == 1) proxy.assertionMethod = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod[0];
|
|
54308
54710
|
if (_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 1 || !("assertionMethod" in proxy) && _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.length > 0) proxy.assertionMethods = _4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod;
|
|
54711
|
+
const _hQiaHhZP8hqxckxTBrpsGNs57E3 = this.#_hQiaHhZP8hqxckxTBrpsGNs57E3.map((v) => v instanceof URL ? {
|
|
54712
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
54713
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
54714
|
+
} : v);
|
|
54715
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length == 1) proxy.gateway = _hQiaHhZP8hqxckxTBrpsGNs57E3[0];
|
|
54716
|
+
if (_hQiaHhZP8hqxckxTBrpsGNs57E3.length > 1 || !("gateway" in proxy) && _hQiaHhZP8hqxckxTBrpsGNs57E3.length > 0) proxy.gateways = _hQiaHhZP8hqxckxTBrpsGNs57E3;
|
|
54309
54717
|
const _36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers = this.#_36QNc9MxfkKf6h8sEUQSHnV9NZA_manuallyApprovesFollowers.map((v) => v instanceof URL ? {
|
|
54310
54718
|
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
|
54311
54719
|
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options)
|
|
@@ -55950,7 +56358,8 @@ var Video = class Video extends Document {
|
|
|
55950
56358
|
if (this.id != null) result["id"] = (0, _fedify_vocab_runtime.formatIri)(this.id);
|
|
55951
56359
|
result["@context"] = [
|
|
55952
56360
|
"https://www.w3.org/ns/activitystreams",
|
|
55953
|
-
"https://w3id.org/security/data-integrity/
|
|
56361
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
56362
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
55954
56363
|
"https://gotosocial.org/ns"
|
|
55955
56364
|
];
|
|
55956
56365
|
return result;
|
|
@@ -55965,7 +56374,8 @@ var Video = class Video extends Document {
|
|
|
55965
56374
|
if (options.format === "expand") return await _fedify_vocab_runtime_jsonld.default.expand(values, { documentLoader: options.contextLoader });
|
|
55966
56375
|
const docContext = options.context ?? [
|
|
55967
56376
|
"https://www.w3.org/ns/activitystreams",
|
|
55968
|
-
"https://w3id.org/security/data-integrity/
|
|
56377
|
+
"https://w3id.org/security/data-integrity/v2",
|
|
56378
|
+
{ "digestMultibase": "https://www.w3.org/ns/credentials/v2#digestMultibase" },
|
|
55969
56379
|
"https://gotosocial.org/ns"
|
|
55970
56380
|
];
|
|
55971
56381
|
const compacted = await _fedify_vocab_runtime_jsonld.default.compact(values, docContext, { documentLoader: options.contextLoader });
|