import type { MeteringDay } from './session-metering.js'; import { type PricingConfig } from './pricing.js'; export interface DayRange { from: string; to: string; } /** The outcome of reading `from`/`to` off a request. * * `fullRangeFallback` separates the two ways `range` comes back null, which * are NOT the same event: * * - false — no range was asked for (the All time preset). Legitimate, and * the figures are honestly labelled all-time. * - true — a range WAS asked for and could not be honoured. This is the * most misleading state available, because the page then shows * all-time figures under a bounded heading. */ export interface ParsedRange { range: DayRange | null; fullRangeFallback: boolean; } export declare function parseDayRange(from: unknown, to: unknown): ParsedRange; export interface RangeSlice { activeMs: number; tokens: number; costGBP: { opus: number; sonnet: number; }; /** Days falling inside the range. 0 is a real answer — a quiet month — and is * what the caller reports as an empty slice. */ matchedDays: number; } /** Sum a session's day rows over an inclusive range. A null range means every * day. * * Cost is re-derived from the SUMMED tokens rather than summed from the * per-day costs, matching how computeMetering derives its own totals — adding * already-rounded figures compounds their rounding. */ export declare function sliceMeteringDays(days: MeteringDay[], range: DayRange | null, cfg?: PricingConfig): RangeSlice; //# sourceMappingURL=activity-range.d.ts.map