import { Workout as BaseWorkout, WorkoutConstructor } from 'fitness-models'; import { DateTime, Duration } from 'luxon'; import { Unit } from 'mathjs'; import { Sport } from '../constants'; import { ApiWorkout } from '../types/api/ApiWorkout'; import Point from './Point'; interface Constructor extends WorkoutConstructor { hashtags?: string[]; id: Id; message?: string; points?: Point[]; source: ApiSource; typeId: Sport; } export default class Workout extends BaseWorkout { protected id: Id; protected typeId: Sport; protected points: Point[]; protected hashtags: string[]; protected source: ApiSource; protected message?: string; constructor(options: Constructor); static fromApi(workout: ApiWorkout): Workout; static get(typeId: Sport, start: DateTime, duration: Duration, distance?: Unit, points?: Point[], options?: Partial>): Workout; protected clone(extension: Partial>): this; getId(): Id; setId(id: number): Workout; setId(id: undefined): Workout; getTypeId(): Sport; getSportName(): string; getPoints(): Point[]; getMessage(): string | undefined; setMessage(message?: string): this; getSource(): ApiSource; toGpx(): string; hasGPSData(): boolean; setTypeId(typeId: Sport): this; toObject(): Constructor; } export {};