@fedify/fedify 1.1.0-dev.442 → 1.1.0-dev.444
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGES.md +9 -0
- package/esm/vocab/vocab.js +132 -66
- package/package.json +1 -1
- package/types/vocab/vocab.d.ts.map +1 -1
package/CHANGES.md
CHANGED
@@ -65,6 +65,15 @@ To be released.
|
|
65
65
|
[#150]: https://github.com/dahlia/fedify/issues/150
|
66
66
|
|
67
67
|
|
68
|
+
Version 1.0.3
|
69
|
+
-------------
|
70
|
+
|
71
|
+
Released on October 17, 2024.
|
72
|
+
|
73
|
+
- Improved compatibility with some implementations (e.g., Nexkey) where
|
74
|
+
some `CryptographicKey` objects are incorrectly typed in JSON-LD objects.
|
75
|
+
|
76
|
+
|
68
77
|
Version 1.0.2
|
69
78
|
-------------
|
70
79
|
|
package/esm/vocab/vocab.js
CHANGED
@@ -3701,7 +3701,8 @@ export class Object {
|
|
3701
3701
|
// deno-lint-ignore no-explicit-any
|
3702
3702
|
(expanded[0] ?? {});
|
3703
3703
|
}
|
3704
|
-
if ("@type" in values
|
3704
|
+
if ("@type" in values &&
|
3705
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
3705
3706
|
if (values["@type"].includes("http://joinmastodon.org/ns#Emoji")) {
|
3706
3707
|
return await Emoji.fromJsonLd(json, options);
|
3707
3708
|
}
|
@@ -5532,7 +5533,8 @@ export class Emoji extends Object {
|
|
5532
5533
|
// deno-lint-ignore no-explicit-any
|
5533
5534
|
(expanded[0] ?? {});
|
5534
5535
|
}
|
5535
|
-
if ("@type" in values
|
5536
|
+
if ("@type" in values &&
|
5537
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
5536
5538
|
if (!values["@type"].includes("http://joinmastodon.org/ns#Emoji")) {
|
5537
5539
|
throw new TypeError("Invalid type: " + values["@type"]);
|
5538
5540
|
}
|
@@ -5796,7 +5798,8 @@ export class ChatMessage extends Object {
|
|
5796
5798
|
// deno-lint-ignore no-explicit-any
|
5797
5799
|
(expanded[0] ?? {});
|
5798
5800
|
}
|
5799
|
-
if ("@type" in values
|
5801
|
+
if ("@type" in values &&
|
5802
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
5800
5803
|
if (!values["@type"].includes("http://litepub.social/ns#ChatMessage")) {
|
5801
5804
|
throw new TypeError("Invalid type: " + values["@type"]);
|
5802
5805
|
}
|
@@ -6953,7 +6956,8 @@ export class Activity extends Object {
|
|
6953
6956
|
// deno-lint-ignore no-explicit-any
|
6954
6957
|
(expanded[0] ?? {});
|
6955
6958
|
}
|
6956
|
-
if ("@type" in values
|
6959
|
+
if ("@type" in values &&
|
6960
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
6957
6961
|
if (values["@type"].includes("http://litepub.social/ns#EmojiReact")) {
|
6958
6962
|
return await EmojiReact.fromJsonLd(json, options);
|
6959
6963
|
}
|
@@ -7446,7 +7450,8 @@ export class EmojiReact extends Activity {
|
|
7446
7450
|
// deno-lint-ignore no-explicit-any
|
7447
7451
|
(expanded[0] ?? {});
|
7448
7452
|
}
|
7449
|
-
if ("@type" in values
|
7453
|
+
if ("@type" in values &&
|
7454
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
7450
7455
|
if (!values["@type"].includes("http://litepub.social/ns#EmojiReact")) {
|
7451
7456
|
throw new TypeError("Invalid type: " + values["@type"]);
|
7452
7457
|
}
|
@@ -7737,7 +7742,8 @@ export class PropertyValue {
|
|
7737
7742
|
// deno-lint-ignore no-explicit-any
|
7738
7743
|
(expanded[0] ?? {});
|
7739
7744
|
}
|
7740
|
-
if ("@type" in values
|
7745
|
+
if ("@type" in values &&
|
7746
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
7741
7747
|
if (!values["@type"].includes("http://schema.org#PropertyValue")) {
|
7742
7748
|
throw new TypeError("Invalid type: " + values["@type"]);
|
7743
7749
|
}
|
@@ -8046,7 +8052,8 @@ export class DidService {
|
|
8046
8052
|
// deno-lint-ignore no-explicit-any
|
8047
8053
|
(expanded[0] ?? {});
|
8048
8054
|
}
|
8049
|
-
if ("@type" in values
|
8055
|
+
if ("@type" in values &&
|
8056
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
8050
8057
|
if (values["@type"].includes("https://w3id.org/fep/9091#Export")) {
|
8051
8058
|
return await Export.fromJsonLd(json, options);
|
8052
8059
|
}
|
@@ -8221,7 +8228,8 @@ export class Export extends DidService {
|
|
8221
8228
|
// deno-lint-ignore no-explicit-any
|
8222
8229
|
(expanded[0] ?? {});
|
8223
8230
|
}
|
8224
|
-
if ("@type" in values
|
8231
|
+
if ("@type" in values &&
|
8232
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
8225
8233
|
if (!values["@type"].includes("https://w3id.org/fep/9091#Export")) {
|
8226
8234
|
throw new TypeError("Invalid type: " + values["@type"]);
|
8227
8235
|
}
|
@@ -8661,7 +8669,8 @@ export class DataIntegrityProof {
|
|
8661
8669
|
// deno-lint-ignore no-explicit-any
|
8662
8670
|
(expanded[0] ?? {});
|
8663
8671
|
}
|
8664
|
-
if ("@type" in values
|
8672
|
+
if ("@type" in values &&
|
8673
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
8665
8674
|
if (!values["@type"].includes("https://w3id.org/security#DataIntegrityProof")) {
|
8666
8675
|
throw new TypeError("Invalid type: " + values["@type"]);
|
8667
8676
|
}
|
@@ -9193,7 +9202,8 @@ export class CryptographicKey {
|
|
9193
9202
|
// deno-lint-ignore no-explicit-any
|
9194
9203
|
(expanded[0] ?? {});
|
9195
9204
|
}
|
9196
|
-
if ("@type" in values
|
9205
|
+
if ("@type" in values &&
|
9206
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
9197
9207
|
if (!values["@type"].includes("https://w3id.org/security#Key")) {
|
9198
9208
|
throw new TypeError("Invalid type: " + values["@type"]);
|
9199
9209
|
}
|
@@ -9684,7 +9694,8 @@ export class Multikey {
|
|
9684
9694
|
// deno-lint-ignore no-explicit-any
|
9685
9695
|
(expanded[0] ?? {});
|
9686
9696
|
}
|
9687
|
-
if ("@type" in values
|
9697
|
+
if ("@type" in values &&
|
9698
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
9688
9699
|
if (!values["@type"].includes("https://w3id.org/security#Multikey")) {
|
9689
9700
|
throw new TypeError("Invalid type: " + values["@type"]);
|
9690
9701
|
}
|
@@ -9924,7 +9935,8 @@ export class Accept extends Activity {
|
|
9924
9935
|
// deno-lint-ignore no-explicit-any
|
9925
9936
|
(expanded[0] ?? {});
|
9926
9937
|
}
|
9927
|
-
if ("@type" in values
|
9938
|
+
if ("@type" in values &&
|
9939
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
9928
9940
|
if (values["@type"].includes("https://www.w3.org/ns/activitystreams#TentativeAccept")) {
|
9929
9941
|
return await TentativeAccept.fromJsonLd(json, options);
|
9930
9942
|
}
|
@@ -10088,7 +10100,8 @@ export class Add extends Activity {
|
|
10088
10100
|
// deno-lint-ignore no-explicit-any
|
10089
10101
|
(expanded[0] ?? {});
|
10090
10102
|
}
|
10091
|
-
if ("@type" in values
|
10103
|
+
if ("@type" in values &&
|
10104
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
10092
10105
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Add")) {
|
10093
10106
|
throw new TypeError("Invalid type: " + values["@type"]);
|
10094
10107
|
}
|
@@ -10260,7 +10273,8 @@ export class Announce extends Activity {
|
|
10260
10273
|
// deno-lint-ignore no-explicit-any
|
10261
10274
|
(expanded[0] ?? {});
|
10262
10275
|
}
|
10263
|
-
if ("@type" in values
|
10276
|
+
if ("@type" in values &&
|
10277
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
10264
10278
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Announce")) {
|
10265
10279
|
throw new TypeError("Invalid type: " + values["@type"]);
|
10266
10280
|
}
|
@@ -12578,7 +12592,8 @@ export class Application extends Object {
|
|
12578
12592
|
// deno-lint-ignore no-explicit-any
|
12579
12593
|
(expanded[0] ?? {});
|
12580
12594
|
}
|
12581
|
-
if ("@type" in values
|
12595
|
+
if ("@type" in values &&
|
12596
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
12582
12597
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Application")) {
|
12583
12598
|
throw new TypeError("Invalid type: " + values["@type"]);
|
12584
12599
|
}
|
@@ -13386,7 +13401,8 @@ export class IntransitiveActivity extends Activity {
|
|
13386
13401
|
// deno-lint-ignore no-explicit-any
|
13387
13402
|
(expanded[0] ?? {});
|
13388
13403
|
}
|
13389
|
-
if ("@type" in values
|
13404
|
+
if ("@type" in values &&
|
13405
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
13390
13406
|
if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Arrive")) {
|
13391
13407
|
return await Arrive.fromJsonLd(json, options);
|
13392
13408
|
}
|
@@ -13555,7 +13571,8 @@ export class Arrive extends IntransitiveActivity {
|
|
13555
13571
|
// deno-lint-ignore no-explicit-any
|
13556
13572
|
(expanded[0] ?? {});
|
13557
13573
|
}
|
13558
|
-
if ("@type" in values
|
13574
|
+
if ("@type" in values &&
|
13575
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
13559
13576
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Arrive")) {
|
13560
13577
|
throw new TypeError("Invalid type: " + values["@type"]);
|
13561
13578
|
}
|
@@ -13817,7 +13834,8 @@ export class Article extends Object {
|
|
13817
13834
|
// deno-lint-ignore no-explicit-any
|
13818
13835
|
(expanded[0] ?? {});
|
13819
13836
|
}
|
13820
|
-
if ("@type" in values
|
13837
|
+
if ("@type" in values &&
|
13838
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
13821
13839
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Article")) {
|
13822
13840
|
throw new TypeError("Invalid type: " + values["@type"]);
|
13823
13841
|
}
|
@@ -14137,7 +14155,8 @@ export class Document extends Object {
|
|
14137
14155
|
// deno-lint-ignore no-explicit-any
|
14138
14156
|
(expanded[0] ?? {});
|
14139
14157
|
}
|
14140
|
-
if ("@type" in values
|
14158
|
+
if ("@type" in values &&
|
14159
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
14141
14160
|
if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Audio")) {
|
14142
14161
|
return await Audio.fromJsonLd(json, options);
|
14143
14162
|
}
|
@@ -14375,7 +14394,8 @@ export class Audio extends Document {
|
|
14375
14394
|
// deno-lint-ignore no-explicit-any
|
14376
14395
|
(expanded[0] ?? {});
|
14377
14396
|
}
|
14378
|
-
if ("@type" in values
|
14397
|
+
if ("@type" in values &&
|
14398
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
14379
14399
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Audio")) {
|
14380
14400
|
throw new TypeError("Invalid type: " + values["@type"]);
|
14381
14401
|
}
|
@@ -14534,7 +14554,8 @@ export class Ignore extends Activity {
|
|
14534
14554
|
// deno-lint-ignore no-explicit-any
|
14535
14555
|
(expanded[0] ?? {});
|
14536
14556
|
}
|
14537
|
-
if ("@type" in values
|
14557
|
+
if ("@type" in values &&
|
14558
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
14538
14559
|
if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Block")) {
|
14539
14560
|
return await Block.fromJsonLd(json, options);
|
14540
14561
|
}
|
@@ -14698,7 +14719,8 @@ export class Block extends Ignore {
|
|
14698
14719
|
// deno-lint-ignore no-explicit-any
|
14699
14720
|
(expanded[0] ?? {});
|
14700
14721
|
}
|
14701
|
-
if ("@type" in values
|
14722
|
+
if ("@type" in values &&
|
14723
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
14702
14724
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Block")) {
|
14703
14725
|
throw new TypeError("Invalid type: " + values["@type"]);
|
14704
14726
|
}
|
@@ -15381,7 +15403,8 @@ export class Collection extends Object {
|
|
15381
15403
|
// deno-lint-ignore no-explicit-any
|
15382
15404
|
(expanded[0] ?? {});
|
15383
15405
|
}
|
15384
|
-
if ("@type" in values
|
15406
|
+
if ("@type" in values &&
|
15407
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
15385
15408
|
if (values["@type"].includes("https://www.w3.org/ns/activitystreams#CollectionPage")) {
|
15386
15409
|
return await CollectionPage.fromJsonLd(json, options);
|
15387
15410
|
}
|
@@ -16111,7 +16134,8 @@ export class CollectionPage extends Collection {
|
|
16111
16134
|
// deno-lint-ignore no-explicit-any
|
16112
16135
|
(expanded[0] ?? {});
|
16113
16136
|
}
|
16114
|
-
if ("@type" in values
|
16137
|
+
if ("@type" in values &&
|
16138
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
16115
16139
|
if (values["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")) {
|
16116
16140
|
return await OrderedCollectionPage.fromJsonLd(json, options);
|
16117
16141
|
}
|
@@ -16379,7 +16403,8 @@ export class Create extends Activity {
|
|
16379
16403
|
// deno-lint-ignore no-explicit-any
|
16380
16404
|
(expanded[0] ?? {});
|
16381
16405
|
}
|
16382
|
-
if ("@type" in values
|
16406
|
+
if ("@type" in values &&
|
16407
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
16383
16408
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Create")) {
|
16384
16409
|
throw new TypeError("Invalid type: " + values["@type"]);
|
16385
16410
|
}
|
@@ -16551,7 +16576,8 @@ export class Delete extends Activity {
|
|
16551
16576
|
// deno-lint-ignore no-explicit-any
|
16552
16577
|
(expanded[0] ?? {});
|
16553
16578
|
}
|
16554
|
-
if ("@type" in values
|
16579
|
+
if ("@type" in values &&
|
16580
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
16555
16581
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Delete")) {
|
16556
16582
|
throw new TypeError("Invalid type: " + values["@type"]);
|
16557
16583
|
}
|
@@ -16710,7 +16736,8 @@ export class Dislike extends Activity {
|
|
16710
16736
|
// deno-lint-ignore no-explicit-any
|
16711
16737
|
(expanded[0] ?? {});
|
16712
16738
|
}
|
16713
|
-
if ("@type" in values
|
16739
|
+
if ("@type" in values &&
|
16740
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
16714
16741
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Dislike")) {
|
16715
16742
|
throw new TypeError("Invalid type: " + values["@type"]);
|
16716
16743
|
}
|
@@ -17216,7 +17243,8 @@ export class Endpoints {
|
|
17216
17243
|
// deno-lint-ignore no-explicit-any
|
17217
17244
|
(expanded[0] ?? {});
|
17218
17245
|
}
|
17219
|
-
if ("@type" in values
|
17246
|
+
if ("@type" in values &&
|
17247
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
17220
17248
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Endpoints")) {
|
17221
17249
|
throw new TypeError("Invalid type: " + values["@type"]);
|
17222
17250
|
}
|
@@ -17549,7 +17577,8 @@ export class Event extends Object {
|
|
17549
17577
|
// deno-lint-ignore no-explicit-any
|
17550
17578
|
(expanded[0] ?? {});
|
17551
17579
|
}
|
17552
|
-
if ("@type" in values
|
17580
|
+
if ("@type" in values &&
|
17581
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
17553
17582
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Event")) {
|
17554
17583
|
throw new TypeError("Invalid type: " + values["@type"]);
|
17555
17584
|
}
|
@@ -17709,7 +17738,8 @@ export class Flag extends Activity {
|
|
17709
17738
|
// deno-lint-ignore no-explicit-any
|
17710
17739
|
(expanded[0] ?? {});
|
17711
17740
|
}
|
17712
|
-
if ("@type" in values
|
17741
|
+
if ("@type" in values &&
|
17742
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
17713
17743
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Flag")) {
|
17714
17744
|
throw new TypeError("Invalid type: " + values["@type"]);
|
17715
17745
|
}
|
@@ -17870,7 +17900,8 @@ export class Follow extends Activity {
|
|
17870
17900
|
// deno-lint-ignore no-explicit-any
|
17871
17901
|
(expanded[0] ?? {});
|
17872
17902
|
}
|
17873
|
-
if ("@type" in values
|
17903
|
+
if ("@type" in values &&
|
17904
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
17874
17905
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Follow")) {
|
17875
17906
|
throw new TypeError("Invalid type: " + values["@type"]);
|
17876
17907
|
}
|
@@ -20188,7 +20219,8 @@ export class Group extends Object {
|
|
20188
20219
|
// deno-lint-ignore no-explicit-any
|
20189
20220
|
(expanded[0] ?? {});
|
20190
20221
|
}
|
20191
|
-
if ("@type" in values
|
20222
|
+
if ("@type" in values &&
|
20223
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
20192
20224
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Group")) {
|
20193
20225
|
throw new TypeError("Invalid type: " + values["@type"]);
|
20194
20226
|
}
|
@@ -21582,7 +21614,8 @@ export class Link {
|
|
21582
21614
|
// deno-lint-ignore no-explicit-any
|
21583
21615
|
(expanded[0] ?? {});
|
21584
21616
|
}
|
21585
|
-
if ("@type" in values
|
21617
|
+
if ("@type" in values &&
|
21618
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
21586
21619
|
if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Hashtag")) {
|
21587
21620
|
return await Hashtag.fromJsonLd(json, options);
|
21588
21621
|
}
|
@@ -22054,7 +22087,8 @@ export class Hashtag extends Link {
|
|
22054
22087
|
// deno-lint-ignore no-explicit-any
|
22055
22088
|
(expanded[0] ?? {});
|
22056
22089
|
}
|
22057
|
-
if ("@type" in values
|
22090
|
+
if ("@type" in values &&
|
22091
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
22058
22092
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Hashtag")) {
|
22059
22093
|
throw new TypeError("Invalid type: " + values["@type"]);
|
22060
22094
|
}
|
@@ -22222,7 +22256,8 @@ export class Image extends Document {
|
|
22222
22256
|
// deno-lint-ignore no-explicit-any
|
22223
22257
|
(expanded[0] ?? {});
|
22224
22258
|
}
|
22225
|
-
if ("@type" in values
|
22259
|
+
if ("@type" in values &&
|
22260
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
22226
22261
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Image")) {
|
22227
22262
|
throw new TypeError("Invalid type: " + values["@type"]);
|
22228
22263
|
}
|
@@ -22382,7 +22417,8 @@ export class Offer extends Activity {
|
|
22382
22417
|
// deno-lint-ignore no-explicit-any
|
22383
22418
|
(expanded[0] ?? {});
|
22384
22419
|
}
|
22385
|
-
if ("@type" in values
|
22420
|
+
if ("@type" in values &&
|
22421
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
22386
22422
|
if (values["@type"].includes("https://www.w3.org/ns/activitystreams#Invite")) {
|
22387
22423
|
return await Invite.fromJsonLd(json, options);
|
22388
22424
|
}
|
@@ -22544,7 +22580,8 @@ export class Invite extends Offer {
|
|
22544
22580
|
// deno-lint-ignore no-explicit-any
|
22545
22581
|
(expanded[0] ?? {});
|
22546
22582
|
}
|
22547
|
-
if ("@type" in values
|
22583
|
+
if ("@type" in values &&
|
22584
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
22548
22585
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Invite")) {
|
22549
22586
|
throw new TypeError("Invalid type: " + values["@type"]);
|
22550
22587
|
}
|
@@ -22703,7 +22740,8 @@ export class Join extends Activity {
|
|
22703
22740
|
// deno-lint-ignore no-explicit-any
|
22704
22741
|
(expanded[0] ?? {});
|
22705
22742
|
}
|
22706
|
-
if ("@type" in values
|
22743
|
+
if ("@type" in values &&
|
22744
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
22707
22745
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Join")) {
|
22708
22746
|
throw new TypeError("Invalid type: " + values["@type"]);
|
22709
22747
|
}
|
@@ -22862,7 +22900,8 @@ export class Leave extends Activity {
|
|
22862
22900
|
// deno-lint-ignore no-explicit-any
|
22863
22901
|
(expanded[0] ?? {});
|
22864
22902
|
}
|
22865
|
-
if ("@type" in values
|
22903
|
+
if ("@type" in values &&
|
22904
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
22866
22905
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Leave")) {
|
22867
22906
|
throw new TypeError("Invalid type: " + values["@type"]);
|
22868
22907
|
}
|
@@ -23022,7 +23061,8 @@ export class Like extends Activity {
|
|
23022
23061
|
// deno-lint-ignore no-explicit-any
|
23023
23062
|
(expanded[0] ?? {});
|
23024
23063
|
}
|
23025
|
-
if ("@type" in values
|
23064
|
+
if ("@type" in values &&
|
23065
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
23026
23066
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Like")) {
|
23027
23067
|
throw new TypeError("Invalid type: " + values["@type"]);
|
23028
23068
|
}
|
@@ -23180,7 +23220,8 @@ export class Listen extends Activity {
|
|
23180
23220
|
// deno-lint-ignore no-explicit-any
|
23181
23221
|
(expanded[0] ?? {});
|
23182
23222
|
}
|
23183
|
-
if ("@type" in values
|
23223
|
+
if ("@type" in values &&
|
23224
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
23184
23225
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Listen")) {
|
23185
23226
|
throw new TypeError("Invalid type: " + values["@type"]);
|
23186
23227
|
}
|
@@ -23337,7 +23378,8 @@ export class Mention extends Link {
|
|
23337
23378
|
// deno-lint-ignore no-explicit-any
|
23338
23379
|
(expanded[0] ?? {});
|
23339
23380
|
}
|
23340
|
-
if ("@type" in values
|
23381
|
+
if ("@type" in values &&
|
23382
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
23341
23383
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Mention")) {
|
23342
23384
|
throw new TypeError("Invalid type: " + values["@type"]);
|
23343
23385
|
}
|
@@ -23497,7 +23539,8 @@ export class Move extends Activity {
|
|
23497
23539
|
// deno-lint-ignore no-explicit-any
|
23498
23540
|
(expanded[0] ?? {});
|
23499
23541
|
}
|
23500
|
-
if ("@type" in values
|
23542
|
+
if ("@type" in values &&
|
23543
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
23501
23544
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Move")) {
|
23502
23545
|
throw new TypeError("Invalid type: " + values["@type"]);
|
23503
23546
|
}
|
@@ -23760,7 +23803,8 @@ export class Note extends Object {
|
|
23760
23803
|
// deno-lint-ignore no-explicit-any
|
23761
23804
|
(expanded[0] ?? {});
|
23762
23805
|
}
|
23763
|
-
if ("@type" in values
|
23806
|
+
if ("@type" in values &&
|
23807
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
23764
23808
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Note")) {
|
23765
23809
|
throw new TypeError("Invalid type: " + values["@type"]);
|
23766
23810
|
}
|
@@ -24107,7 +24151,8 @@ export class OrderedCollection extends Collection {
|
|
24107
24151
|
// deno-lint-ignore no-explicit-any
|
24108
24152
|
(expanded[0] ?? {});
|
24109
24153
|
}
|
24110
|
-
if ("@type" in values
|
24154
|
+
if ("@type" in values &&
|
24155
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
24111
24156
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")) {
|
24112
24157
|
throw new TypeError("Invalid type: " + values["@type"]);
|
24113
24158
|
}
|
@@ -24578,7 +24623,8 @@ export class OrderedCollectionPage extends CollectionPage {
|
|
24578
24623
|
// deno-lint-ignore no-explicit-any
|
24579
24624
|
(expanded[0] ?? {});
|
24580
24625
|
}
|
24581
|
-
if ("@type" in values
|
24626
|
+
if ("@type" in values &&
|
24627
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
24582
24628
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")) {
|
24583
24629
|
throw new TypeError("Invalid type: " + values["@type"]);
|
24584
24630
|
}
|
@@ -27026,7 +27072,8 @@ export class Organization extends Object {
|
|
27026
27072
|
// deno-lint-ignore no-explicit-any
|
27027
27073
|
(expanded[0] ?? {});
|
27028
27074
|
}
|
27029
|
-
if ("@type" in values
|
27075
|
+
if ("@type" in values &&
|
27076
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
27030
27077
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Organization")) {
|
27031
27078
|
throw new TypeError("Invalid type: " + values["@type"]);
|
27032
27079
|
}
|
@@ -27846,7 +27893,8 @@ export class Page extends Document {
|
|
27846
27893
|
// deno-lint-ignore no-explicit-any
|
27847
27894
|
(expanded[0] ?? {});
|
27848
27895
|
}
|
27849
|
-
if ("@type" in values
|
27896
|
+
if ("@type" in values &&
|
27897
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
27850
27898
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Page")) {
|
27851
27899
|
throw new TypeError("Invalid type: " + values["@type"]);
|
27852
27900
|
}
|
@@ -30164,7 +30212,8 @@ export class Person extends Object {
|
|
30164
30212
|
// deno-lint-ignore no-explicit-any
|
30165
30213
|
(expanded[0] ?? {});
|
30166
30214
|
}
|
30167
|
-
if ("@type" in values
|
30215
|
+
if ("@type" in values &&
|
30216
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
30168
30217
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Person")) {
|
30169
30218
|
throw new TypeError("Invalid type: " + values["@type"]);
|
30170
30219
|
}
|
@@ -31315,7 +31364,8 @@ export class Place extends Object {
|
|
31315
31364
|
// deno-lint-ignore no-explicit-any
|
31316
31365
|
(expanded[0] ?? {});
|
31317
31366
|
}
|
31318
|
-
if ("@type" in values
|
31367
|
+
if ("@type" in values &&
|
31368
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
31319
31369
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Place")) {
|
31320
31370
|
throw new TypeError("Invalid type: " + values["@type"]);
|
31321
31371
|
}
|
@@ -31765,7 +31815,8 @@ export class Profile extends Object {
|
|
31765
31815
|
// deno-lint-ignore no-explicit-any
|
31766
31816
|
(expanded[0] ?? {});
|
31767
31817
|
}
|
31768
|
-
if ("@type" in values
|
31818
|
+
if ("@type" in values &&
|
31819
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
31769
31820
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Profile")) {
|
31770
31821
|
throw new TypeError("Invalid type: " + values["@type"]);
|
31771
31822
|
}
|
@@ -32295,7 +32346,8 @@ export class Question extends IntransitiveActivity {
|
|
32295
32346
|
// deno-lint-ignore no-explicit-any
|
32296
32347
|
(expanded[0] ?? {});
|
32297
32348
|
}
|
32298
|
-
if ("@type" in values
|
32349
|
+
if ("@type" in values &&
|
32350
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
32299
32351
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Question")) {
|
32300
32352
|
throw new TypeError("Invalid type: " + values["@type"]);
|
32301
32353
|
}
|
@@ -32617,7 +32669,8 @@ export class Read extends Activity {
|
|
32617
32669
|
// deno-lint-ignore no-explicit-any
|
32618
32670
|
(expanded[0] ?? {});
|
32619
32671
|
}
|
32620
|
-
if ("@type" in values
|
32672
|
+
if ("@type" in values &&
|
32673
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
32621
32674
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Read")) {
|
32622
32675
|
throw new TypeError("Invalid type: " + values["@type"]);
|
32623
32676
|
}
|
@@ -32776,7 +32829,8 @@ export class Reject extends Activity {
|
|
32776
32829
|
// deno-lint-ignore no-explicit-any
|
32777
32830
|
(expanded[0] ?? {});
|
32778
32831
|
}
|
32779
|
-
if ("@type" in values
|
32832
|
+
if ("@type" in values &&
|
32833
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
32780
32834
|
if (values["@type"].includes("https://www.w3.org/ns/activitystreams#TentativeReject")) {
|
32781
32835
|
return await TentativeReject.fromJsonLd(json, options);
|
32782
32836
|
}
|
@@ -33398,7 +33452,8 @@ export class Relationship extends Object {
|
|
33398
33452
|
// deno-lint-ignore no-explicit-any
|
33399
33453
|
(expanded[0] ?? {});
|
33400
33454
|
}
|
33401
|
-
if ("@type" in values
|
33455
|
+
if ("@type" in values &&
|
33456
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
33402
33457
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Relationship")) {
|
33403
33458
|
throw new TypeError("Invalid type: " + values["@type"]);
|
33404
33459
|
}
|
@@ -33660,7 +33715,8 @@ export class Remove extends Activity {
|
|
33660
33715
|
// deno-lint-ignore no-explicit-any
|
33661
33716
|
(expanded[0] ?? {});
|
33662
33717
|
}
|
33663
|
-
if ("@type" in values
|
33718
|
+
if ("@type" in values &&
|
33719
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
33664
33720
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Remove")) {
|
33665
33721
|
throw new TypeError("Invalid type: " + values["@type"]);
|
33666
33722
|
}
|
@@ -35978,7 +36034,8 @@ export class Service extends Object {
|
|
35978
36034
|
// deno-lint-ignore no-explicit-any
|
35979
36035
|
(expanded[0] ?? {});
|
35980
36036
|
}
|
35981
|
-
if ("@type" in values
|
36037
|
+
if ("@type" in values &&
|
36038
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
35982
36039
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Service")) {
|
35983
36040
|
throw new TypeError("Invalid type: " + values["@type"]);
|
35984
36041
|
}
|
@@ -36935,7 +36992,8 @@ export class Source {
|
|
36935
36992
|
// deno-lint-ignore no-explicit-any
|
36936
36993
|
(expanded[0] ?? {});
|
36937
36994
|
}
|
36938
|
-
if ("@type" in values
|
36995
|
+
if ("@type" in values &&
|
36996
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
36939
36997
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Source")) {
|
36940
36998
|
throw new TypeError("Invalid type: " + values["@type"]);
|
36941
36999
|
}
|
@@ -37159,7 +37217,8 @@ export class TentativeAccept extends Accept {
|
|
37159
37217
|
// deno-lint-ignore no-explicit-any
|
37160
37218
|
(expanded[0] ?? {});
|
37161
37219
|
}
|
37162
|
-
if ("@type" in values
|
37220
|
+
if ("@type" in values &&
|
37221
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
37163
37222
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#TentativeAccept")) {
|
37164
37223
|
throw new TypeError("Invalid type: " + values["@type"]);
|
37165
37224
|
}
|
@@ -37318,7 +37377,8 @@ export class TentativeReject extends Reject {
|
|
37318
37377
|
// deno-lint-ignore no-explicit-any
|
37319
37378
|
(expanded[0] ?? {});
|
37320
37379
|
}
|
37321
|
-
if ("@type" in values
|
37380
|
+
if ("@type" in values &&
|
37381
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
37322
37382
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#TentativeReject")) {
|
37323
37383
|
throw new TypeError("Invalid type: " + values["@type"]);
|
37324
37384
|
}
|
@@ -37547,7 +37607,8 @@ export class Tombstone extends Object {
|
|
37547
37607
|
// deno-lint-ignore no-explicit-any
|
37548
37608
|
(expanded[0] ?? {});
|
37549
37609
|
}
|
37550
|
-
if ("@type" in values
|
37610
|
+
if ("@type" in values &&
|
37611
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
37551
37612
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Tombstone")) {
|
37552
37613
|
throw new TypeError("Invalid type: " + values["@type"]);
|
37553
37614
|
}
|
@@ -37734,7 +37795,8 @@ export class Travel extends IntransitiveActivity {
|
|
37734
37795
|
// deno-lint-ignore no-explicit-any
|
37735
37796
|
(expanded[0] ?? {});
|
37736
37797
|
}
|
37737
|
-
if ("@type" in values
|
37798
|
+
if ("@type" in values &&
|
37799
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
37738
37800
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Travel")) {
|
37739
37801
|
throw new TypeError("Invalid type: " + values["@type"]);
|
37740
37802
|
}
|
@@ -37898,7 +37960,8 @@ export class Undo extends Activity {
|
|
37898
37960
|
// deno-lint-ignore no-explicit-any
|
37899
37961
|
(expanded[0] ?? {});
|
37900
37962
|
}
|
37901
|
-
if ("@type" in values
|
37963
|
+
if ("@type" in values &&
|
37964
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
37902
37965
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Undo")) {
|
37903
37966
|
throw new TypeError("Invalid type: " + values["@type"]);
|
37904
37967
|
}
|
@@ -38083,7 +38146,8 @@ export class Update extends Activity {
|
|
38083
38146
|
// deno-lint-ignore no-explicit-any
|
38084
38147
|
(expanded[0] ?? {});
|
38085
38148
|
}
|
38086
|
-
if ("@type" in values
|
38149
|
+
if ("@type" in values &&
|
38150
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
38087
38151
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Update")) {
|
38088
38152
|
throw new TypeError("Invalid type: " + values["@type"]);
|
38089
38153
|
}
|
@@ -38257,7 +38321,8 @@ export class Video extends Document {
|
|
38257
38321
|
// deno-lint-ignore no-explicit-any
|
38258
38322
|
(expanded[0] ?? {});
|
38259
38323
|
}
|
38260
|
-
if ("@type" in values
|
38324
|
+
if ("@type" in values &&
|
38325
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
38261
38326
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#Video")) {
|
38262
38327
|
throw new TypeError("Invalid type: " + values["@type"]);
|
38263
38328
|
}
|
@@ -38415,7 +38480,8 @@ export class View extends Activity {
|
|
38415
38480
|
// deno-lint-ignore no-explicit-any
|
38416
38481
|
(expanded[0] ?? {});
|
38417
38482
|
}
|
38418
|
-
if ("@type" in values
|
38483
|
+
if ("@type" in values &&
|
38484
|
+
!values["@type"].every((t) => t.startsWith("_:"))) {
|
38419
38485
|
if (!values["@type"].includes("https://www.w3.org/ns/activitystreams#View")) {
|
38420
38486
|
throw new TypeError("Invalid type: " + values["@type"]);
|
38421
38487
|
}
|