From 8a13444b16a6cafd35093ffacc530ba478fccf1e Mon Sep 17 00:00:00 2001 From: Dylan De Faoite Date: Mon, 16 Mar 2026 16:46:07 +0000 Subject: [PATCH] chore(frontend): add new API types --- frontend/src/types/ApiTypes.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/frontend/src/types/ApiTypes.ts b/frontend/src/types/ApiTypes.ts index 5feaddf..43b035b 100644 --- a/frontend/src/types/ApiTypes.ts +++ b/frontend/src/types/ApiTypes.ts @@ -71,6 +71,25 @@ type NGram = { type AverageEmotionByTopic = Emotion & { n: number; topic: string; + [key: string]: string | number; +}; + +type OverallEmotionAverage = { + emotion: string; + score: number; +}; + +type DominantEmotionDistribution = { + emotion: string; + count: number; + ratio: number; +}; + +type EmotionBySource = { + source: string; + dominant_emotion: string; + dominant_score: number; + event_count: number; }; @@ -79,6 +98,9 @@ type ContentAnalysisResponse = { average_emotion_by_topic: AverageEmotionByTopic[]; common_three_phrases: NGram[]; common_two_phrases: NGram[]; + overall_emotion_average?: OverallEmotionAverage[]; + dominant_emotion_distribution?: DominantEmotionDistribution[]; + emotion_by_source?: EmotionBySource[]; } // Summary @@ -110,6 +132,9 @@ export type { UserAnalysisResponse, FrequencyWord, AverageEmotionByTopic, + OverallEmotionAverage, + DominantEmotionDistribution, + EmotionBySource, SummaryResponse, TimeAnalysisResponse, ContentAnalysisResponse,