@llun/activities.schema 0.0.4 → 0.0.6

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.
Binary file
package/.yarnrc.yml ADDED
@@ -0,0 +1 @@
1
+ nodeLinker: node-modules
@@ -0,0 +1,43 @@
1
+ import { z } from "zod";
2
+ export declare const Accept: z.ZodObject<{
3
+ id: z.ZodString;
4
+ actor: z.ZodString;
5
+ type: z.ZodLiteral<"Accept">;
6
+ object: z.ZodObject<{
7
+ id: z.ZodString;
8
+ type: z.ZodLiteral<"Follow">;
9
+ actor: z.ZodString;
10
+ object: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ object: string;
13
+ id: string;
14
+ type: "Follow";
15
+ actor: string;
16
+ }, {
17
+ object: string;
18
+ id: string;
19
+ type: "Follow";
20
+ actor: string;
21
+ }>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ object: {
24
+ object: string;
25
+ id: string;
26
+ type: "Follow";
27
+ actor: string;
28
+ };
29
+ id: string;
30
+ type: "Accept";
31
+ actor: string;
32
+ }, {
33
+ object: {
34
+ object: string;
35
+ id: string;
36
+ type: "Follow";
37
+ actor: string;
38
+ };
39
+ id: string;
40
+ type: "Accept";
41
+ actor: string;
42
+ }>;
43
+ export type Accept = z.infer<typeof Accept>;
package/dist/accept.js ADDED
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ import { Follow } from "./follow.js";
3
+ export const Accept = z.object({
4
+ id: z.string(),
5
+ actor: z.string(),
6
+ type: z.literal("Accept"),
7
+ object: Follow,
8
+ });
@@ -0,0 +1,18 @@
1
+ import { z } from "zod";
2
+ export declare const Follow: z.ZodObject<{
3
+ id: z.ZodString;
4
+ type: z.ZodLiteral<"Follow">;
5
+ actor: z.ZodString;
6
+ object: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ object: string;
9
+ id: string;
10
+ type: "Follow";
11
+ actor: string;
12
+ }, {
13
+ object: string;
14
+ id: string;
15
+ type: "Follow";
16
+ actor: string;
17
+ }>;
18
+ export type Follow = z.infer<typeof Follow>;
package/dist/follow.js ADDED
@@ -0,0 +1,7 @@
1
+ import { z } from "zod";
2
+ export const Follow = z.object({
3
+ id: z.string(),
4
+ type: z.literal("Follow"),
5
+ actor: z.string(),
6
+ object: z.string(),
7
+ });
package/dist/index.d.ts CHANGED
@@ -1 +1,6 @@
1
+ export * from "./accept.js";
2
+ export * from "./follow.js";
3
+ export * from "./like.js";
1
4
  export * from "./note.js";
5
+ export * from "./reject.js";
6
+ export * from "./undo.js";
package/dist/index.js CHANGED
@@ -1 +1,6 @@
1
+ export * from "./accept.js";
2
+ export * from "./follow.js";
3
+ export * from "./like.js";
1
4
  export * from "./note.js";
5
+ export * from "./reject.js";
6
+ export * from "./undo.js";
package/dist/like.d.ts ADDED
@@ -0,0 +1,489 @@
1
+ import { z } from "zod";
2
+ export declare const Like: z.ZodObject<{
3
+ type: z.ZodLiteral<"Like">;
4
+ id: z.ZodString;
5
+ actor: z.ZodString;
6
+ object: z.ZodUnion<[z.ZodString, z.ZodObject<{
7
+ id: z.ZodString;
8
+ url: z.ZodString;
9
+ updated: z.ZodOptional<z.ZodString>;
10
+ attributedTo: z.ZodString;
11
+ to: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
12
+ cc: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
13
+ inReplyTo: z.ZodNullable<z.ZodString>;
14
+ summary: z.ZodOptional<z.ZodString>;
15
+ summaryMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
16
+ content: z.ZodOptional<z.ZodString>;
17
+ contentMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
18
+ attachment: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
19
+ type: z.ZodLiteral<"PropertyValue">;
20
+ name: z.ZodString;
21
+ value: z.ZodString;
22
+ }, "strip", z.ZodTypeAny, {
23
+ type: "PropertyValue";
24
+ value: string;
25
+ name: string;
26
+ }, {
27
+ type: "PropertyValue";
28
+ value: string;
29
+ name: string;
30
+ }>, z.ZodObject<{
31
+ type: z.ZodLiteral<"Document">;
32
+ mediaType: z.ZodString;
33
+ url: z.ZodString;
34
+ blurhash: z.ZodOptional<z.ZodString>;
35
+ width: z.ZodOptional<z.ZodNumber>;
36
+ height: z.ZodOptional<z.ZodNumber>;
37
+ name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
38
+ focalPoint: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ type: "Document";
41
+ mediaType: string;
42
+ url: string;
43
+ blurhash?: string | undefined;
44
+ width?: number | undefined;
45
+ height?: number | undefined;
46
+ name?: string | null | undefined;
47
+ focalPoint?: [number, number] | undefined;
48
+ }, {
49
+ type: "Document";
50
+ mediaType: string;
51
+ url: string;
52
+ blurhash?: string | undefined;
53
+ width?: number | undefined;
54
+ height?: number | undefined;
55
+ name?: string | null | undefined;
56
+ focalPoint?: [number, number] | undefined;
57
+ }>]>, z.ZodArray<z.ZodUnion<[z.ZodObject<{
58
+ type: z.ZodLiteral<"PropertyValue">;
59
+ name: z.ZodString;
60
+ value: z.ZodString;
61
+ }, "strip", z.ZodTypeAny, {
62
+ type: "PropertyValue";
63
+ value: string;
64
+ name: string;
65
+ }, {
66
+ type: "PropertyValue";
67
+ value: string;
68
+ name: string;
69
+ }>, z.ZodObject<{
70
+ type: z.ZodLiteral<"Document">;
71
+ mediaType: z.ZodString;
72
+ url: z.ZodString;
73
+ blurhash: z.ZodOptional<z.ZodString>;
74
+ width: z.ZodOptional<z.ZodNumber>;
75
+ height: z.ZodOptional<z.ZodNumber>;
76
+ name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
77
+ focalPoint: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ type: "Document";
80
+ mediaType: string;
81
+ url: string;
82
+ blurhash?: string | undefined;
83
+ width?: number | undefined;
84
+ height?: number | undefined;
85
+ name?: string | null | undefined;
86
+ focalPoint?: [number, number] | undefined;
87
+ }, {
88
+ type: "Document";
89
+ mediaType: string;
90
+ url: string;
91
+ blurhash?: string | undefined;
92
+ width?: number | undefined;
93
+ height?: number | undefined;
94
+ name?: string | null | undefined;
95
+ focalPoint?: [number, number] | undefined;
96
+ }>]>, "many">]>>;
97
+ tag: z.ZodArray<z.ZodUnion<[z.ZodObject<{
98
+ type: z.ZodLiteral<"Mention">;
99
+ href: z.ZodString;
100
+ name: z.ZodString;
101
+ }, "strip", z.ZodTypeAny, {
102
+ type: "Mention";
103
+ name: string;
104
+ href: string;
105
+ }, {
106
+ type: "Mention";
107
+ name: string;
108
+ href: string;
109
+ }>, z.ZodObject<{
110
+ type: z.ZodLiteral<"Emoji">;
111
+ name: z.ZodString;
112
+ updated: z.ZodString;
113
+ icon: z.ZodObject<{
114
+ type: z.ZodLiteral<"Image">;
115
+ mediaType: z.ZodString;
116
+ url: z.ZodString;
117
+ }, "strip", z.ZodTypeAny, {
118
+ type: "Image";
119
+ mediaType: string;
120
+ url: string;
121
+ }, {
122
+ type: "Image";
123
+ mediaType: string;
124
+ url: string;
125
+ }>;
126
+ }, "strip", z.ZodTypeAny, {
127
+ type: "Emoji";
128
+ name: string;
129
+ updated: string;
130
+ icon: {
131
+ type: "Image";
132
+ mediaType: string;
133
+ url: string;
134
+ };
135
+ }, {
136
+ type: "Emoji";
137
+ name: string;
138
+ updated: string;
139
+ icon: {
140
+ type: "Image";
141
+ mediaType: string;
142
+ url: string;
143
+ };
144
+ }>]>, "many">;
145
+ published: z.ZodString;
146
+ type: z.ZodLiteral<"Note">;
147
+ }, "strip", z.ZodTypeAny, {
148
+ id: string;
149
+ type: "Note";
150
+ url: string;
151
+ attributedTo: string;
152
+ to: (string | string[]) & (string | string[] | undefined);
153
+ cc: (string | string[]) & (string | string[] | undefined);
154
+ inReplyTo: string | null;
155
+ tag: ({
156
+ type: "Emoji";
157
+ name: string;
158
+ updated: string;
159
+ icon: {
160
+ type: "Image";
161
+ mediaType: string;
162
+ url: string;
163
+ };
164
+ } | {
165
+ type: "Mention";
166
+ name: string;
167
+ href: string;
168
+ })[];
169
+ published: string;
170
+ updated?: string | undefined;
171
+ summary?: string | undefined;
172
+ summaryMap?: Record<string, string> | undefined;
173
+ content?: string | undefined;
174
+ contentMap?: Record<string, string> | undefined;
175
+ attachment?: {
176
+ type: "Document";
177
+ mediaType: string;
178
+ url: string;
179
+ blurhash?: string | undefined;
180
+ width?: number | undefined;
181
+ height?: number | undefined;
182
+ name?: string | null | undefined;
183
+ focalPoint?: [number, number] | undefined;
184
+ } | {
185
+ type: "PropertyValue";
186
+ value: string;
187
+ name: string;
188
+ } | ({
189
+ type: "Document";
190
+ mediaType: string;
191
+ url: string;
192
+ blurhash?: string | undefined;
193
+ width?: number | undefined;
194
+ height?: number | undefined;
195
+ name?: string | null | undefined;
196
+ focalPoint?: [number, number] | undefined;
197
+ } | {
198
+ type: "PropertyValue";
199
+ value: string;
200
+ name: string;
201
+ })[] | undefined;
202
+ }, {
203
+ id: string;
204
+ type: "Note";
205
+ url: string;
206
+ attributedTo: string;
207
+ to: (string | string[]) & (string | string[] | undefined);
208
+ cc: (string | string[]) & (string | string[] | undefined);
209
+ inReplyTo: string | null;
210
+ tag: ({
211
+ type: "Emoji";
212
+ name: string;
213
+ updated: string;
214
+ icon: {
215
+ type: "Image";
216
+ mediaType: string;
217
+ url: string;
218
+ };
219
+ } | {
220
+ type: "Mention";
221
+ name: string;
222
+ href: string;
223
+ })[];
224
+ published: string;
225
+ updated?: string | undefined;
226
+ summary?: string | undefined;
227
+ summaryMap?: Record<string, string> | undefined;
228
+ content?: string | undefined;
229
+ contentMap?: Record<string, string> | undefined;
230
+ attachment?: {
231
+ type: "Document";
232
+ mediaType: string;
233
+ url: string;
234
+ blurhash?: string | undefined;
235
+ width?: number | undefined;
236
+ height?: number | undefined;
237
+ name?: string | null | undefined;
238
+ focalPoint?: [number, number] | undefined;
239
+ } | {
240
+ type: "PropertyValue";
241
+ value: string;
242
+ name: string;
243
+ } | ({
244
+ type: "Document";
245
+ mediaType: string;
246
+ url: string;
247
+ blurhash?: string | undefined;
248
+ width?: number | undefined;
249
+ height?: number | undefined;
250
+ name?: string | null | undefined;
251
+ focalPoint?: [number, number] | undefined;
252
+ } | {
253
+ type: "PropertyValue";
254
+ value: string;
255
+ name: string;
256
+ })[] | undefined;
257
+ }>]>;
258
+ }, "strip", z.ZodTypeAny, {
259
+ object: (string | {
260
+ id: string;
261
+ type: "Note";
262
+ url: string;
263
+ attributedTo: string;
264
+ to: (string | string[]) & (string | string[] | undefined);
265
+ cc: (string | string[]) & (string | string[] | undefined);
266
+ inReplyTo: string | null;
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
+ })[];
281
+ published: string;
282
+ updated?: string | undefined;
283
+ summary?: string | undefined;
284
+ summaryMap?: Record<string, string> | undefined;
285
+ content?: string | undefined;
286
+ contentMap?: Record<string, string> | undefined;
287
+ attachment?: {
288
+ type: "Document";
289
+ mediaType: string;
290
+ url: string;
291
+ blurhash?: string | undefined;
292
+ width?: number | undefined;
293
+ height?: number | undefined;
294
+ name?: string | null | undefined;
295
+ focalPoint?: [number, number] | undefined;
296
+ } | {
297
+ type: "PropertyValue";
298
+ value: string;
299
+ name: string;
300
+ } | ({
301
+ type: "Document";
302
+ mediaType: string;
303
+ url: string;
304
+ blurhash?: string | undefined;
305
+ width?: number | undefined;
306
+ height?: number | undefined;
307
+ name?: string | null | undefined;
308
+ focalPoint?: [number, number] | undefined;
309
+ } | {
310
+ type: "PropertyValue";
311
+ value: string;
312
+ name: string;
313
+ })[] | undefined;
314
+ }) & (string | {
315
+ id: string;
316
+ type: "Note";
317
+ url: string;
318
+ attributedTo: string;
319
+ to: (string | string[]) & (string | string[] | undefined);
320
+ cc: (string | string[]) & (string | string[] | undefined);
321
+ inReplyTo: string | null;
322
+ tag: ({
323
+ type: "Emoji";
324
+ name: string;
325
+ updated: string;
326
+ icon: {
327
+ type: "Image";
328
+ mediaType: string;
329
+ url: string;
330
+ };
331
+ } | {
332
+ type: "Mention";
333
+ name: string;
334
+ href: string;
335
+ })[];
336
+ published: string;
337
+ updated?: string | undefined;
338
+ summary?: string | undefined;
339
+ summaryMap?: Record<string, string> | undefined;
340
+ content?: string | undefined;
341
+ contentMap?: Record<string, string> | undefined;
342
+ attachment?: {
343
+ type: "Document";
344
+ mediaType: string;
345
+ url: string;
346
+ blurhash?: string | undefined;
347
+ width?: number | undefined;
348
+ height?: number | undefined;
349
+ name?: string | null | undefined;
350
+ focalPoint?: [number, number] | undefined;
351
+ } | {
352
+ type: "PropertyValue";
353
+ value: string;
354
+ name: string;
355
+ } | ({
356
+ type: "Document";
357
+ mediaType: string;
358
+ url: string;
359
+ blurhash?: string | undefined;
360
+ width?: number | undefined;
361
+ height?: number | undefined;
362
+ name?: string | null | undefined;
363
+ focalPoint?: [number, number] | undefined;
364
+ } | {
365
+ type: "PropertyValue";
366
+ value: string;
367
+ name: string;
368
+ })[] | undefined;
369
+ } | undefined);
370
+ id: string;
371
+ type: "Like";
372
+ actor: string;
373
+ }, {
374
+ object: (string | {
375
+ id: string;
376
+ type: "Note";
377
+ url: string;
378
+ attributedTo: string;
379
+ to: (string | string[]) & (string | string[] | undefined);
380
+ cc: (string | string[]) & (string | string[] | undefined);
381
+ inReplyTo: string | null;
382
+ tag: ({
383
+ type: "Emoji";
384
+ name: string;
385
+ updated: string;
386
+ icon: {
387
+ type: "Image";
388
+ mediaType: string;
389
+ url: string;
390
+ };
391
+ } | {
392
+ type: "Mention";
393
+ name: string;
394
+ href: string;
395
+ })[];
396
+ published: string;
397
+ updated?: string | undefined;
398
+ summary?: string | undefined;
399
+ summaryMap?: Record<string, string> | undefined;
400
+ content?: string | undefined;
401
+ contentMap?: Record<string, string> | undefined;
402
+ attachment?: {
403
+ type: "Document";
404
+ mediaType: string;
405
+ url: string;
406
+ blurhash?: string | undefined;
407
+ width?: number | undefined;
408
+ height?: number | undefined;
409
+ name?: string | null | undefined;
410
+ focalPoint?: [number, number] | undefined;
411
+ } | {
412
+ type: "PropertyValue";
413
+ value: string;
414
+ name: string;
415
+ } | ({
416
+ type: "Document";
417
+ mediaType: string;
418
+ url: string;
419
+ blurhash?: string | undefined;
420
+ width?: number | undefined;
421
+ height?: number | undefined;
422
+ name?: string | null | undefined;
423
+ focalPoint?: [number, number] | undefined;
424
+ } | {
425
+ type: "PropertyValue";
426
+ value: string;
427
+ name: string;
428
+ })[] | undefined;
429
+ }) & (string | {
430
+ id: string;
431
+ type: "Note";
432
+ url: string;
433
+ attributedTo: string;
434
+ to: (string | string[]) & (string | string[] | undefined);
435
+ cc: (string | string[]) & (string | string[] | undefined);
436
+ inReplyTo: string | null;
437
+ tag: ({
438
+ type: "Emoji";
439
+ name: string;
440
+ updated: string;
441
+ icon: {
442
+ type: "Image";
443
+ mediaType: string;
444
+ url: string;
445
+ };
446
+ } | {
447
+ type: "Mention";
448
+ name: string;
449
+ href: string;
450
+ })[];
451
+ published: string;
452
+ updated?: string | undefined;
453
+ summary?: string | undefined;
454
+ summaryMap?: Record<string, string> | undefined;
455
+ content?: string | undefined;
456
+ contentMap?: Record<string, string> | undefined;
457
+ attachment?: {
458
+ type: "Document";
459
+ mediaType: string;
460
+ url: string;
461
+ blurhash?: string | undefined;
462
+ width?: number | undefined;
463
+ height?: number | undefined;
464
+ name?: string | null | undefined;
465
+ focalPoint?: [number, number] | undefined;
466
+ } | {
467
+ type: "PropertyValue";
468
+ value: string;
469
+ name: string;
470
+ } | ({
471
+ type: "Document";
472
+ mediaType: string;
473
+ url: string;
474
+ blurhash?: string | undefined;
475
+ width?: number | undefined;
476
+ height?: number | undefined;
477
+ name?: string | null | undefined;
478
+ focalPoint?: [number, number] | undefined;
479
+ } | {
480
+ type: "PropertyValue";
481
+ value: string;
482
+ name: string;
483
+ })[] | undefined;
484
+ } | undefined);
485
+ id: string;
486
+ type: "Like";
487
+ actor: string;
488
+ }>;
489
+ export type Like = z.infer<typeof Like>;
package/dist/like.js ADDED
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ import { Note } from "./note.js";
3
+ export const Like = z.object({
4
+ type: z.literal("Like"),
5
+ id: z.string(),
6
+ actor: z.string(),
7
+ object: z.union([z.string(), Note]),
8
+ });
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ export declare const Attachment: z.ZodUnion<[z.ZodObject<{
3
+ type: z.ZodLiteral<"PropertyValue">;
4
+ name: z.ZodString;
5
+ value: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ type: "PropertyValue";
8
+ value: string;
9
+ name: string;
10
+ }, {
11
+ type: "PropertyValue";
12
+ value: string;
13
+ name: string;
14
+ }>, z.ZodObject<{
15
+ type: z.ZodLiteral<"Document">;
16
+ mediaType: z.ZodString;
17
+ url: z.ZodString;
18
+ blurhash: z.ZodOptional<z.ZodString>;
19
+ width: z.ZodOptional<z.ZodNumber>;
20
+ height: z.ZodOptional<z.ZodNumber>;
21
+ name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
22
+ focalPoint: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ type: "Document";
25
+ mediaType: string;
26
+ url: string;
27
+ blurhash?: string | undefined;
28
+ width?: number | undefined;
29
+ height?: number | undefined;
30
+ name?: string | null | undefined;
31
+ focalPoint?: [number, number] | undefined;
32
+ }, {
33
+ type: "Document";
34
+ mediaType: string;
35
+ url: string;
36
+ blurhash?: string | undefined;
37
+ width?: number | undefined;
38
+ height?: number | undefined;
39
+ name?: string | null | undefined;
40
+ focalPoint?: [number, number] | undefined;
41
+ }>]>;
42
+ export type Attachment = z.infer<typeof Attachment>;
@@ -0,0 +1,4 @@
1
+ import { z } from "zod";
2
+ import { Document } from "./document.js";
3
+ import { PropertyValue } from "./propertyValue.js";
4
+ export const Attachment = z.union([PropertyValue, Document]);
@@ -0,0 +1,30 @@
1
+ import { z } from "zod";
2
+ export declare const Document: z.ZodObject<{
3
+ type: z.ZodLiteral<"Document">;
4
+ mediaType: z.ZodString;
5
+ url: z.ZodString;
6
+ blurhash: z.ZodOptional<z.ZodString>;
7
+ width: z.ZodOptional<z.ZodNumber>;
8
+ height: z.ZodOptional<z.ZodNumber>;
9
+ name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
10
+ focalPoint: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ type: "Document";
13
+ mediaType: string;
14
+ url: string;
15
+ blurhash?: string | undefined;
16
+ width?: number | undefined;
17
+ height?: number | undefined;
18
+ name?: string | null | undefined;
19
+ focalPoint?: [number, number] | undefined;
20
+ }, {
21
+ type: "Document";
22
+ mediaType: string;
23
+ url: string;
24
+ blurhash?: string | undefined;
25
+ width?: number | undefined;
26
+ height?: number | undefined;
27
+ name?: string | null | undefined;
28
+ focalPoint?: [number, number] | undefined;
29
+ }>;
30
+ export type Document = z.infer<typeof Document>;
@@ -0,0 +1,11 @@
1
+ import { z } from "zod";
2
+ export const Document = z.object({
3
+ type: z.literal("Document"),
4
+ mediaType: z.string(),
5
+ url: z.string(),
6
+ blurhash: z.string().optional(),
7
+ width: z.number().optional(),
8
+ height: z.number().optional(),
9
+ name: z.string().optional().nullable(),
10
+ focalPoint: z.tuple([z.number(), z.number()]).optional(),
11
+ });