chore(frontend): add new API types

This commit is contained in:
2026-03-16 16:46:07 +00:00
parent 3468fdc2ea
commit 8a13444b16

View File

@@ -71,6 +71,25 @@ type NGram = {
type AverageEmotionByTopic = Emotion & { type AverageEmotionByTopic = Emotion & {
n: number; n: number;
topic: string; 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[]; average_emotion_by_topic: AverageEmotionByTopic[];
common_three_phrases: NGram[]; common_three_phrases: NGram[];
common_two_phrases: NGram[]; common_two_phrases: NGram[];
overall_emotion_average?: OverallEmotionAverage[];
dominant_emotion_distribution?: DominantEmotionDistribution[];
emotion_by_source?: EmotionBySource[];
} }
// Summary // Summary
@@ -110,6 +132,9 @@ export type {
UserAnalysisResponse, UserAnalysisResponse,
FrequencyWord, FrequencyWord,
AverageEmotionByTopic, AverageEmotionByTopic,
OverallEmotionAverage,
DominantEmotionDistribution,
EmotionBySource,
SummaryResponse, SummaryResponse,
TimeAnalysisResponse, TimeAnalysisResponse,
ContentAnalysisResponse, ContentAnalysisResponse,