@llun/activities.schema 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/undo.d.ts CHANGED
@@ -7,10 +7,9 @@ export declare const Undo: z.ZodObject<{
7
7
  type: z.ZodLiteral<"Like">;
8
8
  id: z.ZodString;
9
9
  actor: z.ZodString;
10
- object: z.ZodUnion<[z.ZodString, z.ZodObject<{
10
+ object: z.ZodUnion<[z.ZodString, z.ZodObject<z.objectUtil.extendShape<{
11
11
  id: z.ZodString;
12
12
  url: z.ZodString;
13
- updated: z.ZodOptional<z.ZodString>;
14
13
  attributedTo: z.ZodString;
15
14
  to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
16
15
  cc: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
@@ -147,14 +146,16 @@ export declare const Undo: z.ZodObject<{
147
146
  };
148
147
  }>]>, "many">;
149
148
  published: z.ZodString;
149
+ updated: z.ZodOptional<z.ZodString>;
150
+ }, {
150
151
  type: z.ZodLiteral<"Note">;
151
- }, "strip", z.ZodTypeAny, {
152
+ }>, "strip", z.ZodTypeAny, {
152
153
  id: string;
153
154
  type: "Note";
154
155
  url: string;
155
156
  attributedTo: string;
156
- to: (string | string[]) & (string | string[] | undefined);
157
- cc: (string | string[]) & (string | string[] | undefined);
157
+ to: string | string[];
158
+ cc: string | string[];
158
159
  inReplyTo: string | null;
159
160
  tag: ({
160
161
  type: "Emoji";
@@ -208,8 +209,8 @@ export declare const Undo: z.ZodObject<{
208
209
  type: "Note";
209
210
  url: string;
210
211
  attributedTo: string;
211
- to: (string | string[]) & (string | string[] | undefined);
212
- cc: (string | string[]) & (string | string[] | undefined);
212
+ to: string | string[];
213
+ cc: string | string[];
213
214
  inReplyTo: string | null;
214
215
  tag: ({
215
216
  type: "Emoji";
@@ -260,68 +261,13 @@ export declare const Undo: z.ZodObject<{
260
261
  })[] | undefined;
261
262
  }>]>;
262
263
  }, "strip", z.ZodTypeAny, {
263
- object: (string | {
264
- id: string;
265
- type: "Note";
266
- url: string;
267
- attributedTo: string;
268
- to: (string | string[]) & (string | string[] | undefined);
269
- cc: (string | string[]) & (string | string[] | undefined);
270
- inReplyTo: string | null;
271
- tag: ({
272
- type: "Emoji";
273
- name: string;
274
- updated: string;
275
- icon: {
276
- type: "Image";
277
- mediaType: string;
278
- url: string;
279
- };
280
- } | {
281
- type: "Mention";
282
- name: string;
283
- href: string;
284
- })[];
285
- published: string;
286
- updated?: string | undefined;
287
- summary?: string | undefined;
288
- summaryMap?: Record<string, string> | undefined;
289
- content?: string | undefined;
290
- contentMap?: Record<string, string> | undefined;
291
- attachment?: {
292
- type: "Document";
293
- mediaType: string;
294
- url: string;
295
- blurhash?: string | undefined;
296
- width?: number | undefined;
297
- height?: number | undefined;
298
- name?: string | null | undefined;
299
- focalPoint?: [number, number] | undefined;
300
- } | {
301
- type: "PropertyValue";
302
- value: string;
303
- name: string;
304
- } | ({
305
- type: "Document";
306
- mediaType: string;
307
- url: string;
308
- blurhash?: string | undefined;
309
- width?: number | undefined;
310
- height?: number | undefined;
311
- name?: string | null | undefined;
312
- focalPoint?: [number, number] | undefined;
313
- } | {
314
- type: "PropertyValue";
315
- value: string;
316
- name: string;
317
- })[] | undefined;
318
- }) & (string | {
264
+ object: string | {
319
265
  id: string;
320
266
  type: "Note";
321
267
  url: string;
322
268
  attributedTo: string;
323
- to: (string | string[]) & (string | string[] | undefined);
324
- cc: (string | string[]) & (string | string[] | undefined);
269
+ to: string | string[];
270
+ cc: string | string[];
325
271
  inReplyTo: string | null;
326
272
  tag: ({
327
273
  type: "Emoji";
@@ -370,18 +316,18 @@ export declare const Undo: z.ZodObject<{
370
316
  value: string;
371
317
  name: string;
372
318
  })[] | undefined;
373
- } | undefined);
319
+ };
374
320
  id: string;
375
321
  type: "Like";
376
322
  actor: string;
377
323
  }, {
378
- object: (string | {
324
+ object: string | {
379
325
  id: string;
380
326
  type: "Note";
381
327
  url: string;
382
328
  attributedTo: string;
383
- to: (string | string[]) & (string | string[] | undefined);
384
- cc: (string | string[]) & (string | string[] | undefined);
329
+ to: string | string[];
330
+ cc: string | string[];
385
331
  inReplyTo: string | null;
386
332
  tag: ({
387
333
  type: "Emoji";
@@ -430,62 +376,7 @@ export declare const Undo: z.ZodObject<{
430
376
  value: string;
431
377
  name: string;
432
378
  })[] | undefined;
433
- }) & (string | {
434
- id: string;
435
- type: "Note";
436
- url: string;
437
- attributedTo: string;
438
- to: (string | string[]) & (string | string[] | undefined);
439
- cc: (string | string[]) & (string | string[] | undefined);
440
- inReplyTo: string | null;
441
- tag: ({
442
- type: "Emoji";
443
- name: string;
444
- updated: string;
445
- icon: {
446
- type: "Image";
447
- mediaType: string;
448
- url: string;
449
- };
450
- } | {
451
- type: "Mention";
452
- name: string;
453
- href: string;
454
- })[];
455
- published: string;
456
- updated?: string | undefined;
457
- summary?: string | undefined;
458
- summaryMap?: Record<string, string> | undefined;
459
- content?: string | undefined;
460
- contentMap?: Record<string, string> | undefined;
461
- attachment?: {
462
- type: "Document";
463
- mediaType: string;
464
- url: string;
465
- blurhash?: string | undefined;
466
- width?: number | undefined;
467
- height?: number | undefined;
468
- name?: string | null | undefined;
469
- focalPoint?: [number, number] | undefined;
470
- } | {
471
- type: "PropertyValue";
472
- value: string;
473
- name: string;
474
- } | ({
475
- type: "Document";
476
- mediaType: string;
477
- url: string;
478
- blurhash?: string | undefined;
479
- width?: number | undefined;
480
- height?: number | undefined;
481
- name?: string | null | undefined;
482
- focalPoint?: [number, number] | undefined;
483
- } | {
484
- type: "PropertyValue";
485
- value: string;
486
- name: string;
487
- })[] | undefined;
488
- } | undefined);
379
+ };
489
380
  id: string;
490
381
  type: "Like";
491
382
  actor: string;
@@ -512,68 +403,13 @@ export declare const Undo: z.ZodObject<{
512
403
  type: "Follow";
513
404
  actor: string;
514
405
  } | {
515
- object: (string | {
516
- id: string;
517
- type: "Note";
518
- url: string;
519
- attributedTo: string;
520
- to: (string | string[]) & (string | string[] | undefined);
521
- cc: (string | string[]) & (string | string[] | undefined);
522
- inReplyTo: string | null;
523
- tag: ({
524
- type: "Emoji";
525
- name: string;
526
- updated: string;
527
- icon: {
528
- type: "Image";
529
- mediaType: string;
530
- url: string;
531
- };
532
- } | {
533
- type: "Mention";
534
- name: string;
535
- href: string;
536
- })[];
537
- published: string;
538
- updated?: string | undefined;
539
- summary?: string | undefined;
540
- summaryMap?: Record<string, string> | undefined;
541
- content?: string | undefined;
542
- contentMap?: Record<string, string> | undefined;
543
- attachment?: {
544
- type: "Document";
545
- mediaType: string;
546
- url: string;
547
- blurhash?: string | undefined;
548
- width?: number | undefined;
549
- height?: number | undefined;
550
- name?: string | null | undefined;
551
- focalPoint?: [number, number] | undefined;
552
- } | {
553
- type: "PropertyValue";
554
- value: string;
555
- name: string;
556
- } | ({
557
- type: "Document";
558
- mediaType: string;
559
- url: string;
560
- blurhash?: string | undefined;
561
- width?: number | undefined;
562
- height?: number | undefined;
563
- name?: string | null | undefined;
564
- focalPoint?: [number, number] | undefined;
565
- } | {
566
- type: "PropertyValue";
567
- value: string;
568
- name: string;
569
- })[] | undefined;
570
- }) & (string | {
406
+ object: string | {
571
407
  id: string;
572
408
  type: "Note";
573
409
  url: string;
574
410
  attributedTo: string;
575
- to: (string | string[]) & (string | string[] | undefined);
576
- cc: (string | string[]) & (string | string[] | undefined);
411
+ to: string | string[];
412
+ cc: string | string[];
577
413
  inReplyTo: string | null;
578
414
  tag: ({
579
415
  type: "Emoji";
@@ -622,7 +458,7 @@ export declare const Undo: z.ZodObject<{
622
458
  value: string;
623
459
  name: string;
624
460
  })[] | undefined;
625
- } | undefined);
461
+ };
626
462
  id: string;
627
463
  type: "Like";
628
464
  actor: string;
@@ -637,68 +473,13 @@ export declare const Undo: z.ZodObject<{
637
473
  type: "Follow";
638
474
  actor: string;
639
475
  } | {
640
- object: (string | {
641
- id: string;
642
- type: "Note";
643
- url: string;
644
- attributedTo: string;
645
- to: (string | string[]) & (string | string[] | undefined);
646
- cc: (string | string[]) & (string | string[] | undefined);
647
- inReplyTo: string | null;
648
- tag: ({
649
- type: "Emoji";
650
- name: string;
651
- updated: string;
652
- icon: {
653
- type: "Image";
654
- mediaType: string;
655
- url: string;
656
- };
657
- } | {
658
- type: "Mention";
659
- name: string;
660
- href: string;
661
- })[];
662
- published: string;
663
- updated?: string | undefined;
664
- summary?: string | undefined;
665
- summaryMap?: Record<string, string> | undefined;
666
- content?: string | undefined;
667
- contentMap?: Record<string, string> | undefined;
668
- attachment?: {
669
- type: "Document";
670
- mediaType: string;
671
- url: string;
672
- blurhash?: string | undefined;
673
- width?: number | undefined;
674
- height?: number | undefined;
675
- name?: string | null | undefined;
676
- focalPoint?: [number, number] | undefined;
677
- } | {
678
- type: "PropertyValue";
679
- value: string;
680
- name: string;
681
- } | ({
682
- type: "Document";
683
- mediaType: string;
684
- url: string;
685
- blurhash?: string | undefined;
686
- width?: number | undefined;
687
- height?: number | undefined;
688
- name?: string | null | undefined;
689
- focalPoint?: [number, number] | undefined;
690
- } | {
691
- type: "PropertyValue";
692
- value: string;
693
- name: string;
694
- })[] | undefined;
695
- }) & (string | {
476
+ object: string | {
696
477
  id: string;
697
478
  type: "Note";
698
479
  url: string;
699
480
  attributedTo: string;
700
- to: (string | string[]) & (string | string[] | undefined);
701
- cc: (string | string[]) & (string | string[] | undefined);
481
+ to: string | string[];
482
+ cc: string | string[];
702
483
  inReplyTo: string | null;
703
484
  tag: ({
704
485
  type: "Emoji";
@@ -747,7 +528,7 @@ export declare const Undo: z.ZodObject<{
747
528
  value: string;
748
529
  name: string;
749
530
  })[] | undefined;
750
- } | undefined);
531
+ };
751
532
  id: string;
752
533
  type: "Like";
753
534
  actor: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llun/activities.schema",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Validate ActivityPub with Zod",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,10 +12,10 @@
12
12
  "author": "Maythee Anegboonlap <null@llun.dev>",
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "zod": "^3.23.6"
15
+ "zod": "^3.23.8"
16
16
  },
17
17
  "devDependencies": {
18
18
  "typescript": "^5.4.5"
19
19
  },
20
- "packageManager": "yarn@4.1.1"
20
+ "packageManager": "yarn@4.2.2"
21
21
  }