import { DistanceUnit, ExerciseType, MuscleGroup, RPE, SetPersonalRecordType, SetType, WeightUnit } from '..'; import { LocalizedExerciseTitles } from './shared'; export declare const isPublicWorkout: (x: any) => x is PublicWorkout; export interface PublicWorkout { type: 'public'; id: string; short_id: string | null; name: string; create_at: string; start_time: number; end_time: number; username: string; profile_image: string | null; preview_image: string | null; is_private: boolean; exercises: PublicWorkoutExercise[]; /** * weight_unit and distance_unit are the current unit * preferences of the owner of the workout. */ weight_unit: WeightUnit; distance_unit: DistanceUnit; estimated_volume_kg: number; } export interface PublicWorkoutExercise 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; url?: string; media_type?: string; custom_exercise_image_url?: string | null; thumbnail_url?: string | null; manual_tag?: string; aka?: string; /** * 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: PublicWorkoutExerciseSet[]; } export interface PublicWorkoutExerciseSet { /** * 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; /** * @deprecated 1.29.17 - * we can only set this to `best_weight`, `best_reps`, `best_duration` or * `best_distance`. sending anything else would cause older clients to crash. * newer clients will ignore this field and use the `prs` field instead. */ personalRecords?: Array<{ type: 'best_weight' | 'best_reps' | 'best_duration' | 'best_distance'; value: number; }>; prs: { type: SetPersonalRecordType; value: number; }[]; completed_at: string | null; }