hevy-shared 1.0.582 → 1.0.584
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 -0
- package/built/index.js +2 -4
- package/built/normalizedWorkoutUtils.d.ts +1 -0
- package/package.json +1 -1
package/built/index.d.ts
CHANGED
|
@@ -688,6 +688,7 @@ export interface WorkoutExerciseSet {
|
|
|
688
688
|
type: SetPersonalRecordType;
|
|
689
689
|
value: number;
|
|
690
690
|
}[];
|
|
691
|
+
completed_at_unix: number | null;
|
|
691
692
|
}
|
|
692
693
|
export interface WorkoutExercise {
|
|
693
694
|
id: string;
|
|
@@ -907,6 +908,7 @@ export interface PostWorkoutRequestSet {
|
|
|
907
908
|
duration_seconds?: number;
|
|
908
909
|
custom_metric?: number;
|
|
909
910
|
rpe?: RPE;
|
|
911
|
+
completed_at_unix?: number;
|
|
910
912
|
}
|
|
911
913
|
/**
|
|
912
914
|
* Used to update an existing workout. Props that are defined will be used to
|
package/built/index.js
CHANGED
|
@@ -229,10 +229,8 @@ 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 = maybeCalories ===
|
|
233
|
-
|
|
234
|
-
const heartSamplesAreValid = maybeHeartRateSamples === undefined ||
|
|
235
|
-
(0, exports.isHeartRateSamples)(maybeHeartRateSamples);
|
|
232
|
+
const caloriesAreValid = !maybeCalories || (typeof maybeCalories === 'number' && maybeCalories >= 0);
|
|
233
|
+
const heartSamplesAreValid = !maybeHeartRateSamples || (0, exports.isHeartRateSamples)(maybeHeartRateSamples);
|
|
236
234
|
return caloriesAreValid && heartSamplesAreValid;
|
|
237
235
|
};
|
|
238
236
|
exports.isWorkoutBiometrics = isWorkoutBiometrics;
|