import { DurationUnit } from '@doist/todoist-sdk'; type ParsedDuration = { amount: number; unit: DurationUnit; }; export declare const DURATION_INPUT_DESCRIPTION = "The duration of the task. Use format: \"2h\" (hours), \"90m\" (minutes), \"2h30m\" (combined), \"1.5h\" (decimal hours), or \"3d\" (whole days; days cannot be combined with hours or minutes). Todoist apps only display durations under 24 hours: a longer or day-based duration is stored and reported by this server, but the apps show the task as having no duration."; export declare class DurationParseError extends Error { constructor(input: string, reason: string); } /** * Parses a duration string in the restricted syntax into the amount and unit * the API stores: whole days for "3d", otherwise minutes. * * @param durationStr - Duration string like "2h30m", "45m", "1.5h", "3d" * @returns Parsed duration amount and unit * @throws DurationParseError for invalid formats */ export declare function parseDuration(durationStr: string): ParsedDuration; /** * Formats a stored duration back to a human-readable string. * Used when returning task data to LLMs. * * The output mirrors the stored unit so it round-trips through `parseDuration`: * day durations become "3d", and minute durations always use hours/minutes * ("48h", never "2d") so a day-based and a minute-based duration stay * distinguishable. * * @param amount - Duration amount in the given unit * @param unit - The unit the amount is stored in * @returns Formatted duration string like "2h30m", "45m" or "3d" */ export declare function formatDuration(amount: number, unit?: DurationUnit): string; export {}; //# sourceMappingURL=duration-parser.d.ts.map