import type { NotificationRecord } from '@platform-modules/notifications/inbox'

export type { NotificationRecord }

/**
 * Injected data seam for the browser. Every method targets the CURRENT user's
 * inbox — the consumer's route derives userId from the session, NEVER a param
 * (a browser-asserted userId would be an IDOR footgun).
 */
export interface NotificationClient {
  list(opts?: { limit?: number; cursor?: string; unreadOnly?: boolean }): Promise<{
    items: NotificationRecord[]
    nextCursor?: string
  }>
  unreadCount(): Promise<number>
  markRead(ids: string[] | 'all'): Promise<void>
}
