@llun/activities.schema 0.2.9 → 0.2.10

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.
@@ -6,7 +6,9 @@ const attachment_js_1 = require("./attachment.js");
6
6
  const tag_js_1 = require("./tag.js");
7
7
  exports.BaseContent = zod_1.z.object({
8
8
  id: zod_1.z.string(),
9
- url: zod_1.z.string({ description: "Note URL" }),
9
+ url: zod_1.z
10
+ .string({ description: "Note URL. This is optional for Pleloma" })
11
+ .nullish(),
10
12
  attributedTo: zod_1.z.string({ description: "Note publisher" }),
11
13
  to: zod_1.z.union([zod_1.z.string(), zod_1.z.string().array()]),
12
14
  cc: zod_1.z.union([zod_1.z.string(), zod_1.z.string().array()]),
@@ -3,7 +3,9 @@ import { Attachment } from "./attachment.js";
3
3
  import { Tag } from "./tag.js";
4
4
  export const BaseContent = z.object({
5
5
  id: z.string(),
6
- url: z.string({ description: "Note URL" }),
6
+ url: z
7
+ .string({ description: "Note URL. This is optional for Pleloma" })
8
+ .nullish(),
7
9
  attributedTo: z.string({ description: "Note publisher" }),
8
10
  to: z.union([z.string(), z.string().array()]),
9
11
  cc: z.union([z.string(), z.string().array()]),
@@ -5,7 +5,7 @@ export declare const Like: z.ZodObject<{
5
5
  actor: z.ZodString;
6
6
  object: z.ZodUnion<[z.ZodString, z.ZodObject<z.objectUtil.extendShape<{
7
7
  id: z.ZodString;
8
- url: z.ZodString;
8
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
9
  attributedTo: z.ZodString;
10
10
  to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
11
11
  cc: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
@@ -222,7 +222,6 @@ export declare const Like: z.ZodObject<{
222
222
  published: string;
223
223
  to: string | string[];
224
224
  cc: string | string[];
225
- url: string;
226
225
  attributedTo: string;
227
226
  tag: {
228
227
  type: "Emoji";
@@ -259,6 +258,7 @@ export declare const Like: z.ZodObject<{
259
258
  name: string;
260
259
  href: string;
261
260
  })[];
261
+ url?: string | null | undefined;
262
262
  updated?: string | null | undefined;
263
263
  inReplyTo?: string | null | undefined;
264
264
  summary?: string | null | undefined;
@@ -298,7 +298,6 @@ export declare const Like: z.ZodObject<{
298
298
  published: string;
299
299
  to: string | string[];
300
300
  cc: string | string[];
301
- url: string;
302
301
  attributedTo: string;
303
302
  tag: {
304
303
  type: "Emoji";
@@ -335,6 +334,7 @@ export declare const Like: z.ZodObject<{
335
334
  name: string;
336
335
  href: string;
337
336
  })[];
337
+ url?: string | null | undefined;
338
338
  updated?: string | null | undefined;
339
339
  inReplyTo?: string | null | undefined;
340
340
  summary?: string | null | undefined;
@@ -376,7 +376,6 @@ export declare const Like: z.ZodObject<{
376
376
  published: string;
377
377
  to: string | string[];
378
378
  cc: string | string[];
379
- url: string;
380
379
  attributedTo: string;
381
380
  tag: {
382
381
  type: "Emoji";
@@ -413,6 +412,7 @@ export declare const Like: z.ZodObject<{
413
412
  name: string;
414
413
  href: string;
415
414
  })[];
415
+ url?: string | null | undefined;
416
416
  updated?: string | null | undefined;
417
417
  inReplyTo?: string | null | undefined;
418
418
  summary?: string | null | undefined;
@@ -457,7 +457,6 @@ export declare const Like: z.ZodObject<{
457
457
  published: string;
458
458
  to: string | string[];
459
459
  cc: string | string[];
460
- url: string;
461
460
  attributedTo: string;
462
461
  tag: {
463
462
  type: "Emoji";
@@ -494,6 +493,7 @@ export declare const Like: z.ZodObject<{
494
493
  name: string;
495
494
  href: string;
496
495
  })[];
496
+ url?: string | null | undefined;
497
497
  updated?: string | null | undefined;
498
498
  inReplyTo?: string | null | undefined;
499
499
  summary?: string | null | undefined;
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  export declare const BaseContent: z.ZodObject<{
3
3
  id: z.ZodString;
4
- url: z.ZodString;
4
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
5
  attributedTo: z.ZodString;
6
6
  to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
7
7
  cc: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
@@ -215,7 +215,6 @@ export declare const BaseContent: z.ZodObject<{
215
215
  published: string;
216
216
  to: string | string[];
217
217
  cc: string | string[];
218
- url: string;
219
218
  attributedTo: string;
220
219
  tag: {
221
220
  type: "Emoji";
@@ -252,6 +251,7 @@ export declare const BaseContent: z.ZodObject<{
252
251
  name: string;
253
252
  href: string;
254
253
  })[];
254
+ url?: string | null | undefined;
255
255
  updated?: string | null | undefined;
256
256
  inReplyTo?: string | null | undefined;
257
257
  summary?: string | null | undefined;
@@ -290,7 +290,6 @@ export declare const BaseContent: z.ZodObject<{
290
290
  published: string;
291
291
  to: string | string[];
292
292
  cc: string | string[];
293
- url: string;
294
293
  attributedTo: string;
295
294
  tag: {
296
295
  type: "Emoji";
@@ -327,6 +326,7 @@ export declare const BaseContent: z.ZodObject<{
327
326
  name: string;
328
327
  href: string;
329
328
  })[];
329
+ url?: string | null | undefined;
330
330
  updated?: string | null | undefined;
331
331
  inReplyTo?: string | null | undefined;
332
332
  summary?: string | null | undefined;
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
3
3
  id: z.ZodString;
4
- url: z.ZodString;
4
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
5
  attributedTo: z.ZodString;
6
6
  to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
7
7
  cc: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
@@ -218,7 +218,6 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
218
218
  published: string;
219
219
  to: string | string[];
220
220
  cc: string | string[];
221
- url: string;
222
221
  attributedTo: string;
223
222
  tag: {
224
223
  type: "Emoji";
@@ -255,6 +254,7 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
255
254
  name: string;
256
255
  href: string;
257
256
  })[];
257
+ url?: string | null | undefined;
258
258
  updated?: string | null | undefined;
259
259
  inReplyTo?: string | null | undefined;
260
260
  summary?: string | null | undefined;
@@ -294,7 +294,6 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
294
294
  published: string;
295
295
  to: string | string[];
296
296
  cc: string | string[];
297
- url: string;
298
297
  attributedTo: string;
299
298
  tag: {
300
299
  type: "Emoji";
@@ -331,6 +330,7 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
331
330
  name: string;
332
331
  href: string;
333
332
  })[];
333
+ url?: string | null | undefined;
334
334
  updated?: string | null | undefined;
335
335
  inReplyTo?: string | null | undefined;
336
336
  summary?: string | null | undefined;
@@ -9,7 +9,7 @@ export declare const Undo: z.ZodObject<{
9
9
  actor: z.ZodString;
10
10
  object: z.ZodUnion<[z.ZodString, z.ZodObject<z.objectUtil.extendShape<{
11
11
  id: z.ZodString;
12
- url: z.ZodString;
12
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
13
  attributedTo: z.ZodString;
14
14
  to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
15
15
  cc: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
@@ -226,7 +226,6 @@ export declare const Undo: z.ZodObject<{
226
226
  published: string;
227
227
  to: string | string[];
228
228
  cc: string | string[];
229
- url: string;
230
229
  attributedTo: string;
231
230
  tag: {
232
231
  type: "Emoji";
@@ -263,6 +262,7 @@ export declare const Undo: z.ZodObject<{
263
262
  name: string;
264
263
  href: string;
265
264
  })[];
265
+ url?: string | null | undefined;
266
266
  updated?: string | null | undefined;
267
267
  inReplyTo?: string | null | undefined;
268
268
  summary?: string | null | undefined;
@@ -302,7 +302,6 @@ export declare const Undo: z.ZodObject<{
302
302
  published: string;
303
303
  to: string | string[];
304
304
  cc: string | string[];
305
- url: string;
306
305
  attributedTo: string;
307
306
  tag: {
308
307
  type: "Emoji";
@@ -339,6 +338,7 @@ export declare const Undo: z.ZodObject<{
339
338
  name: string;
340
339
  href: string;
341
340
  })[];
341
+ url?: string | null | undefined;
342
342
  updated?: string | null | undefined;
343
343
  inReplyTo?: string | null | undefined;
344
344
  summary?: string | null | undefined;
@@ -380,7 +380,6 @@ export declare const Undo: z.ZodObject<{
380
380
  published: string;
381
381
  to: string | string[];
382
382
  cc: string | string[];
383
- url: string;
384
383
  attributedTo: string;
385
384
  tag: {
386
385
  type: "Emoji";
@@ -417,6 +416,7 @@ export declare const Undo: z.ZodObject<{
417
416
  name: string;
418
417
  href: string;
419
418
  })[];
419
+ url?: string | null | undefined;
420
420
  updated?: string | null | undefined;
421
421
  inReplyTo?: string | null | undefined;
422
422
  summary?: string | null | undefined;
@@ -461,7 +461,6 @@ export declare const Undo: z.ZodObject<{
461
461
  published: string;
462
462
  to: string | string[];
463
463
  cc: string | string[];
464
- url: string;
465
464
  attributedTo: string;
466
465
  tag: {
467
466
  type: "Emoji";
@@ -498,6 +497,7 @@ export declare const Undo: z.ZodObject<{
498
497
  name: string;
499
498
  href: string;
500
499
  })[];
500
+ url?: string | null | undefined;
501
501
  updated?: string | null | undefined;
502
502
  inReplyTo?: string | null | undefined;
503
503
  summary?: string | null | undefined;
@@ -564,7 +564,6 @@ export declare const Undo: z.ZodObject<{
564
564
  published: string;
565
565
  to: string | string[];
566
566
  cc: string | string[];
567
- url: string;
568
567
  attributedTo: string;
569
568
  tag: {
570
569
  type: "Emoji";
@@ -601,6 +600,7 @@ export declare const Undo: z.ZodObject<{
601
600
  name: string;
602
601
  href: string;
603
602
  })[];
603
+ url?: string | null | undefined;
604
604
  updated?: string | null | undefined;
605
605
  inReplyTo?: string | null | undefined;
606
606
  summary?: string | null | undefined;
@@ -655,7 +655,6 @@ export declare const Undo: z.ZodObject<{
655
655
  published: string;
656
656
  to: string | string[];
657
657
  cc: string | string[];
658
- url: string;
659
658
  attributedTo: string;
660
659
  tag: {
661
660
  type: "Emoji";
@@ -692,6 +691,7 @@ export declare const Undo: z.ZodObject<{
692
691
  name: string;
693
692
  href: string;
694
693
  })[];
694
+ url?: string | null | undefined;
695
695
  updated?: string | null | undefined;
696
696
  inReplyTo?: string | null | undefined;
697
697
  summary?: string | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llun/activities.schema",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Validate ActivityPub and Mastodon with Zod",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -4,7 +4,9 @@ import { Tag } from "./tag.js";
4
4
 
5
5
  export const BaseContent = z.object({
6
6
  id: z.string(),
7
- url: z.string({ description: "Note URL" }),
7
+ url: z
8
+ .string({ description: "Note URL. This is optional for Pleloma" })
9
+ .nullish(),
8
10
  attributedTo: z.string({ description: "Note publisher" }),
9
11
 
10
12
  to: z.union([z.string(), z.string().array()]),