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