Add Ask Mento, customer mood, and Pipecat speech-to-text.

Ship assistant answers, contact moods, voice dictation, and the related CRM UI so these can be deployed to production.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-03 14:20:55 +03:30
co-authored by Cursor
parent 0dd2966f3c
commit 7757c0837d
43 changed files with 5156 additions and 1741 deletions
+36
View File
@@ -169,6 +169,16 @@ export interface LoyaltyTierSummaryDto {
color: string | null;
}
export const PERSON_MOODS = ["newcomer", "happy", "unhappy", "special"] as const;
export type PersonMood = (typeof PERSON_MOODS)[number];
export const PERSON_MOOD_LABELS: Record<PersonMood, string> = {
newcomer: "مشتری تازه وارد",
happy: "مشتری خوشحال",
unhappy: "مشتری ناراضی",
special: "مشتری خاص",
};
export interface PersonDto {
id: string;
firstName: string;
@@ -179,6 +189,7 @@ export interface PersonDto {
mobile: string | null;
position: string | null;
notes: string | null;
mood: PersonMood;
customFields: Record<string, unknown>;
loyaltyPoints: number;
loyaltyTier: LoyaltyTierSummaryDto | null;
@@ -196,6 +207,7 @@ export interface CreatePersonRequest {
mobile?: string;
position?: string;
notes?: string;
mood?: PersonMood;
companyId?: string | null;
customFields?: Record<string, unknown>;
ownerId?: string | null;
@@ -523,6 +535,30 @@ export interface ApplyNoteAiSuggestionRequest {
memoryItems?: Array<{ index: number; content: string }>;
}
export type AskMentoSourceType = 'person' | 'note' | 'activity' | 'deal' | 'memory';
export interface AskMentoSourceDto {
type: AskMentoSourceType;
id: string;
label: string;
}
export interface AskMentoRequest {
question: string;
personId?: string;
}
export interface AskMentoResponse {
answer: string;
sources: AskMentoSourceDto[];
}
export interface PersonAiSummaryDto {
text: string;
cta: string;
ctaKind: 'call' | 'activity';
}
export interface MemoryItemDto {
id: string;
personId: string;