export type DeliveryEntityType = 'project' | 'milestone' | 'task' | 'note' | 'activity'

export type DeliveryEntityChangedAction = 'created' | 'updated' | 'deleted'

export interface DeliveryConnectedEvent {
  type: 'connected'
  timestamp: number
}

export interface DeliveryEntityChangedEvent {
  type: 'entity_changed'
  timestamp: number
  data: {
    entityType: DeliveryEntityType
    action: DeliveryEntityChangedAction
    projectId: string
    entityId: string
  }
}

export type DeliverySSEEvent = DeliveryConnectedEvent | DeliveryEntityChangedEvent
