hevy-shared 1.0.562 → 1.0.563
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 +6 -16
- package/built/index.js +1 -25
- package/built/normalizedWorkoutUtils.d.ts +1 -3
- package/built/tests/testUtils.js +0 -1
- package/package.json +1 -1
package/built/index.d.ts
CHANGED
|
@@ -465,7 +465,6 @@ export interface UserPreferences {
|
|
|
465
465
|
live_pr_volume?: LivePRVolumeOption;
|
|
466
466
|
inline_set_timer_enabled?: boolean;
|
|
467
467
|
default_workout_visibility_public?: boolean;
|
|
468
|
-
default_workout_biometrics_visibility_public?: boolean;
|
|
469
468
|
}
|
|
470
469
|
export type UpdateUserPreferencesRequest = Omit<UserPreferences, 'username'>;
|
|
471
470
|
export type FollowingStatus = 'not-following' | 'following' | 'requested';
|
|
@@ -506,6 +505,10 @@ export interface RoutineMetadata {
|
|
|
506
505
|
short_id: string;
|
|
507
506
|
title: string;
|
|
508
507
|
}
|
|
508
|
+
export type PreviewMutualUser = {
|
|
509
|
+
username: string;
|
|
510
|
+
profile_pic: string | null;
|
|
511
|
+
};
|
|
509
512
|
export interface UserProfile {
|
|
510
513
|
username: string;
|
|
511
514
|
verified: boolean;
|
|
@@ -523,6 +526,7 @@ export interface UserProfile {
|
|
|
523
526
|
following_count: number;
|
|
524
527
|
routines: RoutineMetadata[];
|
|
525
528
|
weekly_workout_durations: WeeklyWorkoutDuration[];
|
|
529
|
+
mutual_followers: PreviewMutualUser[];
|
|
526
530
|
}
|
|
527
531
|
export interface PublicUserProfile {
|
|
528
532
|
private_profile: boolean;
|
|
@@ -779,8 +783,6 @@ export interface Workout {
|
|
|
779
783
|
* If applicable, the user ID of the coach who logged this workout
|
|
780
784
|
*/
|
|
781
785
|
logged_by_coach_id?: string;
|
|
782
|
-
biometrics?: WorkoutBiometrics;
|
|
783
|
-
is_biometrics_public: boolean;
|
|
784
786
|
}
|
|
785
787
|
export interface CustomExerciseImage {
|
|
786
788
|
type: 'image';
|
|
@@ -857,18 +859,6 @@ export interface PostWorkoutRequestWorkout {
|
|
|
857
859
|
wearos_watch: boolean;
|
|
858
860
|
workout_id: string;
|
|
859
861
|
is_private: boolean;
|
|
860
|
-
biometrics?: WorkoutBiometrics;
|
|
861
|
-
is_biometrics_public: boolean;
|
|
862
|
-
}
|
|
863
|
-
export declare const isHeartRateSamples: (x: any) => x is HeartRateSample[];
|
|
864
|
-
export declare const isWorkoutBiometrics: (x: any) => x is WorkoutBiometrics;
|
|
865
|
-
export interface WorkoutBiometrics {
|
|
866
|
-
total_calories?: number;
|
|
867
|
-
heart_rate_samples?: HeartRateSample[];
|
|
868
|
-
}
|
|
869
|
-
export interface HeartRateSample {
|
|
870
|
-
timestamp_ms: number;
|
|
871
|
-
bpm: number;
|
|
872
862
|
}
|
|
873
863
|
export interface PostWorkoutRequestExercise {
|
|
874
864
|
title: string;
|
|
@@ -900,7 +890,7 @@ export interface PostWorkoutRequestSet {
|
|
|
900
890
|
* update the corresponding values of the workout in the database, and those
|
|
901
891
|
* that are undefined will not be changed.
|
|
902
892
|
*/
|
|
903
|
-
export type UpdateWorkoutRequestWorkout = Partial<Pick<PostWorkoutRequestWorkout, 'title' | 'description' | 'media' | 'exercises' | 'is_private'
|
|
893
|
+
export type UpdateWorkoutRequestWorkout = Partial<Pick<PostWorkoutRequestWorkout, 'title' | 'description' | 'media' | 'exercises' | 'is_private'>> & {
|
|
904
894
|
start_and_end_time?: Required<Pick<PostWorkoutRequestWorkout, 'start_time' | 'end_time'>>;
|
|
905
895
|
};
|
|
906
896
|
/** Routines */
|
package/built/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.isValidUserWorkoutMetricsType = exports.isBodyMeasurementKey = exports.measurementsList = exports.
|
|
17
|
+
exports.isValidUserWorkoutMetricsType = exports.isBodyMeasurementKey = exports.measurementsList = exports.isPublicWorkout = exports.isSetType = exports.isRPE = exports.validRpeValues = exports.supportedInstructionsLanguages = exports.isCustomExerciseType = exports.customExericseTypes = exports.isExerciseType = exports.exerciseTypes = exports.isExerciseRepType = exports.exerciseRepTypes = exports.isEquipmentFilter = exports.equipmentFilters = exports.isEquipment = exports.equipments = exports.isMuscleGroupFilter = exports.muscleGroupFilters = exports.isMuscleGroup = exports.muscleGroups = exports.DefaultClientConfiguration = exports.isCoachRole = exports.isErrorResponse = exports.isLivePRVolumeOption = exports.isTimerVolumeOption = exports.isWeekday = exports.orderedWeekdays = exports.isBodyMeasurementUnit = exports.isDistanceUnitShort = exports.isDistanceUnit = exports.isWeightUnit = exports.isLanguage = exports.supportedLanguages = void 0;
|
|
18
18
|
const typeUtils_1 = require("./typeUtils");
|
|
19
19
|
__exportStar(require("./constants"), exports);
|
|
20
20
|
__exportStar(require("./utils"), exports);
|
|
@@ -212,30 +212,6 @@ const isPublicWorkout = (x) => {
|
|
|
212
212
|
return x.type === 'public';
|
|
213
213
|
};
|
|
214
214
|
exports.isPublicWorkout = isPublicWorkout;
|
|
215
|
-
const isHeartRateSamples = (x) => {
|
|
216
|
-
if (!x)
|
|
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
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
return true;
|
|
227
|
-
};
|
|
228
|
-
exports.isHeartRateSamples = isHeartRateSamples;
|
|
229
|
-
const isWorkoutBiometrics = (x) => {
|
|
230
|
-
if (!x)
|
|
231
|
-
return false;
|
|
232
|
-
const maybeCalories = x.total_calories;
|
|
233
|
-
const maybeHeartRateSamples = x.heart_rate_samples;
|
|
234
|
-
const caloriesAreValid = !maybeCalories || (typeof maybeCalories === 'number' && maybeCalories >= 0);
|
|
235
|
-
return ((caloriesAreValid && !maybeHeartRateSamples) ||
|
|
236
|
-
(0, exports.isHeartRateSamples)(maybeHeartRateSamples));
|
|
237
|
-
};
|
|
238
|
-
exports.isWorkoutBiometrics = isWorkoutBiometrics;
|
|
239
215
|
exports.measurementsList = [
|
|
240
216
|
'weight_kg',
|
|
241
217
|
'fat_percent',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExerciseType, RPE, SetType, ShareToPlatform,
|
|
1
|
+
import { ExerciseType, RPE, SetType, ShareToPlatform, WorkoutMedia, WorkoutVisibility } from '.';
|
|
2
2
|
/**
|
|
3
3
|
* Events are used to determine the start time, end time and duration of a
|
|
4
4
|
* `NormalizedWorkout`, in a way that can be persisted to disk.
|
|
@@ -29,12 +29,10 @@ export interface NormalizedWorkout {
|
|
|
29
29
|
appleWatch: boolean;
|
|
30
30
|
wearosWatch: boolean;
|
|
31
31
|
workoutVisibility: WorkoutVisibility;
|
|
32
|
-
isWorkoutBiometricsPublic: boolean;
|
|
33
32
|
shareTo: {
|
|
34
33
|
[key in ShareToPlatform]: boolean;
|
|
35
34
|
};
|
|
36
35
|
clientId: string;
|
|
37
|
-
biometrics?: WorkoutBiometrics;
|
|
38
36
|
}
|
|
39
37
|
export interface NormalizedSet {
|
|
40
38
|
index: number;
|
package/built/tests/testUtils.js
CHANGED