export const NOTIFICATION_RMQ_QUEUE = 'oudelaa.notifications';
export const NOTIFICATION_RMQ_DLQ = 'oudelaa.notifications.dlq';

export const NOTIFICATION_RPC = {
  list: 'notifications.list',
  unreadCount: 'notifications.unread-count',
  markRead: 'notifications.mark-read',
  markAllRead: 'notifications.mark-all-read',
} as const;

export interface MessageContext {
  correlationId: string;
  requestId: string;
}

export interface NotificationListRequest {
  recipientId: string;
  query: Record<string, unknown>;
}

export interface NotificationUnreadCountRequest {
  recipientId: string;
  category?: string;
}

export interface NotificationMarkReadRequest {
  recipientId: string;
  notificationId: string;
}

export interface NotificationMarkAllReadRequest {
  recipientId: string;
}

export interface NotificationRealtimeUpdate {
  recipientId: string;
  notification?: unknown;
  unreadCount: number;
  unreadCounts?: Record<string, number>;
}

export interface NotificationRpcResponse<T> {
  result: T;
  realtime?: NotificationRealtimeUpdate;
}
