import { ExerciseType, GeospatialPoint, MuscleGroup, PreviewWorkoutLike, RPE, SetPersonalRecordType, SetType, WorkoutBiometrics, WorkoutComment, WorkoutMedia } from '..'; import { LocalizedExerciseTitles } from './shared'; export interface OwnedWorkout { id: string; short_id: string | null; index: number; name: string; description?: string; like_count: number; preview_workout_likes: PreviewWorkoutLike[]; comment_count: number; comments: WorkoutComment[]; media: WorkoutMedia[]; is_liked_by_user: boolean; start_time: number; end_time: number; user_id: string; username: string; profile_image: string; exercises: OwnedWorkoutExercise[]; routine_id?: string; apple_watch: boolean; wearos_watch: boolean; verified: boolean; created_at: string; updated_at: string; nth_workout: number; is_private: boolean; biometrics?: WorkoutBiometrics; is_biometrics_public: boolean; trainer_workout_template_id: string | undefined; gym: { type: 'commercial'; gym_id: string; } | { type: 'home'; } | null; } export interface TrainerWorkout extends OwnedWorkout { trainer_workout_template_id: string; } export interface OwnedWorkoutExercise extends LocalizedExerciseTitles { id: string; exercise_template_id: string; title: string; superset_id: number | null; rest_seconds: number | null; notes: string; muscle_group: MuscleGroup; other_muscles: MuscleGroup[]; exercise_type: ExerciseType; thumbnail_url?: string | null; /** * for exercises with two dumbbells * * `true` if the weight of each set is the weight of _one_ dumbbell, but the * exercise was performed with _two_ dumbbells of that weight */ volume_doubling_enabled: boolean; sets: OwnedWorkoutExerciseSet[]; } export interface OwnedWorkoutExerciseSet { /** * id can be a string or a number because we used * to store it as int4 and now we store it as int8 * which is too big to store (accurately) in a JS * number. */ id: number | string; index: number; indicator: SetType; weight_kg?: number | null; reps?: number | null; distance_meters?: number | null; duration_seconds?: number | null; custom_metric?: number | null; rpe?: RPE | null; prs: { type: SetPersonalRecordType; value: number; }[]; completed_at: string | null; geospatial_data: GeospatialPoint[] | null; }