@llun/activities.schema 0.2.27 → 0.2.29

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.
@@ -12,9 +12,9 @@ exports.Person = zod_1.z.object({
12
12
  outbox: zod_1.z.string().url(),
13
13
  preferredUsername: zod_1.z.string(),
14
14
  name: zod_1.z.string(),
15
- summary: zod_1.z.string(),
15
+ summary: zod_1.z.string().nullish(),
16
16
  url: zod_1.z.string().url(),
17
- published: zod_1.z.string(),
17
+ published: zod_1.z.string().nullish(),
18
18
  publicKey: zod_1.z.object({
19
19
  id: zod_1.z.string(),
20
20
  owner: zod_1.z.string(),
@@ -25,6 +25,6 @@ exports.Person = zod_1.z.object({
25
25
  sharedInbox: zod_1.z.string().optional(),
26
26
  })
27
27
  .optional(),
28
- icon: image_js_1.Image.optional(),
29
- image: image_js_1.Image.optional(),
28
+ icon: image_js_1.Image.nullish(),
29
+ image: image_js_1.Image.nullish(),
30
30
  });
@@ -9,9 +9,9 @@ export const Person = z.object({
9
9
  outbox: z.string().url(),
10
10
  preferredUsername: z.string(),
11
11
  name: z.string(),
12
- summary: z.string(),
12
+ summary: z.string().nullish(),
13
13
  url: z.string().url(),
14
- published: z.string(),
14
+ published: z.string().nullish(),
15
15
  publicKey: z.object({
16
16
  id: z.string(),
17
17
  owner: z.string(),
@@ -22,6 +22,6 @@ export const Person = z.object({
22
22
  sharedInbox: z.string().optional(),
23
23
  })
24
24
  .optional(),
25
- icon: Image.optional(),
26
- image: Image.optional(),
25
+ icon: Image.nullish(),
26
+ image: Image.nullish(),
27
27
  });
@@ -8,9 +8,9 @@ export declare const Person: z.ZodObject<{
8
8
  outbox: z.ZodString;
9
9
  preferredUsername: z.ZodString;
10
10
  name: z.ZodString;
11
- summary: z.ZodString;
11
+ summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
12
  url: z.ZodString;
13
- published: z.ZodString;
13
+ published: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
14
  publicKey: z.ZodObject<{
15
15
  id: z.ZodString;
16
16
  owner: z.ZodString;
@@ -31,7 +31,7 @@ export declare const Person: z.ZodObject<{
31
31
  }, {
32
32
  sharedInbox?: string | undefined;
33
33
  }>>;
34
- icon: z.ZodOptional<z.ZodObject<{
34
+ icon: z.ZodOptional<z.ZodNullable<z.ZodObject<{
35
35
  type: z.ZodLiteral<"Image">;
36
36
  mediaType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
37
  url: z.ZodString;
@@ -43,8 +43,8 @@ export declare const Person: z.ZodObject<{
43
43
  type: "Image";
44
44
  url: string;
45
45
  mediaType?: string | null | undefined;
46
- }>>;
47
- image: z.ZodOptional<z.ZodObject<{
46
+ }>>>;
47
+ image: z.ZodOptional<z.ZodNullable<z.ZodObject<{
48
48
  type: z.ZodLiteral<"Image">;
49
49
  mediaType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
50
  url: z.ZodString;
@@ -56,14 +56,12 @@ export declare const Person: z.ZodObject<{
56
56
  type: "Image";
57
57
  url: string;
58
58
  mediaType?: string | null | undefined;
59
- }>>;
59
+ }>>>;
60
60
  }, "strip", z.ZodTypeAny, {
61
61
  id: string;
62
62
  type: "Person";
63
- published: string;
64
63
  url: string;
65
64
  name: string;
66
- summary: string;
67
65
  following: string;
68
66
  followers: string;
69
67
  inbox: string;
@@ -74,11 +72,13 @@ export declare const Person: z.ZodObject<{
74
72
  owner: string;
75
73
  publicKeyPem: string;
76
74
  };
75
+ published?: string | null | undefined;
77
76
  icon?: {
78
77
  type: "Image";
79
78
  url: string;
80
79
  mediaType?: string | null | undefined;
81
- } | undefined;
80
+ } | null | undefined;
81
+ summary?: string | null | undefined;
82
82
  endpoints?: {
83
83
  sharedInbox?: string | undefined;
84
84
  } | undefined;
@@ -86,14 +86,12 @@ export declare const Person: z.ZodObject<{
86
86
  type: "Image";
87
87
  url: string;
88
88
  mediaType?: string | null | undefined;
89
- } | undefined;
89
+ } | null | undefined;
90
90
  }, {
91
91
  id: string;
92
92
  type: "Person";
93
- published: string;
94
93
  url: string;
95
94
  name: string;
96
- summary: string;
97
95
  following: string;
98
96
  followers: string;
99
97
  inbox: string;
@@ -104,11 +102,13 @@ export declare const Person: z.ZodObject<{
104
102
  owner: string;
105
103
  publicKeyPem: string;
106
104
  };
105
+ published?: string | null | undefined;
107
106
  icon?: {
108
107
  type: "Image";
109
108
  url: string;
110
109
  mediaType?: string | null | undefined;
111
- } | undefined;
110
+ } | null | undefined;
111
+ summary?: string | null | undefined;
112
112
  endpoints?: {
113
113
  sharedInbox?: string | undefined;
114
114
  } | undefined;
@@ -116,6 +116,6 @@ export declare const Person: z.ZodObject<{
116
116
  type: "Image";
117
117
  url: string;
118
118
  mediaType?: string | null | undefined;
119
- } | undefined;
119
+ } | null | undefined;
120
120
  }>;
121
121
  export type Person = z.infer<typeof Person>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llun/activities.schema",
3
- "version": "0.2.27",
3
+ "version": "0.2.29",
4
4
  "description": "Validate ActivityPub and Mastodon with Zod",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/person.ts CHANGED
@@ -10,9 +10,9 @@ export const Person = z.object({
10
10
  outbox: z.string().url(),
11
11
  preferredUsername: z.string(),
12
12
  name: z.string(),
13
- summary: z.string(),
13
+ summary: z.string().nullish(),
14
14
  url: z.string().url(),
15
- published: z.string(),
15
+ published: z.string().nullish(),
16
16
  publicKey: z.object({
17
17
  id: z.string(),
18
18
  owner: z.string(),
@@ -23,7 +23,7 @@ export const Person = z.object({
23
23
  sharedInbox: z.string().optional(),
24
24
  })
25
25
  .optional(),
26
- icon: Image.optional(),
27
- image: Image.optional(),
26
+ icon: Image.nullish(),
27
+ image: Image.nullish(),
28
28
  });
29
29
  export type Person = z.infer<typeof Person>;