refactor: more TS code

This commit is contained in:
Tristan Yang
2022-07-08 19:13:49 +08:00
parent 678b8515ca
commit 9f1b115c73
55 changed files with 421 additions and 338 deletions
+12
View File
@@ -1,3 +1,5 @@
import { ChatEvent } from "./sse";
export type ContentType = "text/plain" | "text/markdown" | "vocechat/file" | "vocechat/archive";
export type ContentTypeKey = "text" | "markdown" | "file" | "archive";
@@ -13,3 +15,13 @@ export interface MuteDTO {
remove_users?: number[];
remove_groups?: number[];
}
export interface UploadFileResponse {
path: string;
size: number;
hash: string;
image_properties: {
width: number;
height: number;
};
}
export interface ChatMessage extends Omit<ChatEvent, "type"> {}