wip
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user