@llun/activities.schema 0.2.6 → 0.2.8
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/cjs/note/baseContent.js +9 -10
- package/dist/cjs/note/tag.js +7 -0
- package/dist/esm/note/baseContent.js +9 -10
- package/dist/esm/note/tag.js +4 -0
- package/dist/types/like.d.ts +141 -42
- package/dist/types/note/baseContent.d.ts +99 -26
- package/dist/types/note/tag.d.ts +50 -0
- package/dist/types/note.d.ts +99 -26
- package/dist/types/undo.d.ts +183 -58
- package/package.json +1 -1
- package/src/note/baseContent.ts +9 -10
- package/src/note/tag.ts +6 -0
|
@@ -3,25 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.BaseContent = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const attachment_js_1 = require("./attachment.js");
|
|
6
|
-
const
|
|
7
|
-
const mention_js_1 = require("./mention.js");
|
|
6
|
+
const tag_js_1 = require("./tag.js");
|
|
8
7
|
exports.BaseContent = zod_1.z.object({
|
|
9
8
|
id: zod_1.z.string(),
|
|
10
9
|
url: zod_1.z.string({ description: "Note URL" }),
|
|
11
10
|
attributedTo: zod_1.z.string({ description: "Note publisher" }),
|
|
12
11
|
to: zod_1.z.union([zod_1.z.string(), zod_1.z.string().array()]),
|
|
13
12
|
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" }).
|
|
13
|
+
inReplyTo: zod_1.z.string().nullish(),
|
|
14
|
+
summary: zod_1.z.string({ description: "Note short summary" }).nullish(),
|
|
16
15
|
summaryMap: zod_1.z
|
|
17
16
|
.record(zod_1.z.string(), { description: "Note short summary in each locale" })
|
|
18
|
-
.
|
|
17
|
+
.nullish(),
|
|
19
18
|
content: zod_1.z
|
|
20
19
|
.union([
|
|
21
20
|
zod_1.z.string({ description: "Note content" }),
|
|
22
21
|
zod_1.z.string({ description: "Note content in array from Wordpress" }).array(),
|
|
23
22
|
])
|
|
24
|
-
.
|
|
23
|
+
.nullish(),
|
|
25
24
|
contentMap: zod_1.z
|
|
26
25
|
.union([
|
|
27
26
|
zod_1.z.record(zod_1.z.string(), { description: "Note content in each locale" }),
|
|
@@ -31,9 +30,9 @@ exports.BaseContent = zod_1.z.object({
|
|
|
31
30
|
})
|
|
32
31
|
.array(),
|
|
33
32
|
])
|
|
34
|
-
.
|
|
35
|
-
attachment: zod_1.z.union([attachment_js_1.Attachment, attachment_js_1.Attachment.array()]).
|
|
36
|
-
tag: zod_1.z.union([
|
|
33
|
+
.nullish(),
|
|
34
|
+
attachment: zod_1.z.union([attachment_js_1.Attachment, attachment_js_1.Attachment.array()]).nullish(),
|
|
35
|
+
tag: zod_1.z.union([tag_js_1.Tag, tag_js_1.Tag.array()]),
|
|
37
36
|
published: zod_1.z.string({ description: "Object published datetime" }),
|
|
38
|
-
updated: zod_1.z.string({ description: "Object updated datetime" }).
|
|
37
|
+
updated: zod_1.z.string({ description: "Object updated datetime" }).nullish(),
|
|
39
38
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Tag = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const emoji_js_1 = require("./emoji.js");
|
|
6
|
+
const mention_js_1 = require("./mention.js");
|
|
7
|
+
exports.Tag = zod_1.z.union([mention_js_1.Mention, emoji_js_1.Emoji]);
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { Attachment } from "./attachment.js";
|
|
3
|
-
import {
|
|
4
|
-
import { Mention } from "./mention.js";
|
|
3
|
+
import { Tag } from "./tag.js";
|
|
5
4
|
export const BaseContent = z.object({
|
|
6
5
|
id: z.string(),
|
|
7
6
|
url: z.string({ description: "Note URL" }),
|
|
8
7
|
attributedTo: z.string({ description: "Note publisher" }),
|
|
9
8
|
to: z.union([z.string(), z.string().array()]),
|
|
10
9
|
cc: z.union([z.string(), z.string().array()]),
|
|
11
|
-
inReplyTo: z.string().
|
|
12
|
-
summary: z.string({ description: "Note short summary" }).
|
|
10
|
+
inReplyTo: z.string().nullish(),
|
|
11
|
+
summary: z.string({ description: "Note short summary" }).nullish(),
|
|
13
12
|
summaryMap: z
|
|
14
13
|
.record(z.string(), { description: "Note short summary in each locale" })
|
|
15
|
-
.
|
|
14
|
+
.nullish(),
|
|
16
15
|
content: z
|
|
17
16
|
.union([
|
|
18
17
|
z.string({ description: "Note content" }),
|
|
19
18
|
z.string({ description: "Note content in array from Wordpress" }).array(),
|
|
20
19
|
])
|
|
21
|
-
.
|
|
20
|
+
.nullish(),
|
|
22
21
|
contentMap: z
|
|
23
22
|
.union([
|
|
24
23
|
z.record(z.string(), { description: "Note content in each locale" }),
|
|
@@ -28,9 +27,9 @@ export const BaseContent = z.object({
|
|
|
28
27
|
})
|
|
29
28
|
.array(),
|
|
30
29
|
])
|
|
31
|
-
.
|
|
32
|
-
attachment: z.union([Attachment, Attachment.array()]).
|
|
33
|
-
tag: z.union([
|
|
30
|
+
.nullish(),
|
|
31
|
+
attachment: z.union([Attachment, Attachment.array()]).nullish(),
|
|
32
|
+
tag: z.union([Tag, Tag.array()]),
|
|
34
33
|
published: z.string({ description: "Object published datetime" }),
|
|
35
|
-
updated: z.string({ description: "Object updated datetime" }).
|
|
34
|
+
updated: z.string({ description: "Object updated datetime" }).nullish(),
|
|
36
35
|
});
|
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.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]
|
|
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,8 +92,8 @@ 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">]
|
|
96
|
-
tag: z.
|
|
95
|
+
}>]>, "many">]>>>;
|
|
96
|
+
tag: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
97
97
|
type: z.ZodLiteral<"Mention">;
|
|
98
98
|
href: z.ZodString;
|
|
99
99
|
name: z.ZodString;
|
|
@@ -140,9 +140,56 @@ export declare const Like: z.ZodObject<{
|
|
|
140
140
|
mediaType: string;
|
|
141
141
|
url: string;
|
|
142
142
|
};
|
|
143
|
-
}>]>,
|
|
143
|
+
}>]>, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<"Mention">;
|
|
145
|
+
href: z.ZodString;
|
|
146
|
+
name: z.ZodString;
|
|
147
|
+
}, "strip", z.ZodTypeAny, {
|
|
148
|
+
type: "Mention";
|
|
149
|
+
name: string;
|
|
150
|
+
href: string;
|
|
151
|
+
}, {
|
|
152
|
+
type: "Mention";
|
|
153
|
+
name: string;
|
|
154
|
+
href: string;
|
|
155
|
+
}>, z.ZodObject<{
|
|
156
|
+
type: z.ZodLiteral<"Emoji">;
|
|
157
|
+
name: z.ZodString;
|
|
158
|
+
updated: z.ZodString;
|
|
159
|
+
icon: z.ZodObject<{
|
|
160
|
+
type: z.ZodLiteral<"Image">;
|
|
161
|
+
mediaType: z.ZodString;
|
|
162
|
+
url: z.ZodString;
|
|
163
|
+
}, "strip", z.ZodTypeAny, {
|
|
164
|
+
type: "Image";
|
|
165
|
+
mediaType: string;
|
|
166
|
+
url: string;
|
|
167
|
+
}, {
|
|
168
|
+
type: "Image";
|
|
169
|
+
mediaType: string;
|
|
170
|
+
url: string;
|
|
171
|
+
}>;
|
|
172
|
+
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
type: "Emoji";
|
|
174
|
+
name: string;
|
|
175
|
+
updated: string;
|
|
176
|
+
icon: {
|
|
177
|
+
type: "Image";
|
|
178
|
+
mediaType: string;
|
|
179
|
+
url: string;
|
|
180
|
+
};
|
|
181
|
+
}, {
|
|
182
|
+
type: "Emoji";
|
|
183
|
+
name: string;
|
|
184
|
+
updated: string;
|
|
185
|
+
icon: {
|
|
186
|
+
type: "Image";
|
|
187
|
+
mediaType: string;
|
|
188
|
+
url: string;
|
|
189
|
+
};
|
|
190
|
+
}>]>, "many">]>;
|
|
144
191
|
published: z.ZodString;
|
|
145
|
-
updated: z.ZodOptional<z.ZodString
|
|
192
|
+
updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
146
193
|
}, {
|
|
147
194
|
type: z.ZodLiteral<"Note">;
|
|
148
195
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -153,8 +200,20 @@ export declare const Like: z.ZodObject<{
|
|
|
153
200
|
cc: string | string[];
|
|
154
201
|
url: string;
|
|
155
202
|
attributedTo: string;
|
|
156
|
-
|
|
157
|
-
|
|
203
|
+
tag: {
|
|
204
|
+
type: "Emoji";
|
|
205
|
+
name: string;
|
|
206
|
+
updated: string;
|
|
207
|
+
icon: {
|
|
208
|
+
type: "Image";
|
|
209
|
+
mediaType: string;
|
|
210
|
+
url: string;
|
|
211
|
+
};
|
|
212
|
+
} | {
|
|
213
|
+
type: "Mention";
|
|
214
|
+
name: string;
|
|
215
|
+
href: string;
|
|
216
|
+
} | ({
|
|
158
217
|
type: "Emoji";
|
|
159
218
|
name: string;
|
|
160
219
|
updated: string;
|
|
@@ -168,11 +227,12 @@ export declare const Like: z.ZodObject<{
|
|
|
168
227
|
name: string;
|
|
169
228
|
href: string;
|
|
170
229
|
})[];
|
|
171
|
-
updated?: string | undefined;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
230
|
+
updated?: string | null | undefined;
|
|
231
|
+
inReplyTo?: string | null | undefined;
|
|
232
|
+
summary?: string | null | undefined;
|
|
233
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
234
|
+
content?: string | string[] | null | undefined;
|
|
235
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
176
236
|
attachment?: {
|
|
177
237
|
type: "Document";
|
|
178
238
|
mediaType: string;
|
|
@@ -199,7 +259,7 @@ export declare const Like: z.ZodObject<{
|
|
|
199
259
|
type: "PropertyValue";
|
|
200
260
|
value: string;
|
|
201
261
|
name: string;
|
|
202
|
-
})[] | undefined;
|
|
262
|
+
})[] | null | undefined;
|
|
203
263
|
}, {
|
|
204
264
|
id: string;
|
|
205
265
|
type: "Note";
|
|
@@ -208,8 +268,20 @@ export declare const Like: z.ZodObject<{
|
|
|
208
268
|
cc: string | string[];
|
|
209
269
|
url: string;
|
|
210
270
|
attributedTo: string;
|
|
211
|
-
|
|
212
|
-
|
|
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
|
+
} | ({
|
|
213
285
|
type: "Emoji";
|
|
214
286
|
name: string;
|
|
215
287
|
updated: string;
|
|
@@ -223,11 +295,12 @@ export declare const Like: z.ZodObject<{
|
|
|
223
295
|
name: string;
|
|
224
296
|
href: string;
|
|
225
297
|
})[];
|
|
226
|
-
updated?: string | undefined;
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
298
|
+
updated?: string | null | undefined;
|
|
299
|
+
inReplyTo?: string | null | undefined;
|
|
300
|
+
summary?: string | null | undefined;
|
|
301
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
302
|
+
content?: string | string[] | null | undefined;
|
|
303
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
231
304
|
attachment?: {
|
|
232
305
|
type: "Document";
|
|
233
306
|
mediaType: string;
|
|
@@ -254,7 +327,7 @@ export declare const Like: z.ZodObject<{
|
|
|
254
327
|
type: "PropertyValue";
|
|
255
328
|
value: string;
|
|
256
329
|
name: string;
|
|
257
|
-
})[] | undefined;
|
|
330
|
+
})[] | null | undefined;
|
|
258
331
|
}>]>;
|
|
259
332
|
}, "strip", z.ZodTypeAny, {
|
|
260
333
|
object: string | {
|
|
@@ -265,8 +338,20 @@ export declare const Like: z.ZodObject<{
|
|
|
265
338
|
cc: string | string[];
|
|
266
339
|
url: string;
|
|
267
340
|
attributedTo: string;
|
|
268
|
-
|
|
269
|
-
|
|
341
|
+
tag: {
|
|
342
|
+
type: "Emoji";
|
|
343
|
+
name: string;
|
|
344
|
+
updated: string;
|
|
345
|
+
icon: {
|
|
346
|
+
type: "Image";
|
|
347
|
+
mediaType: string;
|
|
348
|
+
url: string;
|
|
349
|
+
};
|
|
350
|
+
} | {
|
|
351
|
+
type: "Mention";
|
|
352
|
+
name: string;
|
|
353
|
+
href: string;
|
|
354
|
+
} | ({
|
|
270
355
|
type: "Emoji";
|
|
271
356
|
name: string;
|
|
272
357
|
updated: string;
|
|
@@ -280,11 +365,12 @@ export declare const Like: z.ZodObject<{
|
|
|
280
365
|
name: string;
|
|
281
366
|
href: string;
|
|
282
367
|
})[];
|
|
283
|
-
updated?: string | undefined;
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
368
|
+
updated?: string | null | undefined;
|
|
369
|
+
inReplyTo?: string | null | undefined;
|
|
370
|
+
summary?: string | null | undefined;
|
|
371
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
372
|
+
content?: string | string[] | null | undefined;
|
|
373
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
288
374
|
attachment?: {
|
|
289
375
|
type: "Document";
|
|
290
376
|
mediaType: string;
|
|
@@ -311,7 +397,7 @@ export declare const Like: z.ZodObject<{
|
|
|
311
397
|
type: "PropertyValue";
|
|
312
398
|
value: string;
|
|
313
399
|
name: string;
|
|
314
|
-
})[] | undefined;
|
|
400
|
+
})[] | null | undefined;
|
|
315
401
|
};
|
|
316
402
|
id: string;
|
|
317
403
|
type: "Like";
|
|
@@ -325,8 +411,20 @@ export declare const Like: z.ZodObject<{
|
|
|
325
411
|
cc: string | string[];
|
|
326
412
|
url: string;
|
|
327
413
|
attributedTo: string;
|
|
328
|
-
|
|
329
|
-
|
|
414
|
+
tag: {
|
|
415
|
+
type: "Emoji";
|
|
416
|
+
name: string;
|
|
417
|
+
updated: string;
|
|
418
|
+
icon: {
|
|
419
|
+
type: "Image";
|
|
420
|
+
mediaType: string;
|
|
421
|
+
url: string;
|
|
422
|
+
};
|
|
423
|
+
} | {
|
|
424
|
+
type: "Mention";
|
|
425
|
+
name: string;
|
|
426
|
+
href: string;
|
|
427
|
+
} | ({
|
|
330
428
|
type: "Emoji";
|
|
331
429
|
name: string;
|
|
332
430
|
updated: string;
|
|
@@ -340,11 +438,12 @@ export declare const Like: z.ZodObject<{
|
|
|
340
438
|
name: string;
|
|
341
439
|
href: string;
|
|
342
440
|
})[];
|
|
343
|
-
updated?: string | undefined;
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
441
|
+
updated?: string | null | undefined;
|
|
442
|
+
inReplyTo?: string | null | undefined;
|
|
443
|
+
summary?: string | null | undefined;
|
|
444
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
445
|
+
content?: string | string[] | null | undefined;
|
|
446
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
348
447
|
attachment?: {
|
|
349
448
|
type: "Document";
|
|
350
449
|
mediaType: string;
|
|
@@ -371,7 +470,7 @@ export declare const Like: z.ZodObject<{
|
|
|
371
470
|
type: "PropertyValue";
|
|
372
471
|
value: string;
|
|
373
472
|
name: string;
|
|
374
|
-
})[] | undefined;
|
|
473
|
+
})[] | null | undefined;
|
|
375
474
|
};
|
|
376
475
|
id: string;
|
|
377
476
|
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.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]
|
|
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,8 +88,8 @@ 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">]
|
|
92
|
-
tag: z.
|
|
91
|
+
}>]>, "many">]>>>;
|
|
92
|
+
tag: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
93
93
|
type: z.ZodLiteral<"Mention">;
|
|
94
94
|
href: z.ZodString;
|
|
95
95
|
name: z.ZodString;
|
|
@@ -136,9 +136,56 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
136
136
|
mediaType: string;
|
|
137
137
|
url: string;
|
|
138
138
|
};
|
|
139
|
-
}>]>,
|
|
139
|
+
}>]>, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<"Mention">;
|
|
141
|
+
href: z.ZodString;
|
|
142
|
+
name: z.ZodString;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
type: "Mention";
|
|
145
|
+
name: string;
|
|
146
|
+
href: string;
|
|
147
|
+
}, {
|
|
148
|
+
type: "Mention";
|
|
149
|
+
name: string;
|
|
150
|
+
href: string;
|
|
151
|
+
}>, z.ZodObject<{
|
|
152
|
+
type: z.ZodLiteral<"Emoji">;
|
|
153
|
+
name: z.ZodString;
|
|
154
|
+
updated: z.ZodString;
|
|
155
|
+
icon: z.ZodObject<{
|
|
156
|
+
type: z.ZodLiteral<"Image">;
|
|
157
|
+
mediaType: z.ZodString;
|
|
158
|
+
url: z.ZodString;
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
|
+
type: "Image";
|
|
161
|
+
mediaType: string;
|
|
162
|
+
url: string;
|
|
163
|
+
}, {
|
|
164
|
+
type: "Image";
|
|
165
|
+
mediaType: string;
|
|
166
|
+
url: string;
|
|
167
|
+
}>;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
type: "Emoji";
|
|
170
|
+
name: string;
|
|
171
|
+
updated: string;
|
|
172
|
+
icon: {
|
|
173
|
+
type: "Image";
|
|
174
|
+
mediaType: string;
|
|
175
|
+
url: string;
|
|
176
|
+
};
|
|
177
|
+
}, {
|
|
178
|
+
type: "Emoji";
|
|
179
|
+
name: string;
|
|
180
|
+
updated: string;
|
|
181
|
+
icon: {
|
|
182
|
+
type: "Image";
|
|
183
|
+
mediaType: string;
|
|
184
|
+
url: string;
|
|
185
|
+
};
|
|
186
|
+
}>]>, "many">]>;
|
|
140
187
|
published: z.ZodString;
|
|
141
|
-
updated: z.ZodOptional<z.ZodString
|
|
188
|
+
updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
189
|
}, "strip", z.ZodTypeAny, {
|
|
143
190
|
id: string;
|
|
144
191
|
published: string;
|
|
@@ -146,8 +193,20 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
146
193
|
cc: string | string[];
|
|
147
194
|
url: string;
|
|
148
195
|
attributedTo: string;
|
|
149
|
-
|
|
150
|
-
|
|
196
|
+
tag: {
|
|
197
|
+
type: "Emoji";
|
|
198
|
+
name: string;
|
|
199
|
+
updated: string;
|
|
200
|
+
icon: {
|
|
201
|
+
type: "Image";
|
|
202
|
+
mediaType: string;
|
|
203
|
+
url: string;
|
|
204
|
+
};
|
|
205
|
+
} | {
|
|
206
|
+
type: "Mention";
|
|
207
|
+
name: string;
|
|
208
|
+
href: string;
|
|
209
|
+
} | ({
|
|
151
210
|
type: "Emoji";
|
|
152
211
|
name: string;
|
|
153
212
|
updated: string;
|
|
@@ -161,11 +220,12 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
161
220
|
name: string;
|
|
162
221
|
href: string;
|
|
163
222
|
})[];
|
|
164
|
-
updated?: string | undefined;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
223
|
+
updated?: string | null | undefined;
|
|
224
|
+
inReplyTo?: string | null | undefined;
|
|
225
|
+
summary?: string | null | undefined;
|
|
226
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
227
|
+
content?: string | string[] | null | undefined;
|
|
228
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
169
229
|
attachment?: {
|
|
170
230
|
type: "Document";
|
|
171
231
|
mediaType: string;
|
|
@@ -192,7 +252,7 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
192
252
|
type: "PropertyValue";
|
|
193
253
|
value: string;
|
|
194
254
|
name: string;
|
|
195
|
-
})[] | undefined;
|
|
255
|
+
})[] | null | undefined;
|
|
196
256
|
}, {
|
|
197
257
|
id: string;
|
|
198
258
|
published: string;
|
|
@@ -200,8 +260,20 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
200
260
|
cc: string | string[];
|
|
201
261
|
url: string;
|
|
202
262
|
attributedTo: string;
|
|
203
|
-
|
|
204
|
-
|
|
263
|
+
tag: {
|
|
264
|
+
type: "Emoji";
|
|
265
|
+
name: string;
|
|
266
|
+
updated: string;
|
|
267
|
+
icon: {
|
|
268
|
+
type: "Image";
|
|
269
|
+
mediaType: string;
|
|
270
|
+
url: string;
|
|
271
|
+
};
|
|
272
|
+
} | {
|
|
273
|
+
type: "Mention";
|
|
274
|
+
name: string;
|
|
275
|
+
href: string;
|
|
276
|
+
} | ({
|
|
205
277
|
type: "Emoji";
|
|
206
278
|
name: string;
|
|
207
279
|
updated: string;
|
|
@@ -215,11 +287,12 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
215
287
|
name: string;
|
|
216
288
|
href: string;
|
|
217
289
|
})[];
|
|
218
|
-
updated?: string | undefined;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
290
|
+
updated?: string | null | undefined;
|
|
291
|
+
inReplyTo?: string | null | undefined;
|
|
292
|
+
summary?: string | null | undefined;
|
|
293
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
294
|
+
content?: string | string[] | null | undefined;
|
|
295
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
223
296
|
attachment?: {
|
|
224
297
|
type: "Document";
|
|
225
298
|
mediaType: string;
|
|
@@ -246,6 +319,6 @@ export declare const BaseContent: z.ZodObject<{
|
|
|
246
319
|
type: "PropertyValue";
|
|
247
320
|
value: string;
|
|
248
321
|
name: string;
|
|
249
|
-
})[] | undefined;
|
|
322
|
+
})[] | null | undefined;
|
|
250
323
|
}>;
|
|
251
324
|
export type BaseContent = z.infer<typeof BaseContent>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const Tag: z.ZodUnion<[z.ZodObject<{
|
|
3
|
+
type: z.ZodLiteral<"Mention">;
|
|
4
|
+
href: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
type: "Mention";
|
|
8
|
+
name: string;
|
|
9
|
+
href: string;
|
|
10
|
+
}, {
|
|
11
|
+
type: "Mention";
|
|
12
|
+
name: string;
|
|
13
|
+
href: string;
|
|
14
|
+
}>, z.ZodObject<{
|
|
15
|
+
type: z.ZodLiteral<"Emoji">;
|
|
16
|
+
name: z.ZodString;
|
|
17
|
+
updated: z.ZodString;
|
|
18
|
+
icon: z.ZodObject<{
|
|
19
|
+
type: z.ZodLiteral<"Image">;
|
|
20
|
+
mediaType: z.ZodString;
|
|
21
|
+
url: z.ZodString;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
type: "Image";
|
|
24
|
+
mediaType: string;
|
|
25
|
+
url: string;
|
|
26
|
+
}, {
|
|
27
|
+
type: "Image";
|
|
28
|
+
mediaType: string;
|
|
29
|
+
url: string;
|
|
30
|
+
}>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
type: "Emoji";
|
|
33
|
+
name: string;
|
|
34
|
+
updated: string;
|
|
35
|
+
icon: {
|
|
36
|
+
type: "Image";
|
|
37
|
+
mediaType: string;
|
|
38
|
+
url: string;
|
|
39
|
+
};
|
|
40
|
+
}, {
|
|
41
|
+
type: "Emoji";
|
|
42
|
+
name: string;
|
|
43
|
+
updated: string;
|
|
44
|
+
icon: {
|
|
45
|
+
type: "Image";
|
|
46
|
+
mediaType: string;
|
|
47
|
+
url: string;
|
|
48
|
+
};
|
|
49
|
+
}>]>;
|
|
50
|
+
export type Tag = z.infer<typeof Tag>;
|
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.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]
|
|
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,8 +88,8 @@ 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">]
|
|
92
|
-
tag: z.
|
|
91
|
+
}>]>, "many">]>>>;
|
|
92
|
+
tag: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
93
93
|
type: z.ZodLiteral<"Mention">;
|
|
94
94
|
href: z.ZodString;
|
|
95
95
|
name: z.ZodString;
|
|
@@ -136,9 +136,56 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
136
136
|
mediaType: string;
|
|
137
137
|
url: string;
|
|
138
138
|
};
|
|
139
|
-
}>]>,
|
|
139
|
+
}>]>, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<"Mention">;
|
|
141
|
+
href: z.ZodString;
|
|
142
|
+
name: z.ZodString;
|
|
143
|
+
}, "strip", z.ZodTypeAny, {
|
|
144
|
+
type: "Mention";
|
|
145
|
+
name: string;
|
|
146
|
+
href: string;
|
|
147
|
+
}, {
|
|
148
|
+
type: "Mention";
|
|
149
|
+
name: string;
|
|
150
|
+
href: string;
|
|
151
|
+
}>, z.ZodObject<{
|
|
152
|
+
type: z.ZodLiteral<"Emoji">;
|
|
153
|
+
name: z.ZodString;
|
|
154
|
+
updated: z.ZodString;
|
|
155
|
+
icon: z.ZodObject<{
|
|
156
|
+
type: z.ZodLiteral<"Image">;
|
|
157
|
+
mediaType: z.ZodString;
|
|
158
|
+
url: z.ZodString;
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
|
+
type: "Image";
|
|
161
|
+
mediaType: string;
|
|
162
|
+
url: string;
|
|
163
|
+
}, {
|
|
164
|
+
type: "Image";
|
|
165
|
+
mediaType: string;
|
|
166
|
+
url: string;
|
|
167
|
+
}>;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
type: "Emoji";
|
|
170
|
+
name: string;
|
|
171
|
+
updated: string;
|
|
172
|
+
icon: {
|
|
173
|
+
type: "Image";
|
|
174
|
+
mediaType: string;
|
|
175
|
+
url: string;
|
|
176
|
+
};
|
|
177
|
+
}, {
|
|
178
|
+
type: "Emoji";
|
|
179
|
+
name: string;
|
|
180
|
+
updated: string;
|
|
181
|
+
icon: {
|
|
182
|
+
type: "Image";
|
|
183
|
+
mediaType: string;
|
|
184
|
+
url: string;
|
|
185
|
+
};
|
|
186
|
+
}>]>, "many">]>;
|
|
140
187
|
published: z.ZodString;
|
|
141
|
-
updated: z.ZodOptional<z.ZodString
|
|
188
|
+
updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
189
|
}, {
|
|
143
190
|
type: z.ZodLiteral<"Note">;
|
|
144
191
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -149,8 +196,20 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
149
196
|
cc: string | string[];
|
|
150
197
|
url: string;
|
|
151
198
|
attributedTo: string;
|
|
152
|
-
|
|
153
|
-
|
|
199
|
+
tag: {
|
|
200
|
+
type: "Emoji";
|
|
201
|
+
name: string;
|
|
202
|
+
updated: string;
|
|
203
|
+
icon: {
|
|
204
|
+
type: "Image";
|
|
205
|
+
mediaType: string;
|
|
206
|
+
url: string;
|
|
207
|
+
};
|
|
208
|
+
} | {
|
|
209
|
+
type: "Mention";
|
|
210
|
+
name: string;
|
|
211
|
+
href: string;
|
|
212
|
+
} | ({
|
|
154
213
|
type: "Emoji";
|
|
155
214
|
name: string;
|
|
156
215
|
updated: string;
|
|
@@ -164,11 +223,12 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
164
223
|
name: string;
|
|
165
224
|
href: string;
|
|
166
225
|
})[];
|
|
167
|
-
updated?: string | undefined;
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
226
|
+
updated?: string | null | undefined;
|
|
227
|
+
inReplyTo?: string | null | undefined;
|
|
228
|
+
summary?: string | null | undefined;
|
|
229
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
230
|
+
content?: string | string[] | null | undefined;
|
|
231
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
172
232
|
attachment?: {
|
|
173
233
|
type: "Document";
|
|
174
234
|
mediaType: string;
|
|
@@ -195,7 +255,7 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
195
255
|
type: "PropertyValue";
|
|
196
256
|
value: string;
|
|
197
257
|
name: string;
|
|
198
|
-
})[] | undefined;
|
|
258
|
+
})[] | null | undefined;
|
|
199
259
|
}, {
|
|
200
260
|
id: string;
|
|
201
261
|
type: "Note";
|
|
@@ -204,8 +264,20 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
204
264
|
cc: string | string[];
|
|
205
265
|
url: string;
|
|
206
266
|
attributedTo: string;
|
|
207
|
-
|
|
208
|
-
|
|
267
|
+
tag: {
|
|
268
|
+
type: "Emoji";
|
|
269
|
+
name: string;
|
|
270
|
+
updated: string;
|
|
271
|
+
icon: {
|
|
272
|
+
type: "Image";
|
|
273
|
+
mediaType: string;
|
|
274
|
+
url: string;
|
|
275
|
+
};
|
|
276
|
+
} | {
|
|
277
|
+
type: "Mention";
|
|
278
|
+
name: string;
|
|
279
|
+
href: string;
|
|
280
|
+
} | ({
|
|
209
281
|
type: "Emoji";
|
|
210
282
|
name: string;
|
|
211
283
|
updated: string;
|
|
@@ -219,11 +291,12 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
219
291
|
name: string;
|
|
220
292
|
href: string;
|
|
221
293
|
})[];
|
|
222
|
-
updated?: string | undefined;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
294
|
+
updated?: string | null | undefined;
|
|
295
|
+
inReplyTo?: string | null | undefined;
|
|
296
|
+
summary?: string | null | undefined;
|
|
297
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
298
|
+
content?: string | string[] | null | undefined;
|
|
299
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
227
300
|
attachment?: {
|
|
228
301
|
type: "Document";
|
|
229
302
|
mediaType: string;
|
|
@@ -250,6 +323,6 @@ export declare const Note: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
250
323
|
type: "PropertyValue";
|
|
251
324
|
value: string;
|
|
252
325
|
name: string;
|
|
253
|
-
})[] | undefined;
|
|
326
|
+
})[] | null | undefined;
|
|
254
327
|
}>;
|
|
255
328
|
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.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]
|
|
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,8 +96,8 @@ 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">]
|
|
100
|
-
tag: z.
|
|
99
|
+
}>]>, "many">]>>>;
|
|
100
|
+
tag: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
|
|
101
101
|
type: z.ZodLiteral<"Mention">;
|
|
102
102
|
href: z.ZodString;
|
|
103
103
|
name: z.ZodString;
|
|
@@ -144,9 +144,56 @@ export declare const Undo: z.ZodObject<{
|
|
|
144
144
|
mediaType: string;
|
|
145
145
|
url: string;
|
|
146
146
|
};
|
|
147
|
-
}>]>,
|
|
147
|
+
}>]>, z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
148
|
+
type: z.ZodLiteral<"Mention">;
|
|
149
|
+
href: z.ZodString;
|
|
150
|
+
name: z.ZodString;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
type: "Mention";
|
|
153
|
+
name: string;
|
|
154
|
+
href: string;
|
|
155
|
+
}, {
|
|
156
|
+
type: "Mention";
|
|
157
|
+
name: string;
|
|
158
|
+
href: string;
|
|
159
|
+
}>, z.ZodObject<{
|
|
160
|
+
type: z.ZodLiteral<"Emoji">;
|
|
161
|
+
name: z.ZodString;
|
|
162
|
+
updated: z.ZodString;
|
|
163
|
+
icon: z.ZodObject<{
|
|
164
|
+
type: z.ZodLiteral<"Image">;
|
|
165
|
+
mediaType: z.ZodString;
|
|
166
|
+
url: z.ZodString;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
type: "Image";
|
|
169
|
+
mediaType: string;
|
|
170
|
+
url: string;
|
|
171
|
+
}, {
|
|
172
|
+
type: "Image";
|
|
173
|
+
mediaType: string;
|
|
174
|
+
url: string;
|
|
175
|
+
}>;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
type: "Emoji";
|
|
178
|
+
name: string;
|
|
179
|
+
updated: string;
|
|
180
|
+
icon: {
|
|
181
|
+
type: "Image";
|
|
182
|
+
mediaType: string;
|
|
183
|
+
url: string;
|
|
184
|
+
};
|
|
185
|
+
}, {
|
|
186
|
+
type: "Emoji";
|
|
187
|
+
name: string;
|
|
188
|
+
updated: string;
|
|
189
|
+
icon: {
|
|
190
|
+
type: "Image";
|
|
191
|
+
mediaType: string;
|
|
192
|
+
url: string;
|
|
193
|
+
};
|
|
194
|
+
}>]>, "many">]>;
|
|
148
195
|
published: z.ZodString;
|
|
149
|
-
updated: z.ZodOptional<z.ZodString
|
|
196
|
+
updated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
150
197
|
}, {
|
|
151
198
|
type: z.ZodLiteral<"Note">;
|
|
152
199
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -157,8 +204,20 @@ export declare const Undo: z.ZodObject<{
|
|
|
157
204
|
cc: string | string[];
|
|
158
205
|
url: string;
|
|
159
206
|
attributedTo: string;
|
|
160
|
-
|
|
161
|
-
|
|
207
|
+
tag: {
|
|
208
|
+
type: "Emoji";
|
|
209
|
+
name: string;
|
|
210
|
+
updated: string;
|
|
211
|
+
icon: {
|
|
212
|
+
type: "Image";
|
|
213
|
+
mediaType: string;
|
|
214
|
+
url: string;
|
|
215
|
+
};
|
|
216
|
+
} | {
|
|
217
|
+
type: "Mention";
|
|
218
|
+
name: string;
|
|
219
|
+
href: string;
|
|
220
|
+
} | ({
|
|
162
221
|
type: "Emoji";
|
|
163
222
|
name: string;
|
|
164
223
|
updated: string;
|
|
@@ -172,11 +231,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
172
231
|
name: string;
|
|
173
232
|
href: string;
|
|
174
233
|
})[];
|
|
175
|
-
updated?: string | undefined;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
234
|
+
updated?: string | null | undefined;
|
|
235
|
+
inReplyTo?: string | null | undefined;
|
|
236
|
+
summary?: string | null | undefined;
|
|
237
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
238
|
+
content?: string | string[] | null | undefined;
|
|
239
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
180
240
|
attachment?: {
|
|
181
241
|
type: "Document";
|
|
182
242
|
mediaType: string;
|
|
@@ -203,7 +263,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
203
263
|
type: "PropertyValue";
|
|
204
264
|
value: string;
|
|
205
265
|
name: string;
|
|
206
|
-
})[] | undefined;
|
|
266
|
+
})[] | null | undefined;
|
|
207
267
|
}, {
|
|
208
268
|
id: string;
|
|
209
269
|
type: "Note";
|
|
@@ -212,8 +272,20 @@ export declare const Undo: z.ZodObject<{
|
|
|
212
272
|
cc: string | string[];
|
|
213
273
|
url: string;
|
|
214
274
|
attributedTo: string;
|
|
215
|
-
|
|
216
|
-
|
|
275
|
+
tag: {
|
|
276
|
+
type: "Emoji";
|
|
277
|
+
name: string;
|
|
278
|
+
updated: string;
|
|
279
|
+
icon: {
|
|
280
|
+
type: "Image";
|
|
281
|
+
mediaType: string;
|
|
282
|
+
url: string;
|
|
283
|
+
};
|
|
284
|
+
} | {
|
|
285
|
+
type: "Mention";
|
|
286
|
+
name: string;
|
|
287
|
+
href: string;
|
|
288
|
+
} | ({
|
|
217
289
|
type: "Emoji";
|
|
218
290
|
name: string;
|
|
219
291
|
updated: string;
|
|
@@ -227,11 +299,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
227
299
|
name: string;
|
|
228
300
|
href: string;
|
|
229
301
|
})[];
|
|
230
|
-
updated?: string | undefined;
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
302
|
+
updated?: string | null | undefined;
|
|
303
|
+
inReplyTo?: string | null | undefined;
|
|
304
|
+
summary?: string | null | undefined;
|
|
305
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
306
|
+
content?: string | string[] | null | undefined;
|
|
307
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
235
308
|
attachment?: {
|
|
236
309
|
type: "Document";
|
|
237
310
|
mediaType: string;
|
|
@@ -258,7 +331,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
258
331
|
type: "PropertyValue";
|
|
259
332
|
value: string;
|
|
260
333
|
name: string;
|
|
261
|
-
})[] | undefined;
|
|
334
|
+
})[] | null | undefined;
|
|
262
335
|
}>]>;
|
|
263
336
|
}, "strip", z.ZodTypeAny, {
|
|
264
337
|
object: string | {
|
|
@@ -269,8 +342,20 @@ export declare const Undo: z.ZodObject<{
|
|
|
269
342
|
cc: string | string[];
|
|
270
343
|
url: string;
|
|
271
344
|
attributedTo: string;
|
|
272
|
-
|
|
273
|
-
|
|
345
|
+
tag: {
|
|
346
|
+
type: "Emoji";
|
|
347
|
+
name: string;
|
|
348
|
+
updated: string;
|
|
349
|
+
icon: {
|
|
350
|
+
type: "Image";
|
|
351
|
+
mediaType: string;
|
|
352
|
+
url: string;
|
|
353
|
+
};
|
|
354
|
+
} | {
|
|
355
|
+
type: "Mention";
|
|
356
|
+
name: string;
|
|
357
|
+
href: string;
|
|
358
|
+
} | ({
|
|
274
359
|
type: "Emoji";
|
|
275
360
|
name: string;
|
|
276
361
|
updated: string;
|
|
@@ -284,11 +369,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
284
369
|
name: string;
|
|
285
370
|
href: string;
|
|
286
371
|
})[];
|
|
287
|
-
updated?: string | undefined;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
372
|
+
updated?: string | null | undefined;
|
|
373
|
+
inReplyTo?: string | null | undefined;
|
|
374
|
+
summary?: string | null | undefined;
|
|
375
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
376
|
+
content?: string | string[] | null | undefined;
|
|
377
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
292
378
|
attachment?: {
|
|
293
379
|
type: "Document";
|
|
294
380
|
mediaType: string;
|
|
@@ -315,7 +401,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
315
401
|
type: "PropertyValue";
|
|
316
402
|
value: string;
|
|
317
403
|
name: string;
|
|
318
|
-
})[] | undefined;
|
|
404
|
+
})[] | null | undefined;
|
|
319
405
|
};
|
|
320
406
|
id: string;
|
|
321
407
|
type: "Like";
|
|
@@ -329,8 +415,20 @@ export declare const Undo: z.ZodObject<{
|
|
|
329
415
|
cc: string | string[];
|
|
330
416
|
url: string;
|
|
331
417
|
attributedTo: string;
|
|
332
|
-
|
|
333
|
-
|
|
418
|
+
tag: {
|
|
419
|
+
type: "Emoji";
|
|
420
|
+
name: string;
|
|
421
|
+
updated: string;
|
|
422
|
+
icon: {
|
|
423
|
+
type: "Image";
|
|
424
|
+
mediaType: string;
|
|
425
|
+
url: string;
|
|
426
|
+
};
|
|
427
|
+
} | {
|
|
428
|
+
type: "Mention";
|
|
429
|
+
name: string;
|
|
430
|
+
href: string;
|
|
431
|
+
} | ({
|
|
334
432
|
type: "Emoji";
|
|
335
433
|
name: string;
|
|
336
434
|
updated: string;
|
|
@@ -344,11 +442,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
344
442
|
name: string;
|
|
345
443
|
href: string;
|
|
346
444
|
})[];
|
|
347
|
-
updated?: string | undefined;
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
445
|
+
updated?: string | null | undefined;
|
|
446
|
+
inReplyTo?: string | null | undefined;
|
|
447
|
+
summary?: string | null | undefined;
|
|
448
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
449
|
+
content?: string | string[] | null | undefined;
|
|
450
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
352
451
|
attachment?: {
|
|
353
452
|
type: "Document";
|
|
354
453
|
mediaType: string;
|
|
@@ -375,7 +474,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
375
474
|
type: "PropertyValue";
|
|
376
475
|
value: string;
|
|
377
476
|
name: string;
|
|
378
|
-
})[] | undefined;
|
|
477
|
+
})[] | null | undefined;
|
|
379
478
|
};
|
|
380
479
|
id: string;
|
|
381
480
|
type: "Like";
|
|
@@ -411,8 +510,20 @@ export declare const Undo: z.ZodObject<{
|
|
|
411
510
|
cc: string | string[];
|
|
412
511
|
url: string;
|
|
413
512
|
attributedTo: string;
|
|
414
|
-
|
|
415
|
-
|
|
513
|
+
tag: {
|
|
514
|
+
type: "Emoji";
|
|
515
|
+
name: string;
|
|
516
|
+
updated: string;
|
|
517
|
+
icon: {
|
|
518
|
+
type: "Image";
|
|
519
|
+
mediaType: string;
|
|
520
|
+
url: string;
|
|
521
|
+
};
|
|
522
|
+
} | {
|
|
523
|
+
type: "Mention";
|
|
524
|
+
name: string;
|
|
525
|
+
href: string;
|
|
526
|
+
} | ({
|
|
416
527
|
type: "Emoji";
|
|
417
528
|
name: string;
|
|
418
529
|
updated: string;
|
|
@@ -426,11 +537,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
426
537
|
name: string;
|
|
427
538
|
href: string;
|
|
428
539
|
})[];
|
|
429
|
-
updated?: string | undefined;
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
540
|
+
updated?: string | null | undefined;
|
|
541
|
+
inReplyTo?: string | null | undefined;
|
|
542
|
+
summary?: string | null | undefined;
|
|
543
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
544
|
+
content?: string | string[] | null | undefined;
|
|
545
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
434
546
|
attachment?: {
|
|
435
547
|
type: "Document";
|
|
436
548
|
mediaType: string;
|
|
@@ -457,7 +569,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
457
569
|
type: "PropertyValue";
|
|
458
570
|
value: string;
|
|
459
571
|
name: string;
|
|
460
|
-
})[] | undefined;
|
|
572
|
+
})[] | null | undefined;
|
|
461
573
|
};
|
|
462
574
|
id: string;
|
|
463
575
|
type: "Like";
|
|
@@ -481,8 +593,20 @@ export declare const Undo: z.ZodObject<{
|
|
|
481
593
|
cc: string | string[];
|
|
482
594
|
url: string;
|
|
483
595
|
attributedTo: string;
|
|
484
|
-
|
|
485
|
-
|
|
596
|
+
tag: {
|
|
597
|
+
type: "Emoji";
|
|
598
|
+
name: string;
|
|
599
|
+
updated: string;
|
|
600
|
+
icon: {
|
|
601
|
+
type: "Image";
|
|
602
|
+
mediaType: string;
|
|
603
|
+
url: string;
|
|
604
|
+
};
|
|
605
|
+
} | {
|
|
606
|
+
type: "Mention";
|
|
607
|
+
name: string;
|
|
608
|
+
href: string;
|
|
609
|
+
} | ({
|
|
486
610
|
type: "Emoji";
|
|
487
611
|
name: string;
|
|
488
612
|
updated: string;
|
|
@@ -496,11 +620,12 @@ export declare const Undo: z.ZodObject<{
|
|
|
496
620
|
name: string;
|
|
497
621
|
href: string;
|
|
498
622
|
})[];
|
|
499
|
-
updated?: string | undefined;
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
623
|
+
updated?: string | null | undefined;
|
|
624
|
+
inReplyTo?: string | null | undefined;
|
|
625
|
+
summary?: string | null | undefined;
|
|
626
|
+
summaryMap?: Record<string, string> | null | undefined;
|
|
627
|
+
content?: string | string[] | null | undefined;
|
|
628
|
+
contentMap?: string[] | Record<string, string> | null | undefined;
|
|
504
629
|
attachment?: {
|
|
505
630
|
type: "Document";
|
|
506
631
|
mediaType: string;
|
|
@@ -527,7 +652,7 @@ export declare const Undo: z.ZodObject<{
|
|
|
527
652
|
type: "PropertyValue";
|
|
528
653
|
value: string;
|
|
529
654
|
name: string;
|
|
530
|
-
})[] | undefined;
|
|
655
|
+
})[] | null | undefined;
|
|
531
656
|
};
|
|
532
657
|
id: string;
|
|
533
658
|
type: "Like";
|
package/package.json
CHANGED
package/src/note/baseContent.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { Attachment } from "./attachment.js";
|
|
3
|
-
import {
|
|
4
|
-
import { Mention } from "./mention.js";
|
|
3
|
+
import { Tag } from "./tag.js";
|
|
5
4
|
|
|
6
5
|
export const BaseContent = z.object({
|
|
7
6
|
id: z.string(),
|
|
@@ -11,19 +10,19 @@ export const BaseContent = z.object({
|
|
|
11
10
|
to: z.union([z.string(), z.string().array()]),
|
|
12
11
|
cc: z.union([z.string(), z.string().array()]),
|
|
13
12
|
|
|
14
|
-
inReplyTo: z.string().
|
|
13
|
+
inReplyTo: z.string().nullish(),
|
|
15
14
|
|
|
16
|
-
summary: z.string({ description: "Note short summary" }).
|
|
15
|
+
summary: z.string({ description: "Note short summary" }).nullish(),
|
|
17
16
|
summaryMap: z
|
|
18
17
|
.record(z.string(), { description: "Note short summary in each locale" })
|
|
19
|
-
.
|
|
18
|
+
.nullish(),
|
|
20
19
|
|
|
21
20
|
content: z
|
|
22
21
|
.union([
|
|
23
22
|
z.string({ description: "Note content" }),
|
|
24
23
|
z.string({ description: "Note content in array from Wordpress" }).array(),
|
|
25
24
|
])
|
|
26
|
-
.
|
|
25
|
+
.nullish(),
|
|
27
26
|
contentMap: z
|
|
28
27
|
.union([
|
|
29
28
|
z.record(z.string(), { description: "Note content in each locale" }),
|
|
@@ -34,13 +33,13 @@ export const BaseContent = z.object({
|
|
|
34
33
|
})
|
|
35
34
|
.array(),
|
|
36
35
|
])
|
|
37
|
-
.
|
|
36
|
+
.nullish(),
|
|
38
37
|
|
|
39
|
-
attachment: z.union([Attachment, Attachment.array()]).
|
|
40
|
-
tag: z.union([
|
|
38
|
+
attachment: z.union([Attachment, Attachment.array()]).nullish(),
|
|
39
|
+
tag: z.union([Tag, Tag.array()]),
|
|
41
40
|
|
|
42
41
|
published: z.string({ description: "Object published datetime" }),
|
|
43
|
-
updated: z.string({ description: "Object updated datetime" }).
|
|
42
|
+
updated: z.string({ description: "Object updated datetime" }).nullish(),
|
|
44
43
|
});
|
|
45
44
|
|
|
46
45
|
export type BaseContent = z.infer<typeof BaseContent>;
|