/** * Client-side Plan Update & Regeneration * * This module applies local changes (from localStorage) to the plan JSON * and generates downloadable updated files (JSON + HTML). * * This is the browser equivalent of the CLI `modify` + `render` commands. */ import type { TrainingPlan, Workout } from "../../schema/training-plan.js"; export interface PlanChanges { moved: Record; edited: Record>; deleted: string[]; added: Record; } export interface UpdateResult { success: boolean; planFilename?: string; changesSummary?: { deleted: number; edited: number; moved: number; added: number; completed: number; }; error?: string; } /** * Main function: Update plan and generate downloadable JSON * * This applies changes from localStorage and downloads the updated plan JSON. * To get the HTML, use: endurance-coach render updated.json -o updated.html */ export declare function updatePlanAndRegenerate(plan: TrainingPlan, changes: PlanChanges, completed: Record): UpdateResult; /** * Get changes from localStorage */ export declare function getChangesFromLocalStorage(planId: string): { changes: PlanChanges; completed: Record; }; /** * Check if there are any pending changes */ export declare function hasPendingChanges(planId: string): boolean;