epq-web/src/Chat/ChatMessage.tsx
Zhongheng Liu 49e7eacb0b
added type compatibility layer
added text data entry for sending new messages
added websockets connection
added type annots
UNTESTED interop between TSX and Java backend
2023-12-21 12:34:29 +02:00

34 lines
582 B
TypeScript

enum FileType {
FILE_TXT,
DOCUMENT_WORD,
DOCUMENT_PDF,
IMAGE,
EXEC_BINARY,
UNKNOWN,
}
export type User = {
name: string,
userId: string,
avatar: Avatar
}
export type Avatar = {
pictureUri: string,
}
export type Attachment = {
name: string,
uri: string,
sizeBytes: number,
filetype: FileType
}
export type ChatMessage = {
from: string,
fromIP: string,
to: Array<string>,
toIPs: Array<string>,
timestampPosted: number,
message: string,
attachments: Attachment
}
export type ServerMsgType = {
}