hevy-shared 1.0.674 → 1.0.675
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 +31 -1
- package/built/index.js +1 -0
- package/built/tests/testUtils.js +1 -0
- package/package.json +1 -1
package/built/index.d.ts
CHANGED
|
@@ -599,6 +599,8 @@ export declare const exerciseCategories: readonly ["isolation", "compound", "ass
|
|
|
599
599
|
export type TrainingGoal = Lookup<typeof trainingGoals>;
|
|
600
600
|
export type TrainingLevel = Lookup<typeof trainingLevels>;
|
|
601
601
|
export type ExerciseCategory = Lookup<typeof exerciseCategories>;
|
|
602
|
+
export type HevyTrainerProgramEquipment = Extract<Equipment, 'barbell' | 'dumbbell' | 'machine'>;
|
|
603
|
+
export type WeeklyTrainingFrequency = 1 | 2 | 3 | 4 | 5 | 6;
|
|
602
604
|
/**
|
|
603
605
|
* Base properties that all exercise templates must have
|
|
604
606
|
*/
|
|
@@ -1008,13 +1010,23 @@ export interface BaseRoutine {
|
|
|
1008
1010
|
coach_id: string | null;
|
|
1009
1011
|
notes: string | null;
|
|
1010
1012
|
coach_force_rpe_enabled: boolean;
|
|
1013
|
+
hevy_trainer_program_id: string | null;
|
|
1011
1014
|
}
|
|
1012
1015
|
export interface Routine extends BaseRoutine {
|
|
1013
1016
|
username: string;
|
|
1017
|
+
coach_id: null;
|
|
1014
1018
|
}
|
|
1015
|
-
export
|
|
1019
|
+
export interface HevyTrainerRoutine extends Routine {
|
|
1020
|
+
hevy_trainer_program_id: string;
|
|
1021
|
+
coach_force_rpe_enabled: false;
|
|
1022
|
+
coach_id: null;
|
|
1023
|
+
program_id: null;
|
|
1024
|
+
folder_id: null;
|
|
1025
|
+
}
|
|
1026
|
+
export type CoachsShallowLibraryRoutine = Omit<BaseRoutine, 'exercises' | 'profile_pic' | 'hevy_trainer_program_id' | 'username'>;
|
|
1016
1027
|
export interface CoachesRoutine extends BaseRoutine {
|
|
1017
1028
|
coach_id: string;
|
|
1029
|
+
username: null;
|
|
1018
1030
|
}
|
|
1019
1031
|
export interface CoachAndCoachsClientsRoutineSyncResponse {
|
|
1020
1032
|
updated: BaseRoutine[];
|
|
@@ -1177,6 +1189,24 @@ export interface GetTeamInviteResponse {
|
|
|
1177
1189
|
export interface OutstandingInvitesForCoachTeamResponse {
|
|
1178
1190
|
invites: CoachTeamInvite[];
|
|
1179
1191
|
}
|
|
1192
|
+
export interface HevyTrainerProgram {
|
|
1193
|
+
title: string;
|
|
1194
|
+
level: TrainingLevel;
|
|
1195
|
+
goal: TrainingGoal;
|
|
1196
|
+
equipments: HevyTrainerProgramEquipment[];
|
|
1197
|
+
weekly_frequency: WeeklyTrainingFrequency;
|
|
1198
|
+
routines: HevyTrainerRoutine[];
|
|
1199
|
+
}
|
|
1200
|
+
export interface PostHevyTrainerProgramRequestBody {
|
|
1201
|
+
program: {
|
|
1202
|
+
title: string;
|
|
1203
|
+
level: TrainingLevel;
|
|
1204
|
+
goal: TrainingGoal;
|
|
1205
|
+
equipments: HevyTrainerProgramEquipment[];
|
|
1206
|
+
weekly_frequency: WeeklyTrainingFrequency;
|
|
1207
|
+
routines: RoutineUpdate[];
|
|
1208
|
+
};
|
|
1209
|
+
}
|
|
1180
1210
|
export declare const measurementsList: readonly ["weight_kg", "fat_percent", "neck_cm", "shoulder_cm", "chest_cm", "left_bicep_cm", "right_bicep_cm", "left_forearm_cm", "right_forearm_cm", "abdomen", "waist", "hips", "left_thigh", "right_thigh", "left_calf", "right_calf"];
|
|
1181
1211
|
type MeasurementProperties = {
|
|
1182
1212
|
[key in typeof measurementsList[number]]?: number;
|
package/built/index.js
CHANGED
|
@@ -208,6 +208,7 @@ exports.isExerciseType = isExerciseType;
|
|
|
208
208
|
exports.customExericseTypes = exports.exerciseTypes.filter((type) => type !== 'floors_duration' && type !== 'steps_duration');
|
|
209
209
|
const isCustomExerciseType = (x) => (0, typeUtils_1.isInArray)(x, exports.customExericseTypes);
|
|
210
210
|
exports.isCustomExerciseType = isCustomExerciseType;
|
|
211
|
+
// Hevy Trainer related types
|
|
211
212
|
exports.trainingGoals = ['strength', 'build_muscle', 'fat_loss'];
|
|
212
213
|
exports.trainingLevels = ['beginner', 'intermediate', 'advanced'];
|
|
213
214
|
exports.exerciseCategories = [
|
package/built/tests/testUtils.js
CHANGED