The day to read, as YYYY-MM-DD.
That day's stats keyed by supplier, or undefined when none exist.
const day = await getSupplierStatsEntry("2026-07-18");
day?.Loudwolf.queries; // => 3
export async function getSupplierStatsEntry(
dateKey: string,
): Promise<Record<string, SupplierDayStats> | undefined> {
try {
const db = await getDB();
const record = await db.get(IDB_STORE.SUPPLIER_STATS, dateKey);
return record?.suppliers;
} catch (error) {
logger.error('Failed to get supplier stats entry from IndexedDB', { error });
return undefined;
}
}
Reads the per-supplier stats recorded for one day.