@fedify/fedify 0.10.0-dev.197 → 0.10.0-dev.198
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGES.md +10 -0
- package/esm/vocab/accept.yaml +3 -1
- package/esm/vocab/activity.yaml +1 -0
- package/esm/vocab/add.yaml +3 -1
- package/esm/vocab/announce.yaml +1 -0
- package/esm/vocab/application.yaml +1 -0
- package/esm/vocab/article.yaml +1 -0
- package/esm/vocab/audio.yaml +3 -1
- package/esm/vocab/block.yaml +3 -1
- package/esm/vocab/create.yaml +1 -0
- package/esm/vocab/delete.yaml +3 -1
- package/esm/vocab/dislike.yaml +3 -1
- package/esm/vocab/document.yaml +4 -2
- package/esm/vocab/event.yaml +3 -1
- package/esm/vocab/flag.yaml +3 -1
- package/esm/vocab/follow.yaml +3 -1
- package/esm/vocab/group.yaml +1 -0
- package/esm/vocab/ignore.yaml +3 -1
- package/esm/vocab/intransitiveactivity.yaml +3 -1
- package/esm/vocab/like.yaml +3 -1
- package/esm/vocab/note.yaml +1 -0
- package/esm/vocab/object.yaml +10 -0
- package/esm/vocab/organization.yaml +1 -0
- package/esm/vocab/page.yaml +3 -1
- package/esm/vocab/person.yaml +1 -0
- package/esm/vocab/place.yaml +3 -1
- package/esm/vocab/profile.yaml +3 -1
- package/esm/vocab/reject.yaml +3 -1
- package/esm/vocab/relationship.yaml +3 -1
- package/esm/vocab/remove.yaml +3 -1
- package/esm/vocab/service.yaml +1 -0
- package/esm/vocab/tombstone.yaml +3 -1
- package/esm/vocab/undo.yaml +4 -2
- package/esm/vocab/update.yaml +1 -0
- package/esm/vocab/video.yaml +3 -1
- package/esm/vocab/vocab.js +256 -36
- package/package.json +1 -1
- package/types/vocab/vocab.d.ts +184 -0
- package/types/vocab/vocab.d.ts.map +1 -1
package/esm/vocab/vocab.js
CHANGED
@@ -57,6 +57,7 @@ export class Object {
|
|
57
57
|
#_3BLrzmscsjHCw8TF5BHRW9WkPnX8 = [];
|
58
58
|
#_3bNvLMBN1bCJETiTihM3wvi1B2JX = [];
|
59
59
|
#_u8gdcDTtChQ4tbSQMXc4cYWyum7 = [];
|
60
|
+
#_42rPnotok1ivQ2RNCKNbeFJgx8b8 = [];
|
60
61
|
/**
|
61
62
|
* Constructs a new instance of Object with the given values.
|
62
63
|
* @param values The values to initialize the instance with.
|
@@ -267,6 +268,17 @@ export class Object {
|
|
267
268
|
if ("sensitive" in values && values.sensitive != null) {
|
268
269
|
this.#_u8gdcDTtChQ4tbSQMXc4cYWyum7 = [values.sensitive];
|
269
270
|
}
|
271
|
+
if ("proof" in values && values.proof != null) {
|
272
|
+
this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8 = [values.proof];
|
273
|
+
}
|
274
|
+
if ("proofs" in values && values.proofs != null) {
|
275
|
+
if ("proof" in values &&
|
276
|
+
values.proof != null) {
|
277
|
+
throw new TypeError("Cannot initialize both proof and " +
|
278
|
+
"proofs at the same time.");
|
279
|
+
}
|
280
|
+
this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8 = values.proofs;
|
281
|
+
}
|
270
282
|
}
|
271
283
|
/**
|
272
284
|
* Clones this instance, optionally updating it with the given values.
|
@@ -505,6 +517,18 @@ export class Object {
|
|
505
517
|
if ("sensitive" in values && values.sensitive != null) {
|
506
518
|
clone.#_u8gdcDTtChQ4tbSQMXc4cYWyum7 = [values.sensitive];
|
507
519
|
}
|
520
|
+
clone.#_42rPnotok1ivQ2RNCKNbeFJgx8b8 = this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8;
|
521
|
+
if ("proof" in values && values.proof != null) {
|
522
|
+
clone.#_42rPnotok1ivQ2RNCKNbeFJgx8b8 = [values.proof];
|
523
|
+
}
|
524
|
+
if ("proofs" in values && values.proofs != null) {
|
525
|
+
if ("proof" in values &&
|
526
|
+
values.proof != null) {
|
527
|
+
throw new TypeError("Cannot update both proof and " +
|
528
|
+
"proofs at the same time.");
|
529
|
+
}
|
530
|
+
clone.#_42rPnotok1ivQ2RNCKNbeFJgx8b8 = values.proofs;
|
531
|
+
}
|
508
532
|
return clone;
|
509
533
|
}
|
510
534
|
async #fetchAttachment(url, options = {}) {
|
@@ -1693,6 +1717,71 @@ export class Object {
|
|
1693
1717
|
return null;
|
1694
1718
|
return this.#_u8gdcDTtChQ4tbSQMXc4cYWyum7[0];
|
1695
1719
|
}
|
1720
|
+
async #fetchProof(url, options = {}) {
|
1721
|
+
const documentLoader = options.documentLoader ?? this._documentLoader ??
|
1722
|
+
fetchDocumentLoader;
|
1723
|
+
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
1724
|
+
fetchDocumentLoader;
|
1725
|
+
const { document } = await documentLoader(url.href);
|
1726
|
+
try {
|
1727
|
+
return await DataIntegrityProof.fromJsonLd(document, { documentLoader, contextLoader });
|
1728
|
+
}
|
1729
|
+
catch (e) {
|
1730
|
+
if (!(e instanceof TypeError))
|
1731
|
+
throw e;
|
1732
|
+
}
|
1733
|
+
throw new TypeError("Expected an object of any type of: " +
|
1734
|
+
["https://w3id.org/security#DataIntegrityProof"].join(", "));
|
1735
|
+
}
|
1736
|
+
/**
|
1737
|
+
* Similar to
|
1738
|
+
* {@link Object.getProof},
|
1739
|
+
* but returns its `@id` URL instead of the object itself.
|
1740
|
+
*/
|
1741
|
+
get proofId() {
|
1742
|
+
if (this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8.length < 1)
|
1743
|
+
return null;
|
1744
|
+
const v = this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8[0];
|
1745
|
+
if (v instanceof URL)
|
1746
|
+
return v;
|
1747
|
+
return v.id;
|
1748
|
+
}
|
1749
|
+
/** A cryptographic proof that can be used to verify the integrity of an object.
|
1750
|
+
*/
|
1751
|
+
async getProof(options = {}) {
|
1752
|
+
if (this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8.length < 1)
|
1753
|
+
return null;
|
1754
|
+
const v = this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8[0];
|
1755
|
+
if (v instanceof URL) {
|
1756
|
+
const fetched = await this.#fetchProof(v, options);
|
1757
|
+
this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8[0] = fetched;
|
1758
|
+
return fetched;
|
1759
|
+
}
|
1760
|
+
return v;
|
1761
|
+
}
|
1762
|
+
/**
|
1763
|
+
* Similar to
|
1764
|
+
* {@link Object.getProofs},
|
1765
|
+
* but returns their `@id`s instead of the objects themselves.
|
1766
|
+
*/
|
1767
|
+
get proofIds() {
|
1768
|
+
return this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8.map((v) => v instanceof URL ? v : v.id).filter((id) => id !== null);
|
1769
|
+
}
|
1770
|
+
/** A cryptographic proof that can be used to verify the integrity of an object.
|
1771
|
+
*/
|
1772
|
+
async *getProofs(options = {}) {
|
1773
|
+
const vs = this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8;
|
1774
|
+
for (let i = 0; i < vs.length; i++) {
|
1775
|
+
const v = vs[i];
|
1776
|
+
if (v instanceof URL) {
|
1777
|
+
const fetched = await this.#fetchProof(v, options);
|
1778
|
+
vs[i] = fetched;
|
1779
|
+
yield fetched;
|
1780
|
+
continue;
|
1781
|
+
}
|
1782
|
+
yield v;
|
1783
|
+
}
|
1784
|
+
}
|
1696
1785
|
/**
|
1697
1786
|
* Converts this object to a JSON-LD structure.
|
1698
1787
|
* @returns The JSON-LD representation of this object.
|
@@ -1958,15 +2047,23 @@ export class Object {
|
|
1958
2047
|
if (array.length > 0) {
|
1959
2048
|
values["https://www.w3.org/ns/activitystreams#sensitive"] = array;
|
1960
2049
|
}
|
2050
|
+
array = [];
|
2051
|
+
for (const v of this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8) {
|
2052
|
+
array.push(v instanceof URL ? { "@id": v.href } : await v.toJsonLd(options));
|
2053
|
+
}
|
2054
|
+
if (array.length > 0)
|
2055
|
+
values["https://w3id.org/security#proof"] = array;
|
1961
2056
|
values["@type"] = ["https://www.w3.org/ns/activitystreams#Object"];
|
1962
2057
|
if (this.id)
|
1963
2058
|
values["@id"] = this.id.href;
|
1964
2059
|
if (options.expand) {
|
1965
2060
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
1966
2061
|
}
|
1967
|
-
return await jsonld.compact(values, [
|
1968
|
-
|
1969
|
-
|
2062
|
+
return await jsonld.compact(values, [
|
2063
|
+
"https://www.w3.org/ns/activitystreams",
|
2064
|
+
"https://w3id.org/security/data-integrity/v1",
|
2065
|
+
{ "sensitive": "as:sensitive" },
|
2066
|
+
], { documentLoader: options.contextLoader });
|
1970
2067
|
}
|
1971
2068
|
/**
|
1972
2069
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -2895,6 +2992,18 @@ export class Object {
|
|
2895
2992
|
_u8gdcDTtChQ4tbSQMXc4cYWyum7.push(v["@value"]);
|
2896
2993
|
}
|
2897
2994
|
instance.#_u8gdcDTtChQ4tbSQMXc4cYWyum7 = _u8gdcDTtChQ4tbSQMXc4cYWyum7;
|
2995
|
+
const _42rPnotok1ivQ2RNCKNbeFJgx8b8 = [];
|
2996
|
+
for (const v of values["https://w3id.org/security#proof"] ?? []) {
|
2997
|
+
if (v == null)
|
2998
|
+
continue;
|
2999
|
+
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
3000
|
+
globalThis.Object.keys(v).length === 1) {
|
3001
|
+
_42rPnotok1ivQ2RNCKNbeFJgx8b8.push(new URL(v["@id"]));
|
3002
|
+
continue;
|
3003
|
+
}
|
3004
|
+
_42rPnotok1ivQ2RNCKNbeFJgx8b8.push(await DataIntegrityProof.fromJsonLd(v, options));
|
3005
|
+
}
|
3006
|
+
instance.#_42rPnotok1ivQ2RNCKNbeFJgx8b8 = _42rPnotok1ivQ2RNCKNbeFJgx8b8;
|
2898
3007
|
return instance;
|
2899
3008
|
}
|
2900
3009
|
_getCustomInspectProxy() {
|
@@ -3285,6 +3394,22 @@ export class Object {
|
|
3285
3394
|
if (_u8gdcDTtChQ4tbSQMXc4cYWyum7.length == 1) {
|
3286
3395
|
proxy.sensitive = _u8gdcDTtChQ4tbSQMXc4cYWyum7[0];
|
3287
3396
|
}
|
3397
|
+
const _42rPnotok1ivQ2RNCKNbeFJgx8b8 = this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8
|
3398
|
+
// deno-lint-ignore no-explicit-any
|
3399
|
+
.map((v) => v instanceof URL
|
3400
|
+
? {
|
3401
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
3402
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
|
3403
|
+
}
|
3404
|
+
: v);
|
3405
|
+
if (_42rPnotok1ivQ2RNCKNbeFJgx8b8.length == 1) {
|
3406
|
+
proxy.proof = _42rPnotok1ivQ2RNCKNbeFJgx8b8[0];
|
3407
|
+
}
|
3408
|
+
if (_42rPnotok1ivQ2RNCKNbeFJgx8b8.length > 1 ||
|
3409
|
+
!("proof" in proxy) &&
|
3410
|
+
_42rPnotok1ivQ2RNCKNbeFJgx8b8.length > 0) {
|
3411
|
+
proxy.proofs = _42rPnotok1ivQ2RNCKNbeFJgx8b8;
|
3412
|
+
}
|
3288
3413
|
return proxy;
|
3289
3414
|
}
|
3290
3415
|
[Symbol.for("Deno.customInspect")](inspect, options) {
|
@@ -4920,7 +5045,11 @@ export class Activity extends Object {
|
|
4920
5045
|
if (options.expand) {
|
4921
5046
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
4922
5047
|
}
|
4923
|
-
return await jsonld.compact(values, [
|
5048
|
+
return await jsonld.compact(values, [
|
5049
|
+
"https://www.w3.org/ns/activitystreams",
|
5050
|
+
"https://w3id.org/security/v1",
|
5051
|
+
"https://w3id.org/security/data-integrity/v1",
|
5052
|
+
], { documentLoader: options.contextLoader });
|
4924
5053
|
}
|
4925
5054
|
/**
|
4926
5055
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -5171,7 +5300,10 @@ export class Accept extends Activity {
|
|
5171
5300
|
if (options.expand) {
|
5172
5301
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
5173
5302
|
}
|
5174
|
-
return await jsonld.compact(values,
|
5303
|
+
return await jsonld.compact(values, [
|
5304
|
+
"https://www.w3.org/ns/activitystreams",
|
5305
|
+
"https://w3id.org/security/data-integrity/v1",
|
5306
|
+
], { documentLoader: options.contextLoader });
|
5175
5307
|
}
|
5176
5308
|
/**
|
5177
5309
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -5280,7 +5412,10 @@ export class Add extends Activity {
|
|
5280
5412
|
if (options.expand) {
|
5281
5413
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
5282
5414
|
}
|
5283
|
-
return await jsonld.compact(values,
|
5415
|
+
return await jsonld.compact(values, [
|
5416
|
+
"https://www.w3.org/ns/activitystreams",
|
5417
|
+
"https://w3id.org/security/data-integrity/v1",
|
5418
|
+
], { documentLoader: options.contextLoader });
|
5284
5419
|
}
|
5285
5420
|
/**
|
5286
5421
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -5388,12 +5523,16 @@ export class Announce extends Activity {
|
|
5388
5523
|
if (options.expand) {
|
5389
5524
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
5390
5525
|
}
|
5391
|
-
return await jsonld.compact(values, [
|
5526
|
+
return await jsonld.compact(values, [
|
5527
|
+
"https://www.w3.org/ns/activitystreams",
|
5528
|
+
"https://w3id.org/security/data-integrity/v1",
|
5529
|
+
{
|
5392
5530
|
"toot": "http://joinmastodon.org/ns#",
|
5393
5531
|
"sensitive": "as:sensitive",
|
5394
5532
|
"Emoji": "toot:Emoji",
|
5395
5533
|
"Hashtag": "as:Hashtag",
|
5396
|
-
}
|
5534
|
+
},
|
5535
|
+
], { documentLoader: options.contextLoader });
|
5397
5536
|
}
|
5398
5537
|
/**
|
5399
5538
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -6267,6 +6406,7 @@ export class Application extends Object {
|
|
6267
6406
|
return await jsonld.compact(values, [
|
6268
6407
|
"https://www.w3.org/ns/activitystreams",
|
6269
6408
|
"https://w3id.org/security/v1",
|
6409
|
+
"https://w3id.org/security/data-integrity/v1",
|
6270
6410
|
"https://www.w3.org/ns/did/v1",
|
6271
6411
|
"https://w3id.org/security/multikey/v1",
|
6272
6412
|
{
|
@@ -6724,12 +6864,16 @@ export class Article extends Object {
|
|
6724
6864
|
if (options.expand) {
|
6725
6865
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
6726
6866
|
}
|
6727
|
-
return await jsonld.compact(values, [
|
6867
|
+
return await jsonld.compact(values, [
|
6868
|
+
"https://www.w3.org/ns/activitystreams",
|
6869
|
+
"https://w3id.org/security/data-integrity/v1",
|
6870
|
+
{
|
6728
6871
|
"toot": "http://joinmastodon.org/ns#",
|
6729
6872
|
"sensitive": "as:sensitive",
|
6730
6873
|
"Emoji": "toot:Emoji",
|
6731
6874
|
"Hashtag": "as:Hashtag",
|
6732
|
-
}
|
6875
|
+
},
|
6876
|
+
], { documentLoader: options.contextLoader });
|
6733
6877
|
}
|
6734
6878
|
/**
|
6735
6879
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -6887,7 +7031,10 @@ export class Document extends Object {
|
|
6887
7031
|
if (options.expand) {
|
6888
7032
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
6889
7033
|
}
|
6890
|
-
return await jsonld.compact(values,
|
7034
|
+
return await jsonld.compact(values, [
|
7035
|
+
"https://www.w3.org/ns/activitystreams",
|
7036
|
+
"https://w3id.org/security/data-integrity/v1",
|
7037
|
+
], { documentLoader: options.contextLoader });
|
6891
7038
|
}
|
6892
7039
|
/**
|
6893
7040
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -7045,7 +7192,10 @@ export class Audio extends Document {
|
|
7045
7192
|
if (options.expand) {
|
7046
7193
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
7047
7194
|
}
|
7048
|
-
return await jsonld.compact(values,
|
7195
|
+
return await jsonld.compact(values, [
|
7196
|
+
"https://www.w3.org/ns/activitystreams",
|
7197
|
+
"https://w3id.org/security/data-integrity/v1",
|
7198
|
+
], { documentLoader: options.contextLoader });
|
7049
7199
|
}
|
7050
7200
|
/**
|
7051
7201
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -7152,7 +7302,10 @@ export class Ignore extends Activity {
|
|
7152
7302
|
if (options.expand) {
|
7153
7303
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
7154
7304
|
}
|
7155
|
-
return await jsonld.compact(values,
|
7305
|
+
return await jsonld.compact(values, [
|
7306
|
+
"https://www.w3.org/ns/activitystreams",
|
7307
|
+
"https://w3id.org/security/data-integrity/v1",
|
7308
|
+
], { documentLoader: options.contextLoader });
|
7156
7309
|
}
|
7157
7310
|
/**
|
7158
7311
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -7265,7 +7418,10 @@ export class Block extends Ignore {
|
|
7265
7418
|
if (options.expand) {
|
7266
7419
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
7267
7420
|
}
|
7268
|
-
return await jsonld.compact(values,
|
7421
|
+
return await jsonld.compact(values, [
|
7422
|
+
"https://www.w3.org/ns/activitystreams",
|
7423
|
+
"https://w3id.org/security/data-integrity/v1",
|
7424
|
+
], { documentLoader: options.contextLoader });
|
7269
7425
|
}
|
7270
7426
|
/**
|
7271
7427
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -8480,12 +8636,16 @@ export class Create extends Activity {
|
|
8480
8636
|
if (options.expand) {
|
8481
8637
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
8482
8638
|
}
|
8483
|
-
return await jsonld.compact(values, [
|
8639
|
+
return await jsonld.compact(values, [
|
8640
|
+
"https://www.w3.org/ns/activitystreams",
|
8641
|
+
"https://w3id.org/security/data-integrity/v1",
|
8642
|
+
{
|
8484
8643
|
"toot": "http://joinmastodon.org/ns#",
|
8485
8644
|
"sensitive": "as:sensitive",
|
8486
8645
|
"Emoji": "toot:Emoji",
|
8487
8646
|
"Hashtag": "as:Hashtag",
|
8488
|
-
}
|
8647
|
+
},
|
8648
|
+
], { documentLoader: options.contextLoader });
|
8489
8649
|
}
|
8490
8650
|
/**
|
8491
8651
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -8592,7 +8752,10 @@ export class Delete extends Activity {
|
|
8592
8752
|
if (options.expand) {
|
8593
8753
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
8594
8754
|
}
|
8595
|
-
return await jsonld.compact(values,
|
8755
|
+
return await jsonld.compact(values, [
|
8756
|
+
"https://www.w3.org/ns/activitystreams",
|
8757
|
+
"https://w3id.org/security/data-integrity/v1",
|
8758
|
+
], { documentLoader: options.contextLoader });
|
8596
8759
|
}
|
8597
8760
|
/**
|
8598
8761
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -8698,7 +8861,10 @@ export class Dislike extends Activity {
|
|
8698
8861
|
if (options.expand) {
|
8699
8862
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
8700
8863
|
}
|
8701
|
-
return await jsonld.compact(values,
|
8864
|
+
return await jsonld.compact(values, [
|
8865
|
+
"https://www.w3.org/ns/activitystreams",
|
8866
|
+
"https://w3id.org/security/data-integrity/v1",
|
8867
|
+
], { documentLoader: options.contextLoader });
|
8702
8868
|
}
|
8703
8869
|
/**
|
8704
8870
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -9192,7 +9358,10 @@ export class Event extends Object {
|
|
9192
9358
|
if (options.expand) {
|
9193
9359
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
9194
9360
|
}
|
9195
|
-
return await jsonld.compact(values,
|
9361
|
+
return await jsonld.compact(values, [
|
9362
|
+
"https://www.w3.org/ns/activitystreams",
|
9363
|
+
"https://w3id.org/security/data-integrity/v1",
|
9364
|
+
], { documentLoader: options.contextLoader });
|
9196
9365
|
}
|
9197
9366
|
/**
|
9198
9367
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -9300,7 +9469,10 @@ export class Flag extends Activity {
|
|
9300
9469
|
if (options.expand) {
|
9301
9470
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
9302
9471
|
}
|
9303
|
-
return await jsonld.compact(values,
|
9472
|
+
return await jsonld.compact(values, [
|
9473
|
+
"https://www.w3.org/ns/activitystreams",
|
9474
|
+
"https://w3id.org/security/data-integrity/v1",
|
9475
|
+
], { documentLoader: options.contextLoader });
|
9304
9476
|
}
|
9305
9477
|
/**
|
9306
9478
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -9409,7 +9581,10 @@ export class Follow extends Activity {
|
|
9409
9581
|
if (options.expand) {
|
9410
9582
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
9411
9583
|
}
|
9412
|
-
return await jsonld.compact(values,
|
9584
|
+
return await jsonld.compact(values, [
|
9585
|
+
"https://www.w3.org/ns/activitystreams",
|
9586
|
+
"https://w3id.org/security/data-integrity/v1",
|
9587
|
+
], { documentLoader: options.contextLoader });
|
9413
9588
|
}
|
9414
9589
|
/**
|
9415
9590
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -10283,6 +10458,7 @@ export class Group extends Object {
|
|
10283
10458
|
return await jsonld.compact(values, [
|
10284
10459
|
"https://www.w3.org/ns/activitystreams",
|
10285
10460
|
"https://w3id.org/security/v1",
|
10461
|
+
"https://w3id.org/security/data-integrity/v1",
|
10286
10462
|
"https://www.w3.org/ns/did/v1",
|
10287
10463
|
"https://w3id.org/security/multikey/v1",
|
10288
10464
|
{
|
@@ -11609,7 +11785,10 @@ export class IntransitiveActivity extends Activity {
|
|
11609
11785
|
if (options.expand) {
|
11610
11786
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
11611
11787
|
}
|
11612
|
-
return await jsonld.compact(values,
|
11788
|
+
return await jsonld.compact(values, [
|
11789
|
+
"https://www.w3.org/ns/activitystreams",
|
11790
|
+
"https://w3id.org/security/data-integrity/v1",
|
11791
|
+
], { documentLoader: options.contextLoader });
|
11613
11792
|
}
|
11614
11793
|
/**
|
11615
11794
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -11716,7 +11895,10 @@ export class Like extends Activity {
|
|
11716
11895
|
if (options.expand) {
|
11717
11896
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
11718
11897
|
}
|
11719
|
-
return await jsonld.compact(values,
|
11898
|
+
return await jsonld.compact(values, [
|
11899
|
+
"https://www.w3.org/ns/activitystreams",
|
11900
|
+
"https://w3id.org/security/data-integrity/v1",
|
11901
|
+
], { documentLoader: options.contextLoader });
|
11720
11902
|
}
|
11721
11903
|
/**
|
11722
11904
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -11929,12 +12111,16 @@ export class Note extends Object {
|
|
11929
12111
|
if (options.expand) {
|
11930
12112
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
11931
12113
|
}
|
11932
|
-
return await jsonld.compact(values, [
|
12114
|
+
return await jsonld.compact(values, [
|
12115
|
+
"https://www.w3.org/ns/activitystreams",
|
12116
|
+
"https://w3id.org/security/data-integrity/v1",
|
12117
|
+
{
|
11933
12118
|
"toot": "http://joinmastodon.org/ns#",
|
11934
12119
|
"sensitive": "as:sensitive",
|
11935
12120
|
"Emoji": "toot:Emoji",
|
11936
12121
|
"Hashtag": "as:Hashtag",
|
11937
|
-
}
|
12122
|
+
},
|
12123
|
+
], { documentLoader: options.contextLoader });
|
11938
12124
|
}
|
11939
12125
|
/**
|
11940
12126
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -13072,6 +13258,7 @@ export class Organization extends Object {
|
|
13072
13258
|
return await jsonld.compact(values, [
|
13073
13259
|
"https://www.w3.org/ns/activitystreams",
|
13074
13260
|
"https://w3id.org/security/v1",
|
13261
|
+
"https://w3id.org/security/data-integrity/v1",
|
13075
13262
|
"https://www.w3.org/ns/did/v1",
|
13076
13263
|
"https://w3id.org/security/multikey/v1",
|
13077
13264
|
{
|
@@ -13529,7 +13716,10 @@ export class Page extends Document {
|
|
13529
13716
|
if (options.expand) {
|
13530
13717
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
13531
13718
|
}
|
13532
|
-
return await jsonld.compact(values,
|
13719
|
+
return await jsonld.compact(values, [
|
13720
|
+
"https://www.w3.org/ns/activitystreams",
|
13721
|
+
"https://w3id.org/security/data-integrity/v1",
|
13722
|
+
], { documentLoader: options.contextLoader });
|
13533
13723
|
}
|
13534
13724
|
/**
|
13535
13725
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -14403,6 +14593,7 @@ export class Person extends Object {
|
|
14403
14593
|
return await jsonld.compact(values, [
|
14404
14594
|
"https://www.w3.org/ns/activitystreams",
|
14405
14595
|
"https://w3id.org/security/v1",
|
14596
|
+
"https://w3id.org/security/data-integrity/v1",
|
14406
14597
|
"https://www.w3.org/ns/did/v1",
|
14407
14598
|
"https://w3id.org/security/multikey/v1",
|
14408
14599
|
{
|
@@ -15020,7 +15211,10 @@ export class Place extends Object {
|
|
15020
15211
|
if (options.expand) {
|
15021
15212
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
15022
15213
|
}
|
15023
|
-
return await jsonld.compact(values,
|
15214
|
+
return await jsonld.compact(values, [
|
15215
|
+
"https://www.w3.org/ns/activitystreams",
|
15216
|
+
"https://w3id.org/security/data-integrity/v1",
|
15217
|
+
], { documentLoader: options.contextLoader });
|
15024
15218
|
}
|
15025
15219
|
/**
|
15026
15220
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -15307,7 +15501,10 @@ export class Profile extends Object {
|
|
15307
15501
|
if (options.expand) {
|
15308
15502
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
15309
15503
|
}
|
15310
|
-
return await jsonld.compact(values,
|
15504
|
+
return await jsonld.compact(values, [
|
15505
|
+
"https://www.w3.org/ns/activitystreams",
|
15506
|
+
"https://w3id.org/security/data-integrity/v1",
|
15507
|
+
], { documentLoader: options.contextLoader });
|
15311
15508
|
}
|
15312
15509
|
/**
|
15313
15510
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -15437,7 +15634,10 @@ export class Reject extends Activity {
|
|
15437
15634
|
if (options.expand) {
|
15438
15635
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
15439
15636
|
}
|
15440
|
-
return await jsonld.compact(values,
|
15637
|
+
return await jsonld.compact(values, [
|
15638
|
+
"https://www.w3.org/ns/activitystreams",
|
15639
|
+
"https://w3id.org/security/data-integrity/v1",
|
15640
|
+
], { documentLoader: options.contextLoader });
|
15441
15641
|
}
|
15442
15642
|
/**
|
15443
15643
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -15805,7 +16005,10 @@ export class Relationship extends Object {
|
|
15805
16005
|
if (options.expand) {
|
15806
16006
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
15807
16007
|
}
|
15808
|
-
return await jsonld.compact(values,
|
16008
|
+
return await jsonld.compact(values, [
|
16009
|
+
"https://www.w3.org/ns/activitystreams",
|
16010
|
+
"https://w3id.org/security/data-integrity/v1",
|
16011
|
+
], { documentLoader: options.contextLoader });
|
15809
16012
|
}
|
15810
16013
|
/**
|
15811
16014
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -15992,7 +16195,10 @@ export class Remove extends Activity {
|
|
15992
16195
|
if (options.expand) {
|
15993
16196
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
15994
16197
|
}
|
15995
|
-
return await jsonld.compact(values,
|
16198
|
+
return await jsonld.compact(values, [
|
16199
|
+
"https://www.w3.org/ns/activitystreams",
|
16200
|
+
"https://w3id.org/security/data-integrity/v1",
|
16201
|
+
], { documentLoader: options.contextLoader });
|
15996
16202
|
}
|
15997
16203
|
/**
|
15998
16204
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -16866,6 +17072,7 @@ export class Service extends Object {
|
|
16866
17072
|
return await jsonld.compact(values, [
|
16867
17073
|
"https://www.w3.org/ns/activitystreams",
|
16868
17074
|
"https://w3id.org/security/v1",
|
17075
|
+
"https://w3id.org/security/data-integrity/v1",
|
16869
17076
|
"https://www.w3.org/ns/did/v1",
|
16870
17077
|
"https://w3id.org/security/multikey/v1",
|
16871
17078
|
{
|
@@ -17351,7 +17558,10 @@ export class Tombstone extends Object {
|
|
17351
17558
|
if (options.expand) {
|
17352
17559
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
17353
17560
|
}
|
17354
|
-
return await jsonld.compact(values,
|
17561
|
+
return await jsonld.compact(values, [
|
17562
|
+
"https://www.w3.org/ns/activitystreams",
|
17563
|
+
"https://w3id.org/security/data-integrity/v1",
|
17564
|
+
], { documentLoader: options.contextLoader });
|
17355
17565
|
}
|
17356
17566
|
/**
|
17357
17567
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -17481,7 +17691,10 @@ export class Undo extends Activity {
|
|
17481
17691
|
if (options.expand) {
|
17482
17692
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
17483
17693
|
}
|
17484
|
-
return await jsonld.compact(values,
|
17694
|
+
return await jsonld.compact(values, [
|
17695
|
+
"https://www.w3.org/ns/activitystreams",
|
17696
|
+
"https://w3id.org/security/data-integrity/v1",
|
17697
|
+
], { documentLoader: options.contextLoader });
|
17485
17698
|
}
|
17486
17699
|
/**
|
17487
17700
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -17591,12 +17804,16 @@ export class Update extends Activity {
|
|
17591
17804
|
if (options.expand) {
|
17592
17805
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
17593
17806
|
}
|
17594
|
-
return await jsonld.compact(values, [
|
17807
|
+
return await jsonld.compact(values, [
|
17808
|
+
"https://www.w3.org/ns/activitystreams",
|
17809
|
+
"https://w3id.org/security/data-integrity/v1",
|
17810
|
+
{
|
17595
17811
|
"toot": "http://joinmastodon.org/ns#",
|
17596
17812
|
"sensitive": "as:sensitive",
|
17597
17813
|
"Emoji": "toot:Emoji",
|
17598
17814
|
"Hashtag": "as:Hashtag",
|
17599
|
-
}
|
17815
|
+
},
|
17816
|
+
], { documentLoader: options.contextLoader });
|
17600
17817
|
}
|
17601
17818
|
/**
|
17602
17819
|
* Converts a JSON-LD structure to an object of this type.
|
@@ -17702,7 +17919,10 @@ export class Video extends Document {
|
|
17702
17919
|
if (options.expand) {
|
17703
17920
|
return await jsonld.expand(values, { documentLoader: options.contextLoader });
|
17704
17921
|
}
|
17705
|
-
return await jsonld.compact(values,
|
17922
|
+
return await jsonld.compact(values, [
|
17923
|
+
"https://www.w3.org/ns/activitystreams",
|
17924
|
+
"https://w3id.org/security/data-integrity/v1",
|
17925
|
+
], { documentLoader: options.contextLoader });
|
17706
17926
|
}
|
17707
17927
|
/**
|
17708
17928
|
* Converts a JSON-LD structure to an object of this type.
|