@llun/activities.schema 0.0.9 → 0.1.1
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/mastodon/filter/index.d.ts +62 -0
- package/dist/mastodon/filter/index.js +24 -0
- package/dist/mastodon/filter/keyword.d.ts +15 -0
- package/dist/mastodon/filter/keyword.js +9 -0
- package/dist/mastodon/filter/status.d.ts +12 -0
- package/dist/mastodon/filter/status.js +8 -0
- package/dist/mastodon/filterResult.d.ts +104 -0
- package/dist/mastodon/filterResult.js +16 -0
- package/dist/mastodon/index.d.ts +6 -0
- package/dist/mastodon/index.js +6 -0
- package/dist/mastodon/mediaAttachment/audio.d.ts +87 -0
- package/dist/mastodon/mediaAttachment/audio.js +17 -0
- package/dist/mastodon/mediaAttachment/base.d.ts +24 -0
- package/dist/mastodon/mediaAttachment/base.js +26 -0
- package/dist/mastodon/mediaAttachment/gifv.d.ts +158 -0
- package/dist/mastodon/mediaAttachment/gifv.js +37 -0
- package/dist/mastodon/mediaAttachment/image.d.ts +142 -0
- package/dist/mastodon/mediaAttachment/image.js +30 -0
- package/dist/mastodon/mediaAttachment/index.d.ts +576 -0
- package/dist/mastodon/mediaAttachment/index.js +8 -0
- package/dist/mastodon/mediaAttachment/unknown.d.ts +28 -0
- package/dist/mastodon/mediaAttachment/unknown.js +8 -0
- package/dist/mastodon/mediaAttachment/video.d.ts +173 -0
- package/dist/mastodon/mediaAttachment/video.js +38 -0
- package/dist/mastodon/poll/index.d.ts +81 -0
- package/dist/mastodon/poll/index.js +27 -0
- package/dist/mastodon/poll/option.d.ts +12 -0
- package/dist/mastodon/poll/option.js +10 -0
- package/dist/mastodon/previewCard.d.ts +48 -0
- package/dist/mastodon/previewCard.js +34 -0
- package/dist/mastodon/status/application.d.ts +12 -0
- package/dist/mastodon/status/application.js +12 -0
- package/dist/mastodon/status/base.d.ts +1738 -0
- package/dist/mastodon/status/base.js +96 -0
- package/dist/mastodon/status/index.d.ts +4035 -0
- package/dist/mastodon/status/index.js +4 -0
- package/dist/mastodon/status/mention.d.ts +18 -0
- package/dist/mastodon/status/mention.js +12 -0
- package/dist/mastodon/status/tag.d.ts +12 -0
- package/dist/mastodon/status/tag.js +10 -0
- package/dist/mastodon/status/visibility.d.ts +3 -0
- package/dist/mastodon/status/visibility.js +3 -0
- package/package.json +2 -2
- package/readme.md +1 -1
- package/src/mastodon/filter/index.ts +31 -0
- package/src/mastodon/filter/keyword.ts +12 -0
- package/src/mastodon/filter/status.ts +10 -0
- package/src/mastodon/filterResult.ts +18 -0
- package/src/mastodon/index.ts +7 -0
- package/src/mastodon/mediaAttachment/audio.ts +19 -0
- package/src/mastodon/mediaAttachment/base.ts +34 -0
- package/src/mastodon/mediaAttachment/gifv.ts +41 -0
- package/src/mastodon/mediaAttachment/image.ts +32 -0
- package/src/mastodon/mediaAttachment/index.ts +10 -0
- package/src/mastodon/mediaAttachment/unknown.ts +12 -0
- package/src/mastodon/mediaAttachment/video.ts +43 -0
- package/src/mastodon/poll/index.ts +35 -0
- package/src/mastodon/poll/option.ts +13 -0
- package/src/mastodon/previewCard.ts +41 -0
- package/src/mastodon/status/application.ts +15 -0
- package/src/mastodon/status/base.ts +125 -0
- package/src/mastodon/status/index.ts +8 -0
- package/src/mastodon/status/mention.ts +15 -0
- package/src/mastodon/status/tag.ts +12 -0
- package/src/mastodon/status/visibility.ts +5 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const Video: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
url: z.ZodString;
|
|
5
|
+
preview_url: z.ZodString;
|
|
6
|
+
remote_url: z.ZodNullable<z.ZodString>;
|
|
7
|
+
description: z.ZodNullable<z.ZodString>;
|
|
8
|
+
bluehash: z.ZodString;
|
|
9
|
+
}, {
|
|
10
|
+
type: z.ZodLiteral<"video">;
|
|
11
|
+
meta: z.ZodObject<{
|
|
12
|
+
length: z.ZodString;
|
|
13
|
+
duration: z.ZodNumber;
|
|
14
|
+
fps: z.ZodNumber;
|
|
15
|
+
size: z.ZodString;
|
|
16
|
+
width: z.ZodNumber;
|
|
17
|
+
height: z.ZodNumber;
|
|
18
|
+
aspect: z.ZodNumber;
|
|
19
|
+
audio_encode: z.ZodString;
|
|
20
|
+
audio_bitrate: z.ZodString;
|
|
21
|
+
audio_channels: z.ZodString;
|
|
22
|
+
original: z.ZodObject<{
|
|
23
|
+
width: z.ZodNumber;
|
|
24
|
+
height: z.ZodNumber;
|
|
25
|
+
frame_rate: z.ZodString;
|
|
26
|
+
duration: z.ZodNumber;
|
|
27
|
+
bitrate: z.ZodNumber;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
duration: number;
|
|
32
|
+
frame_rate: string;
|
|
33
|
+
bitrate: number;
|
|
34
|
+
}, {
|
|
35
|
+
width: number;
|
|
36
|
+
height: number;
|
|
37
|
+
duration: number;
|
|
38
|
+
frame_rate: string;
|
|
39
|
+
bitrate: number;
|
|
40
|
+
}>;
|
|
41
|
+
small: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
42
|
+
width: z.ZodNumber;
|
|
43
|
+
height: z.ZodNumber;
|
|
44
|
+
size: z.ZodString;
|
|
45
|
+
aspect: z.ZodNumber;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
width: number;
|
|
48
|
+
height: number;
|
|
49
|
+
size: string;
|
|
50
|
+
aspect: number;
|
|
51
|
+
}, {
|
|
52
|
+
width: number;
|
|
53
|
+
height: number;
|
|
54
|
+
size: string;
|
|
55
|
+
aspect: number;
|
|
56
|
+
}>>>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
length: string;
|
|
59
|
+
width: number;
|
|
60
|
+
height: number;
|
|
61
|
+
duration: number;
|
|
62
|
+
fps: number;
|
|
63
|
+
size: string;
|
|
64
|
+
aspect: number;
|
|
65
|
+
original: {
|
|
66
|
+
width: number;
|
|
67
|
+
height: number;
|
|
68
|
+
duration: number;
|
|
69
|
+
frame_rate: string;
|
|
70
|
+
bitrate: number;
|
|
71
|
+
};
|
|
72
|
+
audio_encode: string;
|
|
73
|
+
audio_bitrate: string;
|
|
74
|
+
audio_channels: string;
|
|
75
|
+
small?: {
|
|
76
|
+
width: number;
|
|
77
|
+
height: number;
|
|
78
|
+
size: string;
|
|
79
|
+
aspect: number;
|
|
80
|
+
} | null | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
length: string;
|
|
83
|
+
width: number;
|
|
84
|
+
height: number;
|
|
85
|
+
duration: number;
|
|
86
|
+
fps: number;
|
|
87
|
+
size: string;
|
|
88
|
+
aspect: number;
|
|
89
|
+
original: {
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
duration: number;
|
|
93
|
+
frame_rate: string;
|
|
94
|
+
bitrate: number;
|
|
95
|
+
};
|
|
96
|
+
audio_encode: string;
|
|
97
|
+
audio_bitrate: string;
|
|
98
|
+
audio_channels: string;
|
|
99
|
+
small?: {
|
|
100
|
+
width: number;
|
|
101
|
+
height: number;
|
|
102
|
+
size: string;
|
|
103
|
+
aspect: number;
|
|
104
|
+
} | null | undefined;
|
|
105
|
+
}>;
|
|
106
|
+
}>, "strip", z.ZodTypeAny, {
|
|
107
|
+
id: string;
|
|
108
|
+
type: "video";
|
|
109
|
+
url: string;
|
|
110
|
+
description: string | null;
|
|
111
|
+
preview_url: string;
|
|
112
|
+
remote_url: string | null;
|
|
113
|
+
bluehash: string;
|
|
114
|
+
meta: {
|
|
115
|
+
length: string;
|
|
116
|
+
width: number;
|
|
117
|
+
height: number;
|
|
118
|
+
duration: number;
|
|
119
|
+
fps: number;
|
|
120
|
+
size: string;
|
|
121
|
+
aspect: number;
|
|
122
|
+
original: {
|
|
123
|
+
width: number;
|
|
124
|
+
height: number;
|
|
125
|
+
duration: number;
|
|
126
|
+
frame_rate: string;
|
|
127
|
+
bitrate: number;
|
|
128
|
+
};
|
|
129
|
+
audio_encode: string;
|
|
130
|
+
audio_bitrate: string;
|
|
131
|
+
audio_channels: string;
|
|
132
|
+
small?: {
|
|
133
|
+
width: number;
|
|
134
|
+
height: number;
|
|
135
|
+
size: string;
|
|
136
|
+
aspect: number;
|
|
137
|
+
} | null | undefined;
|
|
138
|
+
};
|
|
139
|
+
}, {
|
|
140
|
+
id: string;
|
|
141
|
+
type: "video";
|
|
142
|
+
url: string;
|
|
143
|
+
description: string | null;
|
|
144
|
+
preview_url: string;
|
|
145
|
+
remote_url: string | null;
|
|
146
|
+
bluehash: string;
|
|
147
|
+
meta: {
|
|
148
|
+
length: string;
|
|
149
|
+
width: number;
|
|
150
|
+
height: number;
|
|
151
|
+
duration: number;
|
|
152
|
+
fps: number;
|
|
153
|
+
size: string;
|
|
154
|
+
aspect: number;
|
|
155
|
+
original: {
|
|
156
|
+
width: number;
|
|
157
|
+
height: number;
|
|
158
|
+
duration: number;
|
|
159
|
+
frame_rate: string;
|
|
160
|
+
bitrate: number;
|
|
161
|
+
};
|
|
162
|
+
audio_encode: string;
|
|
163
|
+
audio_bitrate: string;
|
|
164
|
+
audio_channels: string;
|
|
165
|
+
small?: {
|
|
166
|
+
width: number;
|
|
167
|
+
height: number;
|
|
168
|
+
size: string;
|
|
169
|
+
aspect: number;
|
|
170
|
+
} | null | undefined;
|
|
171
|
+
};
|
|
172
|
+
}>;
|
|
173
|
+
export type Video = z.infer<typeof Video>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// This schema is base on https://docs.joinmastodon.org/entities/MediaAttachment/#video
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { BaseMediaAttachment } from "./base.js";
|
|
4
|
+
export const Video = BaseMediaAttachment.extend({
|
|
5
|
+
type: z.literal("video").describe("The type of the attachment (Video clip)"),
|
|
6
|
+
meta: z.object({
|
|
7
|
+
length: z.string(),
|
|
8
|
+
duration: z.number(),
|
|
9
|
+
fps: z.number(),
|
|
10
|
+
size: z.string({
|
|
11
|
+
description: "Video width and height in string wxh format",
|
|
12
|
+
}),
|
|
13
|
+
width: z.number(),
|
|
14
|
+
height: z.number(),
|
|
15
|
+
aspect: z.number({
|
|
16
|
+
description: "Aspect ratio of the video (width/height)",
|
|
17
|
+
}),
|
|
18
|
+
audio_encode: z.string(),
|
|
19
|
+
audio_bitrate: z.string(),
|
|
20
|
+
audio_channels: z.string(),
|
|
21
|
+
original: z.object({
|
|
22
|
+
width: z.number(),
|
|
23
|
+
height: z.number(),
|
|
24
|
+
frame_rate: z.string(),
|
|
25
|
+
duration: z.number(),
|
|
26
|
+
bitrate: z.number(),
|
|
27
|
+
}),
|
|
28
|
+
small: z
|
|
29
|
+
.object({
|
|
30
|
+
width: z.number(),
|
|
31
|
+
height: z.number(),
|
|
32
|
+
size: z.string(),
|
|
33
|
+
aspect: z.number(),
|
|
34
|
+
})
|
|
35
|
+
.describe("A video preview in static image")
|
|
36
|
+
.nullish(),
|
|
37
|
+
}),
|
|
38
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const Poll: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
expires_at: z.ZodNullable<z.ZodString>;
|
|
5
|
+
expired: z.ZodBoolean;
|
|
6
|
+
multiple: z.ZodBoolean;
|
|
7
|
+
votes_count: z.ZodNumber;
|
|
8
|
+
voters_count: z.ZodNumber;
|
|
9
|
+
options: z.ZodArray<z.ZodObject<{
|
|
10
|
+
title: z.ZodString;
|
|
11
|
+
votes_count: z.ZodNullable<z.ZodNumber>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
title: string;
|
|
14
|
+
votes_count: number | null;
|
|
15
|
+
}, {
|
|
16
|
+
title: string;
|
|
17
|
+
votes_count: number | null;
|
|
18
|
+
}>, "many">;
|
|
19
|
+
emojis: z.ZodArray<z.ZodObject<{
|
|
20
|
+
shortcode: z.ZodString;
|
|
21
|
+
static_url: z.ZodString;
|
|
22
|
+
url: z.ZodString;
|
|
23
|
+
visible_in_picker: z.ZodBoolean;
|
|
24
|
+
category: z.ZodNullable<z.ZodString>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
url: string;
|
|
27
|
+
shortcode: string;
|
|
28
|
+
static_url: string;
|
|
29
|
+
visible_in_picker: boolean;
|
|
30
|
+
category: string | null;
|
|
31
|
+
}, {
|
|
32
|
+
url: string;
|
|
33
|
+
shortcode: string;
|
|
34
|
+
static_url: string;
|
|
35
|
+
visible_in_picker: boolean;
|
|
36
|
+
category: string | null;
|
|
37
|
+
}>, "many">;
|
|
38
|
+
voted: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
own_votes: z.ZodArray<z.ZodNumber, "many">;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
id: string;
|
|
42
|
+
options: {
|
|
43
|
+
title: string;
|
|
44
|
+
votes_count: number | null;
|
|
45
|
+
}[];
|
|
46
|
+
emojis: {
|
|
47
|
+
url: string;
|
|
48
|
+
shortcode: string;
|
|
49
|
+
static_url: string;
|
|
50
|
+
visible_in_picker: boolean;
|
|
51
|
+
category: string | null;
|
|
52
|
+
}[];
|
|
53
|
+
expires_at: string | null;
|
|
54
|
+
votes_count: number;
|
|
55
|
+
expired: boolean;
|
|
56
|
+
multiple: boolean;
|
|
57
|
+
voters_count: number;
|
|
58
|
+
own_votes: number[];
|
|
59
|
+
voted?: boolean | undefined;
|
|
60
|
+
}, {
|
|
61
|
+
id: string;
|
|
62
|
+
options: {
|
|
63
|
+
title: string;
|
|
64
|
+
votes_count: number | null;
|
|
65
|
+
}[];
|
|
66
|
+
emojis: {
|
|
67
|
+
url: string;
|
|
68
|
+
shortcode: string;
|
|
69
|
+
static_url: string;
|
|
70
|
+
visible_in_picker: boolean;
|
|
71
|
+
category: string | null;
|
|
72
|
+
}[];
|
|
73
|
+
expires_at: string | null;
|
|
74
|
+
votes_count: number;
|
|
75
|
+
expired: boolean;
|
|
76
|
+
multiple: boolean;
|
|
77
|
+
voters_count: number;
|
|
78
|
+
own_votes: number[];
|
|
79
|
+
voted?: boolean | undefined;
|
|
80
|
+
}>;
|
|
81
|
+
export type Poll = z.infer<typeof Poll>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// This schema is base on https://docs.joinmastodon.org/entities/Poll/
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { CustomEmoji } from "../customEmoji.js";
|
|
4
|
+
import { Option } from "./option.js";
|
|
5
|
+
export const Poll = z.object({
|
|
6
|
+
id: z.string({ description: "The ID of the poll in the database" }),
|
|
7
|
+
expires_at: z
|
|
8
|
+
.string({
|
|
9
|
+
description: "The time the poll ends in ISO 8601 datetime or null if the poll does not end",
|
|
10
|
+
})
|
|
11
|
+
.nullable(),
|
|
12
|
+
expired: z.boolean({ description: "Whether the poll has expired" }),
|
|
13
|
+
multiple: z.boolean({ description: "Whether multiple choices are allowed" }),
|
|
14
|
+
votes_count: z.number({ description: "The number of votes the poll has" }),
|
|
15
|
+
voters_count: z.number({ description: "The number of actors that voted" }),
|
|
16
|
+
options: Option.array().describe("Possible answers for the poll"),
|
|
17
|
+
emojis: CustomEmoji.array().describe("Custom emoji to be used for rendering poll options"),
|
|
18
|
+
voted: z
|
|
19
|
+
.boolean({
|
|
20
|
+
description: "When called with a user token, has the authorized user voted?",
|
|
21
|
+
})
|
|
22
|
+
.optional(),
|
|
23
|
+
own_votes: z
|
|
24
|
+
.number()
|
|
25
|
+
.array()
|
|
26
|
+
.describe("When called with a user token, which options has the authorized user chosen? Contains an array of index values for `options`"),
|
|
27
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const Option: z.ZodObject<{
|
|
3
|
+
title: z.ZodString;
|
|
4
|
+
votes_count: z.ZodNullable<z.ZodNumber>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
title: string;
|
|
7
|
+
votes_count: number | null;
|
|
8
|
+
}, {
|
|
9
|
+
title: string;
|
|
10
|
+
votes_count: number | null;
|
|
11
|
+
}>;
|
|
12
|
+
export type Option = z.infer<typeof Option>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This schema is base on https://docs.joinmastodon.org/entities/Poll/#Option
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const Option = z.object({
|
|
4
|
+
title: z.string({ description: "The text value of the poll option" }),
|
|
5
|
+
votes_count: z
|
|
6
|
+
.number({
|
|
7
|
+
description: "The number of votes the poll option has or null if the results are not published yet",
|
|
8
|
+
})
|
|
9
|
+
.nullable(),
|
|
10
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PreviewCard: z.ZodObject<{
|
|
3
|
+
url: z.ZodString;
|
|
4
|
+
title: z.ZodString;
|
|
5
|
+
description: z.ZodString;
|
|
6
|
+
type: z.ZodEnum<["link", "photo", "video", "rich"]>;
|
|
7
|
+
author_name: z.ZodString;
|
|
8
|
+
author_url: z.ZodString;
|
|
9
|
+
provider_name: z.ZodString;
|
|
10
|
+
provider_url: z.ZodString;
|
|
11
|
+
html: z.ZodString;
|
|
12
|
+
width: z.ZodNumber;
|
|
13
|
+
height: z.ZodNumber;
|
|
14
|
+
image: z.ZodNullable<z.ZodString>;
|
|
15
|
+
embed_url: z.ZodString;
|
|
16
|
+
blurhash: z.ZodNullable<z.ZodString>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
type: "link" | "photo" | "video" | "rich";
|
|
19
|
+
url: string;
|
|
20
|
+
blurhash: string | null;
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
description: string;
|
|
24
|
+
title: string;
|
|
25
|
+
author_name: string;
|
|
26
|
+
author_url: string;
|
|
27
|
+
provider_name: string;
|
|
28
|
+
provider_url: string;
|
|
29
|
+
html: string;
|
|
30
|
+
image: string | null;
|
|
31
|
+
embed_url: string;
|
|
32
|
+
}, {
|
|
33
|
+
type: "link" | "photo" | "video" | "rich";
|
|
34
|
+
url: string;
|
|
35
|
+
blurhash: string | null;
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
description: string;
|
|
39
|
+
title: string;
|
|
40
|
+
author_name: string;
|
|
41
|
+
author_url: string;
|
|
42
|
+
provider_name: string;
|
|
43
|
+
provider_url: string;
|
|
44
|
+
html: string;
|
|
45
|
+
image: string | null;
|
|
46
|
+
embed_url: string;
|
|
47
|
+
}>;
|
|
48
|
+
export type PreviewCard = z.infer<typeof PreviewCard>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// This schema is base on https://docs.joinmastodon.org/entities/PreviewCard/
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const PreviewCard = z.object({
|
|
4
|
+
url: z.string({ description: "Location of linked resource" }),
|
|
5
|
+
title: z.string({ description: "Title of linked resource" }),
|
|
6
|
+
description: z.string({ description: "Description of preview" }),
|
|
7
|
+
type: z.enum(["link", "photo", "video", "rich"], {
|
|
8
|
+
description: "The type of the preview card",
|
|
9
|
+
}),
|
|
10
|
+
author_name: z.string({ description: "The author of the original resource" }),
|
|
11
|
+
author_url: z.string({
|
|
12
|
+
description: "A link to the author of the original resource",
|
|
13
|
+
}),
|
|
14
|
+
provider_name: z.string({
|
|
15
|
+
description: "The provider of the original resource",
|
|
16
|
+
}),
|
|
17
|
+
provider_url: z.string({
|
|
18
|
+
description: "A link to the provider of the original resource",
|
|
19
|
+
}),
|
|
20
|
+
html: z.string({
|
|
21
|
+
description: "HTML to be used for generating the preview card",
|
|
22
|
+
}),
|
|
23
|
+
width: z.number({ description: "Width of preview, in pixels" }),
|
|
24
|
+
height: z.number({ description: "Height of preview, in pixels" }),
|
|
25
|
+
image: z.string({ description: "Preview thumbnail url" }).nullable(),
|
|
26
|
+
embed_url: z.string({
|
|
27
|
+
description: "Used for photo embeds, instead of custom html",
|
|
28
|
+
}),
|
|
29
|
+
blurhash: z
|
|
30
|
+
.string({
|
|
31
|
+
description: "A hash computed by the [BlurHash algorithm](https://github.com/woltapp/blurhash), for generating colorful preview thumbnails when media has not been downloaded yet",
|
|
32
|
+
})
|
|
33
|
+
.nullable(),
|
|
34
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const Application: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
website: z.ZodNullable<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
name: string;
|
|
7
|
+
website: string | null;
|
|
8
|
+
}, {
|
|
9
|
+
name: string;
|
|
10
|
+
website: string | null;
|
|
11
|
+
}>;
|
|
12
|
+
export type Application = z.infer<typeof Application>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This schema is base on https://docs.joinmastodon.org/entities/Status/#application
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export const Application = z.object({
|
|
4
|
+
name: z.string({
|
|
5
|
+
description: "The name of the application that posted this status",
|
|
6
|
+
}),
|
|
7
|
+
website: z
|
|
8
|
+
.string({
|
|
9
|
+
description: "The website associated with the application that posted this status",
|
|
10
|
+
})
|
|
11
|
+
.nullable(),
|
|
12
|
+
});
|