feat(stats): scaffold LibrarySummaryRow type and empty field

This commit is contained in:
2026-04-09 21:53:19 -07:00
parent 928a0d6b61
commit 8e77e422e8

View File

@@ -27,6 +27,19 @@ interface TrendPerAnimePoint {
value: number; 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;
}
interface TrendSessionMetricRow { interface TrendSessionMetricRow {
startedAtMs: number; startedAtMs: number;
epochDay: number; epochDay: number;
@@ -79,6 +92,7 @@ export interface TrendsDashboardQueryResult {
watchTimeByDayOfWeek: TrendChartPoint[]; watchTimeByDayOfWeek: TrendChartPoint[];
watchTimeByHour: TrendChartPoint[]; watchTimeByHour: TrendChartPoint[];
}; };
librarySummary: LibrarySummaryRow[];
} }
const TREND_DAY_LIMITS: Record<Exclude<TrendRange, 'all'>, number> = { const TREND_DAY_LIMITS: Record<Exclude<TrendRange, 'all'>, number> = {
@@ -702,5 +716,6 @@ export function getTrendsDashboard(
watchTimeByDayOfWeek: buildWatchTimeByDayOfWeek(sessions), watchTimeByDayOfWeek: buildWatchTimeByDayOfWeek(sessions),
watchTimeByHour: buildWatchTimeByHour(sessions), watchTimeByHour: buildWatchTimeByHour(sessions),
}, },
librarySummary: [],
}; };
} }