@llun/activities.schema 0.2.15 → 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.
@@ -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" }),
package/dist/cjs/note.js CHANGED
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Note = exports.ENTITY_TYPE_NOTE = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const baseContent_js_1 = require("./note/baseContent.js");
6
- const collection_js_1 = require("./collection.js");
7
6
  exports.ENTITY_TYPE_NOTE = "Note";
8
7
  exports.Note = baseContent_js_1.BaseContent.extend({
9
8
  type: zod_1.z.literal(exports.ENTITY_TYPE_NOTE),
10
- replies: collection_js_1.Collection.nullish(),
11
9
  });
@@ -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" }),
package/dist/esm/note.js CHANGED
@@ -1,8 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { BaseContent } from "./note/baseContent.js";
3
- import { Collection } from "./collection.js";
4
3
  export const ENTITY_TYPE_NOTE = "Note";
5
4
  export const Note = BaseContent.extend({
6
5
  type: z.literal(ENTITY_TYPE_NOTE),
7
- replies: Collection.nullish(),
8
6
  });
@@ -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;
@@ -217,59 +270,6 @@ export declare const Like: z.ZodObject<{
217
270
  updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
218
271
  }, {
219
272
  type: z.ZodLiteral<"Note">;
220
- replies: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
221
- id: z.ZodString;
222
- type: z.ZodLiteral<"Collection">;
223
- first: z.ZodObject<{
224
- type: z.ZodLiteral<"CollectionPage">;
225
- next: z.ZodString;
226
- partOf: z.ZodString;
227
- items: z.ZodArray<z.ZodAny, "many">;
228
- }, "strip", z.ZodTypeAny, {
229
- type: "CollectionPage";
230
- next: string;
231
- partOf: string;
232
- items: any[];
233
- }, {
234
- type: "CollectionPage";
235
- next: string;
236
- partOf: string;
237
- items: any[];
238
- }>;
239
- }, "strip", z.ZodTypeAny, {
240
- id: string;
241
- type: "Collection";
242
- first: {
243
- type: "CollectionPage";
244
- next: string;
245
- partOf: string;
246
- items: any[];
247
- };
248
- }, {
249
- id: string;
250
- type: "Collection";
251
- first: {
252
- type: "CollectionPage";
253
- next: string;
254
- partOf: string;
255
- items: any[];
256
- };
257
- }>, z.ZodObject<{
258
- id: z.ZodString;
259
- type: z.ZodLiteral<"Collection">;
260
- totalItems: z.ZodNumber;
261
- items: z.ZodArray<z.ZodAny, "many">;
262
- }, "strip", z.ZodTypeAny, {
263
- id: string;
264
- type: "Collection";
265
- items: any[];
266
- totalItems: number;
267
- }, {
268
- id: string;
269
- type: "Collection";
270
- items: any[];
271
- totalItems: number;
272
- }>]>>>;
273
273
  }>, "strip", z.ZodTypeAny, {
274
274
  id: string;
275
275
  type: "Note";
@@ -319,6 +319,21 @@ export declare const Like: z.ZodObject<{
319
319
  summaryMap?: Record<string, string> | null | undefined;
320
320
  content?: string | string[] | null | undefined;
321
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;
322
337
  attachment?: {
323
338
  type: "Document";
324
339
  mediaType: string;
@@ -346,21 +361,6 @@ export declare const Like: z.ZodObject<{
346
361
  value: string;
347
362
  name: string;
348
363
  })[] | null | undefined;
349
- replies?: {
350
- id: string;
351
- type: "Collection";
352
- first: {
353
- type: "CollectionPage";
354
- next: string;
355
- partOf: string;
356
- items: any[];
357
- };
358
- } | {
359
- id: string;
360
- type: "Collection";
361
- items: any[];
362
- totalItems: number;
363
- } | null | undefined;
364
364
  }, {
365
365
  id: string;
366
366
  type: "Note";
@@ -410,6 +410,21 @@ export declare const Like: z.ZodObject<{
410
410
  summaryMap?: Record<string, string> | null | undefined;
411
411
  content?: string | string[] | null | undefined;
412
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;
413
428
  attachment?: {
414
429
  type: "Document";
415
430
  mediaType: string;
@@ -437,21 +452,6 @@ export declare const Like: z.ZodObject<{
437
452
  value: string;
438
453
  name: string;
439
454
  })[] | null | undefined;
440
- replies?: {
441
- id: string;
442
- type: "Collection";
443
- first: {
444
- type: "CollectionPage";
445
- next: string;
446
- partOf: string;
447
- items: any[];
448
- };
449
- } | {
450
- id: string;
451
- type: "Collection";
452
- items: any[];
453
- totalItems: number;
454
- } | null | undefined;
455
455
  }>]>;
456
456
  }, "strip", z.ZodTypeAny, {
457
457
  object: string | {
@@ -503,6 +503,21 @@ export declare const Like: z.ZodObject<{
503
503
  summaryMap?: Record<string, string> | null | undefined;
504
504
  content?: string | string[] | null | undefined;
505
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;
506
521
  attachment?: {
507
522
  type: "Document";
508
523
  mediaType: string;
@@ -530,21 +545,6 @@ export declare const Like: z.ZodObject<{
530
545
  value: string;
531
546
  name: string;
532
547
  })[] | null | undefined;
533
- replies?: {
534
- id: string;
535
- type: "Collection";
536
- first: {
537
- type: "CollectionPage";
538
- next: string;
539
- partOf: string;
540
- items: any[];
541
- };
542
- } | {
543
- id: string;
544
- type: "Collection";
545
- items: any[];
546
- totalItems: number;
547
- } | null | undefined;
548
548
  };
549
549
  id: string;
550
550
  type: "Like";
@@ -599,6 +599,21 @@ export declare const Like: z.ZodObject<{
599
599
  summaryMap?: Record<string, string> | null | undefined;
600
600
  content?: string | string[] | null | undefined;
601
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;
602
617
  attachment?: {
603
618
  type: "Document";
604
619
  mediaType: string;
@@ -626,21 +641,6 @@ export declare const Like: z.ZodObject<{
626
641
  value: string;
627
642
  name: string;
628
643
  })[] | null | undefined;
629
- replies?: {
630
- id: string;
631
- type: "Collection";
632
- first: {
633
- type: "CollectionPage";
634
- next: string;
635
- partOf: string;
636
- items: any[];
637
- };
638
- } | {
639
- id: string;
640
- type: "Collection";
641
- items: any[];
642
- totalItems: number;
643
- } | null | undefined;
644
644
  };
645
645
  id: string;
646
646
  type: "Like";
@@ -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;
@@ -213,59 +266,6 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
213
266
  updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
267
  }, {
215
268
  type: z.ZodLiteral<"Note">;
216
- replies: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
217
- id: z.ZodString;
218
- type: z.ZodLiteral<"Collection">;
219
- first: z.ZodObject<{
220
- type: z.ZodLiteral<"CollectionPage">;
221
- next: z.ZodString;
222
- partOf: z.ZodString;
223
- items: z.ZodArray<z.ZodAny, "many">;
224
- }, "strip", z.ZodTypeAny, {
225
- type: "CollectionPage";
226
- next: string;
227
- partOf: string;
228
- items: any[];
229
- }, {
230
- type: "CollectionPage";
231
- next: string;
232
- partOf: string;
233
- items: any[];
234
- }>;
235
- }, "strip", z.ZodTypeAny, {
236
- id: string;
237
- type: "Collection";
238
- first: {
239
- type: "CollectionPage";
240
- next: string;
241
- partOf: string;
242
- items: any[];
243
- };
244
- }, {
245
- id: string;
246
- type: "Collection";
247
- first: {
248
- type: "CollectionPage";
249
- next: string;
250
- partOf: string;
251
- items: any[];
252
- };
253
- }>, z.ZodObject<{
254
- id: z.ZodString;
255
- type: z.ZodLiteral<"Collection">;
256
- totalItems: z.ZodNumber;
257
- items: z.ZodArray<z.ZodAny, "many">;
258
- }, "strip", z.ZodTypeAny, {
259
- id: string;
260
- type: "Collection";
261
- items: any[];
262
- totalItems: number;
263
- }, {
264
- id: string;
265
- type: "Collection";
266
- items: any[];
267
- totalItems: number;
268
- }>]>>>;
269
269
  }>, "strip", z.ZodTypeAny, {
270
270
  id: string;
271
271
  type: "Note";
@@ -315,6 +315,21 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
315
315
  summaryMap?: Record<string, string> | null | undefined;
316
316
  content?: string | string[] | null | undefined;
317
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;
318
333
  attachment?: {
319
334
  type: "Document";
320
335
  mediaType: string;
@@ -342,21 +357,6 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
342
357
  value: string;
343
358
  name: string;
344
359
  })[] | null | undefined;
345
- replies?: {
346
- id: string;
347
- type: "Collection";
348
- first: {
349
- type: "CollectionPage";
350
- next: string;
351
- partOf: string;
352
- items: any[];
353
- };
354
- } | {
355
- id: string;
356
- type: "Collection";
357
- items: any[];
358
- totalItems: number;
359
- } | null | undefined;
360
360
  }, {
361
361
  id: string;
362
362
  type: "Note";
@@ -406,6 +406,21 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
406
406
  summaryMap?: Record<string, string> | null | undefined;
407
407
  content?: string | string[] | null | undefined;
408
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;
409
424
  attachment?: {
410
425
  type: "Document";
411
426
  mediaType: string;
@@ -433,20 +448,5 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
433
448
  value: string;
434
449
  name: string;
435
450
  })[] | null | undefined;
436
- replies?: {
437
- id: string;
438
- type: "Collection";
439
- first: {
440
- type: "CollectionPage";
441
- next: string;
442
- partOf: string;
443
- items: any[];
444
- };
445
- } | {
446
- id: string;
447
- type: "Collection";
448
- items: any[];
449
- totalItems: number;
450
- } | null | undefined;
451
451
  }>;
452
452
  export type Note = z.infer<typeof Note>;
@@ -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;
@@ -220,59 +273,6 @@ export declare const Undo: z.ZodObject<{
220
273
  updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
274
  }, {
222
275
  type: z.ZodLiteral<"Note">;
223
- replies: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
224
- id: z.ZodString;
225
- type: z.ZodLiteral<"Collection">;
226
- first: z.ZodObject<{
227
- type: z.ZodLiteral<"CollectionPage">;
228
- next: z.ZodString;
229
- partOf: z.ZodString;
230
- items: z.ZodArray<z.ZodAny, "many">;
231
- }, "strip", z.ZodTypeAny, {
232
- type: "CollectionPage";
233
- next: string;
234
- partOf: string;
235
- items: any[];
236
- }, {
237
- type: "CollectionPage";
238
- next: string;
239
- partOf: string;
240
- items: any[];
241
- }>;
242
- }, "strip", z.ZodTypeAny, {
243
- id: string;
244
- type: "Collection";
245
- first: {
246
- type: "CollectionPage";
247
- next: string;
248
- partOf: string;
249
- items: any[];
250
- };
251
- }, {
252
- id: string;
253
- type: "Collection";
254
- first: {
255
- type: "CollectionPage";
256
- next: string;
257
- partOf: string;
258
- items: any[];
259
- };
260
- }>, z.ZodObject<{
261
- id: z.ZodString;
262
- type: z.ZodLiteral<"Collection">;
263
- totalItems: z.ZodNumber;
264
- items: z.ZodArray<z.ZodAny, "many">;
265
- }, "strip", z.ZodTypeAny, {
266
- id: string;
267
- type: "Collection";
268
- items: any[];
269
- totalItems: number;
270
- }, {
271
- id: string;
272
- type: "Collection";
273
- items: any[];
274
- totalItems: number;
275
- }>]>>>;
276
276
  }>, "strip", z.ZodTypeAny, {
277
277
  id: string;
278
278
  type: "Note";
@@ -322,6 +322,21 @@ export declare const Undo: z.ZodObject<{
322
322
  summaryMap?: Record<string, string> | null | undefined;
323
323
  content?: string | string[] | null | undefined;
324
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;
325
340
  attachment?: {
326
341
  type: "Document";
327
342
  mediaType: string;
@@ -349,21 +364,6 @@ export declare const Undo: z.ZodObject<{
349
364
  value: string;
350
365
  name: string;
351
366
  })[] | null | undefined;
352
- replies?: {
353
- id: string;
354
- type: "Collection";
355
- first: {
356
- type: "CollectionPage";
357
- next: string;
358
- partOf: string;
359
- items: any[];
360
- };
361
- } | {
362
- id: string;
363
- type: "Collection";
364
- items: any[];
365
- totalItems: number;
366
- } | null | undefined;
367
367
  }, {
368
368
  id: string;
369
369
  type: "Note";
@@ -413,6 +413,21 @@ export declare const Undo: z.ZodObject<{
413
413
  summaryMap?: Record<string, string> | null | undefined;
414
414
  content?: string | string[] | null | undefined;
415
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;
416
431
  attachment?: {
417
432
  type: "Document";
418
433
  mediaType: string;
@@ -440,21 +455,6 @@ export declare const Undo: z.ZodObject<{
440
455
  value: string;
441
456
  name: string;
442
457
  })[] | null | undefined;
443
- replies?: {
444
- id: string;
445
- type: "Collection";
446
- first: {
447
- type: "CollectionPage";
448
- next: string;
449
- partOf: string;
450
- items: any[];
451
- };
452
- } | {
453
- id: string;
454
- type: "Collection";
455
- items: any[];
456
- totalItems: number;
457
- } | null | undefined;
458
458
  }>]>;
459
459
  }, "strip", z.ZodTypeAny, {
460
460
  object: string | {
@@ -506,6 +506,21 @@ export declare const Undo: z.ZodObject<{
506
506
  summaryMap?: Record<string, string> | null | undefined;
507
507
  content?: string | string[] | null | undefined;
508
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;
509
524
  attachment?: {
510
525
  type: "Document";
511
526
  mediaType: string;
@@ -533,21 +548,6 @@ export declare const Undo: z.ZodObject<{
533
548
  value: string;
534
549
  name: string;
535
550
  })[] | null | undefined;
536
- replies?: {
537
- id: string;
538
- type: "Collection";
539
- first: {
540
- type: "CollectionPage";
541
- next: string;
542
- partOf: string;
543
- items: any[];
544
- };
545
- } | {
546
- id: string;
547
- type: "Collection";
548
- items: any[];
549
- totalItems: number;
550
- } | null | undefined;
551
551
  };
552
552
  id: string;
553
553
  type: "Like";
@@ -602,6 +602,21 @@ export declare const Undo: z.ZodObject<{
602
602
  summaryMap?: Record<string, string> | null | undefined;
603
603
  content?: string | string[] | null | undefined;
604
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;
605
620
  attachment?: {
606
621
  type: "Document";
607
622
  mediaType: string;
@@ -629,21 +644,6 @@ export declare const Undo: z.ZodObject<{
629
644
  value: string;
630
645
  name: string;
631
646
  })[] | null | undefined;
632
- replies?: {
633
- id: string;
634
- type: "Collection";
635
- first: {
636
- type: "CollectionPage";
637
- next: string;
638
- partOf: string;
639
- items: any[];
640
- };
641
- } | {
642
- id: string;
643
- type: "Collection";
644
- items: any[];
645
- totalItems: number;
646
- } | null | undefined;
647
647
  };
648
648
  id: string;
649
649
  type: "Like";
@@ -720,6 +720,21 @@ export declare const Undo: z.ZodObject<{
720
720
  summaryMap?: Record<string, string> | null | undefined;
721
721
  content?: string | string[] | null | undefined;
722
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;
723
738
  attachment?: {
724
739
  type: "Document";
725
740
  mediaType: string;
@@ -747,21 +762,6 @@ export declare const Undo: z.ZodObject<{
747
762
  value: string;
748
763
  name: string;
749
764
  })[] | null | undefined;
750
- replies?: {
751
- id: string;
752
- type: "Collection";
753
- first: {
754
- type: "CollectionPage";
755
- next: string;
756
- partOf: string;
757
- items: any[];
758
- };
759
- } | {
760
- id: string;
761
- type: "Collection";
762
- items: any[];
763
- totalItems: number;
764
- } | null | undefined;
765
765
  };
766
766
  id: string;
767
767
  type: "Like";
@@ -826,6 +826,21 @@ export declare const Undo: z.ZodObject<{
826
826
  summaryMap?: Record<string, string> | null | undefined;
827
827
  content?: string | string[] | null | undefined;
828
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;
829
844
  attachment?: {
830
845
  type: "Document";
831
846
  mediaType: string;
@@ -853,21 +868,6 @@ export declare const Undo: z.ZodObject<{
853
868
  value: string;
854
869
  name: string;
855
870
  })[] | null | undefined;
856
- replies?: {
857
- id: string;
858
- type: "Collection";
859
- first: {
860
- type: "CollectionPage";
861
- next: string;
862
- partOf: string;
863
- items: any[];
864
- };
865
- } | {
866
- id: string;
867
- type: "Collection";
868
- items: any[];
869
- totalItems: number;
870
- } | null | undefined;
871
871
  };
872
872
  id: string;
873
873
  type: "Like";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llun/activities.schema",
3
- "version": "0.2.15",
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",
@@ -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()]),
package/src/note.ts CHANGED
@@ -1,10 +1,8 @@
1
1
  import { z } from "zod";
2
2
  import { BaseContent } from "./note/baseContent.js";
3
- import { Collection } from "./collection.js";
4
3
 
5
4
  export const ENTITY_TYPE_NOTE = "Note";
6
5
  export const Note = BaseContent.extend({
7
6
  type: z.literal(ENTITY_TYPE_NOTE),
8
- replies: Collection.nullish(),
9
7
  });
10
8
  export type Note = z.infer<typeof Note>;