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 @@ -374,6 +374,43 @@ partial void ProcessAuthenticationGenerateWidgetSessionResponseContent(
h => h.Key,
h => h.Value));
}
// Returned for Terra accounts created after the widget relaunch (2026-09-03) — this endpoint is deprecated for them. Create widget sessions with POST https://access.tryterra.co/api/widget/session instead. The response carries Deprecation and Link (rel="deprecation") headers.
if ((int)__response.StatusCode == 410)
{
string? __content_410 = null;
global::System.Exception? __exception_410 = null;
global::Terra.Problem? __value_410 = null;
try
{
if (__effectiveReadResponseAsString)
{
__content_410 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
__value_410 = global::Terra.Problem.FromJson(__content_410, JsonSerializerContext);
}
else
{
__content_410 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);

__value_410 = global::Terra.Problem.FromJson(__content_410, JsonSerializerContext);
}
}
catch (global::System.Exception __ex)
{
__exception_410 = __ex;
}


throw global::Terra.ApiException<global::Terra.Problem>.Create(
statusCode: __response.StatusCode,
message: __content_410 ?? __response.ReasonPhrase ?? string.Empty,
innerException: __exception_410,
responseBody: __content_410,
responseObject: __value_410,
responseHeaders: global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value));
}

if (__effectiveReadResponseAsString)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ public partial interface IWorkoutsClient
/// <param name="description">
/// Description of the workout
/// </param>
/// <param name="sport">
/// Sport a workout template targets. Indoor/outdoor is expressed separately via environment.
/// </param>
/// <param name="environment"></param>
/// <param name="poolLengthMeters">
/// Pool length in meters, for swim workouts
Expand All @@ -57,22 +54,33 @@ public partial interface IWorkoutsClient
/// <param name="estimatedCalories">
/// 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.
/// </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.
/// </param>
/// <param name="workoutId">
/// Terra identifier of the stored template. Set by Terra in responses; ignored on create.
/// </param>
/// <param name="sport">
/// Sport a workout template targets. Indoor/outdoor is expressed separately via environment.
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Terra.WorkoutsCreateWorkoutResponse> WorkoutsCreateWorkoutAsync(
string name,
global::Terra.WorkoutSport sport,
global::System.Collections.Generic.IList<global::Terra.StepBlock> stepBlocks,
global::Terra.WorkoutSport sport,
string? description = default,
global::Terra.EnvironmentType? environment = default,
double? poolLengthMeters = default,
double? estimatedDurationSeconds = default,
double? estimatedDistanceMeters = default,
double? estimatedCalories = default,
double? estimatedTss = default,
double? estimatedIntensityFactor = default,
string? workoutId = default,
global::Terra.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public partial interface IWorkoutsClient
{
/// <summary>
/// List planned workouts<br/>
/// Returns the user's planned workouts, including workouts created on the provider side (is_external true) where the provider exposes them. External workouts carry their full body (title, description, planned metrics, structured steps) under `details`; they are fetched live from the provider and are not stored by Terra. Note that providers may limit how far ahead planned workouts are visible.
/// Returns the user's planned workouts, including workouts created on the provider side (is_external true) where the provider exposes them. Every item carries its workout body under `template`, in the same shape for Terra-created and external workouts. External workouts are fetched live from the provider and are not stored by Terra; a workout pushed through Terra that the provider echoes back is listed once, as the Terra row. When the provider could not be read, or a template could not be loaded, the response is still 200 with the rows Terra has and carries the `X-Terra-Provider-Data-Truncated: true` header. Note that providers may limit how far ahead planned workouts are visible.
/// </summary>
/// <param name="userId"></param>
/// <param name="startDate"></param>
Expand All @@ -22,7 +22,7 @@ public partial interface IWorkoutsClient
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// List planned workouts<br/>
/// Returns the user's planned workouts, including workouts created on the provider side (is_external true) where the provider exposes them. External workouts carry their full body (title, description, planned metrics, structured steps) under `details`; they are fetched live from the provider and are not stored by Terra. Note that providers may limit how far ahead planned workouts are visible.
/// Returns the user's planned workouts, including workouts created on the provider side (is_external true) where the provider exposes them. Every item carries its workout body under `template`, in the same shape for Terra-created and external workouts. External workouts are fetched live from the provider and are not stored by Terra; a workout pushed through Terra that the provider echoes back is listed once, as the Terra row. When the provider could not be read, or a template could not be loaded, the response is still 200 with the rows Terra has and carries the `X-Terra-Provider-Data-Truncated: true` header. Note that providers may limit how far ahead planned workouts are visible.
/// </summary>
/// <param name="userId"></param>
/// <param name="startDate"></param>
Expand Down
Loading