diff --git a/crates/models/fitness/src/lib.rs b/crates/models/fitness/src/lib.rs index 67de880b19..614c95c440 100644 --- a/crates/models/fitness/src/lib.rs +++ b/crates/models/fitness/src/lib.rs @@ -249,6 +249,7 @@ pub struct WorkoutSetTotals { #[serde(rename_all = "snake_case")] pub struct WorkoutSetRecord { pub lot: SetLot, + pub rpe: Option, pub note: Option, pub rest_time: Option, pub actual_rest_time: Option, @@ -571,6 +572,7 @@ pub struct UserMeasurementsListInput { #[derive(Clone, Debug, Deserialize, Serialize, InputObject)] pub struct UserWorkoutSetRecord { pub lot: SetLot, + pub rpe: Option, pub note: Option, pub rest_time: Option, pub statistic: WorkoutSetStatistic, diff --git a/crates/services/fitness/src/lib.rs b/crates/services/fitness/src/lib.rs index 26697ed3a7..668ba20149 100644 --- a/crates/services/fitness/src/lib.rs +++ b/crates/services/fitness/src/lib.rs @@ -124,6 +124,7 @@ impl FitnessService { .into_iter() .map(|s| WorkoutSetRecord { lot: s.lot, + rpe: s.rpe, note: s.note, totals: None, confirmed_at: None, diff --git a/crates/services/importer/src/strong_app.rs b/crates/services/importer/src/strong_app.rs index 8db1804847..ccd53a32bb 100644 --- a/crates/services/importer/src/strong_app.rs +++ b/crates/services/importer/src/strong_app.rs @@ -192,6 +192,7 @@ async fn import_exercises( distance: set.distance.and_then(|d| d.checked_div(dec!(1000))), ..Default::default() }, + rpe: None, note: None, lot: set_lot, rest_time: None, diff --git a/crates/utils/dependent/src/lib.rs b/crates/utils/dependent/src/lib.rs index 40ac7e1e5f..3e693d8d99 100644 --- a/crates/utils/dependent/src/lib.rs +++ b/crates/utils/dependent/src/lib.rs @@ -1854,6 +1854,7 @@ pub async fn create_or_update_workout( } let mut value = WorkoutSetRecord { lot: set.lot, + rpe: set.rpe, actual_rest_time, totals: Some(totals), note: set.note.clone(), @@ -2397,9 +2398,10 @@ pub fn db_workout_to_workout_input(user_workout: workout::Model) -> UserWorkoutI .into_iter() .map(|s| UserWorkoutSetRecord { lot: s.lot, + rpe: s.rpe, note: s.note, - statistic: s.statistic, rest_time: s.rest_time, + statistic: s.statistic, confirmed_at: s.confirmed_at, }) .collect(), diff --git a/docs/includes/export-schema.ts b/docs/includes/export-schema.ts index e03e15ae95..a086bf6d67 100644 --- a/docs/includes/export-schema.ts +++ b/docs/includes/export-schema.ts @@ -256,6 +256,7 @@ export interface WorkoutSetRecord { note: string | null; personal_bests: WorkoutSetPersonalBest[] | null; rest_time: number | null; + rpe: number | null; statistic: WorkoutSetStatistic; totals: WorkoutSetTotals | null; } diff --git a/libs/generated/src/graphql/backend/graphql.ts b/libs/generated/src/graphql/backend/graphql.ts index 0c257e4489..693cd87fa4 100644 --- a/libs/generated/src/graphql/backend/graphql.ts +++ b/libs/generated/src/graphql/backend/graphql.ts @@ -2658,6 +2658,7 @@ export type UserWorkoutSetRecord = { lot: SetLot; note?: InputMaybe; restTime?: InputMaybe; + rpe?: InputMaybe; statistic: SetStatisticInput; }; @@ -2777,6 +2778,7 @@ export type WorkoutSetRecord = { note?: Maybe; personalBests?: Maybe>; restTime?: Maybe; + rpe?: Maybe; statistic: WorkoutSetStatistic; totals?: Maybe; }; diff --git a/libs/generated/src/graphql/backend/types.generated.ts b/libs/generated/src/graphql/backend/types.generated.ts index 791e83963d..e3aef8ad43 100644 --- a/libs/generated/src/graphql/backend/types.generated.ts +++ b/libs/generated/src/graphql/backend/types.generated.ts @@ -2765,6 +2765,7 @@ export type UserWorkoutSetRecord = { lot: SetLot; note?: InputMaybe; restTime?: InputMaybe; + rpe?: InputMaybe; statistic: SetStatisticInput; }; @@ -2898,6 +2899,7 @@ export type WorkoutSetRecord = { note?: Maybe; personalBests?: Maybe>; restTime?: Maybe; + rpe?: Maybe; statistic: WorkoutSetStatistic; totals?: Maybe; };