hevy-shared 1.0.577 → 1.0.579

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
@@ -1635,10 +1635,6 @@ export interface GoogleCoachWebSignInRequest {
1635
1635
  invite_short_id?: string;
1636
1636
  }
1637
1637
  export interface UserPushNotificationSettings {
1638
- commentReplies: boolean;
1639
- commentLikes: boolean;
1640
- }
1641
- export interface UserPushNotificationSettingsUpdate {
1642
- commentReplies?: boolean;
1643
- commentLikes?: boolean;
1638
+ comment_replies: boolean | null;
1639
+ comment_likes: boolean | null;
1644
1640
  }
package/built/index.js CHANGED
@@ -213,14 +213,12 @@ const isPublicWorkout = (x) => {
213
213
  };
214
214
  exports.isPublicWorkout = isPublicWorkout;
215
215
  const isHeartRateSamples = (x) => {
216
- if (!x)
216
+ if (!x || !Array.isArray(x))
217
217
  return false;
218
- if (Array.isArray(x)) {
219
- for (const sample of x) {
220
- if (typeof sample.timestamp_ms !== 'number' ||
221
- typeof sample.bpm !== 'number') {
222
- return false;
223
- }
218
+ for (const sample of x) {
219
+ if (typeof sample.timestamp_ms !== 'number' ||
220
+ typeof sample.bpm !== 'number') {
221
+ return false;
224
222
  }
225
223
  }
226
224
  return true;
@@ -231,9 +229,11 @@ const isWorkoutBiometrics = (x) => {
231
229
  return false;
232
230
  const maybeCalories = x.total_calories;
233
231
  const maybeHeartRateSamples = x.heart_rate_samples;
234
- const caloriesAreValid = !maybeCalories || (typeof maybeCalories === 'number' && maybeCalories >= 0);
235
- return ((caloriesAreValid && !maybeHeartRateSamples) ||
236
- (0, exports.isHeartRateSamples)(maybeHeartRateSamples));
232
+ const caloriesAreValid = maybeCalories === undefined ||
233
+ (typeof maybeCalories === 'number' && maybeCalories >= 0);
234
+ const heartSamplesAreValid = maybeHeartRateSamples === undefined ||
235
+ (0, exports.isHeartRateSamples)(maybeHeartRateSamples);
236
+ return caloriesAreValid && heartSamplesAreValid;
237
237
  };
238
238
  exports.isWorkoutBiometrics = isWorkoutBiometrics;
239
239
  exports.measurementsList = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hevy-shared",
3
- "version": "1.0.577",
3
+ "version": "1.0.579",
4
4
  "description": "",
5
5
  "main": "built/index.js",
6
6
  "types": "built/index.d.ts",