@0x3639/intervals-icu
    Preparing search index...

    Class WorkoutService

    Service for library workout operations (workout templates in folders/plans)

    Index
    • Convert a workout definition to .zwo (Zwift), .mrc, .erg or .fit. The workout is sent in the body; it does not need to exist in the library. Uses the global endpoint, which the spec says still resolves power targets from the authenticated athlete's settings ("The athlete to use is extracted from the bearer token and used to resolve power targets"). Use convertWorkoutForAthlete to resolve against a specific athlete id instead. Not live-verified: the live suite checks that both routes convert, not whose settings apply.

      WorkoutConversionInput requires name, description, type and workout_doc: live probes (AUDIT.md) showed a body with all four converts and a body without workout_doc returns HTTP 500; the fields were not probed individually, so all four are required as a conservative contract. A convenient source of workout_doc is an existing calendar workout event's workout_doc field.

      Parameters

      Returns Promise<Buffer<ArrayBufferLike>>

    • Delete a workout

      Parameters

      • workoutId: number
      • OptionalathleteId: string

      Returns Promise<void>

    • Every tag that has been applied to workouts in the athlete's library

      Parameters

      • OptionalathleteId: string

      Returns Promise<string[]>