refactor: add more Typescript code

This commit is contained in:
Tristan Yang
2022-07-05 22:19:45 +08:00
parent 1aafc03ef5
commit d8643fc8fe
6 changed files with 47 additions and 2 deletions
+30
View File
@@ -0,0 +1,30 @@
export interface ArchiveUser {
name: string;
avatar?: number;
}
export interface ArchiveMessage {
from_user: number;
created_at: number;
mid: number;
source: { uid: number } | { gid: number };
properties?: object;
content_type: string;
content?: string;
file_id?: number;
thumbnail_id?: number;
}
export interface Archive {
users: ArchiveUser[];
messages: ArchiveMessage[];
num_attachments: number;
}
// 上传文件API响应
export interface UploadResponse {
path: string;
size: number;
hash: string;
image_properties?: {
width: number;
height: number;
};
}