add chat :p
All checks were successful
Code quality checks / biome (push) Successful in 22s

This commit is contained in:
creations 2025-06-08 19:57:50 -04:00
parent ae3224c18b
commit a3b03fdec4
Signed by: creations
GPG key ID: 8F553AA4320FC711
14 changed files with 2200 additions and 37 deletions

31
types/chat.d.ts vendored Normal file
View file

@ -0,0 +1,31 @@
interface ChatMessage {
id: string;
username: string;
message: string;
timestamp: number;
streamId: string;
}
interface WebSocketMessage {
type: "join_chat" | "send_message" | "leave_chat" | "load_history";
streamId?: string;
username?: string;
message?: string;
}
interface WebSocketResponse {
type:
| "chat_message"
| "chat_history"
| "user_joined"
| "user_left"
| "error"
| "connected";
data?: any;
error?: string;
}
interface UserInfo {
streamId?: string | undefined;
username?: string | undefined;
}