feat: update session metrics and processing to use enums for sentiment and streamline status tracking

This commit is contained in:
Max Kowalski
2025-06-27 23:23:09 +02:00
parent 8ffd5a7a2c
commit 9238c9a6af
9 changed files with 38 additions and 79 deletions

View File

@ -54,8 +54,7 @@ export interface ChatSession {
language?: string | null;
country?: string | null;
ipAddress?: string | null;
sentiment?: number | null;
sentimentCategory?: string | null; // "positive", "neutral", "negative" from OpenAPI
sentiment?: string | null; // Now a SentimentCategory enum: "POSITIVE", "NEUTRAL", "NEGATIVE"
messagesSent?: number;
startTime: Date;
endTime?: Date | null;
@ -66,14 +65,11 @@ export interface ChatSession {
avgResponseTime?: number | null;
escalated?: boolean;
forwardedHr?: boolean;
tokens?: number;
tokensEur?: number;
initialMsg?: string;
fullTranscriptUrl?: string | null;
processed?: boolean | null; // Flag for post-processing status
questions?: string | null; // JSON array of questions asked by user
summary?: string | null; // Brief summary of the conversation
messages?: Message[]; // Parsed messages from transcript
transcriptContent?: string | null; // Full transcript content
}
export interface SessionQuery {