cre-sync/lib/realtime/events.ts
BusyBee3333 4e6467ffb0 Add CRESync CRM application with Setup page
- Build complete Next.js CRM for commercial real estate
- Add authentication with JWT sessions and role-based access
- Add GoHighLevel API integration for contacts, conversations, opportunities
- Add AI-powered Control Center with tool calling
- Add Setup page with onboarding checklist (/setup)
- Add sidebar navigation with Setup menu item
- Fix type errors in onboarding API, GHL services, and control center tools
- Add Prisma schema with SQLite for local development
- Add UI components with clay morphism design system

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 17:30:55 -05:00

30 lines
799 B
TypeScript

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<T = any> {
event: RealtimeEvent;
data: T;
timestamp: string;
userId?: string;
}