Fixes for Lysand types

This commit is contained in:
Jesse Wierzbinski 2024-04-09 16:47:06 -10:00
parent 4ce0e06e41
commit 724b11da4b
No known key found for this signature in database

View file

@ -52,10 +52,6 @@ export interface Entity {
}; };
} }
export interface InlineCustomEmojis {
[key: string]: Emoji;
}
export interface Publication extends Entity { export interface Publication extends Entity {
type: "Note" | "Patch"; type: "Note" | "Patch";
author: string; author: string;
@ -129,39 +125,50 @@ export interface Field {
value: ContentFormat; value: ContentFormat;
} }
export interface Like extends Entity { export interface Action extends Entity {
type:
| "Like"
| "Dislike"
| "Follow"
| "FollowAccept"
| "FollowReject"
| "Announce"
| "Undo";
author: string;
}
export interface Like extends Action {
type: "Like"; type: "Like";
author: string;
object: string; object: string;
} }
export interface Dislike extends Entity { export interface Undo extends Action {
type: "Undo";
object: string;
}
export interface Dislike extends Action {
type: "Dislike"; type: "Dislike";
author: string;
object: string; object: string;
} }
export interface Follow extends Entity { export interface Follow extends Action {
type: "Follow"; type: "Follow";
author: string;
followee: string; followee: string;
} }
export interface FollowAccept extends Entity { export interface FollowAccept extends Action {
type: "FollowAccept"; type: "FollowAccept";
author: string;
follower: string; follower: string;
} }
export interface FollowReject extends Entity { export interface FollowReject extends Action {
type: "FollowReject"; type: "FollowReject";
author: string;
follower: string; follower: string;
} }
export interface Announce extends Entity { export interface Announce extends Action {
type: "Announce"; type: "Announce";
author: string;
object: string; object: string;
} }
@ -226,3 +233,19 @@ export interface LongPronoun {
independent_possessive: string; independent_possessive: string;
reflexive: string; reflexive: string;
} }
export interface ServerMetadata {
type: "ServerMetadata";
name: string;
version: string;
description?: string;
website?: string;
moderators?: string[];
admins?: string[];
logo?: ContentFormat;
banner?: ContentFormat;
supported_extensions: string[];
extensions?: {
[key: string]: object | undefined;
};
}