This commit is contained in:
2026-02-21 20:12:30 +03:00
parent d632bf0f40
commit 6e8c068231
6 changed files with 97 additions and 22 deletions

View File

@@ -1,14 +1,24 @@
export interface WebSocketData {
chatId?: string
token?: string
userId?: number
userId: number
}
export type LoginDto = { email: string }
interface ChatData {
type: 'chat'
id: string
interface ListMessages {
type: 'GET_MESSAGES'
data: {
chat_id: string
}
}
interface CreateMessage {
type: 'CREATE_MESSAGE'
data: {
chat_id: string
text: string
}
}
interface UserData {
@@ -22,4 +32,4 @@ interface MessageData {
text: string
}
type WsData = ChatData | UserData | MessageData
export type WsData = ListMessages|CreateMessage