export const REALTIME_EVENTS = { // Contact events CONTACT_CREATED: 'contact.created', CONTACT_UPDATED: 'contact.updated', CONTACT_DELETED: 'contact.deleted', // Conversation events MESSAGE_RECEIVED: 'message.received', MESSAGE_SENT: 'message.sent', CONVERSATION_UPDATED: 'conversation.updated', // Opportunity events OPPORTUNITY_CREATED: 'opportunity.created', OPPORTUNITY_UPDATED: 'opportunity.updated', OPPORTUNITY_STAGE_CHANGED: 'opportunity.stage_changed', // System events SYNC_COMPLETE: 'sync.complete', WEBHOOK_RECEIVED: 'webhook.received', } as const; export type RealtimeEvent = typeof REALTIME_EVENTS[keyof typeof REALTIME_EVENTS]; export interface RealtimeMessage { event: RealtimeEvent; data: T; timestamp: string; userId?: string; }