This commit is contained in:
2026-02-23 20:44:34 +03:00
parent 2d0bb1c749
commit d675d3ab9f
6 changed files with 1045 additions and 79 deletions

View File

@@ -2,6 +2,18 @@ export interface WebSocketData {
chatId?: string
token?: string
userId: number
email: string
}
export enum DATATYPE {
CHATS_LIST = 'CHATS_LIST',
CHATS_CREATE = 'CHATS_CREATE',
USERS_LIST = 'USERS_LIST',
USER_GET = 'USER_GET',
MESSAGES_LIST = 'MESSAGES_LIST',
MESSAGE_CREATE = 'MESSAGE_CREATE',
STATUS = 'STATUS',
ERROR = 'ERROR',
}
export type LoginDto = { email: string }
@@ -14,7 +26,7 @@ interface ListMessages {
}
interface CreateMessage {
type: 'CREATE_MESSAGE'
type: 'MESSAGE_CREATE'
data: {
chat_id: string
text: string
@@ -32,4 +44,4 @@ interface MessageData {
text: string
}
export type WsData = ListMessages|CreateMessage
export type WsData = ListMessages | CreateMessage