Code quality improvements and cleanup + Implemented ChatService
Some checks failed
Setup testing environment and test the code / build (push) Has been cancelled
Some checks failed
Setup testing environment and test the code / build (push) Has been cancelled
This commit is contained in:
28
src/domain/websocket.schema.ts
Normal file
28
src/domain/websocket.schema.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
export interface WSListenerPipe {
|
||||
identifier: string; // Any identifier that is unique to the service (chatid, networkId, etc...)
|
||||
onNewConnId: (newConnId: string) => void;
|
||||
onNewMessage: MessageListener;
|
||||
}
|
||||
|
||||
export type MessageListener = (action: string, data: string) => void
|
||||
|
||||
export interface WSMakeTokenReq {
|
||||
userid: string
|
||||
}
|
||||
|
||||
export interface WSMakeTokenResp {
|
||||
token: string
|
||||
}
|
||||
|
||||
export interface WSConnIdPayload {
|
||||
connId: string
|
||||
}
|
||||
|
||||
export interface WSConnIdPayload {
|
||||
connId: string
|
||||
}
|
||||
|
||||
export interface WSMessagePayload {
|
||||
action: string,
|
||||
data: string
|
||||
}
|
||||
Reference in New Issue
Block a user