@fedify/fedify 1.2.5 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -10503,24 +10503,27 @@ export class Application extends Object {
10503
10503
  }
10504
10504
  }
10505
10505
  if ("inbox" in values && values.inbox != null) {
10506
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
10506
+ if (values.inbox instanceof OrderedCollection ||
10507
+ values.inbox instanceof OrderedCollectionPage ||
10508
+ values.inbox instanceof URL) {
10507
10509
  // @ts-ignore: type is checked above.
10508
10510
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
10509
10511
  }
10510
10512
  else {
10511
10513
  throw new TypeError("The inbox must be of type " +
10512
- "OrderedCollection | URL" + ".");
10514
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
10513
10515
  }
10514
10516
  }
10515
10517
  if ("outbox" in values && values.outbox != null) {
10516
10518
  if (values.outbox instanceof OrderedCollection ||
10519
+ values.outbox instanceof OrderedCollectionPage ||
10517
10520
  values.outbox instanceof URL) {
10518
10521
  // @ts-ignore: type is checked above.
10519
10522
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
10520
10523
  }
10521
10524
  else {
10522
10525
  throw new TypeError("The outbox must be of type " +
10523
- "OrderedCollection | URL" + ".");
10526
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
10524
10527
  }
10525
10528
  }
10526
10529
  if ("following" in values && values.following != null) {
@@ -10852,26 +10855,29 @@ export class Application extends Object {
10852
10855
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
10853
10856
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
10854
10857
  if ("inbox" in values && values.inbox != null) {
10855
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
10858
+ if (values.inbox instanceof OrderedCollection ||
10859
+ values.inbox instanceof OrderedCollectionPage ||
10860
+ values.inbox instanceof URL) {
10856
10861
  // @ts-ignore: type is checked above.
10857
10862
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
10858
10863
  }
10859
10864
  else {
10860
10865
  throw new TypeError("The inbox must be of type " +
10861
- "OrderedCollection | URL" + ".");
10866
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
10862
10867
  }
10863
10868
  }
10864
10869
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
10865
10870
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
10866
10871
  if ("outbox" in values && values.outbox != null) {
10867
10872
  if (values.outbox instanceof OrderedCollection ||
10873
+ values.outbox instanceof OrderedCollectionPage ||
10868
10874
  values.outbox instanceof URL) {
10869
10875
  // @ts-ignore: type is checked above.
10870
10876
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
10871
10877
  }
10872
10878
  else {
10873
10879
  throw new TypeError("The outbox must be of type " +
10874
- "OrderedCollection | URL" + ".");
10880
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
10875
10881
  }
10876
10882
  }
10877
10883
  clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
@@ -11338,8 +11344,18 @@ export class Application extends Object {
11338
11344
  if (!(e instanceof TypeError))
11339
11345
  throw e;
11340
11346
  }
11347
+ try {
11348
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
11349
+ }
11350
+ catch (e) {
11351
+ if (!(e instanceof TypeError))
11352
+ throw e;
11353
+ }
11341
11354
  throw new TypeError("Expected an object of any type of: " +
11342
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
11355
+ [
11356
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
11357
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
11358
+ ].join(", "));
11343
11359
  }
11344
11360
  /**
11345
11361
  * Similar to
@@ -11405,8 +11421,18 @@ export class Application extends Object {
11405
11421
  if (!(e instanceof TypeError))
11406
11422
  throw e;
11407
11423
  }
11424
+ try {
11425
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
11426
+ }
11427
+ catch (e) {
11428
+ if (!(e instanceof TypeError))
11429
+ throw e;
11430
+ }
11408
11431
  throw new TypeError("Expected an object of any type of: " +
11409
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
11432
+ [
11433
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
11434
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
11435
+ ].join(", "));
11410
11436
  }
11411
11437
  /**
11412
11438
  * Similar to
@@ -12233,11 +12259,19 @@ export class Application extends Object {
12233
12259
  }
12234
12260
  compactItems = [];
12235
12261
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
12236
- const item = v instanceof URL ? v.href : await v.toJsonLd({
12237
- ...options,
12238
- format: undefined,
12239
- context: undefined,
12240
- });
12262
+ const item = v instanceof URL
12263
+ ? v.href
12264
+ : v instanceof OrderedCollection
12265
+ ? await v.toJsonLd({
12266
+ ...options,
12267
+ format: undefined,
12268
+ context: undefined,
12269
+ })
12270
+ : await v.toJsonLd({
12271
+ ...options,
12272
+ format: undefined,
12273
+ context: undefined,
12274
+ });
12241
12275
  compactItems.push(item);
12242
12276
  }
12243
12277
  if (compactItems.length > 0) {
@@ -12247,11 +12281,19 @@ export class Application extends Object {
12247
12281
  }
12248
12282
  compactItems = [];
12249
12283
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
12250
- const item = v instanceof URL ? v.href : await v.toJsonLd({
12251
- ...options,
12252
- format: undefined,
12253
- context: undefined,
12254
- });
12284
+ const item = v instanceof URL
12285
+ ? v.href
12286
+ : v instanceof OrderedCollection
12287
+ ? await v.toJsonLd({
12288
+ ...options,
12289
+ format: undefined,
12290
+ context: undefined,
12291
+ })
12292
+ : await v.toJsonLd({
12293
+ ...options,
12294
+ format: undefined,
12295
+ context: undefined,
12296
+ });
12255
12297
  compactItems.push(item);
12256
12298
  }
12257
12299
  if (compactItems.length > 0) {
@@ -12597,7 +12639,9 @@ export class Application extends Object {
12597
12639
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
12598
12640
  const element = v instanceof URL
12599
12641
  ? { "@id": v.href }
12600
- : await v.toJsonLd(options);
12642
+ : v instanceof OrderedCollection
12643
+ ? await v.toJsonLd(options)
12644
+ : await v.toJsonLd(options);
12601
12645
  array.push(element);
12602
12646
  }
12603
12647
  if (array.length > 0) {
@@ -12608,7 +12652,9 @@ export class Application extends Object {
12608
12652
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
12609
12653
  const element = v instanceof URL
12610
12654
  ? { "@id": v.href }
12611
- : await v.toJsonLd(options);
12655
+ : v instanceof OrderedCollection
12656
+ ? await v.toJsonLd(options)
12657
+ : await v.toJsonLd(options);
12612
12658
  array.push(element);
12613
12659
  }
12614
12660
  if (array.length > 0) {
@@ -12996,7 +13042,18 @@ export class Application extends Object {
12996
13042
  : new URL(v["@id"]));
12997
13043
  continue;
12998
13044
  }
12999
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
13045
+ const decoded = typeof v === "object" && "@type" in v &&
13046
+ Array.isArray(v["@type"]) &&
13047
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
13048
+ ? await OrderedCollection.fromJsonLd(v, options)
13049
+ : typeof v === "object" && "@type" in v &&
13050
+ Array.isArray(v["@type"]) &&
13051
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
13052
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
13053
+ : undefined;
13054
+ if (typeof decoded === "undefined")
13055
+ continue;
13056
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
13000
13057
  }
13001
13058
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
13002
13059
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -13017,7 +13074,18 @@ export class Application extends Object {
13017
13074
  : new URL(v["@id"]));
13018
13075
  continue;
13019
13076
  }
13020
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
13077
+ const decoded = typeof v === "object" && "@type" in v &&
13078
+ Array.isArray(v["@type"]) &&
13079
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
13080
+ ? await OrderedCollection.fromJsonLd(v, options)
13081
+ : typeof v === "object" && "@type" in v &&
13082
+ Array.isArray(v["@type"]) &&
13083
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
13084
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
13085
+ : undefined;
13086
+ if (typeof decoded === "undefined")
13087
+ continue;
13088
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
13021
13089
  }
13022
13090
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
13023
13091
  _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -18491,24 +18559,27 @@ export class Group extends Object {
18491
18559
  }
18492
18560
  }
18493
18561
  if ("inbox" in values && values.inbox != null) {
18494
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
18562
+ if (values.inbox instanceof OrderedCollection ||
18563
+ values.inbox instanceof OrderedCollectionPage ||
18564
+ values.inbox instanceof URL) {
18495
18565
  // @ts-ignore: type is checked above.
18496
18566
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
18497
18567
  }
18498
18568
  else {
18499
18569
  throw new TypeError("The inbox must be of type " +
18500
- "OrderedCollection | URL" + ".");
18570
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
18501
18571
  }
18502
18572
  }
18503
18573
  if ("outbox" in values && values.outbox != null) {
18504
18574
  if (values.outbox instanceof OrderedCollection ||
18575
+ values.outbox instanceof OrderedCollectionPage ||
18505
18576
  values.outbox instanceof URL) {
18506
18577
  // @ts-ignore: type is checked above.
18507
18578
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
18508
18579
  }
18509
18580
  else {
18510
18581
  throw new TypeError("The outbox must be of type " +
18511
- "OrderedCollection | URL" + ".");
18582
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
18512
18583
  }
18513
18584
  }
18514
18585
  if ("following" in values && values.following != null) {
@@ -18840,26 +18911,29 @@ export class Group extends Object {
18840
18911
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
18841
18912
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
18842
18913
  if ("inbox" in values && values.inbox != null) {
18843
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
18914
+ if (values.inbox instanceof OrderedCollection ||
18915
+ values.inbox instanceof OrderedCollectionPage ||
18916
+ values.inbox instanceof URL) {
18844
18917
  // @ts-ignore: type is checked above.
18845
18918
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
18846
18919
  }
18847
18920
  else {
18848
18921
  throw new TypeError("The inbox must be of type " +
18849
- "OrderedCollection | URL" + ".");
18922
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
18850
18923
  }
18851
18924
  }
18852
18925
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
18853
18926
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
18854
18927
  if ("outbox" in values && values.outbox != null) {
18855
18928
  if (values.outbox instanceof OrderedCollection ||
18929
+ values.outbox instanceof OrderedCollectionPage ||
18856
18930
  values.outbox instanceof URL) {
18857
18931
  // @ts-ignore: type is checked above.
18858
18932
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
18859
18933
  }
18860
18934
  else {
18861
18935
  throw new TypeError("The outbox must be of type " +
18862
- "OrderedCollection | URL" + ".");
18936
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
18863
18937
  }
18864
18938
  }
18865
18939
  clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
@@ -19326,8 +19400,18 @@ export class Group extends Object {
19326
19400
  if (!(e instanceof TypeError))
19327
19401
  throw e;
19328
19402
  }
19403
+ try {
19404
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
19405
+ }
19406
+ catch (e) {
19407
+ if (!(e instanceof TypeError))
19408
+ throw e;
19409
+ }
19329
19410
  throw new TypeError("Expected an object of any type of: " +
19330
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
19411
+ [
19412
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
19413
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
19414
+ ].join(", "));
19331
19415
  }
19332
19416
  /**
19333
19417
  * Similar to
@@ -19393,8 +19477,18 @@ export class Group extends Object {
19393
19477
  if (!(e instanceof TypeError))
19394
19478
  throw e;
19395
19479
  }
19480
+ try {
19481
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
19482
+ }
19483
+ catch (e) {
19484
+ if (!(e instanceof TypeError))
19485
+ throw e;
19486
+ }
19396
19487
  throw new TypeError("Expected an object of any type of: " +
19397
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
19488
+ [
19489
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
19490
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
19491
+ ].join(", "));
19398
19492
  }
19399
19493
  /**
19400
19494
  * Similar to
@@ -20221,11 +20315,19 @@ export class Group extends Object {
20221
20315
  }
20222
20316
  compactItems = [];
20223
20317
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
20224
- const item = v instanceof URL ? v.href : await v.toJsonLd({
20225
- ...options,
20226
- format: undefined,
20227
- context: undefined,
20228
- });
20318
+ const item = v instanceof URL
20319
+ ? v.href
20320
+ : v instanceof OrderedCollection
20321
+ ? await v.toJsonLd({
20322
+ ...options,
20323
+ format: undefined,
20324
+ context: undefined,
20325
+ })
20326
+ : await v.toJsonLd({
20327
+ ...options,
20328
+ format: undefined,
20329
+ context: undefined,
20330
+ });
20229
20331
  compactItems.push(item);
20230
20332
  }
20231
20333
  if (compactItems.length > 0) {
@@ -20235,11 +20337,19 @@ export class Group extends Object {
20235
20337
  }
20236
20338
  compactItems = [];
20237
20339
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
20238
- const item = v instanceof URL ? v.href : await v.toJsonLd({
20239
- ...options,
20240
- format: undefined,
20241
- context: undefined,
20242
- });
20340
+ const item = v instanceof URL
20341
+ ? v.href
20342
+ : v instanceof OrderedCollection
20343
+ ? await v.toJsonLd({
20344
+ ...options,
20345
+ format: undefined,
20346
+ context: undefined,
20347
+ })
20348
+ : await v.toJsonLd({
20349
+ ...options,
20350
+ format: undefined,
20351
+ context: undefined,
20352
+ });
20243
20353
  compactItems.push(item);
20244
20354
  }
20245
20355
  if (compactItems.length > 0) {
@@ -20585,7 +20695,9 @@ export class Group extends Object {
20585
20695
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
20586
20696
  const element = v instanceof URL
20587
20697
  ? { "@id": v.href }
20588
- : await v.toJsonLd(options);
20698
+ : v instanceof OrderedCollection
20699
+ ? await v.toJsonLd(options)
20700
+ : await v.toJsonLd(options);
20589
20701
  array.push(element);
20590
20702
  }
20591
20703
  if (array.length > 0) {
@@ -20596,7 +20708,9 @@ export class Group extends Object {
20596
20708
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
20597
20709
  const element = v instanceof URL
20598
20710
  ? { "@id": v.href }
20599
- : await v.toJsonLd(options);
20711
+ : v instanceof OrderedCollection
20712
+ ? await v.toJsonLd(options)
20713
+ : await v.toJsonLd(options);
20600
20714
  array.push(element);
20601
20715
  }
20602
20716
  if (array.length > 0) {
@@ -20984,7 +21098,18 @@ export class Group extends Object {
20984
21098
  : new URL(v["@id"]));
20985
21099
  continue;
20986
21100
  }
20987
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
21101
+ const decoded = typeof v === "object" && "@type" in v &&
21102
+ Array.isArray(v["@type"]) &&
21103
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
21104
+ ? await OrderedCollection.fromJsonLd(v, options)
21105
+ : typeof v === "object" && "@type" in v &&
21106
+ Array.isArray(v["@type"]) &&
21107
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
21108
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
21109
+ : undefined;
21110
+ if (typeof decoded === "undefined")
21111
+ continue;
21112
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
20988
21113
  }
20989
21114
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
20990
21115
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -21005,7 +21130,18 @@ export class Group extends Object {
21005
21130
  : new URL(v["@id"]));
21006
21131
  continue;
21007
21132
  }
21008
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
21133
+ const decoded = typeof v === "object" && "@type" in v &&
21134
+ Array.isArray(v["@type"]) &&
21135
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
21136
+ ? await OrderedCollection.fromJsonLd(v, options)
21137
+ : typeof v === "object" && "@type" in v &&
21138
+ Array.isArray(v["@type"]) &&
21139
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
21140
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
21141
+ : undefined;
21142
+ if (typeof decoded === "undefined")
21143
+ continue;
21144
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
21009
21145
  }
21010
21146
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
21011
21147
  _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -25697,24 +25833,27 @@ export class Organization extends Object {
25697
25833
  }
25698
25834
  }
25699
25835
  if ("inbox" in values && values.inbox != null) {
25700
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
25836
+ if (values.inbox instanceof OrderedCollection ||
25837
+ values.inbox instanceof OrderedCollectionPage ||
25838
+ values.inbox instanceof URL) {
25701
25839
  // @ts-ignore: type is checked above.
25702
25840
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
25703
25841
  }
25704
25842
  else {
25705
25843
  throw new TypeError("The inbox must be of type " +
25706
- "OrderedCollection | URL" + ".");
25844
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
25707
25845
  }
25708
25846
  }
25709
25847
  if ("outbox" in values && values.outbox != null) {
25710
25848
  if (values.outbox instanceof OrderedCollection ||
25849
+ values.outbox instanceof OrderedCollectionPage ||
25711
25850
  values.outbox instanceof URL) {
25712
25851
  // @ts-ignore: type is checked above.
25713
25852
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
25714
25853
  }
25715
25854
  else {
25716
25855
  throw new TypeError("The outbox must be of type " +
25717
- "OrderedCollection | URL" + ".");
25856
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
25718
25857
  }
25719
25858
  }
25720
25859
  if ("following" in values && values.following != null) {
@@ -26046,26 +26185,29 @@ export class Organization extends Object {
26046
26185
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
26047
26186
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
26048
26187
  if ("inbox" in values && values.inbox != null) {
26049
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
26188
+ if (values.inbox instanceof OrderedCollection ||
26189
+ values.inbox instanceof OrderedCollectionPage ||
26190
+ values.inbox instanceof URL) {
26050
26191
  // @ts-ignore: type is checked above.
26051
26192
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
26052
26193
  }
26053
26194
  else {
26054
26195
  throw new TypeError("The inbox must be of type " +
26055
- "OrderedCollection | URL" + ".");
26196
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
26056
26197
  }
26057
26198
  }
26058
26199
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
26059
26200
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
26060
26201
  if ("outbox" in values && values.outbox != null) {
26061
26202
  if (values.outbox instanceof OrderedCollection ||
26203
+ values.outbox instanceof OrderedCollectionPage ||
26062
26204
  values.outbox instanceof URL) {
26063
26205
  // @ts-ignore: type is checked above.
26064
26206
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
26065
26207
  }
26066
26208
  else {
26067
26209
  throw new TypeError("The outbox must be of type " +
26068
- "OrderedCollection | URL" + ".");
26210
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
26069
26211
  }
26070
26212
  }
26071
26213
  clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
@@ -26532,8 +26674,18 @@ export class Organization extends Object {
26532
26674
  if (!(e instanceof TypeError))
26533
26675
  throw e;
26534
26676
  }
26677
+ try {
26678
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
26679
+ }
26680
+ catch (e) {
26681
+ if (!(e instanceof TypeError))
26682
+ throw e;
26683
+ }
26535
26684
  throw new TypeError("Expected an object of any type of: " +
26536
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
26685
+ [
26686
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
26687
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
26688
+ ].join(", "));
26537
26689
  }
26538
26690
  /**
26539
26691
  * Similar to
@@ -26599,8 +26751,18 @@ export class Organization extends Object {
26599
26751
  if (!(e instanceof TypeError))
26600
26752
  throw e;
26601
26753
  }
26754
+ try {
26755
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
26756
+ }
26757
+ catch (e) {
26758
+ if (!(e instanceof TypeError))
26759
+ throw e;
26760
+ }
26602
26761
  throw new TypeError("Expected an object of any type of: " +
26603
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
26762
+ [
26763
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
26764
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
26765
+ ].join(", "));
26604
26766
  }
26605
26767
  /**
26606
26768
  * Similar to
@@ -27427,11 +27589,19 @@ export class Organization extends Object {
27427
27589
  }
27428
27590
  compactItems = [];
27429
27591
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
27430
- const item = v instanceof URL ? v.href : await v.toJsonLd({
27431
- ...options,
27432
- format: undefined,
27433
- context: undefined,
27434
- });
27592
+ const item = v instanceof URL
27593
+ ? v.href
27594
+ : v instanceof OrderedCollection
27595
+ ? await v.toJsonLd({
27596
+ ...options,
27597
+ format: undefined,
27598
+ context: undefined,
27599
+ })
27600
+ : await v.toJsonLd({
27601
+ ...options,
27602
+ format: undefined,
27603
+ context: undefined,
27604
+ });
27435
27605
  compactItems.push(item);
27436
27606
  }
27437
27607
  if (compactItems.length > 0) {
@@ -27441,11 +27611,19 @@ export class Organization extends Object {
27441
27611
  }
27442
27612
  compactItems = [];
27443
27613
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
27444
- const item = v instanceof URL ? v.href : await v.toJsonLd({
27445
- ...options,
27446
- format: undefined,
27447
- context: undefined,
27448
- });
27614
+ const item = v instanceof URL
27615
+ ? v.href
27616
+ : v instanceof OrderedCollection
27617
+ ? await v.toJsonLd({
27618
+ ...options,
27619
+ format: undefined,
27620
+ context: undefined,
27621
+ })
27622
+ : await v.toJsonLd({
27623
+ ...options,
27624
+ format: undefined,
27625
+ context: undefined,
27626
+ });
27449
27627
  compactItems.push(item);
27450
27628
  }
27451
27629
  if (compactItems.length > 0) {
@@ -27791,7 +27969,9 @@ export class Organization extends Object {
27791
27969
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
27792
27970
  const element = v instanceof URL
27793
27971
  ? { "@id": v.href }
27794
- : await v.toJsonLd(options);
27972
+ : v instanceof OrderedCollection
27973
+ ? await v.toJsonLd(options)
27974
+ : await v.toJsonLd(options);
27795
27975
  array.push(element);
27796
27976
  }
27797
27977
  if (array.length > 0) {
@@ -27802,7 +27982,9 @@ export class Organization extends Object {
27802
27982
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
27803
27983
  const element = v instanceof URL
27804
27984
  ? { "@id": v.href }
27805
- : await v.toJsonLd(options);
27985
+ : v instanceof OrderedCollection
27986
+ ? await v.toJsonLd(options)
27987
+ : await v.toJsonLd(options);
27806
27988
  array.push(element);
27807
27989
  }
27808
27990
  if (array.length > 0) {
@@ -28190,7 +28372,18 @@ export class Organization extends Object {
28190
28372
  : new URL(v["@id"]));
28191
28373
  continue;
28192
28374
  }
28193
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
28375
+ const decoded = typeof v === "object" && "@type" in v &&
28376
+ Array.isArray(v["@type"]) &&
28377
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
28378
+ ? await OrderedCollection.fromJsonLd(v, options)
28379
+ : typeof v === "object" && "@type" in v &&
28380
+ Array.isArray(v["@type"]) &&
28381
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
28382
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
28383
+ : undefined;
28384
+ if (typeof decoded === "undefined")
28385
+ continue;
28386
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
28194
28387
  }
28195
28388
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
28196
28389
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -28211,7 +28404,18 @@ export class Organization extends Object {
28211
28404
  : new URL(v["@id"]));
28212
28405
  continue;
28213
28406
  }
28214
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
28407
+ const decoded = typeof v === "object" && "@type" in v &&
28408
+ Array.isArray(v["@type"]) &&
28409
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
28410
+ ? await OrderedCollection.fromJsonLd(v, options)
28411
+ : typeof v === "object" && "@type" in v &&
28412
+ Array.isArray(v["@type"]) &&
28413
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
28414
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
28415
+ : undefined;
28416
+ if (typeof decoded === "undefined")
28417
+ continue;
28418
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
28215
28419
  }
28216
28420
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
28217
28421
  _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -29184,24 +29388,27 @@ export class Person extends Object {
29184
29388
  }
29185
29389
  }
29186
29390
  if ("inbox" in values && values.inbox != null) {
29187
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
29391
+ if (values.inbox instanceof OrderedCollection ||
29392
+ values.inbox instanceof OrderedCollectionPage ||
29393
+ values.inbox instanceof URL) {
29188
29394
  // @ts-ignore: type is checked above.
29189
29395
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
29190
29396
  }
29191
29397
  else {
29192
29398
  throw new TypeError("The inbox must be of type " +
29193
- "OrderedCollection | URL" + ".");
29399
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
29194
29400
  }
29195
29401
  }
29196
29402
  if ("outbox" in values && values.outbox != null) {
29197
29403
  if (values.outbox instanceof OrderedCollection ||
29404
+ values.outbox instanceof OrderedCollectionPage ||
29198
29405
  values.outbox instanceof URL) {
29199
29406
  // @ts-ignore: type is checked above.
29200
29407
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
29201
29408
  }
29202
29409
  else {
29203
29410
  throw new TypeError("The outbox must be of type " +
29204
- "OrderedCollection | URL" + ".");
29411
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
29205
29412
  }
29206
29413
  }
29207
29414
  if ("following" in values && values.following != null) {
@@ -29533,26 +29740,29 @@ export class Person extends Object {
29533
29740
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
29534
29741
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
29535
29742
  if ("inbox" in values && values.inbox != null) {
29536
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
29743
+ if (values.inbox instanceof OrderedCollection ||
29744
+ values.inbox instanceof OrderedCollectionPage ||
29745
+ values.inbox instanceof URL) {
29537
29746
  // @ts-ignore: type is checked above.
29538
29747
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
29539
29748
  }
29540
29749
  else {
29541
29750
  throw new TypeError("The inbox must be of type " +
29542
- "OrderedCollection | URL" + ".");
29751
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
29543
29752
  }
29544
29753
  }
29545
29754
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
29546
29755
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
29547
29756
  if ("outbox" in values && values.outbox != null) {
29548
29757
  if (values.outbox instanceof OrderedCollection ||
29758
+ values.outbox instanceof OrderedCollectionPage ||
29549
29759
  values.outbox instanceof URL) {
29550
29760
  // @ts-ignore: type is checked above.
29551
29761
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
29552
29762
  }
29553
29763
  else {
29554
29764
  throw new TypeError("The outbox must be of type " +
29555
- "OrderedCollection | URL" + ".");
29765
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
29556
29766
  }
29557
29767
  }
29558
29768
  clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
@@ -30019,8 +30229,18 @@ export class Person extends Object {
30019
30229
  if (!(e instanceof TypeError))
30020
30230
  throw e;
30021
30231
  }
30232
+ try {
30233
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
30234
+ }
30235
+ catch (e) {
30236
+ if (!(e instanceof TypeError))
30237
+ throw e;
30238
+ }
30022
30239
  throw new TypeError("Expected an object of any type of: " +
30023
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
30240
+ [
30241
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
30242
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
30243
+ ].join(", "));
30024
30244
  }
30025
30245
  /**
30026
30246
  * Similar to
@@ -30086,8 +30306,18 @@ export class Person extends Object {
30086
30306
  if (!(e instanceof TypeError))
30087
30307
  throw e;
30088
30308
  }
30309
+ try {
30310
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
30311
+ }
30312
+ catch (e) {
30313
+ if (!(e instanceof TypeError))
30314
+ throw e;
30315
+ }
30089
30316
  throw new TypeError("Expected an object of any type of: " +
30090
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
30317
+ [
30318
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
30319
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
30320
+ ].join(", "));
30091
30321
  }
30092
30322
  /**
30093
30323
  * Similar to
@@ -30914,11 +31144,19 @@ export class Person extends Object {
30914
31144
  }
30915
31145
  compactItems = [];
30916
31146
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
30917
- const item = v instanceof URL ? v.href : await v.toJsonLd({
30918
- ...options,
30919
- format: undefined,
30920
- context: undefined,
30921
- });
31147
+ const item = v instanceof URL
31148
+ ? v.href
31149
+ : v instanceof OrderedCollection
31150
+ ? await v.toJsonLd({
31151
+ ...options,
31152
+ format: undefined,
31153
+ context: undefined,
31154
+ })
31155
+ : await v.toJsonLd({
31156
+ ...options,
31157
+ format: undefined,
31158
+ context: undefined,
31159
+ });
30922
31160
  compactItems.push(item);
30923
31161
  }
30924
31162
  if (compactItems.length > 0) {
@@ -30928,11 +31166,19 @@ export class Person extends Object {
30928
31166
  }
30929
31167
  compactItems = [];
30930
31168
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
30931
- const item = v instanceof URL ? v.href : await v.toJsonLd({
30932
- ...options,
30933
- format: undefined,
30934
- context: undefined,
30935
- });
31169
+ const item = v instanceof URL
31170
+ ? v.href
31171
+ : v instanceof OrderedCollection
31172
+ ? await v.toJsonLd({
31173
+ ...options,
31174
+ format: undefined,
31175
+ context: undefined,
31176
+ })
31177
+ : await v.toJsonLd({
31178
+ ...options,
31179
+ format: undefined,
31180
+ context: undefined,
31181
+ });
30936
31182
  compactItems.push(item);
30937
31183
  }
30938
31184
  if (compactItems.length > 0) {
@@ -31278,7 +31524,9 @@ export class Person extends Object {
31278
31524
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
31279
31525
  const element = v instanceof URL
31280
31526
  ? { "@id": v.href }
31281
- : await v.toJsonLd(options);
31527
+ : v instanceof OrderedCollection
31528
+ ? await v.toJsonLd(options)
31529
+ : await v.toJsonLd(options);
31282
31530
  array.push(element);
31283
31531
  }
31284
31532
  if (array.length > 0) {
@@ -31289,7 +31537,9 @@ export class Person extends Object {
31289
31537
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
31290
31538
  const element = v instanceof URL
31291
31539
  ? { "@id": v.href }
31292
- : await v.toJsonLd(options);
31540
+ : v instanceof OrderedCollection
31541
+ ? await v.toJsonLd(options)
31542
+ : await v.toJsonLd(options);
31293
31543
  array.push(element);
31294
31544
  }
31295
31545
  if (array.length > 0) {
@@ -31677,7 +31927,18 @@ export class Person extends Object {
31677
31927
  : new URL(v["@id"]));
31678
31928
  continue;
31679
31929
  }
31680
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
31930
+ const decoded = typeof v === "object" && "@type" in v &&
31931
+ Array.isArray(v["@type"]) &&
31932
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
31933
+ ? await OrderedCollection.fromJsonLd(v, options)
31934
+ : typeof v === "object" && "@type" in v &&
31935
+ Array.isArray(v["@type"]) &&
31936
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
31937
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
31938
+ : undefined;
31939
+ if (typeof decoded === "undefined")
31940
+ continue;
31941
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
31681
31942
  }
31682
31943
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
31683
31944
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -31698,7 +31959,18 @@ export class Person extends Object {
31698
31959
  : new URL(v["@id"]));
31699
31960
  continue;
31700
31961
  }
31701
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
31962
+ const decoded = typeof v === "object" && "@type" in v &&
31963
+ Array.isArray(v["@type"]) &&
31964
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
31965
+ ? await OrderedCollection.fromJsonLd(v, options)
31966
+ : typeof v === "object" && "@type" in v &&
31967
+ Array.isArray(v["@type"]) &&
31968
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
31969
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
31970
+ : undefined;
31971
+ if (typeof decoded === "undefined")
31972
+ continue;
31973
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
31702
31974
  }
31703
31975
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
31704
31976
  _41QwhqJouoLg3h8dRPKat21brynC_outbox;
@@ -35365,24 +35637,27 @@ export class Service extends Object {
35365
35637
  }
35366
35638
  }
35367
35639
  if ("inbox" in values && values.inbox != null) {
35368
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
35640
+ if (values.inbox instanceof OrderedCollection ||
35641
+ values.inbox instanceof OrderedCollectionPage ||
35642
+ values.inbox instanceof URL) {
35369
35643
  // @ts-ignore: type is checked above.
35370
35644
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
35371
35645
  }
35372
35646
  else {
35373
35647
  throw new TypeError("The inbox must be of type " +
35374
- "OrderedCollection | URL" + ".");
35648
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
35375
35649
  }
35376
35650
  }
35377
35651
  if ("outbox" in values && values.outbox != null) {
35378
35652
  if (values.outbox instanceof OrderedCollection ||
35653
+ values.outbox instanceof OrderedCollectionPage ||
35379
35654
  values.outbox instanceof URL) {
35380
35655
  // @ts-ignore: type is checked above.
35381
35656
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
35382
35657
  }
35383
35658
  else {
35384
35659
  throw new TypeError("The outbox must be of type " +
35385
- "OrderedCollection | URL" + ".");
35660
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
35386
35661
  }
35387
35662
  }
35388
35663
  if ("following" in values && values.following != null) {
@@ -35714,26 +35989,29 @@ export class Service extends Object {
35714
35989
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
35715
35990
  this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
35716
35991
  if ("inbox" in values && values.inbox != null) {
35717
- if (values.inbox instanceof OrderedCollection || values.inbox instanceof URL) {
35992
+ if (values.inbox instanceof OrderedCollection ||
35993
+ values.inbox instanceof OrderedCollectionPage ||
35994
+ values.inbox instanceof URL) {
35718
35995
  // @ts-ignore: type is checked above.
35719
35996
  clone.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox = [values.inbox];
35720
35997
  }
35721
35998
  else {
35722
35999
  throw new TypeError("The inbox must be of type " +
35723
- "OrderedCollection | URL" + ".");
36000
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
35724
36001
  }
35725
36002
  }
35726
36003
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
35727
36004
  this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox;
35728
36005
  if ("outbox" in values && values.outbox != null) {
35729
36006
  if (values.outbox instanceof OrderedCollection ||
36007
+ values.outbox instanceof OrderedCollectionPage ||
35730
36008
  values.outbox instanceof URL) {
35731
36009
  // @ts-ignore: type is checked above.
35732
36010
  clone.#_41QwhqJouoLg3h8dRPKat21brynC_outbox = [values.outbox];
35733
36011
  }
35734
36012
  else {
35735
36013
  throw new TypeError("The outbox must be of type " +
35736
- "OrderedCollection | URL" + ".");
36014
+ "OrderedCollection | OrderedCollectionPage | URL" + ".");
35737
36015
  }
35738
36016
  }
35739
36017
  clone.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following =
@@ -36200,8 +36478,18 @@ export class Service extends Object {
36200
36478
  if (!(e instanceof TypeError))
36201
36479
  throw e;
36202
36480
  }
36481
+ try {
36482
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
36483
+ }
36484
+ catch (e) {
36485
+ if (!(e instanceof TypeError))
36486
+ throw e;
36487
+ }
36203
36488
  throw new TypeError("Expected an object of any type of: " +
36204
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
36489
+ [
36490
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
36491
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
36492
+ ].join(", "));
36205
36493
  }
36206
36494
  /**
36207
36495
  * Similar to
@@ -36267,8 +36555,18 @@ export class Service extends Object {
36267
36555
  if (!(e instanceof TypeError))
36268
36556
  throw e;
36269
36557
  }
36558
+ try {
36559
+ return await OrderedCollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
36560
+ }
36561
+ catch (e) {
36562
+ if (!(e instanceof TypeError))
36563
+ throw e;
36564
+ }
36270
36565
  throw new TypeError("Expected an object of any type of: " +
36271
- ["https://www.w3.org/ns/activitystreams#OrderedCollection"].join(", "));
36566
+ [
36567
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
36568
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
36569
+ ].join(", "));
36272
36570
  }
36273
36571
  /**
36274
36572
  * Similar to
@@ -37095,11 +37393,19 @@ export class Service extends Object {
37095
37393
  }
37096
37394
  compactItems = [];
37097
37395
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
37098
- const item = v instanceof URL ? v.href : await v.toJsonLd({
37099
- ...options,
37100
- format: undefined,
37101
- context: undefined,
37102
- });
37396
+ const item = v instanceof URL
37397
+ ? v.href
37398
+ : v instanceof OrderedCollection
37399
+ ? await v.toJsonLd({
37400
+ ...options,
37401
+ format: undefined,
37402
+ context: undefined,
37403
+ })
37404
+ : await v.toJsonLd({
37405
+ ...options,
37406
+ format: undefined,
37407
+ context: undefined,
37408
+ });
37103
37409
  compactItems.push(item);
37104
37410
  }
37105
37411
  if (compactItems.length > 0) {
@@ -37109,11 +37415,19 @@ export class Service extends Object {
37109
37415
  }
37110
37416
  compactItems = [];
37111
37417
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
37112
- const item = v instanceof URL ? v.href : await v.toJsonLd({
37113
- ...options,
37114
- format: undefined,
37115
- context: undefined,
37116
- });
37418
+ const item = v instanceof URL
37419
+ ? v.href
37420
+ : v instanceof OrderedCollection
37421
+ ? await v.toJsonLd({
37422
+ ...options,
37423
+ format: undefined,
37424
+ context: undefined,
37425
+ })
37426
+ : await v.toJsonLd({
37427
+ ...options,
37428
+ format: undefined,
37429
+ context: undefined,
37430
+ });
37117
37431
  compactItems.push(item);
37118
37432
  }
37119
37433
  if (compactItems.length > 0) {
@@ -37459,7 +37773,9 @@ export class Service extends Object {
37459
37773
  for (const v of this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox) {
37460
37774
  const element = v instanceof URL
37461
37775
  ? { "@id": v.href }
37462
- : await v.toJsonLd(options);
37776
+ : v instanceof OrderedCollection
37777
+ ? await v.toJsonLd(options)
37778
+ : await v.toJsonLd(options);
37463
37779
  array.push(element);
37464
37780
  }
37465
37781
  if (array.length > 0) {
@@ -37470,7 +37786,9 @@ export class Service extends Object {
37470
37786
  for (const v of this.#_41QwhqJouoLg3h8dRPKat21brynC_outbox) {
37471
37787
  const element = v instanceof URL
37472
37788
  ? { "@id": v.href }
37473
- : await v.toJsonLd(options);
37789
+ : v instanceof OrderedCollection
37790
+ ? await v.toJsonLd(options)
37791
+ : await v.toJsonLd(options);
37474
37792
  array.push(element);
37475
37793
  }
37476
37794
  if (array.length > 0) {
@@ -37858,7 +38176,18 @@ export class Service extends Object {
37858
38176
  : new URL(v["@id"]));
37859
38177
  continue;
37860
38178
  }
37861
- _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
38179
+ const decoded = typeof v === "object" && "@type" in v &&
38180
+ Array.isArray(v["@type"]) &&
38181
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
38182
+ ? await OrderedCollection.fromJsonLd(v, options)
38183
+ : typeof v === "object" && "@type" in v &&
38184
+ Array.isArray(v["@type"]) &&
38185
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
38186
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
38187
+ : undefined;
38188
+ if (typeof decoded === "undefined")
38189
+ continue;
38190
+ _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(decoded);
37862
38191
  }
37863
38192
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox =
37864
38193
  _3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox;
@@ -37879,7 +38208,18 @@ export class Service extends Object {
37879
38208
  : new URL(v["@id"]));
37880
38209
  continue;
37881
38210
  }
37882
- _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
38211
+ const decoded = typeof v === "object" && "@type" in v &&
38212
+ Array.isArray(v["@type"]) &&
38213
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollection")
38214
+ ? await OrderedCollection.fromJsonLd(v, options)
38215
+ : typeof v === "object" && "@type" in v &&
38216
+ Array.isArray(v["@type"]) &&
38217
+ v["@type"].includes("https://www.w3.org/ns/activitystreams#OrderedCollectionPage")
38218
+ ? await OrderedCollectionPage.fromJsonLd(v, options)
38219
+ : undefined;
38220
+ if (typeof decoded === "undefined")
38221
+ continue;
38222
+ _41QwhqJouoLg3h8dRPKat21brynC_outbox.push(decoded);
37883
38223
  }
37884
38224
  instance.#_41QwhqJouoLg3h8dRPKat21brynC_outbox =
37885
38225
  _41QwhqJouoLg3h8dRPKat21brynC_outbox;