/**
 * SSE Event Types - Central Union
 *
 * Aggregates all domain-specific SSE events into a type-safe union
 */

import type { NotificationSSEEvent, NotificationCountUpdatedEvent } from '../../operations/notifications/sse-events'
import type { ActivitySSEEvent, ActivityCreatedEvent, ActivityConnectedEvent } from '../../operations/activities/sse-events'
import type { CommandQueueSSEEvent, CommandQueueTaskUpdatedEvent, CommandQueueConnectedEvent } from '../../commands/queue/sse-events'
import type { DeliverySSEEvent, DeliveryConnectedEvent, DeliveryEntityChangedEvent } from '../../business/projects/sse-events'
import type {
  ExecutionSSEEvent,
  ExecutionStartedEvent,
  ExecutionLogEvent,
  ExecutionCompleteEvent,
  ExecutionConnectedEvent
} from '../../execution/core/sse-executions'

// Re-export domain-specific event types
export type { NotificationSSEEvent, NotificationCountUpdatedEvent }
export type { ActivitySSEEvent, ActivityCreatedEvent, ActivityConnectedEvent }
export type { CommandQueueSSEEvent, CommandQueueTaskUpdatedEvent, CommandQueueConnectedEvent }
export type { DeliverySSEEvent, DeliveryConnectedEvent, DeliveryEntityChangedEvent }
export type { ExecutionSSEEvent, ExecutionStartedEvent, ExecutionLogEvent, ExecutionCompleteEvent, ExecutionConnectedEvent }

/**
 * Union of all application-level SSE events across all domains
 *
 * Use this for generic SSE handling that needs to support all event types.
 * For domain-specific handling, use NotificationSSEEvent, ActivitySSEEvent, ExecutionSSEEvent, etc.
 */
export type AppSSEEvent =
  | NotificationSSEEvent
  | ActivitySSEEvent
  | CommandQueueSSEEvent
  | DeliverySSEEvent
  | ExecutionSSEEvent
