/** * Workout Template Zod Schema * * Runtime validation for workout template definitions. */ import { z } from "zod"; export declare const SportSchema: z.ZodEnum<{ strength: "strength"; swim: "swim"; bike: "bike"; run: "run"; brick: "brick"; }>; export declare const ParamTypeSchema: z.ZodEnum<{ string: "string"; number: "number"; duration: "duration"; int: "int"; distance: "distance"; }>; export declare const StepTypeSchema: z.ZodEnum<{ warmup: "warmup"; work: "work"; recovery: "recovery"; rest: "rest"; cooldown: "cooldown"; }>; export declare const WorkoutCategorySchema: z.ZodEnum<{ strength: "strength"; recovery: "recovery"; rest: "rest"; threshold: "threshold"; power: "power"; tempo: "tempo"; intervals: "intervals"; endurance: "endurance"; aerobic: "aerobic"; speed: "speed"; hills: "hills"; race: "race"; maintenance: "maintenance"; technique: "technique"; }>; export declare const TemplateParamSchema: z.ZodObject<{ type: z.ZodEnum<{ string: "string"; number: "number"; duration: "duration"; int: "int"; distance: "distance"; }>; required: z.ZodOptional; default: z.ZodOptional>; min: z.ZodOptional; max: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; export declare const TemplateParamsSchema: z.ZodRecord; required: z.ZodOptional; default: z.ZodOptional>; min: z.ZodOptional; max: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>>; export declare const TemplateStepSchema: z.ZodObject<{ type: z.ZodEnum<{ warmup: "warmup"; work: "work"; recovery: "recovery"; rest: "rest"; cooldown: "cooldown"; }>; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; export declare const TemplateIntervalSetSchema: z.ZodObject<{ type: z.ZodLiteral<"intervals">; repeats: z.ZodString; work: z.ZodObject<{ type: z.ZodEnum<{ warmup: "warmup"; work: "work"; recovery: "recovery"; rest: "rest"; cooldown: "cooldown"; }>; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; recovery: z.ZodObject<{ type: z.ZodEnum<{ warmup: "warmup"; work: "work"; recovery: "recovery"; rest: "rest"; cooldown: "cooldown"; }>; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; export declare const MainSetElementSchema: z.ZodUnion; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"intervals">; repeats: z.ZodString; work: z.ZodObject<{ type: z.ZodEnum<{ warmup: "warmup"; work: "work"; recovery: "recovery"; rest: "rest"; cooldown: "cooldown"; }>; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; recovery: z.ZodObject<{ type: z.ZodEnum<{ warmup: "warmup"; work: "work"; recovery: "recovery"; rest: "rest"; cooldown: "cooldown"; }>; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>]>; export declare const TemplateStructureSchema: z.ZodObject<{ warmup: z.ZodOptional; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>>>; main: z.ZodArray; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"intervals">; repeats: z.ZodString; work: z.ZodObject<{ type: z.ZodEnum<{ warmup: "warmup"; work: "work"; recovery: "recovery"; rest: "rest"; cooldown: "cooldown"; }>; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; recovery: z.ZodObject<{ type: z.ZodEnum<{ warmup: "warmup"; work: "work"; recovery: "recovery"; rest: "rest"; cooldown: "cooldown"; }>; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>]>>; cooldown: z.ZodOptional; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; export declare const WorkoutTemplateSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; sport: z.ZodEnum<{ strength: "strength"; swim: "swim"; bike: "bike"; run: "run"; brick: "brick"; }>; type: z.ZodString; category: z.ZodEnum<{ strength: "strength"; recovery: "recovery"; rest: "rest"; threshold: "threshold"; power: "power"; tempo: "tempo"; intervals: "intervals"; endurance: "endurance"; aerobic: "aerobic"; speed: "speed"; hills: "hills"; race: "race"; maintenance: "maintenance"; technique: "technique"; }>; params: z.ZodOptional; required: z.ZodOptional; default: z.ZodOptional>; min: z.ZodOptional; max: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>>>; structure: z.ZodOptional; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>>>; main: z.ZodArray; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"intervals">; repeats: z.ZodString; work: z.ZodObject<{ type: z.ZodEnum<{ warmup: "warmup"; work: "work"; recovery: "recovery"; rest: "rest"; cooldown: "cooldown"; }>; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; recovery: z.ZodObject<{ type: z.ZodEnum<{ warmup: "warmup"; work: "work"; recovery: "recovery"; rest: "rest"; cooldown: "cooldown"; }>; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>]>>; cooldown: z.ZodOptional; name: z.ZodOptional; duration: z.ZodOptional; distance: z.ZodOptional; pace: z.ZodOptional; intensity: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>; humanReadable: z.ZodString; estimatedDuration: z.ZodOptional>; targetZone: z.ZodOptional; rpe: z.ZodOptional; notes: z.ZodOptional; }, z.core.$strip>; export type TemplateValidationResult = { success: true; data: z.infer; } | { success: false; errors: TemplateValidationError[]; }; export interface TemplateValidationError { path: string; message: string; code: string; } /** * Validate a workout template against the schema. */ export declare function validateTemplate(data: unknown): TemplateValidationResult; /** * Validate a template and throw an error if invalid. */ export declare function validateTemplateOrThrow(data: unknown): z.infer; export type WorkoutTemplate = z.infer; export type TemplateParam = z.infer; export type TemplateParams = z.infer; export type TemplateStep = z.infer; export type TemplateIntervalSet = z.infer; export type TemplateStructure = z.infer; export type Sport = z.infer; export type WorkoutCategory = z.infer;