sin-titulo

Pasted Nov 20, 2026, 5:28 AM1 file20 lines

Scan to open on your phone

Point a camera at the QR code - it opens this exact paste, no app needed.

https://codepastes.com/zzgs129t5cpewh2v
sin-titulo
// types/chat.ts
export interface ChatMessage {
  id: string;
  ticketId: string;
  senderId: string;
  senderRole: 'client' | 'agent';
  text: string;
  timestamp: Date;
}

export interface ServerToClientEvents {
  receive_message: (message: ChatMessage) => void;
  agent_typing: (isTyping: boolean) => void;
}

export interface ClientToServerEvents {
  join_ticket_room: (ticketId: string) => void;
  send_message: (message: Omit<ChatMessage, 'id' | 'timestamp'>) => void;
}

477 chars · codepastes.com