/** The delivery seam. Dev = Web Push (VAPID); prod can swap to email/FCM/APNs. */
export interface PushSub {
  endpoint: string;
  p256dh: string;
  auth: string;
}

export interface NotificationPayload {
  title: string;
  body: string;
  data: { threadId: string; interactionId?: string };
}

export interface NotificationPort {
  deliver(sub: PushSub, payload: NotificationPayload): Promise<'sent' | 'gone' | 'failed'>;
}

export const NOTIFICATION_PORT = Symbol('NOTIFICATION_PORT');
