Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public partial interface IWorkoutsClient
/// Estimated calories burned
/// </param>
/// <param name="estimatedTss">
/// Planned training stress score, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.
/// Planned training stress score (0-9999), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure instead.
/// </param>
/// <param name="estimatedIntensityFactor">
/// Planned intensity factor, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.
/// Planned intensity factor (0-5), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure instead.
/// </param>
/// <param name="workoutId">
/// Terra identifier of the stored template. Set by Terra in responses; ignored on create.
Expand Down
15 changes: 8 additions & 7 deletions src/libs/Terra/Generated/Terra.Models.PlannedWorkout.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ public sealed partial class PlannedWorkout
public string? WorkoutId { get; set; }

/// <summary>
/// Scheduled date (YYYY-MM-DD). Null for provider entries that are not attached to a date, such as a routine library.
/// Scheduled date (YYYY-MM-DD)
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("planned_date")]
public string? PlannedDate { get; set; }
[global::System.Text.Json.Serialization.JsonRequired]
public required string PlannedDate { get; set; }

/// <summary>
/// Identifier of the workout on the provider's side, in the form the provider's own API uses for it
Expand Down Expand Up @@ -95,6 +96,9 @@ public sealed partial class PlannedWorkout
/// <summary>
/// Initializes a new instance of the <see cref="PlannedWorkout" /> class.
/// </summary>
/// <param name="plannedDate">
/// Scheduled date (YYYY-MM-DD)
/// </param>
/// <param name="warnings">
/// Adjustments made while converting between Terra's template and the provider's format. On Terra-created workouts these come from the push to the provider; on external workouts, from reading the provider's workout into a template. Empty when the conversion was exact.
/// </param>
Expand All @@ -107,9 +111,6 @@ public sealed partial class PlannedWorkout
/// <param name="workoutId">
/// Identifier of the workout template this was planned from. Null for workouts created on the provider side; a non-null value means the workout is managed through Terra and can be rescheduled or deleted.
/// </param>
/// <param name="plannedDate">
/// Scheduled date (YYYY-MM-DD). Null for provider entries that are not attached to a date, such as a routine library.
/// </param>
/// <param name="providerWorkoutId">
/// Identifier of the workout on the provider's side, in the form the provider's own API uses for it
/// </param>
Expand All @@ -127,11 +128,11 @@ public sealed partial class PlannedWorkout
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public PlannedWorkout(
string plannedDate,
global::System.Collections.Generic.IList<global::Terra.CoercionWarning> warnings,
bool isExternal,
string? plannedWorkoutId,
string? workoutId,
string? plannedDate,
string? providerWorkoutId,
string? createdAt,
string? lastUpdatedAt,
Expand All @@ -140,7 +141,7 @@ public PlannedWorkout(
{
this.PlannedWorkoutId = plannedWorkoutId;
this.WorkoutId = workoutId;
this.PlannedDate = plannedDate;
this.PlannedDate = plannedDate ?? throw new global::System.ArgumentNullException(nameof(plannedDate));
this.ProviderWorkoutId = providerWorkoutId;
this.Warnings = warnings ?? throw new global::System.ArgumentNullException(nameof(warnings));
this.CreatedAt = createdAt;
Expand Down
8 changes: 4 additions & 4 deletions src/libs/Terra/Generated/Terra.Models.PlannedWorkoutBody.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ public sealed partial class PlannedWorkoutBody
public double? EstimatedCalories { get; set; }

/// <summary>
/// Planned training stress score, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.
/// Planned training stress score (0-9999), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure instead.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("estimated_tss")]
public double? EstimatedTss { get; set; }

/// <summary>
/// Planned intensity factor, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.
/// Planned intensity factor (0-5), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure instead.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("estimated_intensity_factor")]
public double? EstimatedIntensityFactor { get; set; }
Expand Down Expand Up @@ -117,10 +117,10 @@ public sealed partial class PlannedWorkoutBody
/// Estimated calories burned
/// </param>
/// <param name="estimatedTss">
/// Planned training stress score, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.
/// Planned training stress score (0-9999), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure instead.
/// </param>
/// <param name="estimatedIntensityFactor">
/// Planned intensity factor, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.
/// Planned intensity factor (0-5), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure instead.
/// </param>
/// <param name="workoutId">
/// Terra identifier of the stored template. Set by Terra in responses; ignored on create.
Expand Down
8 changes: 4 additions & 4 deletions src/libs/Terra/Generated/Terra.Models.WorkoutTemplate.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ public sealed partial class WorkoutTemplate
public double? EstimatedCalories { get; set; }

/// <summary>
/// Planned training stress score, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.
/// Planned training stress score (0-9999), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure instead.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("estimated_tss")]
public double? EstimatedTss { get; set; }

/// <summary>
/// Planned intensity factor, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.
/// Planned intensity factor (0-5), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure instead.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("estimated_intensity_factor")]
public double? EstimatedIntensityFactor { get; set; }
Expand Down Expand Up @@ -117,10 +117,10 @@ public sealed partial class WorkoutTemplate
/// Estimated calories burned
/// </param>
/// <param name="estimatedTss">
/// Planned training stress score, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.
/// Planned training stress score (0-9999), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure instead.
/// </param>
/// <param name="estimatedIntensityFactor">
/// Planned intensity factor, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.
/// Planned intensity factor (0-5), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure instead.
/// </param>
/// <param name="workoutId">
/// Terra identifier of the stored template. Set by Terra in responses; ignored on create.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,10 +532,10 @@ partial void ProcessWorkoutsCreateWorkoutResponseContent(
/// Estimated calories burned
/// </param>
/// <param name="estimatedTss">
/// Planned training stress score, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.
/// Planned training stress score (0-9999), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure instead.
/// </param>
/// <param name="estimatedIntensityFactor">
/// Planned intensity factor, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.
/// Planned intensity factor (0-5), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure instead.
/// </param>
/// <param name="workoutId">
/// Terra identifier of the stored template. Set by Terra in responses; ignored on create.
Expand Down
20 changes: 11 additions & 9 deletions src/libs/Terra/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.3
info:
description: The Terra API (v2 surface, served at access.tryterra.co/api/v2).
title: TerraAPI
version: 2026.09.04.2
version: 2026.09.08
license:
name: Apache-2.0
url: https://github.com/tryterra/openapi/blob/master/LICENSE
Expand Down Expand Up @@ -2222,12 +2222,14 @@ components:
anyOf:
- type: number
- type: 'null'
description: 'Planned training stress score, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.'
description: Planned training stress score (0-9999), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from
the structure instead.
estimated_intensity_factor:
anyOf:
- type: number
- type: 'null'
description: 'Planned intensity factor, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.'
description: Planned intensity factor (0-5), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure
instead.
workout_id:
anyOf:
- type: string
Expand Down Expand Up @@ -2331,12 +2333,14 @@ components:
anyOf:
- type: number
- type: 'null'
description: 'Planned training stress score, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.'
description: Planned training stress score (0-9999), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from
the structure instead.
estimated_intensity_factor:
anyOf:
- type: number
- type: 'null'
description: 'Planned intensity factor, where the provider or author supplies one. Read-only today: accepted on create but not forwarded to providers.'
description: Planned intensity factor (0-5), where the provider or author supplies one. Forwarded to TrainingPeaks, which ignores it when any step target is not RPE and derives it from the structure
instead.
workout_id:
anyOf:
- type: string
Expand Down Expand Up @@ -9352,10 +9356,8 @@ components:
description: Identifier of the workout template this was planned from. Null for workouts created on the provider side; a non-null value means the workout is managed through Terra and can be rescheduled
or deleted.
planned_date:
anyOf:
- type: string
- type: 'null'
description: Scheduled date (YYYY-MM-DD). Null for provider entries that are not attached to a date, such as a routine library.
type: string
description: Scheduled date (YYYY-MM-DD)
provider_workout_id:
anyOf:
- type: string
Expand Down