import type { TemperatureReading } from "./types.js"; /** A single milestone kind on a cook timeline. */ export type TimelineKind = "start" | "low" | "stall" | "target" | "peak" | "end"; /** A single annotated milestone on a cook timeline. */ export interface TimelineEvent { /** What kind of milestone this is. */ kind: TimelineKind; /** Timestamp of the reading that triggered the milestone. */ timestamp: Date; /** Whole minutes from the first reading. */ minuteOffset: number; /** Temperature at the milestone, in Fahrenheit. */ tempF: number; /** Short human-readable description. */ detail: string; } /** A full annotated cook timeline. */ export interface CookTimeline { /** Milestones in chronological order. */ events: TimelineEvent[]; /** Timestamp of the first reading, or null when there are none. */ startedAt: Date | null; /** Timestamp of the last reading, or null when there are none. */ endedAt: Date | null; /** Whole minutes from first to last reading. */ durationMinutes: number; /** Lowest temperature seen, in Fahrenheit, or null when there are no readings. */ minTempF: number | null; /** Highest temperature seen, in Fahrenheit, or null when there are no readings. */ maxTempF: number | null; /** Whether the target was reached (only meaningful when a target was given). */ targetReached: boolean; } /** Options for {@link buildCookTimeline}. */ export interface TimelineOptions { /** Target internal temperature in Fahrenheit. When set, the first crossing is marked. */ targetF?: number; /** Maximum variance (degrees) for the stall window. Default 2. */ stallThresholdDegrees?: number; /** Minimum duration (minutes) for a plateau to count as a stall. Default 30. */ stallMinutes?: number; } /** * Turn a chronological series of probe readings into an annotated cook timeline. * * Milestones detected: the start, the low point, the longest stall, the first * target crossing (when a target is given), the peak, and the end. Non-anchor * milestones that land on the first or last reading are folded into the start * and end lines; when two milestones share a reading, the more specific one * wins (target over stall over peak over low). * * Pure and side-effect free. Readings must already be in Fahrenheit and sorted * chronologically (oldest first). */ export declare function buildCookTimeline(readings: TemperatureReading[], options?: TimelineOptions): CookTimeline; //# sourceMappingURL=timeline.d.ts.map