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 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 === undefined ||
233
- (typeof maybeCalories === 'number' && maybeCalories >= 0);
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;
@@ -47,6 +47,7 @@ export interface NormalizedSet {
47
47
  rpe?: RPE;
48
48
  targetRpe?: RPE;
49
49
  completed: boolean;
50
+ completedAtUnix?: number;
50
51
  }
51
52
  export interface NormalizedExercise {
52
53
  title: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hevy-shared",
3
- "version": "1.0.582",
3
+ "version": "1.0.584",
4
4
  "description": "",
5
5
  "main": "built/index.js",
6
6
  "types": "built/index.d.ts",