import { ExerciseType, RPE, SetPersonalRecordType, SetType } from '..'; export interface LiveWorkoutExerciseSet { 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; } export interface LiveWorkoutExercise { exercise_template_id: string; is_custom: boolean; type: ExerciseType; thumbnail_url?: string | null; title: string; sets: LiveWorkoutExerciseSet[]; } export interface LiveWorkoutComment { user_id: string; username: string; profile_image: string | null; comment: string; created_at_unix: number; } export interface LiveWorkoutViewer { user_id: string; username: string; profile_image: string | null; created_at_unix: number; } export interface LiveWorkout { workout_id: string; user_id: string; username: string; verified: boolean; profile_image: string | null; name: string; start_time_unix: number; exercises: LiveWorkoutExercise[]; comments: LiveWorkoutComment[]; viewers: LiveWorkoutViewer[]; } /** * A snapshot of an in-progress workout, sent to the server every time a set * is checked or unchecked so followers can see live workout activity. */ export interface PostLiveWorkoutRequest extends LiveWorkout { updated_at: string; } export interface DeleteLiveWorkoutRequest { workout_id: string; } export interface LiveWorkoutResponse { live_workouts: LiveWorkout[]; } export interface PostLiveWorkoutComment { workout_id: string; comment: string; } export interface PostLiveWorkoutViewer { workout_id: string; } export interface DeleteLiveWorkoutViewer { workout_id: string; }