22 lines
653 B
TypeScript
22 lines
653 B
TypeScript
import { z } from "zod";
|
|
|
|
export const startHistorySchema = z.object({
|
|
programId: z.string().min(1),
|
|
});
|
|
|
|
export const addEntrySchema = z.object({
|
|
exerciseId: z.string().min(1),
|
|
sets: z.number().int().min(1),
|
|
reps: z.number().int().min(1).optional(),
|
|
weightKg: z.number().min(0).optional(),
|
|
durationSec: z.number().int().min(1).optional(),
|
|
});
|
|
|
|
export const completeHistorySchema = z.object({
|
|
notes: z.string().max(500).optional(),
|
|
});
|
|
|
|
export type StartHistoryInput = z.infer<typeof startHistorySchema>;
|
|
export type AddEntryInput = z.infer<typeof addEntrySchema>;
|
|
export type CompleteHistoryInput = z.infer<typeof completeHistorySchema>;
|