refactor: 📝 Move documentation to a custom VitePress site

This commit is contained in:
Jesse Wierzbinski 2024-11-10 15:24:34 +01:00
parent 19d8680289
commit 06a8dd1c0a
No known key found for this signature in database
26 changed files with 1449 additions and 775 deletions

View file

@ -23,6 +23,7 @@ type EmojiWithInstance = InferSelectModel<typeof Emojis> & {
export class Emoji extends BaseInterface<typeof Emojis, EmojiWithInstance> {
public static schema = z.object({
id: z.string(),
shortcode: z.string(),
url: z.string(),
visible_in_picker: z.boolean(),
@ -186,9 +187,8 @@ export class Emoji extends BaseInterface<typeof Emojis, EmojiWithInstance> {
);
}
public toApi(): ApiEmoji {
public toApi(): ApiEmoji & { id: string } {
return {
// @ts-expect-error ID is not in regular Mastodon API
id: this.id,
shortcode: this.data.shortcode,
static_url: proxyUrl(this.data.url) ?? "", // TODO: Add static version