mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-11 16:19:27 -07:00
refactor(stats): replace animePerDay type with librarySummary
This commit is contained in:
@@ -84,14 +84,7 @@ test('getTrendsDashboard requests the chart-ready trends endpoint with range and
|
|||||||
lookups: [],
|
lookups: [],
|
||||||
},
|
},
|
||||||
ratios: { lookupsPerHundred: [] },
|
ratios: { lookupsPerHundred: [] },
|
||||||
animePerDay: {
|
librarySummary: [],
|
||||||
episodes: [],
|
|
||||||
watchTime: [],
|
|
||||||
cards: [],
|
|
||||||
words: [],
|
|
||||||
lookups: [],
|
|
||||||
lookupsPerHundred: [],
|
|
||||||
},
|
|
||||||
animeCumulative: {
|
animeCumulative: {
|
||||||
watchTime: [],
|
watchTime: [],
|
||||||
episodes: [],
|
episodes: [],
|
||||||
@@ -133,14 +126,7 @@ test('getTrendsDashboard accepts 365d range and builds correct URL', async () =>
|
|||||||
lookups: [],
|
lookups: [],
|
||||||
},
|
},
|
||||||
ratios: { lookupsPerHundred: [] },
|
ratios: { lookupsPerHundred: [] },
|
||||||
animePerDay: {
|
librarySummary: [],
|
||||||
episodes: [],
|
|
||||||
watchTime: [],
|
|
||||||
cards: [],
|
|
||||||
words: [],
|
|
||||||
lookups: [],
|
|
||||||
lookupsPerHundred: [],
|
|
||||||
},
|
|
||||||
animeCumulative: {
|
animeCumulative: {
|
||||||
watchTime: [],
|
watchTime: [],
|
||||||
episodes: [],
|
episodes: [],
|
||||||
|
|||||||
@@ -288,6 +288,19 @@ export 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;
|
||||||
|
}
|
||||||
|
|
||||||
export interface TrendsDashboardData {
|
export interface TrendsDashboardData {
|
||||||
activity: {
|
activity: {
|
||||||
watchTime: TrendChartPoint[];
|
watchTime: TrendChartPoint[];
|
||||||
@@ -307,14 +320,7 @@ export interface TrendsDashboardData {
|
|||||||
ratios: {
|
ratios: {
|
||||||
lookupsPerHundred: TrendChartPoint[];
|
lookupsPerHundred: TrendChartPoint[];
|
||||||
};
|
};
|
||||||
animePerDay: {
|
librarySummary: LibrarySummaryRow[];
|
||||||
episodes: TrendPerAnimePoint[];
|
|
||||||
watchTime: TrendPerAnimePoint[];
|
|
||||||
cards: TrendPerAnimePoint[];
|
|
||||||
words: TrendPerAnimePoint[];
|
|
||||||
lookups: TrendPerAnimePoint[];
|
|
||||||
lookupsPerHundred: TrendPerAnimePoint[];
|
|
||||||
};
|
|
||||||
animeCumulative: {
|
animeCumulative: {
|
||||||
watchTime: TrendPerAnimePoint[];
|
watchTime: TrendPerAnimePoint[];
|
||||||
episodes: TrendPerAnimePoint[];
|
episodes: TrendPerAnimePoint[];
|
||||||
|
|||||||
Reference in New Issue
Block a user