/**
 * Comms adapter interfaces — system-communications-notifications.
 *
 * `CommsAdapter` is the broader send/receive interface for inbound-capable
 * bot adapters (Telegram, Slack, WhatsApp). It complements the delivery-only
 * `NotificationAdapter` in notification.ts.
 */

export interface Attachment {
  filename: string
  contentType: string
  content: ArrayBuffer | string
}

export interface OutboundMessage {
  to: string
  subject?: string
  body: string
  html?: string
  attachments?: Attachment[]
}

export interface InboundMessage {
  from: string
  text: string
  chatId: string
  metadata: Record<string, unknown>
}

export interface CommsAdapter {
  id: string
  name: string
  send(message: OutboundMessage): Promise<void>
  receive?(payload: unknown): InboundMessage | null
}
