@llun/activities.schema 0.2.14 → 0.2.16

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.
Binary file
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Collection = void 0;
4
+ const zod_1 = require("zod");
5
+ const CollectionWithFirstPage = zod_1.z.object({
6
+ id: zod_1.z.string(),
7
+ type: zod_1.z.literal("Collection"),
8
+ first: zod_1.z.object({
9
+ type: zod_1.z.literal("CollectionPage"),
10
+ next: zod_1.z.string(),
11
+ partOf: zod_1.z.string(),
12
+ items: zod_1.z.array(zod_1.z.any()),
13
+ }),
14
+ });
15
+ const CollectionWithItems = zod_1.z.object({
16
+ id: zod_1.z.string(),
17
+ type: zod_1.z.literal("Collection"),
18
+ totalItems: zod_1.z.number(),
19
+ items: zod_1.z.array(zod_1.z.any()),
20
+ });
21
+ exports.Collection = zod_1.z.union([
22
+ CollectionWithFirstPage,
23
+ CollectionWithItems,
24
+ ]);
@@ -4,6 +4,7 @@ exports.BaseContent = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const attachment_js_1 = require("./attachment.js");
6
6
  const tag_js_1 = require("./tag.js");
7
+ const collection_js_1 = require("../collection.js");
7
8
  exports.BaseContent = zod_1.z.object({
8
9
  id: zod_1.z.string(),
9
10
  url: zod_1.z
@@ -33,6 +34,7 @@ exports.BaseContent = zod_1.z.object({
33
34
  .array(),
34
35
  ])
35
36
  .nullish(),
37
+ replies: collection_js_1.Collection.nullish(),
36
38
  attachment: zod_1.z.union([attachment_js_1.Attachment, attachment_js_1.Attachment.array()]).nullish(),
37
39
  tag: zod_1.z.union([tag_js_1.Tag, tag_js_1.Tag.array()]),
38
40
  published: zod_1.z.string({ description: "Object published datetime" }),
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ const CollectionWithFirstPage = z.object({
3
+ id: z.string(),
4
+ type: z.literal("Collection"),
5
+ first: z.object({
6
+ type: z.literal("CollectionPage"),
7
+ next: z.string(),
8
+ partOf: z.string(),
9
+ items: z.array(z.any()),
10
+ }),
11
+ });
12
+ const CollectionWithItems = z.object({
13
+ id: z.string(),
14
+ type: z.literal("Collection"),
15
+ totalItems: z.number(),
16
+ items: z.array(z.any()),
17
+ });
18
+ export const Collection = z.union([
19
+ CollectionWithFirstPage,
20
+ CollectionWithItems,
21
+ ]);
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { Attachment } from "./attachment.js";
3
3
  import { Tag } from "./tag.js";
4
+ import { Collection } from "../collection.js";
4
5
  export const BaseContent = z.object({
5
6
  id: z.string(),
6
7
  url: z
@@ -30,6 +31,7 @@ export const BaseContent = z.object({
30
31
  .array(),
31
32
  ])
32
33
  .nullish(),
34
+ replies: Collection.nullish(),
33
35
  attachment: z.union([Attachment, Attachment.array()]).nullish(),
34
36
  tag: z.union([Tag, Tag.array()]),
35
37
  published: z.string({ description: "Object published datetime" }),
@@ -0,0 +1,55 @@
1
+ import { z } from "zod";
2
+ export declare const Collection: z.ZodUnion<[z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"Collection">;
5
+ first: z.ZodObject<{
6
+ type: z.ZodLiteral<"CollectionPage">;
7
+ next: z.ZodString;
8
+ partOf: z.ZodString;
9
+ items: z.ZodArray<z.ZodAny, "many">;
10
+ }, "strip", z.ZodTypeAny, {
11
+ type: "CollectionPage";
12
+ next: string;
13
+ partOf: string;
14
+ items: any[];
15
+ }, {
16
+ type: "CollectionPage";
17
+ next: string;
18
+ partOf: string;
19
+ items: any[];
20
+ }>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ id: string;
23
+ type: "Collection";
24
+ first: {
25
+ type: "CollectionPage";
26
+ next: string;
27
+ partOf: string;
28
+ items: any[];
29
+ };
30
+ }, {
31
+ id: string;
32
+ type: "Collection";
33
+ first: {
34
+ type: "CollectionPage";
35
+ next: string;
36
+ partOf: string;
37
+ items: any[];
38
+ };
39
+ }>, z.ZodObject<{
40
+ id: z.ZodString;
41
+ type: z.ZodLiteral<"Collection">;
42
+ totalItems: z.ZodNumber;
43
+ items: z.ZodArray<z.ZodAny, "many">;
44
+ }, "strip", z.ZodTypeAny, {
45
+ id: string;
46
+ type: "Collection";
47
+ items: any[];
48
+ totalItems: number;
49
+ }, {
50
+ id: string;
51
+ type: "Collection";
52
+ items: any[];
53
+ totalItems: number;
54
+ }>]>;
55
+ export type Collection = z.infer<typeof Collection>;
@@ -15,6 +15,59 @@ export declare const Like: z.ZodObject<{
15
15
  summaryMap: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
16
16
  content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
17
17
  contentMap: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>>;
18
+ replies: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
19
+ id: z.ZodString;
20
+ type: z.ZodLiteral<"Collection">;
21
+ first: z.ZodObject<{
22
+ type: z.ZodLiteral<"CollectionPage">;
23
+ next: z.ZodString;
24
+ partOf: z.ZodString;
25
+ items: z.ZodArray<z.ZodAny, "many">;
26
+ }, "strip", z.ZodTypeAny, {
27
+ type: "CollectionPage";
28
+ next: string;
29
+ partOf: string;
30
+ items: any[];
31
+ }, {
32
+ type: "CollectionPage";
33
+ next: string;
34
+ partOf: string;
35
+ items: any[];
36
+ }>;
37
+ }, "strip", z.ZodTypeAny, {
38
+ id: string;
39
+ type: "Collection";
40
+ first: {
41
+ type: "CollectionPage";
42
+ next: string;
43
+ partOf: string;
44
+ items: any[];
45
+ };
46
+ }, {
47
+ id: string;
48
+ type: "Collection";
49
+ first: {
50
+ type: "CollectionPage";
51
+ next: string;
52
+ partOf: string;
53
+ items: any[];
54
+ };
55
+ }>, z.ZodObject<{
56
+ id: z.ZodString;
57
+ type: z.ZodLiteral<"Collection">;
58
+ totalItems: z.ZodNumber;
59
+ items: z.ZodArray<z.ZodAny, "many">;
60
+ }, "strip", z.ZodTypeAny, {
61
+ id: string;
62
+ type: "Collection";
63
+ items: any[];
64
+ totalItems: number;
65
+ }, {
66
+ id: string;
67
+ type: "Collection";
68
+ items: any[];
69
+ totalItems: number;
70
+ }>]>>>;
18
71
  attachment: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
19
72
  type: z.ZodLiteral<"PropertyValue">;
20
73
  name: z.ZodString;
@@ -266,6 +319,21 @@ export declare const Like: z.ZodObject<{
266
319
  summaryMap?: Record<string, string> | null | undefined;
267
320
  content?: string | string[] | null | undefined;
268
321
  contentMap?: string[] | Record<string, string> | null | undefined;
322
+ replies?: {
323
+ id: string;
324
+ type: "Collection";
325
+ first: {
326
+ type: "CollectionPage";
327
+ next: string;
328
+ partOf: string;
329
+ items: any[];
330
+ };
331
+ } | {
332
+ id: string;
333
+ type: "Collection";
334
+ items: any[];
335
+ totalItems: number;
336
+ } | null | undefined;
269
337
  attachment?: {
270
338
  type: "Document";
271
339
  mediaType: string;
@@ -342,6 +410,21 @@ export declare const Like: z.ZodObject<{
342
410
  summaryMap?: Record<string, string> | null | undefined;
343
411
  content?: string | string[] | null | undefined;
344
412
  contentMap?: string[] | Record<string, string> | null | undefined;
413
+ replies?: {
414
+ id: string;
415
+ type: "Collection";
416
+ first: {
417
+ type: "CollectionPage";
418
+ next: string;
419
+ partOf: string;
420
+ items: any[];
421
+ };
422
+ } | {
423
+ id: string;
424
+ type: "Collection";
425
+ items: any[];
426
+ totalItems: number;
427
+ } | null | undefined;
345
428
  attachment?: {
346
429
  type: "Document";
347
430
  mediaType: string;
@@ -420,6 +503,21 @@ export declare const Like: z.ZodObject<{
420
503
  summaryMap?: Record<string, string> | null | undefined;
421
504
  content?: string | string[] | null | undefined;
422
505
  contentMap?: string[] | Record<string, string> | null | undefined;
506
+ replies?: {
507
+ id: string;
508
+ type: "Collection";
509
+ first: {
510
+ type: "CollectionPage";
511
+ next: string;
512
+ partOf: string;
513
+ items: any[];
514
+ };
515
+ } | {
516
+ id: string;
517
+ type: "Collection";
518
+ items: any[];
519
+ totalItems: number;
520
+ } | null | undefined;
423
521
  attachment?: {
424
522
  type: "Document";
425
523
  mediaType: string;
@@ -501,6 +599,21 @@ export declare const Like: z.ZodObject<{
501
599
  summaryMap?: Record<string, string> | null | undefined;
502
600
  content?: string | string[] | null | undefined;
503
601
  contentMap?: string[] | Record<string, string> | null | undefined;
602
+ replies?: {
603
+ id: string;
604
+ type: "Collection";
605
+ first: {
606
+ type: "CollectionPage";
607
+ next: string;
608
+ partOf: string;
609
+ items: any[];
610
+ };
611
+ } | {
612
+ id: string;
613
+ type: "Collection";
614
+ items: any[];
615
+ totalItems: number;
616
+ } | null | undefined;
504
617
  attachment?: {
505
618
  type: "Document";
506
619
  mediaType: string;
@@ -10,6 +10,59 @@ export declare const BaseContent: z.ZodObject<{
10
10
  summaryMap: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
11
11
  content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
12
12
  contentMap: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>>;
13
+ replies: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
14
+ id: z.ZodString;
15
+ type: z.ZodLiteral<"Collection">;
16
+ first: z.ZodObject<{
17
+ type: z.ZodLiteral<"CollectionPage">;
18
+ next: z.ZodString;
19
+ partOf: z.ZodString;
20
+ items: z.ZodArray<z.ZodAny, "many">;
21
+ }, "strip", z.ZodTypeAny, {
22
+ type: "CollectionPage";
23
+ next: string;
24
+ partOf: string;
25
+ items: any[];
26
+ }, {
27
+ type: "CollectionPage";
28
+ next: string;
29
+ partOf: string;
30
+ items: any[];
31
+ }>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ id: string;
34
+ type: "Collection";
35
+ first: {
36
+ type: "CollectionPage";
37
+ next: string;
38
+ partOf: string;
39
+ items: any[];
40
+ };
41
+ }, {
42
+ id: string;
43
+ type: "Collection";
44
+ first: {
45
+ type: "CollectionPage";
46
+ next: string;
47
+ partOf: string;
48
+ items: any[];
49
+ };
50
+ }>, z.ZodObject<{
51
+ id: z.ZodString;
52
+ type: z.ZodLiteral<"Collection">;
53
+ totalItems: z.ZodNumber;
54
+ items: z.ZodArray<z.ZodAny, "many">;
55
+ }, "strip", z.ZodTypeAny, {
56
+ id: string;
57
+ type: "Collection";
58
+ items: any[];
59
+ totalItems: number;
60
+ }, {
61
+ id: string;
62
+ type: "Collection";
63
+ items: any[];
64
+ totalItems: number;
65
+ }>]>>>;
13
66
  attachment: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
14
67
  type: z.ZodLiteral<"PropertyValue">;
15
68
  name: z.ZodString;
@@ -258,6 +311,21 @@ export declare const BaseContent: z.ZodObject<{
258
311
  summaryMap?: Record<string, string> | null | undefined;
259
312
  content?: string | string[] | null | undefined;
260
313
  contentMap?: string[] | Record<string, string> | null | undefined;
314
+ replies?: {
315
+ id: string;
316
+ type: "Collection";
317
+ first: {
318
+ type: "CollectionPage";
319
+ next: string;
320
+ partOf: string;
321
+ items: any[];
322
+ };
323
+ } | {
324
+ id: string;
325
+ type: "Collection";
326
+ items: any[];
327
+ totalItems: number;
328
+ } | null | undefined;
261
329
  attachment?: {
262
330
  type: "Document";
263
331
  mediaType: string;
@@ -333,6 +401,21 @@ export declare const BaseContent: z.ZodObject<{
333
401
  summaryMap?: Record<string, string> | null | undefined;
334
402
  content?: string | string[] | null | undefined;
335
403
  contentMap?: string[] | Record<string, string> | null | undefined;
404
+ replies?: {
405
+ id: string;
406
+ type: "Collection";
407
+ first: {
408
+ type: "CollectionPage";
409
+ next: string;
410
+ partOf: string;
411
+ items: any[];
412
+ };
413
+ } | {
414
+ id: string;
415
+ type: "Collection";
416
+ items: any[];
417
+ totalItems: number;
418
+ } | null | undefined;
336
419
  attachment?: {
337
420
  type: "Document";
338
421
  mediaType: string;
@@ -11,6 +11,59 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
11
11
  summaryMap: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
12
12
  content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
13
13
  contentMap: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>>;
14
+ replies: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
15
+ id: z.ZodString;
16
+ type: z.ZodLiteral<"Collection">;
17
+ first: z.ZodObject<{
18
+ type: z.ZodLiteral<"CollectionPage">;
19
+ next: z.ZodString;
20
+ partOf: z.ZodString;
21
+ items: z.ZodArray<z.ZodAny, "many">;
22
+ }, "strip", z.ZodTypeAny, {
23
+ type: "CollectionPage";
24
+ next: string;
25
+ partOf: string;
26
+ items: any[];
27
+ }, {
28
+ type: "CollectionPage";
29
+ next: string;
30
+ partOf: string;
31
+ items: any[];
32
+ }>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ id: string;
35
+ type: "Collection";
36
+ first: {
37
+ type: "CollectionPage";
38
+ next: string;
39
+ partOf: string;
40
+ items: any[];
41
+ };
42
+ }, {
43
+ id: string;
44
+ type: "Collection";
45
+ first: {
46
+ type: "CollectionPage";
47
+ next: string;
48
+ partOf: string;
49
+ items: any[];
50
+ };
51
+ }>, z.ZodObject<{
52
+ id: z.ZodString;
53
+ type: z.ZodLiteral<"Collection">;
54
+ totalItems: z.ZodNumber;
55
+ items: z.ZodArray<z.ZodAny, "many">;
56
+ }, "strip", z.ZodTypeAny, {
57
+ id: string;
58
+ type: "Collection";
59
+ items: any[];
60
+ totalItems: number;
61
+ }, {
62
+ id: string;
63
+ type: "Collection";
64
+ items: any[];
65
+ totalItems: number;
66
+ }>]>>>;
14
67
  attachment: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
15
68
  type: z.ZodLiteral<"PropertyValue">;
16
69
  name: z.ZodString;
@@ -262,6 +315,21 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
262
315
  summaryMap?: Record<string, string> | null | undefined;
263
316
  content?: string | string[] | null | undefined;
264
317
  contentMap?: string[] | Record<string, string> | null | undefined;
318
+ replies?: {
319
+ id: string;
320
+ type: "Collection";
321
+ first: {
322
+ type: "CollectionPage";
323
+ next: string;
324
+ partOf: string;
325
+ items: any[];
326
+ };
327
+ } | {
328
+ id: string;
329
+ type: "Collection";
330
+ items: any[];
331
+ totalItems: number;
332
+ } | null | undefined;
265
333
  attachment?: {
266
334
  type: "Document";
267
335
  mediaType: string;
@@ -338,6 +406,21 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
338
406
  summaryMap?: Record<string, string> | null | undefined;
339
407
  content?: string | string[] | null | undefined;
340
408
  contentMap?: string[] | Record<string, string> | null | undefined;
409
+ replies?: {
410
+ id: string;
411
+ type: "Collection";
412
+ first: {
413
+ type: "CollectionPage";
414
+ next: string;
415
+ partOf: string;
416
+ items: any[];
417
+ };
418
+ } | {
419
+ id: string;
420
+ type: "Collection";
421
+ items: any[];
422
+ totalItems: number;
423
+ } | null | undefined;
341
424
  attachment?: {
342
425
  type: "Document";
343
426
  mediaType: string;
@@ -11,6 +11,59 @@ export declare const Question: z.ZodObject<z.objectUtil.extendShape<{
11
11
  summaryMap: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
12
12
  content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
13
13
  contentMap: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>>;
14
+ replies: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
15
+ id: z.ZodString;
16
+ type: z.ZodLiteral<"Collection">;
17
+ first: z.ZodObject<{
18
+ type: z.ZodLiteral<"CollectionPage">;
19
+ next: z.ZodString;
20
+ partOf: z.ZodString;
21
+ items: z.ZodArray<z.ZodAny, "many">;
22
+ }, "strip", z.ZodTypeAny, {
23
+ type: "CollectionPage";
24
+ next: string;
25
+ partOf: string;
26
+ items: any[];
27
+ }, {
28
+ type: "CollectionPage";
29
+ next: string;
30
+ partOf: string;
31
+ items: any[];
32
+ }>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ id: string;
35
+ type: "Collection";
36
+ first: {
37
+ type: "CollectionPage";
38
+ next: string;
39
+ partOf: string;
40
+ items: any[];
41
+ };
42
+ }, {
43
+ id: string;
44
+ type: "Collection";
45
+ first: {
46
+ type: "CollectionPage";
47
+ next: string;
48
+ partOf: string;
49
+ items: any[];
50
+ };
51
+ }>, z.ZodObject<{
52
+ id: z.ZodString;
53
+ type: z.ZodLiteral<"Collection">;
54
+ totalItems: z.ZodNumber;
55
+ items: z.ZodArray<z.ZodAny, "many">;
56
+ }, "strip", z.ZodTypeAny, {
57
+ id: string;
58
+ type: "Collection";
59
+ items: any[];
60
+ totalItems: number;
61
+ }, {
62
+ id: string;
63
+ type: "Collection";
64
+ items: any[];
65
+ totalItems: number;
66
+ }>]>>>;
14
67
  attachment: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
15
68
  type: z.ZodLiteral<"PropertyValue">;
16
69
  name: z.ZodString;
@@ -300,6 +353,21 @@ export declare const Question: z.ZodObject<z.objectUtil.extendShape<{
300
353
  summaryMap?: Record<string, string> | null | undefined;
301
354
  content?: string | string[] | null | undefined;
302
355
  contentMap?: string[] | Record<string, string> | null | undefined;
356
+ replies?: {
357
+ id: string;
358
+ type: "Collection";
359
+ first: {
360
+ type: "CollectionPage";
361
+ next: string;
362
+ partOf: string;
363
+ items: any[];
364
+ };
365
+ } | {
366
+ id: string;
367
+ type: "Collection";
368
+ items: any[];
369
+ totalItems: number;
370
+ } | null | undefined;
303
371
  attachment?: {
304
372
  type: "Document";
305
373
  mediaType: string;
@@ -385,6 +453,21 @@ export declare const Question: z.ZodObject<z.objectUtil.extendShape<{
385
453
  summaryMap?: Record<string, string> | null | undefined;
386
454
  content?: string | string[] | null | undefined;
387
455
  contentMap?: string[] | Record<string, string> | null | undefined;
456
+ replies?: {
457
+ id: string;
458
+ type: "Collection";
459
+ first: {
460
+ type: "CollectionPage";
461
+ next: string;
462
+ partOf: string;
463
+ items: any[];
464
+ };
465
+ } | {
466
+ id: string;
467
+ type: "Collection";
468
+ items: any[];
469
+ totalItems: number;
470
+ } | null | undefined;
388
471
  attachment?: {
389
472
  type: "Document";
390
473
  mediaType: string;
@@ -18,6 +18,59 @@ export declare const Undo: z.ZodObject<{
18
18
  summaryMap: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
19
19
  content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
20
20
  contentMap: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>>;
21
+ replies: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
22
+ id: z.ZodString;
23
+ type: z.ZodLiteral<"Collection">;
24
+ first: z.ZodObject<{
25
+ type: z.ZodLiteral<"CollectionPage">;
26
+ next: z.ZodString;
27
+ partOf: z.ZodString;
28
+ items: z.ZodArray<z.ZodAny, "many">;
29
+ }, "strip", z.ZodTypeAny, {
30
+ type: "CollectionPage";
31
+ next: string;
32
+ partOf: string;
33
+ items: any[];
34
+ }, {
35
+ type: "CollectionPage";
36
+ next: string;
37
+ partOf: string;
38
+ items: any[];
39
+ }>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ id: string;
42
+ type: "Collection";
43
+ first: {
44
+ type: "CollectionPage";
45
+ next: string;
46
+ partOf: string;
47
+ items: any[];
48
+ };
49
+ }, {
50
+ id: string;
51
+ type: "Collection";
52
+ first: {
53
+ type: "CollectionPage";
54
+ next: string;
55
+ partOf: string;
56
+ items: any[];
57
+ };
58
+ }>, z.ZodObject<{
59
+ id: z.ZodString;
60
+ type: z.ZodLiteral<"Collection">;
61
+ totalItems: z.ZodNumber;
62
+ items: z.ZodArray<z.ZodAny, "many">;
63
+ }, "strip", z.ZodTypeAny, {
64
+ id: string;
65
+ type: "Collection";
66
+ items: any[];
67
+ totalItems: number;
68
+ }, {
69
+ id: string;
70
+ type: "Collection";
71
+ items: any[];
72
+ totalItems: number;
73
+ }>]>>>;
21
74
  attachment: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
22
75
  type: z.ZodLiteral<"PropertyValue">;
23
76
  name: z.ZodString;
@@ -269,6 +322,21 @@ export declare const Undo: z.ZodObject<{
269
322
  summaryMap?: Record<string, string> | null | undefined;
270
323
  content?: string | string[] | null | undefined;
271
324
  contentMap?: string[] | Record<string, string> | null | undefined;
325
+ replies?: {
326
+ id: string;
327
+ type: "Collection";
328
+ first: {
329
+ type: "CollectionPage";
330
+ next: string;
331
+ partOf: string;
332
+ items: any[];
333
+ };
334
+ } | {
335
+ id: string;
336
+ type: "Collection";
337
+ items: any[];
338
+ totalItems: number;
339
+ } | null | undefined;
272
340
  attachment?: {
273
341
  type: "Document";
274
342
  mediaType: string;
@@ -345,6 +413,21 @@ export declare const Undo: z.ZodObject<{
345
413
  summaryMap?: Record<string, string> | null | undefined;
346
414
  content?: string | string[] | null | undefined;
347
415
  contentMap?: string[] | Record<string, string> | null | undefined;
416
+ replies?: {
417
+ id: string;
418
+ type: "Collection";
419
+ first: {
420
+ type: "CollectionPage";
421
+ next: string;
422
+ partOf: string;
423
+ items: any[];
424
+ };
425
+ } | {
426
+ id: string;
427
+ type: "Collection";
428
+ items: any[];
429
+ totalItems: number;
430
+ } | null | undefined;
348
431
  attachment?: {
349
432
  type: "Document";
350
433
  mediaType: string;
@@ -423,6 +506,21 @@ export declare const Undo: z.ZodObject<{
423
506
  summaryMap?: Record<string, string> | null | undefined;
424
507
  content?: string | string[] | null | undefined;
425
508
  contentMap?: string[] | Record<string, string> | null | undefined;
509
+ replies?: {
510
+ id: string;
511
+ type: "Collection";
512
+ first: {
513
+ type: "CollectionPage";
514
+ next: string;
515
+ partOf: string;
516
+ items: any[];
517
+ };
518
+ } | {
519
+ id: string;
520
+ type: "Collection";
521
+ items: any[];
522
+ totalItems: number;
523
+ } | null | undefined;
426
524
  attachment?: {
427
525
  type: "Document";
428
526
  mediaType: string;
@@ -504,6 +602,21 @@ export declare const Undo: z.ZodObject<{
504
602
  summaryMap?: Record<string, string> | null | undefined;
505
603
  content?: string | string[] | null | undefined;
506
604
  contentMap?: string[] | Record<string, string> | null | undefined;
605
+ replies?: {
606
+ id: string;
607
+ type: "Collection";
608
+ first: {
609
+ type: "CollectionPage";
610
+ next: string;
611
+ partOf: string;
612
+ items: any[];
613
+ };
614
+ } | {
615
+ id: string;
616
+ type: "Collection";
617
+ items: any[];
618
+ totalItems: number;
619
+ } | null | undefined;
507
620
  attachment?: {
508
621
  type: "Document";
509
622
  mediaType: string;
@@ -607,6 +720,21 @@ export declare const Undo: z.ZodObject<{
607
720
  summaryMap?: Record<string, string> | null | undefined;
608
721
  content?: string | string[] | null | undefined;
609
722
  contentMap?: string[] | Record<string, string> | null | undefined;
723
+ replies?: {
724
+ id: string;
725
+ type: "Collection";
726
+ first: {
727
+ type: "CollectionPage";
728
+ next: string;
729
+ partOf: string;
730
+ items: any[];
731
+ };
732
+ } | {
733
+ id: string;
734
+ type: "Collection";
735
+ items: any[];
736
+ totalItems: number;
737
+ } | null | undefined;
610
738
  attachment?: {
611
739
  type: "Document";
612
740
  mediaType: string;
@@ -698,6 +826,21 @@ export declare const Undo: z.ZodObject<{
698
826
  summaryMap?: Record<string, string> | null | undefined;
699
827
  content?: string | string[] | null | undefined;
700
828
  contentMap?: string[] | Record<string, string> | null | undefined;
829
+ replies?: {
830
+ id: string;
831
+ type: "Collection";
832
+ first: {
833
+ type: "CollectionPage";
834
+ next: string;
835
+ partOf: string;
836
+ items: any[];
837
+ };
838
+ } | {
839
+ id: string;
840
+ type: "Collection";
841
+ items: any[];
842
+ totalItems: number;
843
+ } | null | undefined;
701
844
  attachment?: {
702
845
  type: "Document";
703
846
  mediaType: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llun/activities.schema",
3
- "version": "0.2.14",
3
+ "version": "0.2.16",
4
4
  "description": "Validate ActivityPub and Mastodon with Zod",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -16,7 +16,7 @@
16
16
  "zod": "^3.24.1"
17
17
  },
18
18
  "devDependencies": {
19
- "typescript": "^5.7.2"
19
+ "typescript": "^5.7.3"
20
20
  },
21
- "packageManager": "yarn@4.5.3"
21
+ "packageManager": "yarn@4.6.0"
22
22
  }
@@ -0,0 +1,25 @@
1
+ import { z } from "zod";
2
+
3
+ const CollectionWithFirstPage = z.object({
4
+ id: z.string(),
5
+ type: z.literal("Collection"),
6
+ first: z.object({
7
+ type: z.literal("CollectionPage"),
8
+ next: z.string(),
9
+ partOf: z.string(),
10
+ items: z.array(z.any()),
11
+ }),
12
+ });
13
+
14
+ const CollectionWithItems = z.object({
15
+ id: z.string(),
16
+ type: z.literal("Collection"),
17
+ totalItems: z.number(),
18
+ items: z.array(z.any()),
19
+ });
20
+
21
+ export const Collection = z.union([
22
+ CollectionWithFirstPage,
23
+ CollectionWithItems,
24
+ ]);
25
+ export type Collection = z.infer<typeof Collection>;
@@ -1,6 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { Attachment } from "./attachment.js";
3
3
  import { Tag } from "./tag.js";
4
+ import { Collection } from "../collection.js";
4
5
 
5
6
  export const BaseContent = z.object({
6
7
  id: z.string(),
@@ -36,6 +37,7 @@ export const BaseContent = z.object({
36
37
  .array(),
37
38
  ])
38
39
  .nullish(),
40
+ replies: Collection.nullish(),
39
41
 
40
42
  attachment: z.union([Attachment, Attachment.array()]).nullish(),
41
43
  tag: z.union([Tag, Tag.array()]),