mirror of
https://github.com/FranP-code/inbox-negotiator.git
synced 2025-10-13 00:42:26 +00:00
Adds AI-driven conversation tracking to debt negotiation
Introduces comprehensive conversation history with a new table and UI for tracking all negotiation emails, AI analysis, and financial outcomes. Enhances real-time updates, manages negotiation rounds, and supports new statuses for negotiation lifecycle. Integrates AI-powered extraction and response analysis to automate intent detection and outcome calculations, improving transparency and automation of debt resolution.
This commit is contained in:
@@ -27,6 +27,10 @@ export type Debt = {
|
||||
| "negotiating"
|
||||
| "approved"
|
||||
| "sent"
|
||||
| "awaiting_response"
|
||||
| "counter_negotiating"
|
||||
| "accepted"
|
||||
| "rejected"
|
||||
| "settled"
|
||||
| "failed"
|
||||
| "opted_out";
|
||||
@@ -35,6 +39,11 @@ export type Debt = {
|
||||
user_id: string;
|
||||
description?: string | null;
|
||||
due_date?: string | null;
|
||||
conversation_count?: number;
|
||||
last_message_at?: string;
|
||||
negotiation_round?: number;
|
||||
prospected_savings?: number;
|
||||
actual_savings?: number;
|
||||
metadata?: Record<string, any> | null;
|
||||
};
|
||||
|
||||
@@ -84,3 +93,24 @@ export type DebtVariable = {
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
export type ConversationMessage = {
|
||||
id: string;
|
||||
debt_id: string;
|
||||
message_type:
|
||||
| "initial_debt"
|
||||
| "negotiation_sent"
|
||||
| "response_received"
|
||||
| "counter_offer"
|
||||
| "acceptance"
|
||||
| "rejection";
|
||||
direction: "inbound" | "outbound";
|
||||
subject?: string;
|
||||
body: string;
|
||||
from_email?: string;
|
||||
to_email?: string;
|
||||
message_id?: string;
|
||||
ai_analysis?: Record<string, any>;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user