@fedify/fedify 1.0.9 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGES.md +136 -0
- package/esm/testing/fixtures/example.com/orderedcollectionpage +24 -0
- package/esm/vocab/application.yaml +2 -0
- package/esm/vocab/group.yaml +2 -0
- package/esm/vocab/organization.yaml +2 -0
- package/esm/vocab/person.yaml +2 -0
- package/esm/vocab/service.yaml +2 -0
- package/esm/vocab/vocab.js +450 -110
- package/esm/webfinger/lookup.js +1 -1
- package/package.json +1 -1
- package/types/vocab/vocab.d.ts +30 -30
- package/types/vocab/vocab.d.ts.map +1 -1
- package/types/webfinger/lookup.d.ts.map +1 -1
package/esm/vocab/vocab.js
CHANGED
@@ -9906,24 +9906,27 @@ export class Application extends Object {
|
|
9906
9906
|
}
|
9907
9907
|
}
|
9908
9908
|
if ("inbox" in values && values.inbox != null) {
|
9909
|
-
if (values.inbox instanceof OrderedCollection ||
|
9909
|
+
if (values.inbox instanceof OrderedCollection ||
|
9910
|
+
values.inbox instanceof OrderedCollectionPage ||
|
9911
|
+
values.inbox instanceof URL) {
|
9910
9912
|
// @ts-ignore: type is checked above.
|
9911
9913
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
|
9912
9914
|
}
|
9913
9915
|
else {
|
9914
9916
|
throw new TypeError("The inbox must be of type " +
|
9915
|
-
"OrderedCollection | URL" + ".");
|
9917
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
9916
9918
|
}
|
9917
9919
|
}
|
9918
9920
|
if ("outbox" in values && values.outbox != null) {
|
9919
9921
|
if (values.outbox instanceof OrderedCollection ||
|
9922
|
+
values.outbox instanceof OrderedCollectionPage ||
|
9920
9923
|
values.outbox instanceof URL) {
|
9921
9924
|
// @ts-ignore: type is checked above.
|
9922
9925
|
this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
|
9923
9926
|
}
|
9924
9927
|
else {
|
9925
9928
|
throw new TypeError("The outbox must be of type " +
|
9926
|
-
"OrderedCollection | URL" + ".");
|
9929
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
9927
9930
|
}
|
9928
9931
|
}
|
9929
9932
|
if ("following" in values && values.following != null) {
|
@@ -10203,26 +10206,29 @@ export class Application extends Object {
|
|
10203
10206
|
clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
|
10204
10207
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
|
10205
10208
|
if ("inbox" in values && values.inbox != null) {
|
10206
|
-
if (values.inbox instanceof OrderedCollection ||
|
10209
|
+
if (values.inbox instanceof OrderedCollection ||
|
10210
|
+
values.inbox instanceof OrderedCollectionPage ||
|
10211
|
+
values.inbox instanceof URL) {
|
10207
10212
|
// @ts-ignore: type is checked above.
|
10208
10213
|
clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
|
10209
10214
|
}
|
10210
10215
|
else {
|
10211
10216
|
throw new TypeError("The inbox must be of type " +
|
10212
|
-
"OrderedCollection | URL" + ".");
|
10217
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
10213
10218
|
}
|
10214
10219
|
}
|
10215
10220
|
clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
|
10216
10221
|
this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
|
10217
10222
|
if ("outbox" in values && values.outbox != null) {
|
10218
10223
|
if (values.outbox instanceof OrderedCollection ||
|
10224
|
+
values.outbox instanceof OrderedCollectionPage ||
|
10219
10225
|
values.outbox instanceof URL) {
|
10220
10226
|
// @ts-ignore: type is checked above.
|
10221
10227
|
clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
|
10222
10228
|
}
|
10223
10229
|
else {
|
10224
10230
|
throw new TypeError("The outbox must be of type " +
|
10225
|
-
"OrderedCollection | URL" + ".");
|
10231
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
10226
10232
|
}
|
10227
10233
|
}
|
10228
10234
|
clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
|
@@ -10631,8 +10637,18 @@ export class Application extends Object {
|
|
10631
10637
|
if (!(e instanceof TypeError))
|
10632
10638
|
throw e;
|
10633
10639
|
}
|
10640
|
+
try {
|
10641
|
+
return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
10642
|
+
}
|
10643
|
+
catch (e) {
|
10644
|
+
if (!(e instanceof TypeError))
|
10645
|
+
throw e;
|
10646
|
+
}
|
10634
10647
|
throw new TypeError("Expected an object of any type of: " +
|
10635
|
-
[
|
10648
|
+
[
|
10649
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollection",
|
10650
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
|
10651
|
+
].join(", "));
|
10636
10652
|
}
|
10637
10653
|
/**
|
10638
10654
|
* Similar to
|
@@ -10698,8 +10714,18 @@ export class Application extends Object {
|
|
10698
10714
|
if (!(e instanceof TypeError))
|
10699
10715
|
throw e;
|
10700
10716
|
}
|
10717
|
+
try {
|
10718
|
+
return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
10719
|
+
}
|
10720
|
+
catch (e) {
|
10721
|
+
if (!(e instanceof TypeError))
|
10722
|
+
throw e;
|
10723
|
+
}
|
10701
10724
|
throw new TypeError("Expected an object of any type of: " +
|
10702
|
-
[
|
10725
|
+
[
|
10726
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollection",
|
10727
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
|
10728
|
+
].join(", "));
|
10703
10729
|
}
|
10704
10730
|
/**
|
10705
10731
|
* Similar to
|
@@ -11344,11 +11370,19 @@ export class Application extends Object {
|
|
11344
11370
|
}
|
11345
11371
|
compactItems = [];
|
11346
11372
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
|
11347
|
-
const item = v instanceof URL
|
11348
|
-
|
11349
|
-
|
11350
|
-
|
11351
|
-
|
11373
|
+
const item = v instanceof URL
|
11374
|
+
? v.href
|
11375
|
+
: v instanceof OrderedCollection
|
11376
|
+
? await v.toJsonLd({
|
11377
|
+
...options,
|
11378
|
+
format: undefined,
|
11379
|
+
context: undefined,
|
11380
|
+
})
|
11381
|
+
: await v.toJsonLd({
|
11382
|
+
...options,
|
11383
|
+
format: undefined,
|
11384
|
+
context: undefined,
|
11385
|
+
});
|
11352
11386
|
compactItems.push(item);
|
11353
11387
|
}
|
11354
11388
|
if (compactItems.length > 0) {
|
@@ -11358,11 +11392,19 @@ export class Application extends Object {
|
|
11358
11392
|
}
|
11359
11393
|
compactItems = [];
|
11360
11394
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
|
11361
|
-
const item = v instanceof URL
|
11362
|
-
|
11363
|
-
|
11364
|
-
|
11365
|
-
|
11395
|
+
const item = v instanceof URL
|
11396
|
+
? v.href
|
11397
|
+
: v instanceof OrderedCollection
|
11398
|
+
? await v.toJsonLd({
|
11399
|
+
...options,
|
11400
|
+
format: undefined,
|
11401
|
+
context: undefined,
|
11402
|
+
})
|
11403
|
+
: await v.toJsonLd({
|
11404
|
+
...options,
|
11405
|
+
format: undefined,
|
11406
|
+
context: undefined,
|
11407
|
+
});
|
11366
11408
|
compactItems.push(item);
|
11367
11409
|
}
|
11368
11410
|
if (compactItems.length > 0) {
|
@@ -11642,7 +11684,9 @@ export class Application extends Object {
|
|
11642
11684
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
|
11643
11685
|
const element = v instanceof URL
|
11644
11686
|
? { "@id": v.href }
|
11645
|
-
:
|
11687
|
+
: v instanceof OrderedCollection
|
11688
|
+
? await v.toJsonLd(options)
|
11689
|
+
: await v.toJsonLd(options);
|
11646
11690
|
array.push(element);
|
11647
11691
|
}
|
11648
11692
|
if (array.length > 0) {
|
@@ -11653,7 +11697,9 @@ export class Application extends Object {
|
|
11653
11697
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
|
11654
11698
|
const element = v instanceof URL
|
11655
11699
|
? { "@id": v.href }
|
11656
|
-
:
|
11700
|
+
: v instanceof OrderedCollection
|
11701
|
+
? await v.toJsonLd(options)
|
11702
|
+
: await v.toJsonLd(options);
|
11657
11703
|
array.push(element);
|
11658
11704
|
}
|
11659
11705
|
if (array.length > 0) {
|
@@ -11997,7 +12043,18 @@ export class Application extends Object {
|
|
11997
12043
|
: new URL(v["@id"]));
|
11998
12044
|
continue;
|
11999
12045
|
}
|
12000
|
-
|
12046
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
12047
|
+
Array.isArray(v["@type"]) &&
|
12048
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
|
12049
|
+
? await OrderedCollection.fromJsonLd(v, options)
|
12050
|
+
: typeof v === "object" && "@type" in v &&
|
12051
|
+
Array.isArray(v["@type"]) &&
|
12052
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
|
12053
|
+
? await OrderedCollectionPage.fromJsonLd(v, options)
|
12054
|
+
: undefined;
|
12055
|
+
if (typeof decoded === "undefined")
|
12056
|
+
continue;
|
12057
|
+
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
|
12001
12058
|
}
|
12002
12059
|
instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
|
12003
12060
|
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
|
@@ -12018,7 +12075,18 @@ export class Application extends Object {
|
|
12018
12075
|
: new URL(v["@id"]));
|
12019
12076
|
continue;
|
12020
12077
|
}
|
12021
|
-
|
12078
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
12079
|
+
Array.isArray(v["@type"]) &&
|
12080
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
|
12081
|
+
? await OrderedCollection.fromJsonLd(v, options)
|
12082
|
+
: typeof v === "object" && "@type" in v &&
|
12083
|
+
Array.isArray(v["@type"]) &&
|
12084
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
|
12085
|
+
? await OrderedCollectionPage.fromJsonLd(v, options)
|
12086
|
+
: undefined;
|
12087
|
+
if (typeof decoded === "undefined")
|
12088
|
+
continue;
|
12089
|
+
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
|
12022
12090
|
}
|
12023
12091
|
instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
|
12024
12092
|
_41QwhqJouoLg3h8dRPKat21brynC_outbox;
|
@@ -17364,24 +17432,27 @@ export class Group extends Object {
|
|
17364
17432
|
}
|
17365
17433
|
}
|
17366
17434
|
if ("inbox" in values && values.inbox != null) {
|
17367
|
-
if (values.inbox instanceof OrderedCollection ||
|
17435
|
+
if (values.inbox instanceof OrderedCollection ||
|
17436
|
+
values.inbox instanceof OrderedCollectionPage ||
|
17437
|
+
values.inbox instanceof URL) {
|
17368
17438
|
// @ts-ignore: type is checked above.
|
17369
17439
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
|
17370
17440
|
}
|
17371
17441
|
else {
|
17372
17442
|
throw new TypeError("The inbox must be of type " +
|
17373
|
-
"OrderedCollection | URL" + ".");
|
17443
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
17374
17444
|
}
|
17375
17445
|
}
|
17376
17446
|
if ("outbox" in values && values.outbox != null) {
|
17377
17447
|
if (values.outbox instanceof OrderedCollection ||
|
17448
|
+
values.outbox instanceof OrderedCollectionPage ||
|
17378
17449
|
values.outbox instanceof URL) {
|
17379
17450
|
// @ts-ignore: type is checked above.
|
17380
17451
|
this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
|
17381
17452
|
}
|
17382
17453
|
else {
|
17383
17454
|
throw new TypeError("The outbox must be of type " +
|
17384
|
-
"OrderedCollection | URL" + ".");
|
17455
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
17385
17456
|
}
|
17386
17457
|
}
|
17387
17458
|
if ("following" in values && values.following != null) {
|
@@ -17661,26 +17732,29 @@ export class Group extends Object {
|
|
17661
17732
|
clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
|
17662
17733
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
|
17663
17734
|
if ("inbox" in values && values.inbox != null) {
|
17664
|
-
if (values.inbox instanceof OrderedCollection ||
|
17735
|
+
if (values.inbox instanceof OrderedCollection ||
|
17736
|
+
values.inbox instanceof OrderedCollectionPage ||
|
17737
|
+
values.inbox instanceof URL) {
|
17665
17738
|
// @ts-ignore: type is checked above.
|
17666
17739
|
clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
|
17667
17740
|
}
|
17668
17741
|
else {
|
17669
17742
|
throw new TypeError("The inbox must be of type " +
|
17670
|
-
"OrderedCollection | URL" + ".");
|
17743
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
17671
17744
|
}
|
17672
17745
|
}
|
17673
17746
|
clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
|
17674
17747
|
this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
|
17675
17748
|
if ("outbox" in values && values.outbox != null) {
|
17676
17749
|
if (values.outbox instanceof OrderedCollection ||
|
17750
|
+
values.outbox instanceof OrderedCollectionPage ||
|
17677
17751
|
values.outbox instanceof URL) {
|
17678
17752
|
// @ts-ignore: type is checked above.
|
17679
17753
|
clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
|
17680
17754
|
}
|
17681
17755
|
else {
|
17682
17756
|
throw new TypeError("The outbox must be of type " +
|
17683
|
-
"OrderedCollection | URL" + ".");
|
17757
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
17684
17758
|
}
|
17685
17759
|
}
|
17686
17760
|
clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
|
@@ -18089,8 +18163,18 @@ export class Group extends Object {
|
|
18089
18163
|
if (!(e instanceof TypeError))
|
18090
18164
|
throw e;
|
18091
18165
|
}
|
18166
|
+
try {
|
18167
|
+
return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
18168
|
+
}
|
18169
|
+
catch (e) {
|
18170
|
+
if (!(e instanceof TypeError))
|
18171
|
+
throw e;
|
18172
|
+
}
|
18092
18173
|
throw new TypeError("Expected an object of any type of: " +
|
18093
|
-
[
|
18174
|
+
[
|
18175
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollection",
|
18176
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
|
18177
|
+
].join(", "));
|
18094
18178
|
}
|
18095
18179
|
/**
|
18096
18180
|
* Similar to
|
@@ -18156,8 +18240,18 @@ export class Group extends Object {
|
|
18156
18240
|
if (!(e instanceof TypeError))
|
18157
18241
|
throw e;
|
18158
18242
|
}
|
18243
|
+
try {
|
18244
|
+
return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
18245
|
+
}
|
18246
|
+
catch (e) {
|
18247
|
+
if (!(e instanceof TypeError))
|
18248
|
+
throw e;
|
18249
|
+
}
|
18159
18250
|
throw new TypeError("Expected an object of any type of: " +
|
18160
|
-
[
|
18251
|
+
[
|
18252
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollection",
|
18253
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
|
18254
|
+
].join(", "));
|
18161
18255
|
}
|
18162
18256
|
/**
|
18163
18257
|
* Similar to
|
@@ -18802,11 +18896,19 @@ export class Group extends Object {
|
|
18802
18896
|
}
|
18803
18897
|
compactItems = [];
|
18804
18898
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
|
18805
|
-
const item = v instanceof URL
|
18806
|
-
|
18807
|
-
|
18808
|
-
|
18809
|
-
|
18899
|
+
const item = v instanceof URL
|
18900
|
+
? v.href
|
18901
|
+
: v instanceof OrderedCollection
|
18902
|
+
? await v.toJsonLd({
|
18903
|
+
...options,
|
18904
|
+
format: undefined,
|
18905
|
+
context: undefined,
|
18906
|
+
})
|
18907
|
+
: await v.toJsonLd({
|
18908
|
+
...options,
|
18909
|
+
format: undefined,
|
18910
|
+
context: undefined,
|
18911
|
+
});
|
18810
18912
|
compactItems.push(item);
|
18811
18913
|
}
|
18812
18914
|
if (compactItems.length > 0) {
|
@@ -18816,11 +18918,19 @@ export class Group extends Object {
|
|
18816
18918
|
}
|
18817
18919
|
compactItems = [];
|
18818
18920
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
|
18819
|
-
const item = v instanceof URL
|
18820
|
-
|
18821
|
-
|
18822
|
-
|
18823
|
-
|
18921
|
+
const item = v instanceof URL
|
18922
|
+
? v.href
|
18923
|
+
: v instanceof OrderedCollection
|
18924
|
+
? await v.toJsonLd({
|
18925
|
+
...options,
|
18926
|
+
format: undefined,
|
18927
|
+
context: undefined,
|
18928
|
+
})
|
18929
|
+
: await v.toJsonLd({
|
18930
|
+
...options,
|
18931
|
+
format: undefined,
|
18932
|
+
context: undefined,
|
18933
|
+
});
|
18824
18934
|
compactItems.push(item);
|
18825
18935
|
}
|
18826
18936
|
if (compactItems.length > 0) {
|
@@ -19100,7 +19210,9 @@ export class Group extends Object {
|
|
19100
19210
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
|
19101
19211
|
const element = v instanceof URL
|
19102
19212
|
? { "@id": v.href }
|
19103
|
-
:
|
19213
|
+
: v instanceof OrderedCollection
|
19214
|
+
? await v.toJsonLd(options)
|
19215
|
+
: await v.toJsonLd(options);
|
19104
19216
|
array.push(element);
|
19105
19217
|
}
|
19106
19218
|
if (array.length > 0) {
|
@@ -19111,7 +19223,9 @@ export class Group extends Object {
|
|
19111
19223
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
|
19112
19224
|
const element = v instanceof URL
|
19113
19225
|
? { "@id": v.href }
|
19114
|
-
:
|
19226
|
+
: v instanceof OrderedCollection
|
19227
|
+
? await v.toJsonLd(options)
|
19228
|
+
: await v.toJsonLd(options);
|
19115
19229
|
array.push(element);
|
19116
19230
|
}
|
19117
19231
|
if (array.length > 0) {
|
@@ -19455,7 +19569,18 @@ export class Group extends Object {
|
|
19455
19569
|
: new URL(v["@id"]));
|
19456
19570
|
continue;
|
19457
19571
|
}
|
19458
|
-
|
19572
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
19573
|
+
Array.isArray(v["@type"]) &&
|
19574
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
|
19575
|
+
? await OrderedCollection.fromJsonLd(v, options)
|
19576
|
+
: typeof v === "object" && "@type" in v &&
|
19577
|
+
Array.isArray(v["@type"]) &&
|
19578
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
|
19579
|
+
? await OrderedCollectionPage.fromJsonLd(v, options)
|
19580
|
+
: undefined;
|
19581
|
+
if (typeof decoded === "undefined")
|
19582
|
+
continue;
|
19583
|
+
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
|
19459
19584
|
}
|
19460
19585
|
instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
|
19461
19586
|
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
|
@@ -19476,7 +19601,18 @@ export class Group extends Object {
|
|
19476
19601
|
: new URL(v["@id"]));
|
19477
19602
|
continue;
|
19478
19603
|
}
|
19479
|
-
|
19604
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
19605
|
+
Array.isArray(v["@type"]) &&
|
19606
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
|
19607
|
+
? await OrderedCollection.fromJsonLd(v, options)
|
19608
|
+
: typeof v === "object" && "@type" in v &&
|
19609
|
+
Array.isArray(v["@type"]) &&
|
19610
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
|
19611
|
+
? await OrderedCollectionPage.fromJsonLd(v, options)
|
19612
|
+
: undefined;
|
19613
|
+
if (typeof decoded === "undefined")
|
19614
|
+
continue;
|
19615
|
+
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
|
19480
19616
|
}
|
19481
19617
|
instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
|
19482
19618
|
_41QwhqJouoLg3h8dRPKat21brynC_outbox;
|
@@ -24038,24 +24174,27 @@ export class Organization extends Object {
|
|
24038
24174
|
}
|
24039
24175
|
}
|
24040
24176
|
if ("inbox" in values && values.inbox != null) {
|
24041
|
-
if (values.inbox instanceof OrderedCollection ||
|
24177
|
+
if (values.inbox instanceof OrderedCollection ||
|
24178
|
+
values.inbox instanceof OrderedCollectionPage ||
|
24179
|
+
values.inbox instanceof URL) {
|
24042
24180
|
// @ts-ignore: type is checked above.
|
24043
24181
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
|
24044
24182
|
}
|
24045
24183
|
else {
|
24046
24184
|
throw new TypeError("The inbox must be of type " +
|
24047
|
-
"OrderedCollection | URL" + ".");
|
24185
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
24048
24186
|
}
|
24049
24187
|
}
|
24050
24188
|
if ("outbox" in values && values.outbox != null) {
|
24051
24189
|
if (values.outbox instanceof OrderedCollection ||
|
24190
|
+
values.outbox instanceof OrderedCollectionPage ||
|
24052
24191
|
values.outbox instanceof URL) {
|
24053
24192
|
// @ts-ignore: type is checked above.
|
24054
24193
|
this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
|
24055
24194
|
}
|
24056
24195
|
else {
|
24057
24196
|
throw new TypeError("The outbox must be of type " +
|
24058
|
-
"OrderedCollection | URL" + ".");
|
24197
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
24059
24198
|
}
|
24060
24199
|
}
|
24061
24200
|
if ("following" in values && values.following != null) {
|
@@ -24335,26 +24474,29 @@ export class Organization extends Object {
|
|
24335
24474
|
clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
|
24336
24475
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
|
24337
24476
|
if ("inbox" in values && values.inbox != null) {
|
24338
|
-
if (values.inbox instanceof OrderedCollection ||
|
24477
|
+
if (values.inbox instanceof OrderedCollection ||
|
24478
|
+
values.inbox instanceof OrderedCollectionPage ||
|
24479
|
+
values.inbox instanceof URL) {
|
24339
24480
|
// @ts-ignore: type is checked above.
|
24340
24481
|
clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
|
24341
24482
|
}
|
24342
24483
|
else {
|
24343
24484
|
throw new TypeError("The inbox must be of type " +
|
24344
|
-
"OrderedCollection | URL" + ".");
|
24485
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
24345
24486
|
}
|
24346
24487
|
}
|
24347
24488
|
clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
|
24348
24489
|
this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
|
24349
24490
|
if ("outbox" in values && values.outbox != null) {
|
24350
24491
|
if (values.outbox instanceof OrderedCollection ||
|
24492
|
+
values.outbox instanceof OrderedCollectionPage ||
|
24351
24493
|
values.outbox instanceof URL) {
|
24352
24494
|
// @ts-ignore: type is checked above.
|
24353
24495
|
clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
|
24354
24496
|
}
|
24355
24497
|
else {
|
24356
24498
|
throw new TypeError("The outbox must be of type " +
|
24357
|
-
"OrderedCollection | URL" + ".");
|
24499
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
24358
24500
|
}
|
24359
24501
|
}
|
24360
24502
|
clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
|
@@ -24763,8 +24905,18 @@ export class Organization extends Object {
|
|
24763
24905
|
if (!(e instanceof TypeError))
|
24764
24906
|
throw e;
|
24765
24907
|
}
|
24908
|
+
try {
|
24909
|
+
return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
24910
|
+
}
|
24911
|
+
catch (e) {
|
24912
|
+
if (!(e instanceof TypeError))
|
24913
|
+
throw e;
|
24914
|
+
}
|
24766
24915
|
throw new TypeError("Expected an object of any type of: " +
|
24767
|
-
[
|
24916
|
+
[
|
24917
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollection",
|
24918
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
|
24919
|
+
].join(", "));
|
24768
24920
|
}
|
24769
24921
|
/**
|
24770
24922
|
* Similar to
|
@@ -24830,8 +24982,18 @@ export class Organization extends Object {
|
|
24830
24982
|
if (!(e instanceof TypeError))
|
24831
24983
|
throw e;
|
24832
24984
|
}
|
24985
|
+
try {
|
24986
|
+
return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
24987
|
+
}
|
24988
|
+
catch (e) {
|
24989
|
+
if (!(e instanceof TypeError))
|
24990
|
+
throw e;
|
24991
|
+
}
|
24833
24992
|
throw new TypeError("Expected an object of any type of: " +
|
24834
|
-
[
|
24993
|
+
[
|
24994
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollection",
|
24995
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
|
24996
|
+
].join(", "));
|
24835
24997
|
}
|
24836
24998
|
/**
|
24837
24999
|
* Similar to
|
@@ -25476,11 +25638,19 @@ export class Organization extends Object {
|
|
25476
25638
|
}
|
25477
25639
|
compactItems = [];
|
25478
25640
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
|
25479
|
-
const item = v instanceof URL
|
25480
|
-
|
25481
|
-
|
25482
|
-
|
25483
|
-
|
25641
|
+
const item = v instanceof URL
|
25642
|
+
? v.href
|
25643
|
+
: v instanceof OrderedCollection
|
25644
|
+
? await v.toJsonLd({
|
25645
|
+
...options,
|
25646
|
+
format: undefined,
|
25647
|
+
context: undefined,
|
25648
|
+
})
|
25649
|
+
: await v.toJsonLd({
|
25650
|
+
...options,
|
25651
|
+
format: undefined,
|
25652
|
+
context: undefined,
|
25653
|
+
});
|
25484
25654
|
compactItems.push(item);
|
25485
25655
|
}
|
25486
25656
|
if (compactItems.length > 0) {
|
@@ -25490,11 +25660,19 @@ export class Organization extends Object {
|
|
25490
25660
|
}
|
25491
25661
|
compactItems = [];
|
25492
25662
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
|
25493
|
-
const item = v instanceof URL
|
25494
|
-
|
25495
|
-
|
25496
|
-
|
25497
|
-
|
25663
|
+
const item = v instanceof URL
|
25664
|
+
? v.href
|
25665
|
+
: v instanceof OrderedCollection
|
25666
|
+
? await v.toJsonLd({
|
25667
|
+
...options,
|
25668
|
+
format: undefined,
|
25669
|
+
context: undefined,
|
25670
|
+
})
|
25671
|
+
: await v.toJsonLd({
|
25672
|
+
...options,
|
25673
|
+
format: undefined,
|
25674
|
+
context: undefined,
|
25675
|
+
});
|
25498
25676
|
compactItems.push(item);
|
25499
25677
|
}
|
25500
25678
|
if (compactItems.length > 0) {
|
@@ -25774,7 +25952,9 @@ export class Organization extends Object {
|
|
25774
25952
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
|
25775
25953
|
const element = v instanceof URL
|
25776
25954
|
? { "@id": v.href }
|
25777
|
-
:
|
25955
|
+
: v instanceof OrderedCollection
|
25956
|
+
? await v.toJsonLd(options)
|
25957
|
+
: await v.toJsonLd(options);
|
25778
25958
|
array.push(element);
|
25779
25959
|
}
|
25780
25960
|
if (array.length > 0) {
|
@@ -25785,7 +25965,9 @@ export class Organization extends Object {
|
|
25785
25965
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
|
25786
25966
|
const element = v instanceof URL
|
25787
25967
|
? { "@id": v.href }
|
25788
|
-
:
|
25968
|
+
: v instanceof OrderedCollection
|
25969
|
+
? await v.toJsonLd(options)
|
25970
|
+
: await v.toJsonLd(options);
|
25789
25971
|
array.push(element);
|
25790
25972
|
}
|
25791
25973
|
if (array.length > 0) {
|
@@ -26129,7 +26311,18 @@ export class Organization extends Object {
|
|
26129
26311
|
: new URL(v["@id"]));
|
26130
26312
|
continue;
|
26131
26313
|
}
|
26132
|
-
|
26314
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
26315
|
+
Array.isArray(v["@type"]) &&
|
26316
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
|
26317
|
+
? await OrderedCollection.fromJsonLd(v, options)
|
26318
|
+
: typeof v === "object" && "@type" in v &&
|
26319
|
+
Array.isArray(v["@type"]) &&
|
26320
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
|
26321
|
+
? await OrderedCollectionPage.fromJsonLd(v, options)
|
26322
|
+
: undefined;
|
26323
|
+
if (typeof decoded === "undefined")
|
26324
|
+
continue;
|
26325
|
+
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
|
26133
26326
|
}
|
26134
26327
|
instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
|
26135
26328
|
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
|
@@ -26150,7 +26343,18 @@ export class Organization extends Object {
|
|
26150
26343
|
: new URL(v["@id"]));
|
26151
26344
|
continue;
|
26152
26345
|
}
|
26153
|
-
|
26346
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
26347
|
+
Array.isArray(v["@type"]) &&
|
26348
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
|
26349
|
+
? await OrderedCollection.fromJsonLd(v, options)
|
26350
|
+
: typeof v === "object" && "@type" in v &&
|
26351
|
+
Array.isArray(v["@type"]) &&
|
26352
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
|
26353
|
+
? await OrderedCollectionPage.fromJsonLd(v, options)
|
26354
|
+
: undefined;
|
26355
|
+
if (typeof decoded === "undefined")
|
26356
|
+
continue;
|
26357
|
+
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
|
26154
26358
|
}
|
26155
26359
|
instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
|
26156
26360
|
_41QwhqJouoLg3h8dRPKat21brynC_outbox;
|
@@ -26997,24 +27201,27 @@ export class Person extends Object {
|
|
26997
27201
|
}
|
26998
27202
|
}
|
26999
27203
|
if ("inbox" in values && values.inbox != null) {
|
27000
|
-
if (values.inbox instanceof OrderedCollection ||
|
27204
|
+
if (values.inbox instanceof OrderedCollection ||
|
27205
|
+
values.inbox instanceof OrderedCollectionPage ||
|
27206
|
+
values.inbox instanceof URL) {
|
27001
27207
|
// @ts-ignore: type is checked above.
|
27002
27208
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
|
27003
27209
|
}
|
27004
27210
|
else {
|
27005
27211
|
throw new TypeError("The inbox must be of type " +
|
27006
|
-
"OrderedCollection | URL" + ".");
|
27212
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
27007
27213
|
}
|
27008
27214
|
}
|
27009
27215
|
if ("outbox" in values && values.outbox != null) {
|
27010
27216
|
if (values.outbox instanceof OrderedCollection ||
|
27217
|
+
values.outbox instanceof OrderedCollectionPage ||
|
27011
27218
|
values.outbox instanceof URL) {
|
27012
27219
|
// @ts-ignore: type is checked above.
|
27013
27220
|
this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
|
27014
27221
|
}
|
27015
27222
|
else {
|
27016
27223
|
throw new TypeError("The outbox must be of type " +
|
27017
|
-
"OrderedCollection | URL" + ".");
|
27224
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
27018
27225
|
}
|
27019
27226
|
}
|
27020
27227
|
if ("following" in values && values.following != null) {
|
@@ -27294,26 +27501,29 @@ export class Person extends Object {
|
|
27294
27501
|
clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
|
27295
27502
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
|
27296
27503
|
if ("inbox" in values && values.inbox != null) {
|
27297
|
-
if (values.inbox instanceof OrderedCollection ||
|
27504
|
+
if (values.inbox instanceof OrderedCollection ||
|
27505
|
+
values.inbox instanceof OrderedCollectionPage ||
|
27506
|
+
values.inbox instanceof URL) {
|
27298
27507
|
// @ts-ignore: type is checked above.
|
27299
27508
|
clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
|
27300
27509
|
}
|
27301
27510
|
else {
|
27302
27511
|
throw new TypeError("The inbox must be of type " +
|
27303
|
-
"OrderedCollection | URL" + ".");
|
27512
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
27304
27513
|
}
|
27305
27514
|
}
|
27306
27515
|
clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
|
27307
27516
|
this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
|
27308
27517
|
if ("outbox" in values && values.outbox != null) {
|
27309
27518
|
if (values.outbox instanceof OrderedCollection ||
|
27519
|
+
values.outbox instanceof OrderedCollectionPage ||
|
27310
27520
|
values.outbox instanceof URL) {
|
27311
27521
|
// @ts-ignore: type is checked above.
|
27312
27522
|
clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
|
27313
27523
|
}
|
27314
27524
|
else {
|
27315
27525
|
throw new TypeError("The outbox must be of type " +
|
27316
|
-
"OrderedCollection | URL" + ".");
|
27526
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
27317
27527
|
}
|
27318
27528
|
}
|
27319
27529
|
clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
|
@@ -27722,8 +27932,18 @@ export class Person extends Object {
|
|
27722
27932
|
if (!(e instanceof TypeError))
|
27723
27933
|
throw e;
|
27724
27934
|
}
|
27935
|
+
try {
|
27936
|
+
return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
27937
|
+
}
|
27938
|
+
catch (e) {
|
27939
|
+
if (!(e instanceof TypeError))
|
27940
|
+
throw e;
|
27941
|
+
}
|
27725
27942
|
throw new TypeError("Expected an object of any type of: " +
|
27726
|
-
[
|
27943
|
+
[
|
27944
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollection",
|
27945
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
|
27946
|
+
].join(", "));
|
27727
27947
|
}
|
27728
27948
|
/**
|
27729
27949
|
* Similar to
|
@@ -27789,8 +28009,18 @@ export class Person extends Object {
|
|
27789
28009
|
if (!(e instanceof TypeError))
|
27790
28010
|
throw e;
|
27791
28011
|
}
|
28012
|
+
try {
|
28013
|
+
return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
28014
|
+
}
|
28015
|
+
catch (e) {
|
28016
|
+
if (!(e instanceof TypeError))
|
28017
|
+
throw e;
|
28018
|
+
}
|
27792
28019
|
throw new TypeError("Expected an object of any type of: " +
|
27793
|
-
[
|
28020
|
+
[
|
28021
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollection",
|
28022
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
|
28023
|
+
].join(", "));
|
27794
28024
|
}
|
27795
28025
|
/**
|
27796
28026
|
* Similar to
|
@@ -28435,11 +28665,19 @@ export class Person extends Object {
|
|
28435
28665
|
}
|
28436
28666
|
compactItems = [];
|
28437
28667
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
|
28438
|
-
const item = v instanceof URL
|
28439
|
-
|
28440
|
-
|
28441
|
-
|
28442
|
-
|
28668
|
+
const item = v instanceof URL
|
28669
|
+
? v.href
|
28670
|
+
: v instanceof OrderedCollection
|
28671
|
+
? await v.toJsonLd({
|
28672
|
+
...options,
|
28673
|
+
format: undefined,
|
28674
|
+
context: undefined,
|
28675
|
+
})
|
28676
|
+
: await v.toJsonLd({
|
28677
|
+
...options,
|
28678
|
+
format: undefined,
|
28679
|
+
context: undefined,
|
28680
|
+
});
|
28443
28681
|
compactItems.push(item);
|
28444
28682
|
}
|
28445
28683
|
if (compactItems.length > 0) {
|
@@ -28449,11 +28687,19 @@ export class Person extends Object {
|
|
28449
28687
|
}
|
28450
28688
|
compactItems = [];
|
28451
28689
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
|
28452
|
-
const item = v instanceof URL
|
28453
|
-
|
28454
|
-
|
28455
|
-
|
28456
|
-
|
28690
|
+
const item = v instanceof URL
|
28691
|
+
? v.href
|
28692
|
+
: v instanceof OrderedCollection
|
28693
|
+
? await v.toJsonLd({
|
28694
|
+
...options,
|
28695
|
+
format: undefined,
|
28696
|
+
context: undefined,
|
28697
|
+
})
|
28698
|
+
: await v.toJsonLd({
|
28699
|
+
...options,
|
28700
|
+
format: undefined,
|
28701
|
+
context: undefined,
|
28702
|
+
});
|
28457
28703
|
compactItems.push(item);
|
28458
28704
|
}
|
28459
28705
|
if (compactItems.length > 0) {
|
@@ -28733,7 +28979,9 @@ export class Person extends Object {
|
|
28733
28979
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
|
28734
28980
|
const element = v instanceof URL
|
28735
28981
|
? { "@id": v.href }
|
28736
|
-
:
|
28982
|
+
: v instanceof OrderedCollection
|
28983
|
+
? await v.toJsonLd(options)
|
28984
|
+
: await v.toJsonLd(options);
|
28737
28985
|
array.push(element);
|
28738
28986
|
}
|
28739
28987
|
if (array.length > 0) {
|
@@ -28744,7 +28992,9 @@ export class Person extends Object {
|
|
28744
28992
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
|
28745
28993
|
const element = v instanceof URL
|
28746
28994
|
? { "@id": v.href }
|
28747
|
-
:
|
28995
|
+
: v instanceof OrderedCollection
|
28996
|
+
? await v.toJsonLd(options)
|
28997
|
+
: await v.toJsonLd(options);
|
28748
28998
|
array.push(element);
|
28749
28999
|
}
|
28750
29000
|
if (array.length > 0) {
|
@@ -29088,7 +29338,18 @@ export class Person extends Object {
|
|
29088
29338
|
: new URL(v["@id"]));
|
29089
29339
|
continue;
|
29090
29340
|
}
|
29091
|
-
|
29341
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
29342
|
+
Array.isArray(v["@type"]) &&
|
29343
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
|
29344
|
+
? await OrderedCollection.fromJsonLd(v, options)
|
29345
|
+
: typeof v === "object" && "@type" in v &&
|
29346
|
+
Array.isArray(v["@type"]) &&
|
29347
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
|
29348
|
+
? await OrderedCollectionPage.fromJsonLd(v, options)
|
29349
|
+
: undefined;
|
29350
|
+
if (typeof decoded === "undefined")
|
29351
|
+
continue;
|
29352
|
+
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
|
29092
29353
|
}
|
29093
29354
|
instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
|
29094
29355
|
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
|
@@ -29109,7 +29370,18 @@ export class Person extends Object {
|
|
29109
29370
|
: new URL(v["@id"]));
|
29110
29371
|
continue;
|
29111
29372
|
}
|
29112
|
-
|
29373
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
29374
|
+
Array.isArray(v["@type"]) &&
|
29375
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
|
29376
|
+
? await OrderedCollection.fromJsonLd(v, options)
|
29377
|
+
: typeof v === "object" && "@type" in v &&
|
29378
|
+
Array.isArray(v["@type"]) &&
|
29379
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
|
29380
|
+
? await OrderedCollectionPage.fromJsonLd(v, options)
|
29381
|
+
: undefined;
|
29382
|
+
if (typeof decoded === "undefined")
|
29383
|
+
continue;
|
29384
|
+
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
|
29113
29385
|
}
|
29114
29386
|
instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
|
29115
29387
|
_41QwhqJouoLg3h8dRPKat21brynC_outbox;
|
@@ -32650,24 +32922,27 @@ export class Service extends Object {
|
|
32650
32922
|
}
|
32651
32923
|
}
|
32652
32924
|
if ("inbox" in values && values.inbox != null) {
|
32653
|
-
if (values.inbox instanceof OrderedCollection ||
|
32925
|
+
if (values.inbox instanceof OrderedCollection ||
|
32926
|
+
values.inbox instanceof OrderedCollectionPage ||
|
32927
|
+
values.inbox instanceof URL) {
|
32654
32928
|
// @ts-ignore: type is checked above.
|
32655
32929
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
|
32656
32930
|
}
|
32657
32931
|
else {
|
32658
32932
|
throw new TypeError("The inbox must be of type " +
|
32659
|
-
"OrderedCollection | URL" + ".");
|
32933
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
32660
32934
|
}
|
32661
32935
|
}
|
32662
32936
|
if ("outbox" in values && values.outbox != null) {
|
32663
32937
|
if (values.outbox instanceof OrderedCollection ||
|
32938
|
+
values.outbox instanceof OrderedCollectionPage ||
|
32664
32939
|
values.outbox instanceof URL) {
|
32665
32940
|
// @ts-ignore: type is checked above.
|
32666
32941
|
this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
|
32667
32942
|
}
|
32668
32943
|
else {
|
32669
32944
|
throw new TypeError("The outbox must be of type " +
|
32670
|
-
"OrderedCollection | URL" + ".");
|
32945
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
32671
32946
|
}
|
32672
32947
|
}
|
32673
32948
|
if ("following" in values && values.following != null) {
|
@@ -32947,26 +33222,29 @@ export class Service extends Object {
|
|
32947
33222
|
clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
|
32948
33223
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
|
32949
33224
|
if ("inbox" in values && values.inbox != null) {
|
32950
|
-
if (values.inbox instanceof OrderedCollection ||
|
33225
|
+
if (values.inbox instanceof OrderedCollection ||
|
33226
|
+
values.inbox instanceof OrderedCollectionPage ||
|
33227
|
+
values.inbox instanceof URL) {
|
32951
33228
|
// @ts-ignore: type is checked above.
|
32952
33229
|
clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
|
32953
33230
|
}
|
32954
33231
|
else {
|
32955
33232
|
throw new TypeError("The inbox must be of type " +
|
32956
|
-
"OrderedCollection | URL" + ".");
|
33233
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
32957
33234
|
}
|
32958
33235
|
}
|
32959
33236
|
clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
|
32960
33237
|
this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
|
32961
33238
|
if ("outbox" in values && values.outbox != null) {
|
32962
33239
|
if (values.outbox instanceof OrderedCollection ||
|
33240
|
+
values.outbox instanceof OrderedCollectionPage ||
|
32963
33241
|
values.outbox instanceof URL) {
|
32964
33242
|
// @ts-ignore: type is checked above.
|
32965
33243
|
clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
|
32966
33244
|
}
|
32967
33245
|
else {
|
32968
33246
|
throw new TypeError("The outbox must be of type " +
|
32969
|
-
"OrderedCollection | URL" + ".");
|
33247
|
+
"OrderedCollection | OrderedCollectionPage | URL" + ".");
|
32970
33248
|
}
|
32971
33249
|
}
|
32972
33250
|
clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
|
@@ -33375,8 +33653,18 @@ export class Service extends Object {
|
|
33375
33653
|
if (!(e instanceof TypeError))
|
33376
33654
|
throw e;
|
33377
33655
|
}
|
33656
|
+
try {
|
33657
|
+
return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
33658
|
+
}
|
33659
|
+
catch (e) {
|
33660
|
+
if (!(e instanceof TypeError))
|
33661
|
+
throw e;
|
33662
|
+
}
|
33378
33663
|
throw new TypeError("Expected an object of any type of: " +
|
33379
|
-
[
|
33664
|
+
[
|
33665
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollection",
|
33666
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
|
33667
|
+
].join(", "));
|
33380
33668
|
}
|
33381
33669
|
/**
|
33382
33670
|
* Similar to
|
@@ -33442,8 +33730,18 @@ export class Service extends Object {
|
|
33442
33730
|
if (!(e instanceof TypeError))
|
33443
33731
|
throw e;
|
33444
33732
|
}
|
33733
|
+
try {
|
33734
|
+
return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
33735
|
+
}
|
33736
|
+
catch (e) {
|
33737
|
+
if (!(e instanceof TypeError))
|
33738
|
+
throw e;
|
33739
|
+
}
|
33445
33740
|
throw new TypeError("Expected an object of any type of: " +
|
33446
|
-
[
|
33741
|
+
[
|
33742
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollection",
|
33743
|
+
"https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
|
33744
|
+
].join(", "));
|
33447
33745
|
}
|
33448
33746
|
/**
|
33449
33747
|
* Similar to
|
@@ -34088,11 +34386,19 @@ export class Service extends Object {
|
|
34088
34386
|
}
|
34089
34387
|
compactItems = [];
|
34090
34388
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
|
34091
|
-
const item = v instanceof URL
|
34092
|
-
|
34093
|
-
|
34094
|
-
|
34095
|
-
|
34389
|
+
const item = v instanceof URL
|
34390
|
+
? v.href
|
34391
|
+
: v instanceof OrderedCollection
|
34392
|
+
? await v.toJsonLd({
|
34393
|
+
...options,
|
34394
|
+
format: undefined,
|
34395
|
+
context: undefined,
|
34396
|
+
})
|
34397
|
+
: await v.toJsonLd({
|
34398
|
+
...options,
|
34399
|
+
format: undefined,
|
34400
|
+
context: undefined,
|
34401
|
+
});
|
34096
34402
|
compactItems.push(item);
|
34097
34403
|
}
|
34098
34404
|
if (compactItems.length > 0) {
|
@@ -34102,11 +34408,19 @@ export class Service extends Object {
|
|
34102
34408
|
}
|
34103
34409
|
compactItems = [];
|
34104
34410
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
|
34105
|
-
const item = v instanceof URL
|
34106
|
-
|
34107
|
-
|
34108
|
-
|
34109
|
-
|
34411
|
+
const item = v instanceof URL
|
34412
|
+
? v.href
|
34413
|
+
: v instanceof OrderedCollection
|
34414
|
+
? await v.toJsonLd({
|
34415
|
+
...options,
|
34416
|
+
format: undefined,
|
34417
|
+
context: undefined,
|
34418
|
+
})
|
34419
|
+
: await v.toJsonLd({
|
34420
|
+
...options,
|
34421
|
+
format: undefined,
|
34422
|
+
context: undefined,
|
34423
|
+
});
|
34110
34424
|
compactItems.push(item);
|
34111
34425
|
}
|
34112
34426
|
if (compactItems.length > 0) {
|
@@ -34386,7 +34700,9 @@ export class Service extends Object {
|
|
34386
34700
|
for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
|
34387
34701
|
const element = v instanceof URL
|
34388
34702
|
? { "@id": v.href }
|
34389
|
-
:
|
34703
|
+
: v instanceof OrderedCollection
|
34704
|
+
? await v.toJsonLd(options)
|
34705
|
+
: await v.toJsonLd(options);
|
34390
34706
|
array.push(element);
|
34391
34707
|
}
|
34392
34708
|
if (array.length > 0) {
|
@@ -34397,7 +34713,9 @@ export class Service extends Object {
|
|
34397
34713
|
for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
|
34398
34714
|
const element = v instanceof URL
|
34399
34715
|
? { "@id": v.href }
|
34400
|
-
:
|
34716
|
+
: v instanceof OrderedCollection
|
34717
|
+
? await v.toJsonLd(options)
|
34718
|
+
: await v.toJsonLd(options);
|
34401
34719
|
array.push(element);
|
34402
34720
|
}
|
34403
34721
|
if (array.length > 0) {
|
@@ -34741,7 +35059,18 @@ export class Service extends Object {
|
|
34741
35059
|
: new URL(v["@id"]));
|
34742
35060
|
continue;
|
34743
35061
|
}
|
34744
|
-
|
35062
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
35063
|
+
Array.isArray(v["@type"]) &&
|
35064
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
|
35065
|
+
? await OrderedCollection.fromJsonLd(v, options)
|
35066
|
+
: typeof v === "object" && "@type" in v &&
|
35067
|
+
Array.isArray(v["@type"]) &&
|
35068
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
|
35069
|
+
? await OrderedCollectionPage.fromJsonLd(v, options)
|
35070
|
+
: undefined;
|
35071
|
+
if (typeof decoded === "undefined")
|
35072
|
+
continue;
|
35073
|
+
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
|
34745
35074
|
}
|
34746
35075
|
instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
|
34747
35076
|
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
|
@@ -34762,7 +35091,18 @@ export class Service extends Object {
|
|
34762
35091
|
: new URL(v["@id"]));
|
34763
35092
|
continue;
|
34764
35093
|
}
|
34765
|
-
|
35094
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
35095
|
+
Array.isArray(v["@type"]) &&
|
35096
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
|
35097
|
+
? await OrderedCollection.fromJsonLd(v, options)
|
35098
|
+
: typeof v === "object" && "@type" in v &&
|
35099
|
+
Array.isArray(v["@type"]) &&
|
35100
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
|
35101
|
+
? await OrderedCollectionPage.fromJsonLd(v, options)
|
35102
|
+
: undefined;
|
35103
|
+
if (typeof decoded === "undefined")
|
35104
|
+
continue;
|
35105
|
+
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
|
34766
35106
|
}
|
34767
35107
|
instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
|
34768
35108
|
_41QwhqJouoLg3h8dRPKat21brynC_outbox;
|