Result of a statistics aggregation operation including data, options, and timing.

export interface StatisticsAggregationResult {
filteredData: {
matchResults: NormalizedMatchForStats[];
readingHistory: ReadingHistory;
};
filterOptions: {
genres: string[];
formats: string[];
statuses: string[];
tags: string[];
};
comparisonDatasets: {
primary: {
trends: Array<{ date: string; chapters: number; count: number }>;
velocity: {
perDay: number;
perWeek: number;
perMonth: number;
totalChapters: number;
activeDays: number;
};
habits: {
byDayOfWeek: Array<{ day: string; chapters: number }>;
byTimeOfDay: Array<{ hour: string; chapters: number }>;
peakDay: string | null;
peakHour: string | null;
};
};
secondary: {
trends: Array<{ date: string; chapters: number; count: number }>;
velocity: {
perDay: number;
perWeek: number;
perMonth: number;
totalChapters: number;
activeDays: number;
};
habits: {
byDayOfWeek: Array<{ day: string; chapters: number }>;
byTimeOfDay: Array<{ hour: string; chapters: number }>;
peakDay: string | null;
peakHour: string | null;
};
};
primaryLabel: string;
secondaryLabel: string;
} | null;
cacheKey: string;
timing: {
filteringTimeMs: number;
aggregationTimeMs: number;
totalTimeMs: number;
};
}
interface StatisticsAggregationResult {
    filteredData: {
        matchResults: NormalizedMatchForStats[];
        readingHistory: ReadingHistory;
    };
    filterOptions: {
        genres: string[];
        formats: string[];
        statuses: string[];
        tags: string[];
    };
    comparisonDatasets: | null
    | {
        primary: {
            trends: { date: string; chapters: number; count: number }[];
            velocity: {
                perDay: number;
                perWeek: number;
                perMonth: number;
                totalChapters: number;
                activeDays: number;
            };
            habits: {
                byDayOfWeek: { day: string; chapters: number }[];
                byTimeOfDay: { hour: string; chapters: number }[];
                peakDay: null | string;
                peakHour: null | string;
            };
        };
        secondary: {
            trends: { date: string; chapters: number; count: number }[];
            velocity: {
                perDay: number;
                perWeek: number;
                perMonth: number;
                totalChapters: number;
                activeDays: number;
            };
            habits: {
                byDayOfWeek: { day: string; chapters: number }[];
                byTimeOfDay: { hour: string; chapters: number }[];
                peakDay: null | string;
                peakHour: null | string;
            };
        };
        primaryLabel: string;
        secondaryLabel: string;
    };
    cacheKey: string;
    timing: {
        filteringTimeMs: number;
        aggregationTimeMs: number;
        totalTimeMs: number;
    };
}

Properties

filteredData: {
    matchResults: NormalizedMatchForStats[];
    readingHistory: ReadingHistory;
}
filterOptions: {
    genres: string[];
    formats: string[];
    statuses: string[];
    tags: string[];
}
comparisonDatasets:
    | null
    | {
        primary: {
            trends: { date: string; chapters: number; count: number }[];
            velocity: {
                perDay: number;
                perWeek: number;
                perMonth: number;
                totalChapters: number;
                activeDays: number;
            };
            habits: {
                byDayOfWeek: { day: string; chapters: number }[];
                byTimeOfDay: { hour: string; chapters: number }[];
                peakDay: null | string;
                peakHour: null | string;
            };
        };
        secondary: {
            trends: { date: string; chapters: number; count: number }[];
            velocity: {
                perDay: number;
                perWeek: number;
                perMonth: number;
                totalChapters: number;
                activeDays: number;
            };
            habits: {
                byDayOfWeek: { day: string; chapters: number }[];
                byTimeOfDay: { hour: string; chapters: number }[];
                peakDay: null | string;
                peakHour: null | string;
            };
        };
        primaryLabel: string;
        secondaryLabel: string;
    }
cacheKey: string
timing: {
    filteringTimeMs: number;
    aggregationTimeMs: number;
    totalTimeMs: number;
}