mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
progress on server refactor
This commit is contained in:
@ -1,10 +1,14 @@
|
||||
export const EVENT = {
|
||||
// Internal Events
|
||||
CONNECTING: 'CONNECTING',
|
||||
CONNECTED: 'CONNECTED',
|
||||
DISCONNECTED: 'DISCONNECTED',
|
||||
TRACK: 'TRACK',
|
||||
MESSAGE: 'MESSAGE',
|
||||
DATA: 'DATA',
|
||||
|
||||
// Websocket Events
|
||||
DISCONNECT: 'disconnect',
|
||||
SIGNAL: {
|
||||
ANSWER: 'signal/answer',
|
||||
PROVIDE: 'signal/provide',
|
||||
@ -25,8 +29,7 @@ export const EVENT = {
|
||||
REQUESTING: 'control/requesting',
|
||||
},
|
||||
CHAT: {
|
||||
SEND: 'chat/send',
|
||||
RECEIVE: 'chat/receive',
|
||||
MESSAGE: 'chat/message',
|
||||
EMOJI: 'chat/emoji',
|
||||
},
|
||||
ADMIN: {
|
||||
@ -43,9 +46,10 @@ export const EVENT = {
|
||||
} as const
|
||||
|
||||
export type Events = typeof EVENT
|
||||
export type WebSocketEvents = ControlEvents | IdentityEvents | MemberEvents | SignalEvents | ChatEvents
|
||||
export type WebSocketEvents = SystemEvents | ControlEvents | IdentityEvents | MemberEvents | SignalEvents | ChatEvents
|
||||
export type SystemEvents = typeof EVENT.DISCONNECT
|
||||
export type ControlEvents = typeof EVENT.CONTROL.LOCKED | typeof EVENT.CONTROL.RELEASE | typeof EVENT.CONTROL.REQUEST
|
||||
export type IdentityEvents = typeof EVENT.IDENTITY.PROVIDE | typeof EVENT.IDENTITY.DETAILS
|
||||
export type MemberEvents = typeof EVENT.MEMBER.LIST | typeof EVENT.MEMBER.CONNECTED | typeof EVENT.MEMBER.DISCONNECTED
|
||||
export type SignalEvents = typeof EVENT.SIGNAL.ANSWER | typeof EVENT.SIGNAL.PROVIDE
|
||||
export type ChatEvents = typeof EVENT.CHAT.SEND | typeof EVENT.CHAT.RECEIVE
|
||||
export type ChatEvents = typeof EVENT.CHAT.MESSAGE | typeof EVENT.CHAT.EMOJI
|
||||
|
Reference in New Issue
Block a user