workoutSchema.ts•2.25 kB
/**
* Generated by Kubb (https://kubb.dev/).
* Do not edit manually.
*/
import { z } from "zod";
export const workoutSchema = z.object({
"id": z.optional(z.string().describe("The workout ID.")),
"title": z.optional(z.string().describe("The workout title.")),
"description": z.optional(z.string().describe("The workout description.")),
"start_time": z.optional(z.number().describe("ISO 8601 timestamp of when the workout was recorded to have started.")),
"end_time": z.optional(z.number().describe("ISO 8601 timestamp of when the workout was recorded to have ended.")),
"updated_at": z.optional(z.string().describe("ISO 8601 timestamp of when the workout was last updated.")),
"created_at": z.optional(z.string().describe("ISO 8601 timestamp of when the workout was created.")),
"exercises": z.optional(z.array(z.object({
"index": z.optional(z.number().describe("Index indicating the order of the exercise in the workout.")),
"title": z.optional(z.string().describe("Title of the exercise")),
"notes": z.optional(z.string().describe("Notes on the exercise")),
"exercise_template_id": z.optional(z.string().describe("The id of the exercise template. This can be used to fetch the exercise template.")),
"supersets_id": z.number().describe("The id of the superset that the exercise belongs to. A value of null indicates the exercise is not part of a superset.").nullish(),
"sets": z.optional(z.array(z.object({
"index": z.optional(z.number().describe("Index indicating the order of the set in the workout.")),
"type": z.optional(z.string().describe("The type of set. This can be one of 'normal', 'warmup', 'dropset', 'failure'")),
"weight_kg": z.number().describe("Weight lifted in kilograms.").nullish(),
"reps": z.number().describe("Number of reps logged for the set").nullish(),
"distance_meters": z.number().describe("Number of meters logged for the set").nullish(),
"duration_seconds": z.number().describe("Number of seconds logged for the set").nullish(),
"rpe": z.number().describe("RPE (Relative perceived exertion) value logged for the set").nullish(),
"custom_metric": z.number().describe("Custom metric logged for the set (Currently only used to log floors or steps for stair machine exercises)").nullish()
})))
})))
})