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