/**
 * Shared types for the per-entity activity timeline (wave-12).
 */

export type ActorType = 'user' | 'system' | 'customer'

export interface ActivityEvent {
  id: string
  actorId: string | null
  actorName: string | null      // resolved from users table; null for system events
  actorType: ActorType
  eventType: string
  metadata: Record<string, unknown>   // event-type-specific (e.g. status_changed → { from, to })
  note: string | null
  createdAt: string             // ISO8601
}

export interface ActivityFeedResponse {
  events: ActivityEvent[]
  hasMore: boolean
}
