diff --git a/stats/src/lib/api-client.test.ts b/stats/src/lib/api-client.test.ts index c26c15c2..88f9989d 100644 --- a/stats/src/lib/api-client.test.ts +++ b/stats/src/lib/api-client.test.ts @@ -84,14 +84,7 @@ test('getTrendsDashboard requests the chart-ready trends endpoint with range and lookups: [], }, ratios: { lookupsPerHundred: [] }, - animePerDay: { - episodes: [], - watchTime: [], - cards: [], - words: [], - lookups: [], - lookupsPerHundred: [], - }, + librarySummary: [], animeCumulative: { watchTime: [], episodes: [], @@ -133,14 +126,7 @@ test('getTrendsDashboard accepts 365d range and builds correct URL', async () => lookups: [], }, ratios: { lookupsPerHundred: [] }, - animePerDay: { - episodes: [], - watchTime: [], - cards: [], - words: [], - lookups: [], - lookupsPerHundred: [], - }, + librarySummary: [], animeCumulative: { watchTime: [], episodes: [], diff --git a/stats/src/types/stats.ts b/stats/src/types/stats.ts index 29e05f6b..81861fee 100644 --- a/stats/src/types/stats.ts +++ b/stats/src/types/stats.ts @@ -288,6 +288,19 @@ export interface TrendPerAnimePoint { value: number; } +export interface LibrarySummaryRow { + title: string; + watchTimeMin: number; + videos: number; + sessions: number; + cards: number; + words: number; + lookups: number; + lookupsPerHundred: number | null; + firstWatched: number; + lastWatched: number; +} + export interface TrendsDashboardData { activity: { watchTime: TrendChartPoint[]; @@ -307,14 +320,7 @@ export interface TrendsDashboardData { ratios: { lookupsPerHundred: TrendChartPoint[]; }; - animePerDay: { - episodes: TrendPerAnimePoint[]; - watchTime: TrendPerAnimePoint[]; - cards: TrendPerAnimePoint[]; - words: TrendPerAnimePoint[]; - lookups: TrendPerAnimePoint[]; - lookupsPerHundred: TrendPerAnimePoint[]; - }; + librarySummary: LibrarySummaryRow[]; animeCumulative: { watchTime: TrendPerAnimePoint[]; episodes: TrendPerAnimePoint[];