hevy-shared 1.0.584 → 1.0.585
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/built/index.d.ts +2 -2
- package/built/index.js +4 -2
- package/built/normalizedWorkoutUtils.d.ts +1 -1
- package/package.json +1 -1
package/built/index.d.ts
CHANGED
|
@@ -688,7 +688,7 @@ export interface WorkoutExerciseSet {
|
|
|
688
688
|
type: SetPersonalRecordType;
|
|
689
689
|
value: number;
|
|
690
690
|
}[];
|
|
691
|
-
|
|
691
|
+
completed_at: string | null;
|
|
692
692
|
}
|
|
693
693
|
export interface WorkoutExercise {
|
|
694
694
|
id: string;
|
|
@@ -908,7 +908,7 @@ export interface PostWorkoutRequestSet {
|
|
|
908
908
|
duration_seconds?: number;
|
|
909
909
|
custom_metric?: number;
|
|
910
910
|
rpe?: RPE;
|
|
911
|
-
|
|
911
|
+
completed_at?: string;
|
|
912
912
|
}
|
|
913
913
|
/**
|
|
914
914
|
* Used to update an existing workout. Props that are defined will be used to
|
package/built/index.js
CHANGED
|
@@ -229,8 +229,10 @@ const isWorkoutBiometrics = (x) => {
|
|
|
229
229
|
return false;
|
|
230
230
|
const maybeCalories = x.total_calories;
|
|
231
231
|
const maybeHeartRateSamples = x.heart_rate_samples;
|
|
232
|
-
const caloriesAreValid =
|
|
233
|
-
|
|
232
|
+
const caloriesAreValid = maybeCalories === undefined ||
|
|
233
|
+
(typeof maybeCalories === 'number' && maybeCalories >= 0);
|
|
234
|
+
const heartSamplesAreValid = maybeHeartRateSamples === undefined ||
|
|
235
|
+
(0, exports.isHeartRateSamples)(maybeHeartRateSamples);
|
|
234
236
|
return caloriesAreValid && heartSamplesAreValid;
|
|
235
237
|
};
|
|
236
238
|
exports.isWorkoutBiometrics = isWorkoutBiometrics;
|