Improve operator CRM flows and UI
This commit is contained in:
@@ -96,6 +96,36 @@ class CustomerOut(CustomerCreate):
|
||||
created_at: str
|
||||
|
||||
|
||||
class CustomerHistoryEventOut(BaseModel):
|
||||
timestamp: str
|
||||
kind: str
|
||||
title: str
|
||||
body: str
|
||||
note: str = ""
|
||||
interaction_id: str | None = None
|
||||
thread_id: str | None = None
|
||||
call_id: str | None = None
|
||||
|
||||
|
||||
class CustomerHistorySummaryOut(BaseModel):
|
||||
contact_points: int = 0
|
||||
open_cases: int = 0
|
||||
active_channels: list[str] = Field(default_factory=list)
|
||||
latest_event_at: str | None = None
|
||||
latest_event_title: str | None = None
|
||||
primary_phone: str | None = None
|
||||
primary_telegram_thread_id: str | None = None
|
||||
|
||||
|
||||
class CustomerHistoryOut(BaseModel):
|
||||
customer: CustomerOut
|
||||
summary: CustomerHistorySummaryOut
|
||||
interactions: list["InteractionOut"] = Field(default_factory=list)
|
||||
telegram_threads: list["TelegramThreadOut"] = Field(default_factory=list)
|
||||
live_calls: list["VoiceLiveCallOut"] = Field(default_factory=list)
|
||||
history: list[CustomerHistoryEventOut] = Field(default_factory=list)
|
||||
|
||||
|
||||
class InteractionCreate(BaseModel):
|
||||
channel: Channel
|
||||
subject: str = Field(min_length=3)
|
||||
|
||||
Reference in New Issue
Block a user