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 +2 -6
- package/built/index.js +10 -10
- package/package.json +1 -1
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
|
-
|
|
1639
|
-
|
|
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
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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 =
|
|
235
|
-
|
|
236
|
-
|
|
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 = [
|