export type ComplaintSeverity = "low" | "med" | "high";
export type ComplaintCategory = "product_defect" | "billing" | "delivery" | "service" | "other";

export type ComplaintResult = {
  is_complaint: boolean;
  severity: ComplaintSeverity;
  category: ComplaintCategory;
  summary: string;
};

export type ComplaintRow = {
  id: number;
  agent_id: string | null;
  channel_id: string;
  chat_id: string;
  from_sender: string;
  content: string;
  is_complaint: number;
  severity: ComplaintSeverity;
  category: ComplaintCategory;
  summary: string;
  created_at: number;
  notified_at: number | null;
};

export interface ComplaintHistoryEntry {
  role: "user" | "agent";
  content: string;
  senderId?: string;
  ts: number;
}
