// Event topic names export const Topics = { CALL_COMPLETED: 'call.completed', CALL_MISSED: 'call.missed', AGENT_STATE: 'agent.state', } as const; // Event payloads export type CallCompletedEvent = { callId: string | null; ucid: string; agentId: string; callerPhone: string; direction: string; durationSec: number; disposition: string; leadId: string | null; notes: string | null; timestamp: string; }; export type CallMissedEvent = { callId: string | null; callerPhone: string; leadId: string | null; leadName: string | null; timestamp: string; }; export type AgentStateEvent = { agentId: string; state: string; timestamp: string; }; export type EventPayload = CallCompletedEvent | CallMissedEvent | AgentStateEvent;