@llun/activities.schema 0.2.5 → 0.2.7
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/.yarn/install-state.gz +0 -0
- package/dist/cjs/note/baseContent.js +17 -9
- package/dist/esm/note/baseContent.js +17 -9
- package/dist/types/like.d.ts +36 -36
- package/dist/types/note/baseContent.d.ts +22 -22
- package/dist/types/note.d.ts +22 -22
- package/dist/types/undo.d.ts +50 -50
- package/package.json +1 -1
- package/src/note/baseContent.ts +18 -9
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
|
@@ -11,21 +11,29 @@ exports.BaseContent = zod_1.z.object({
|
|
|
11
11
|
attributedTo: zod_1.z.string({ description: "Note publisher" }),
|
|
12
12
|
to: zod_1.z.union([zod_1.z.string(), zod_1.z.string().array()]),
|
|
13
13
|
cc: zod_1.z.union([zod_1.z.string(), zod_1.z.string().array()]),
|
|
14
|
-
inReplyTo: zod_1.z.string().
|
|
15
|
-
summary: zod_1.z.string({ description: "Note short summary" }).
|
|
14
|
+
inReplyTo: zod_1.z.string().nullish(),
|
|
15
|
+
summary: zod_1.z.string({ description: "Note short summary" }).nullish(),
|
|
16
16
|
summaryMap: zod_1.z
|
|
17
17
|
.record(zod_1.z.string(), { description: "Note short summary in each locale" })
|
|
18
|
-
.
|
|
19
|
-
content: zod_1.z
|
|
18
|
+
.nullish(),
|
|
19
|
+
content: zod_1.z
|
|
20
|
+
.union([
|
|
21
|
+
zod_1.z.string({ description: "Note content" }),
|
|
22
|
+
zod_1.z.string({ description: "Note content in array from Wordpress" }).array(),
|
|
23
|
+
])
|
|
24
|
+
.nullish(),
|
|
20
25
|
contentMap: zod_1.z
|
|
21
26
|
.union([
|
|
22
27
|
zod_1.z.record(zod_1.z.string(), { description: "Note content in each locale" }),
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
zod_1.z
|
|
29
|
+
.string({
|
|
30
|
+
description: "Some activity pub server use content map as array with content in the first element",
|
|
31
|
+
})
|
|
32
|
+
.array(),
|
|
25
33
|
])
|
|
26
|
-
.
|
|
27
|
-
attachment: zod_1.z.union([attachment_js_1.Attachment, attachment_js_1.Attachment.array()]).
|
|
34
|
+
.nullish(),
|
|
35
|
+
attachment: zod_1.z.union([attachment_js_1.Attachment, attachment_js_1.Attachment.array()]).nullish(),
|
|
28
36
|
tag: zod_1.z.union([mention_js_1.Mention, emoji_js_1.Emoji]).array(),
|
|
29
37
|
published: zod_1.z.string({ description: "Object published datetime" }),
|
|
30
|
-
updated: zod_1.z.string({ description: "Object updated datetime" }).
|
|
38
|
+
updated: zod_1.z.string({ description: "Object updated datetime" }).nullish(),
|
|
31
39
|
});
|
|
@@ -8,21 +8,29 @@ export const BaseContent = z.object({
|
|
|
8
8
|
attributedTo: z.string({ description: "Note publisher" }),
|
|
9
9
|
to: z.union([z.string(), z.string().array()]),
|
|
10
10
|
cc: z.union([z.string(), z.string().array()]),
|
|
11
|
-
inReplyTo: z.string().
|
|
12
|
-
summary: z.string({ description: "Note short summary" }).
|
|
11
|
+
inReplyTo: z.string().nullish(),
|
|
12
|
+
summary: z.string({ description: "Note short summary" }).nullish(),
|
|
13
13
|
summaryMap: z
|
|
14
14
|
.record(z.string(), { description: "Note short summary in each locale" })
|
|
15
|
-
.
|
|
16
|
-
content: z
|
|
15
|
+
.nullish(),
|
|
16
|
+
content: z
|
|
17
|
+
.union([
|
|
18
|
+
z.string({ description: "Note content" }),
|
|
19
|
+
z.string({ description: "Note content in array from Wordpress" }).array(),
|
|
20
|
+
])
|
|
21
|
+
.nullish(),
|
|
17
22
|
contentMap: z
|
|
18
23
|
.union([
|
|
19
24
|
z.record(z.string(), { description: "Note content in each locale" }),
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
z
|
|
26
|
+
.string({
|
|
27
|
+
description: "Some activity pub server use content map as array with content in the first element",
|
|
28
|
+
})
|
|
29
|
+
.array(),
|
|
22
30
|
])
|
|
23
|
-
.
|
|
24
|
-
attachment: z.union([Attachment, Attachment.array()]).
|
|
31
|
+
.nullish(),
|
|
32
|
+
attachment: z.union([Attachment, Attachment.array()]).nullish(),
|
|
25
33
|
tag: z.union([Mention, Emoji]).array(),
|
|
26
34
|
published: z.string({ description: "Object published datetime" }),
|
|
27
|
-
updated: z.string({ description: "Object updated datetime" }).
|
|
35
|
+
updated: z.string({ description: "Object updated datetime" }).nullish(),
|
|
28
36
|
});
|
package/dist/types/like.d.ts
CHANGED
|
@@ -9,12 +9,12 @@ export declare const Like: z.ZodObject<{
|
|
|
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">]>;
|
|
12
|
-
inReplyTo: z.ZodNullable<z.ZodString
|
|
13
|
-
summary: z.ZodOptional<z.ZodString
|
|
14
|
-
summaryMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString
|
|
15
|
-
content: z.ZodOptional<z.ZodString
|
|
16
|
-
contentMap: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]
|
|
17
|
-
attachment: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
12
|
+
inReplyTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
summaryMap: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
15
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
|
|
16
|
+
contentMap: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
17
|
+
attachment: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
18
18
|
type: z.ZodLiteral<"PropertyValue">;
|
|
19
19
|
name: z.ZodString;
|
|
20
20
|
value: z.ZodString;
|
|
@@ -92,7 +92,7 @@ export declare const Like: z.ZodObject<{
|
|
|
92
92
|
height?: number | undefined;
|
|
93
93
|
name?: string | null | undefined;
|
|
94
94
|
focalPoint?: [number, number] | undefined;
|
|
95
|
-
}>]>, "many">]
|
|
95
|
+
}>]>, "many">]>>>;
|
|
96
96
|
tag: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
97
97
|
type: z.ZodLiteral<"Mention">;
|
|
98
98
|
href: z.ZodString;
|
|
@@ -142,7 +142,7 @@ export declare const Like: z.ZodObject<{
|
|
|
142
142
|
};
|
|
143
143
|
}>]>, "many">;
|
|
144
144
|
published: z.ZodString;
|
|
145
|
-
updated: z.ZodOptional<z.ZodString
|
|
145
|
+
updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
146
146
|
}, {
|
|
147
147
|
type: z.ZodLiteral<"Note">;
|
|
148
148
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -153,7 +153,6 @@ export declare const Like: z.ZodObject<{
|
|
|
153
153
|
cc: string | string[];
|
|
154
154
|
url: string;
|
|
155
155
|
attributedTo: string;
|
|
156
|
-
inReplyTo: string | null;
|
|
157
156
|
tag: ({
|
|
158
157
|
type: "Emoji";
|
|
159
158
|
name: string;
|
|
@@ -168,11 +167,12 @@ export declare const Like: z.ZodObject<{
|
|
|
168
167
|
name: string;
|
|
169
168
|
href: string;
|
|
170
169
|
})[];
|
|
171
|
-
updated?: string | undefined;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
170
|
+
updated?: string | null | undefined;
|
|
171
|
+
inReplyTo?: string | null | undefined;
|
|
172
|
+
summary?: string | null | undefined;
|
|
173
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
174
|
+
content?: string | string[] | null | undefined;
|
|
175
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
176
176
|
attachment?: {
|
|
177
177
|
type: "Document";
|
|
178
178
|
mediaType: string;
|
|
@@ -199,7 +199,7 @@ export declare const Like: z.ZodObject<{
|
|
|
199
199
|
type: "PropertyValue";
|
|
200
200
|
value: string;
|
|
201
201
|
name: string;
|
|
202
|
-
})[] | undefined;
|
|
202
|
+
})[] | null | undefined;
|
|
203
203
|
}, {
|
|
204
204
|
id: string;
|
|
205
205
|
type: "Note";
|
|
@@ -208,7 +208,6 @@ export declare const Like: z.ZodObject<{
|
|
|
208
208
|
cc: string | string[];
|
|
209
209
|
url: string;
|
|
210
210
|
attributedTo: string;
|
|
211
|
-
inReplyTo: string | null;
|
|
212
211
|
tag: ({
|
|
213
212
|
type: "Emoji";
|
|
214
213
|
name: string;
|
|
@@ -223,11 +222,12 @@ export declare const Like: z.ZodObject<{
|
|
|
223
222
|
name: string;
|
|
224
223
|
href: string;
|
|
225
224
|
})[];
|
|
226
|
-
updated?: string | undefined;
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
225
|
+
updated?: string | null | undefined;
|
|
226
|
+
inReplyTo?: string | null | undefined;
|
|
227
|
+
summary?: string | null | undefined;
|
|
228
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
229
|
+
content?: string | string[] | null | undefined;
|
|
230
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
231
231
|
attachment?: {
|
|
232
232
|
type: "Document";
|
|
233
233
|
mediaType: string;
|
|
@@ -254,7 +254,7 @@ export declare const Like: z.ZodObject<{
|
|
|
254
254
|
type: "PropertyValue";
|
|
255
255
|
value: string;
|
|
256
256
|
name: string;
|
|
257
|
-
})[] | undefined;
|
|
257
|
+
})[] | null | undefined;
|
|
258
258
|
}>]>;
|
|
259
259
|
}, "strip", z.ZodTypeAny, {
|
|
260
260
|
object: string | {
|
|
@@ -265,7 +265,6 @@ export declare const Like: z.ZodObject<{
|
|
|
265
265
|
cc: string | string[];
|
|
266
266
|
url: string;
|
|
267
267
|
attributedTo: string;
|
|
268
|
-
inReplyTo: string | null;
|
|
269
268
|
tag: ({
|
|
270
269
|
type: "Emoji";
|
|
271
270
|
name: string;
|
|
@@ -280,11 +279,12 @@ export declare const Like: z.ZodObject<{
|
|
|
280
279
|
name: string;
|
|
281
280
|
href: string;
|
|
282
281
|
})[];
|
|
283
|
-
updated?: string | undefined;
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
282
|
+
updated?: string | null | undefined;
|
|
283
|
+
inReplyTo?: string | null | undefined;
|
|
284
|
+
summary?: string | null | undefined;
|
|
285
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
286
|
+
content?: string | string[] | null | undefined;
|
|
287
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
288
288
|
attachment?: {
|
|
289
289
|
type: "Document";
|
|
290
290
|
mediaType: string;
|
|
@@ -311,7 +311,7 @@ export declare const Like: z.ZodObject<{
|
|
|
311
311
|
type: "PropertyValue";
|
|
312
312
|
value: string;
|
|
313
313
|
name: string;
|
|
314
|
-
})[] | undefined;
|
|
314
|
+
})[] | null | undefined;
|
|
315
315
|
};
|
|
316
316
|
id: string;
|
|
317
317
|
type: "Like";
|
|
@@ -325,7 +325,6 @@ export declare const Like: z.ZodObject<{
|
|
|
325
325
|
cc: string | string[];
|
|
326
326
|
url: string;
|
|
327
327
|
attributedTo: string;
|
|
328
|
-
inReplyTo: string | null;
|
|
329
328
|
tag: ({
|
|
330
329
|
type: "Emoji";
|
|
331
330
|
name: string;
|
|
@@ -340,11 +339,12 @@ export declare const Like: z.ZodObject<{
|
|
|
340
339
|
name: string;
|
|
341
340
|
href: string;
|
|
342
341
|
})[];
|
|
343
|
-
updated?: string | undefined;
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
342
|
+
updated?: string | null | undefined;
|
|
343
|
+
inReplyTo?: string | null | undefined;
|
|
344
|
+
summary?: string | null | undefined;
|
|
345
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
346
|
+
content?: string | string[] | null | undefined;
|
|
347
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
348
348
|
attachment?: {
|
|
349
349
|
type: "Document";
|
|
350
350
|
mediaType: string;
|
|
@@ -371,7 +371,7 @@ export declare const Like: z.ZodObject<{
|
|
|
371
371
|
type: "PropertyValue";
|
|
372
372
|
value: string;
|
|
373
373
|
name: string;
|
|
374
|
-
})[] | undefined;
|
|
374
|
+
})[] | null | undefined;
|
|
375
375
|
};
|
|
376
376
|
id: string;
|
|
377
377
|
type: "Like";
|
|
@@ -5,12 +5,12 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
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">]>;
|
|
8
|
-
inReplyTo: z.ZodNullable<z.ZodString
|
|
9
|
-
summary: z.ZodOptional<z.ZodString
|
|
10
|
-
summaryMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString
|
|
11
|
-
content: z.ZodOptional<z.ZodString
|
|
12
|
-
contentMap: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]
|
|
13
|
-
attachment: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
8
|
+
inReplyTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
summaryMap: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
11
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
|
|
12
|
+
contentMap: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
13
|
+
attachment: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
14
14
|
type: z.ZodLiteral<"PropertyValue">;
|
|
15
15
|
name: z.ZodString;
|
|
16
16
|
value: z.ZodString;
|
|
@@ -88,7 +88,7 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
88
88
|
height?: number | undefined;
|
|
89
89
|
name?: string | null | undefined;
|
|
90
90
|
focalPoint?: [number, number] | undefined;
|
|
91
|
-
}>]>, "many">]
|
|
91
|
+
}>]>, "many">]>>>;
|
|
92
92
|
tag: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
93
93
|
type: z.ZodLiteral<"Mention">;
|
|
94
94
|
href: z.ZodString;
|
|
@@ -138,7 +138,7 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
138
138
|
};
|
|
139
139
|
}>]>, "many">;
|
|
140
140
|
published: z.ZodString;
|
|
141
|
-
updated: z.ZodOptional<z.ZodString
|
|
141
|
+
updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
142
|
}, "strip", z.ZodTypeAny, {
|
|
143
143
|
id: string;
|
|
144
144
|
published: string;
|
|
@@ -146,7 +146,6 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
146
146
|
cc: string | string[];
|
|
147
147
|
url: string;
|
|
148
148
|
attributedTo: string;
|
|
149
|
-
inReplyTo: string | null;
|
|
150
149
|
tag: ({
|
|
151
150
|
type: "Emoji";
|
|
152
151
|
name: string;
|
|
@@ -161,11 +160,12 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
161
160
|
name: string;
|
|
162
161
|
href: string;
|
|
163
162
|
})[];
|
|
164
|
-
updated?: string | undefined;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
163
|
+
updated?: string | null | undefined;
|
|
164
|
+
inReplyTo?: string | null | undefined;
|
|
165
|
+
summary?: string | null | undefined;
|
|
166
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
167
|
+
content?: string | string[] | null | undefined;
|
|
168
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
169
169
|
attachment?: {
|
|
170
170
|
type: "Document";
|
|
171
171
|
mediaType: string;
|
|
@@ -192,7 +192,7 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
192
192
|
type: "PropertyValue";
|
|
193
193
|
value: string;
|
|
194
194
|
name: string;
|
|
195
|
-
})[] | undefined;
|
|
195
|
+
})[] | null | undefined;
|
|
196
196
|
}, {
|
|
197
197
|
id: string;
|
|
198
198
|
published: string;
|
|
@@ -200,7 +200,6 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
200
200
|
cc: string | string[];
|
|
201
201
|
url: string;
|
|
202
202
|
attributedTo: string;
|
|
203
|
-
inReplyTo: string | null;
|
|
204
203
|
tag: ({
|
|
205
204
|
type: "Emoji";
|
|
206
205
|
name: string;
|
|
@@ -215,11 +214,12 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
215
214
|
name: string;
|
|
216
215
|
href: string;
|
|
217
216
|
})[];
|
|
218
|
-
updated?: string | undefined;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
217
|
+
updated?: string | null | undefined;
|
|
218
|
+
inReplyTo?: string | null | undefined;
|
|
219
|
+
summary?: string | null | undefined;
|
|
220
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
221
|
+
content?: string | string[] | null | undefined;
|
|
222
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
223
223
|
attachment?: {
|
|
224
224
|
type: "Document";
|
|
225
225
|
mediaType: string;
|
|
@@ -246,6 +246,6 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
246
246
|
type: "PropertyValue";
|
|
247
247
|
value: string;
|
|
248
248
|
name: string;
|
|
249
|
-
})[] | undefined;
|
|
249
|
+
})[] | null | undefined;
|
|
250
250
|
}>;
|
|
251
251
|
export type BaseContent = z.infer<typeof BaseContent>;
|
package/dist/types/note.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
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">]>;
|
|
8
|
-
inReplyTo: z.ZodNullable<z.ZodString
|
|
9
|
-
summary: z.ZodOptional<z.ZodString
|
|
10
|
-
summaryMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString
|
|
11
|
-
content: z.ZodOptional<z.ZodString
|
|
12
|
-
contentMap: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]
|
|
13
|
-
attachment: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
8
|
+
inReplyTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
summaryMap: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
11
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
|
|
12
|
+
contentMap: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
13
|
+
attachment: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
14
14
|
type: z.ZodLiteral<"PropertyValue">;
|
|
15
15
|
name: z.ZodString;
|
|
16
16
|
value: z.ZodString;
|
|
@@ -88,7 +88,7 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
88
88
|
height?: number | undefined;
|
|
89
89
|
name?: string | null | undefined;
|
|
90
90
|
focalPoint?: [number, number] | undefined;
|
|
91
|
-
}>]>, "many">]
|
|
91
|
+
}>]>, "many">]>>>;
|
|
92
92
|
tag: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
93
93
|
type: z.ZodLiteral<"Mention">;
|
|
94
94
|
href: z.ZodString;
|
|
@@ -138,7 +138,7 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
138
138
|
};
|
|
139
139
|
}>]>, "many">;
|
|
140
140
|
published: z.ZodString;
|
|
141
|
-
updated: z.ZodOptional<z.ZodString
|
|
141
|
+
updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
142
|
}, {
|
|
143
143
|
type: z.ZodLiteral<"Note">;
|
|
144
144
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -149,7 +149,6 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
149
149
|
cc: string | string[];
|
|
150
150
|
url: string;
|
|
151
151
|
attributedTo: string;
|
|
152
|
-
inReplyTo: string | null;
|
|
153
152
|
tag: ({
|
|
154
153
|
type: "Emoji";
|
|
155
154
|
name: string;
|
|
@@ -164,11 +163,12 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
164
163
|
name: string;
|
|
165
164
|
href: string;
|
|
166
165
|
})[];
|
|
167
|
-
updated?: string | undefined;
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
166
|
+
updated?: string | null | undefined;
|
|
167
|
+
inReplyTo?: string | null | undefined;
|
|
168
|
+
summary?: string | null | undefined;
|
|
169
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
170
|
+
content?: string | string[] | null | undefined;
|
|
171
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
172
172
|
attachment?: {
|
|
173
173
|
type: "Document";
|
|
174
174
|
mediaType: string;
|
|
@@ -195,7 +195,7 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
195
195
|
type: "PropertyValue";
|
|
196
196
|
value: string;
|
|
197
197
|
name: string;
|
|
198
|
-
})[] | undefined;
|
|
198
|
+
})[] | null | undefined;
|
|
199
199
|
}, {
|
|
200
200
|
id: string;
|
|
201
201
|
type: "Note";
|
|
@@ -204,7 +204,6 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
204
204
|
cc: string | string[];
|
|
205
205
|
url: string;
|
|
206
206
|
attributedTo: string;
|
|
207
|
-
inReplyTo: string | null;
|
|
208
207
|
tag: ({
|
|
209
208
|
type: "Emoji";
|
|
210
209
|
name: string;
|
|
@@ -219,11 +218,12 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
219
218
|
name: string;
|
|
220
219
|
href: string;
|
|
221
220
|
})[];
|
|
222
|
-
updated?: string | undefined;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
221
|
+
updated?: string | null | undefined;
|
|
222
|
+
inReplyTo?: string | null | undefined;
|
|
223
|
+
summary?: string | null | undefined;
|
|
224
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
225
|
+
content?: string | string[] | null | undefined;
|
|
226
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
227
227
|
attachment?: {
|
|
228
228
|
type: "Document";
|
|
229
229
|
mediaType: string;
|
|
@@ -250,6 +250,6 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
250
250
|
type: "PropertyValue";
|
|
251
251
|
value: string;
|
|
252
252
|
name: string;
|
|
253
|
-
})[] | undefined;
|
|
253
|
+
})[] | null | undefined;
|
|
254
254
|
}>;
|
|
255
255
|
export type Note = z.infer<typeof Note>;
|
package/dist/types/undo.d.ts
CHANGED
|
@@ -13,12 +13,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
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">]>;
|
|
16
|
-
inReplyTo: z.ZodNullable<z.ZodString
|
|
17
|
-
summary: z.ZodOptional<z.ZodString
|
|
18
|
-
summaryMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString
|
|
19
|
-
content: z.ZodOptional<z.ZodString
|
|
20
|
-
contentMap: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]
|
|
21
|
-
attachment: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
16
|
+
inReplyTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
|
+
summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
summaryMap: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
19
|
+
content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
|
|
20
|
+
contentMap: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodString>, z.ZodArray<z.ZodString, "many">]>>>;
|
|
21
|
+
attachment: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
22
22
|
type: z.ZodLiteral<"PropertyValue">;
|
|
23
23
|
name: z.ZodString;
|
|
24
24
|
value: z.ZodString;
|
|
@@ -96,7 +96,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
96
96
|
height?: number | undefined;
|
|
97
97
|
name?: string | null | undefined;
|
|
98
98
|
focalPoint?: [number, number] | undefined;
|
|
99
|
-
}>]>, "many">]
|
|
99
|
+
}>]>, "many">]>>>;
|
|
100
100
|
tag: z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
101
101
|
type: z.ZodLiteral<"Mention">;
|
|
102
102
|
href: z.ZodString;
|
|
@@ -146,7 +146,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
146
146
|
};
|
|
147
147
|
}>]>, "many">;
|
|
148
148
|
published: z.ZodString;
|
|
149
|
-
updated: z.ZodOptional<z.ZodString
|
|
149
|
+
updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
150
150
|
}, {
|
|
151
151
|
type: z.ZodLiteral<"Note">;
|
|
152
152
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -157,7 +157,6 @@ export declare const Undo: z.ZodObject<{
|
|
|
157
157
|
cc: string | string[];
|
|
158
158
|
url: string;
|
|
159
159
|
attributedTo: string;
|
|
160
|
-
inReplyTo: string | null;
|
|
161
160
|
tag: ({
|
|
162
161
|
type: "Emoji";
|
|
163
162
|
name: string;
|
|
@@ -172,11 +171,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
172
171
|
name: string;
|
|
173
172
|
href: string;
|
|
174
173
|
})[];
|
|
175
|
-
updated?: string | undefined;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
174
|
+
updated?: string | null | undefined;
|
|
175
|
+
inReplyTo?: string | null | undefined;
|
|
176
|
+
summary?: string | null | undefined;
|
|
177
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
178
|
+
content?: string | string[] | null | undefined;
|
|
179
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
180
180
|
attachment?: {
|
|
181
181
|
type: "Document";
|
|
182
182
|
mediaType: string;
|
|
@@ -203,7 +203,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
203
203
|
type: "PropertyValue";
|
|
204
204
|
value: string;
|
|
205
205
|
name: string;
|
|
206
|
-
})[] | undefined;
|
|
206
|
+
})[] | null | undefined;
|
|
207
207
|
}, {
|
|
208
208
|
id: string;
|
|
209
209
|
type: "Note";
|
|
@@ -212,7 +212,6 @@ export declare const Undo: z.ZodObject<{
|
|
|
212
212
|
cc: string | string[];
|
|
213
213
|
url: string;
|
|
214
214
|
attributedTo: string;
|
|
215
|
-
inReplyTo: string | null;
|
|
216
215
|
tag: ({
|
|
217
216
|
type: "Emoji";
|
|
218
217
|
name: string;
|
|
@@ -227,11 +226,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
227
226
|
name: string;
|
|
228
227
|
href: string;
|
|
229
228
|
})[];
|
|
230
|
-
updated?: string | undefined;
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
229
|
+
updated?: string | null | undefined;
|
|
230
|
+
inReplyTo?: string | null | undefined;
|
|
231
|
+
summary?: string | null | undefined;
|
|
232
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
233
|
+
content?: string | string[] | null | undefined;
|
|
234
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
235
235
|
attachment?: {
|
|
236
236
|
type: "Document";
|
|
237
237
|
mediaType: string;
|
|
@@ -258,7 +258,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
258
258
|
type: "PropertyValue";
|
|
259
259
|
value: string;
|
|
260
260
|
name: string;
|
|
261
|
-
})[] | undefined;
|
|
261
|
+
})[] | null | undefined;
|
|
262
262
|
}>]>;
|
|
263
263
|
}, "strip", z.ZodTypeAny, {
|
|
264
264
|
object: string | {
|
|
@@ -269,7 +269,6 @@ export declare const Undo: z.ZodObject<{
|
|
|
269
269
|
cc: string | string[];
|
|
270
270
|
url: string;
|
|
271
271
|
attributedTo: string;
|
|
272
|
-
inReplyTo: string | null;
|
|
273
272
|
tag: ({
|
|
274
273
|
type: "Emoji";
|
|
275
274
|
name: string;
|
|
@@ -284,11 +283,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
284
283
|
name: string;
|
|
285
284
|
href: string;
|
|
286
285
|
})[];
|
|
287
|
-
updated?: string | undefined;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
286
|
+
updated?: string | null | undefined;
|
|
287
|
+
inReplyTo?: string | null | undefined;
|
|
288
|
+
summary?: string | null | undefined;
|
|
289
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
290
|
+
content?: string | string[] | null | undefined;
|
|
291
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
292
292
|
attachment?: {
|
|
293
293
|
type: "Document";
|
|
294
294
|
mediaType: string;
|
|
@@ -315,7 +315,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
315
315
|
type: "PropertyValue";
|
|
316
316
|
value: string;
|
|
317
317
|
name: string;
|
|
318
|
-
})[] | undefined;
|
|
318
|
+
})[] | null | undefined;
|
|
319
319
|
};
|
|
320
320
|
id: string;
|
|
321
321
|
type: "Like";
|
|
@@ -329,7 +329,6 @@ export declare const Undo: z.ZodObject<{
|
|
|
329
329
|
cc: string | string[];
|
|
330
330
|
url: string;
|
|
331
331
|
attributedTo: string;
|
|
332
|
-
inReplyTo: string | null;
|
|
333
332
|
tag: ({
|
|
334
333
|
type: "Emoji";
|
|
335
334
|
name: string;
|
|
@@ -344,11 +343,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
344
343
|
name: string;
|
|
345
344
|
href: string;
|
|
346
345
|
})[];
|
|
347
|
-
updated?: string | undefined;
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
346
|
+
updated?: string | null | undefined;
|
|
347
|
+
inReplyTo?: string | null | undefined;
|
|
348
|
+
summary?: string | null | undefined;
|
|
349
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
350
|
+
content?: string | string[] | null | undefined;
|
|
351
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
352
352
|
attachment?: {
|
|
353
353
|
type: "Document";
|
|
354
354
|
mediaType: string;
|
|
@@ -375,7 +375,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
375
375
|
type: "PropertyValue";
|
|
376
376
|
value: string;
|
|
377
377
|
name: string;
|
|
378
|
-
})[] | undefined;
|
|
378
|
+
})[] | null | undefined;
|
|
379
379
|
};
|
|
380
380
|
id: string;
|
|
381
381
|
type: "Like";
|
|
@@ -411,7 +411,6 @@ export declare const Undo: z.ZodObject<{
|
|
|
411
411
|
cc: string | string[];
|
|
412
412
|
url: string;
|
|
413
413
|
attributedTo: string;
|
|
414
|
-
inReplyTo: string | null;
|
|
415
414
|
tag: ({
|
|
416
415
|
type: "Emoji";
|
|
417
416
|
name: string;
|
|
@@ -426,11 +425,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
426
425
|
name: string;
|
|
427
426
|
href: string;
|
|
428
427
|
})[];
|
|
429
|
-
updated?: string | undefined;
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
428
|
+
updated?: string | null | undefined;
|
|
429
|
+
inReplyTo?: string | null | undefined;
|
|
430
|
+
summary?: string | null | undefined;
|
|
431
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
432
|
+
content?: string | string[] | null | undefined;
|
|
433
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
434
434
|
attachment?: {
|
|
435
435
|
type: "Document";
|
|
436
436
|
mediaType: string;
|
|
@@ -457,7 +457,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
457
457
|
type: "PropertyValue";
|
|
458
458
|
value: string;
|
|
459
459
|
name: string;
|
|
460
|
-
})[] | undefined;
|
|
460
|
+
})[] | null | undefined;
|
|
461
461
|
};
|
|
462
462
|
id: string;
|
|
463
463
|
type: "Like";
|
|
@@ -481,7 +481,6 @@ export declare const Undo: z.ZodObject<{
|
|
|
481
481
|
cc: string | string[];
|
|
482
482
|
url: string;
|
|
483
483
|
attributedTo: string;
|
|
484
|
-
inReplyTo: string | null;
|
|
485
484
|
tag: ({
|
|
486
485
|
type: "Emoji";
|
|
487
486
|
name: string;
|
|
@@ -496,11 +495,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
496
495
|
name: string;
|
|
497
496
|
href: string;
|
|
498
497
|
})[];
|
|
499
|
-
updated?: string | undefined;
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
498
|
+
updated?: string | null | undefined;
|
|
499
|
+
inReplyTo?: string | null | undefined;
|
|
500
|
+
summary?: string | null | undefined;
|
|
501
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
502
|
+
content?: string | string[] | null | undefined;
|
|
503
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
504
504
|
attachment?: {
|
|
505
505
|
type: "Document";
|
|
506
506
|
mediaType: string;
|
|
@@ -527,7 +527,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
527
527
|
type: "PropertyValue";
|
|
528
528
|
value: string;
|
|
529
529
|
name: string;
|
|
530
|
-
})[] | undefined;
|
|
530
|
+
})[] | null | undefined;
|
|
531
531
|
};
|
|
532
532
|
id: string;
|
|
533
533
|
type: "Like";
|
package/package.json
CHANGED
package/src/note/baseContent.ts
CHANGED
|
@@ -11,27 +11,36 @@ export const BaseContent = z.object({
|
|
|
11
11
|
to: z.union([z.string(), z.string().array()]),
|
|
12
12
|
cc: z.union([z.string(), z.string().array()]),
|
|
13
13
|
|
|
14
|
-
inReplyTo: z.string().
|
|
14
|
+
inReplyTo: z.string().nullish(),
|
|
15
15
|
|
|
16
|
-
summary: z.string({ description: "Note short summary" }).
|
|
16
|
+
summary: z.string({ description: "Note short summary" }).nullish(),
|
|
17
17
|
summaryMap: z
|
|
18
18
|
.record(z.string(), { description: "Note short summary in each locale" })
|
|
19
|
-
.
|
|
19
|
+
.nullish(),
|
|
20
20
|
|
|
21
|
-
content: z
|
|
21
|
+
content: z
|
|
22
|
+
.union([
|
|
23
|
+
z.string({ description: "Note content" }),
|
|
24
|
+
z.string({ description: "Note content in array from Wordpress" }).array(),
|
|
25
|
+
])
|
|
26
|
+
.nullish(),
|
|
22
27
|
contentMap: z
|
|
23
28
|
.union([
|
|
24
29
|
z.record(z.string(), { description: "Note content in each locale" }),
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
z
|
|
31
|
+
.string({
|
|
32
|
+
description:
|
|
33
|
+
"Some activity pub server use content map as array with content in the first element",
|
|
34
|
+
})
|
|
35
|
+
.array(),
|
|
27
36
|
])
|
|
28
|
-
.
|
|
37
|
+
.nullish(),
|
|
29
38
|
|
|
30
|
-
attachment: z.union([Attachment, Attachment.array()]).
|
|
39
|
+
attachment: z.union([Attachment, Attachment.array()]).nullish(),
|
|
31
40
|
tag: z.union([Mention, Emoji]).array(),
|
|
32
41
|
|
|
33
42
|
published: z.string({ description: "Object published datetime" }),
|
|
34
|
-
updated: z.string({ description: "Object updated datetime" }).
|
|
43
|
+
updated: z.string({ description: "Object updated datetime" }).nullish(),
|
|
35
44
|
});
|
|
36
45
|
|
|
37
46
|
export type BaseContent = z.infer<typeof BaseContent>;
|