hevy-shared 1.0.970 → 1.0.971
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/hevyTrainer.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WeeklyTrainingFrequency, TrainingGoal, TrainingLevel, SimplifiedMuscleGroup, MuscleGroup, LibraryExercise, ExerciseCategory, GranularEquipment, HevyTrainerProgramEquipment, RestTimerLength } from '.';
|
|
2
2
|
export type HevyTrainerExerciseCategory = typeof hevyTrainerExerciseCategories[number];
|
|
3
|
-
export type
|
|
3
|
+
export type TrainerWorkoutTemplateName = typeof workoutTemplateNames[number];
|
|
4
4
|
export declare const workoutDurationOptions: readonly [40, 60, 80];
|
|
5
5
|
export type WorkoutDurationMinutes = typeof workoutDurationOptions[number];
|
|
6
6
|
export declare const trainerGymTypes: readonly ["home_gym", "garage_gym", "commercial_gym", "full_gym"];
|
|
@@ -16,7 +16,7 @@ export declare const trainerEquipmentToGranularEquipments: (equipments: HevyTrai
|
|
|
16
16
|
export declare const granularEquipmentsToTrainerEquipments: (granularEquipments: GranularEquipment[]) => HevyTrainerProgramEquipment[];
|
|
17
17
|
export declare const hevyTrainerExerciseCategories: readonly ["compound", "isolation"];
|
|
18
18
|
export declare const defaultDurationPerFrequency: Record<WeeklyTrainingFrequency, WorkoutDurationMinutes>;
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const workoutTemplateNames: readonly ["full_body_1", "full_body_2_a", "full_body_2_b", "full_body_3_a", "full_body_3_b", "full_body_3_c", "upper_1_a", "lower_1_a", "upper_1_b", "lower_1_b", "push_1", "pull_1", "legs_1", "upper_2", "lower_2", "push_2_a", "pull_2_a", "legs_2_a", "push_2_b", "pull_2_b", "legs_2_b"];
|
|
20
20
|
export type exerciseId = string;
|
|
21
21
|
export interface ExerciseSelectionCriteria {
|
|
22
22
|
exerciseCategory: HevyTrainerExerciseCategory | 'all';
|
|
@@ -67,7 +67,7 @@ export interface ProgramGenerationParams<T extends HevyTrainerLibraryExercise> {
|
|
|
67
67
|
debugExerciseSelectionTrace?: boolean;
|
|
68
68
|
}
|
|
69
69
|
export interface ProgramExerciseSelectionTraceRecord {
|
|
70
|
-
routine:
|
|
70
|
+
routine: TrainerWorkoutTemplateName;
|
|
71
71
|
prescriptionIndex: number;
|
|
72
72
|
prescription: ExercisePrescription;
|
|
73
73
|
resolvedMuscleGroup: MuscleGroup;
|
|
@@ -80,7 +80,7 @@ export type TrainerProgramAttemptWithTraces = TrainerProgramAttempt & {
|
|
|
80
80
|
};
|
|
81
81
|
export type FrequencyString = 'one_day' | 'two_days' | 'three_days' | 'four_days' | 'five_days' | 'six_days';
|
|
82
82
|
export declare const frequencyMap: Record<WeeklyTrainingFrequency, FrequencyString>;
|
|
83
|
-
export declare const programSplits: Record<WeeklyTrainingFrequency,
|
|
83
|
+
export declare const programSplits: Record<WeeklyTrainingFrequency, TrainerWorkoutTemplateName[]>;
|
|
84
84
|
export type SetsPerGoal = {
|
|
85
85
|
[key in TrainingGoal]: number;
|
|
86
86
|
};
|
|
@@ -126,7 +126,7 @@ export interface WorkoutTemplate {
|
|
|
126
126
|
notes?: string;
|
|
127
127
|
}
|
|
128
128
|
export type Templates = {
|
|
129
|
-
[key in
|
|
129
|
+
[key in TrainerWorkoutTemplateName]: WorkoutTemplate;
|
|
130
130
|
};
|
|
131
131
|
export interface BackofficeTrainerPreset {
|
|
132
132
|
id?: number;
|
|
@@ -157,7 +157,7 @@ export interface TrainerProgramExercise {
|
|
|
157
157
|
notes?: string;
|
|
158
158
|
}
|
|
159
159
|
export interface TrainerProgramRoutine {
|
|
160
|
-
name:
|
|
160
|
+
name: TrainerWorkoutTemplateName;
|
|
161
161
|
exercises: TrainerProgramExercise[];
|
|
162
162
|
notes?: string;
|
|
163
163
|
}
|
package/built/hevyTrainer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPrioritySortedExercises = exports.isEquipmentCompatible = exports.normalizeExerciseCategory = exports.getTrainerRestTimerSeconds = exports.getTrainerRepRange = exports.getTrainerSetCount = exports.programSplits = exports.frequencyMap = exports.
|
|
3
|
+
exports.getPrioritySortedExercises = exports.isEquipmentCompatible = exports.normalizeExerciseCategory = exports.getTrainerRestTimerSeconds = exports.getTrainerRepRange = exports.getTrainerSetCount = exports.programSplits = exports.frequencyMap = exports.workoutTemplateNames = exports.defaultDurationPerFrequency = exports.hevyTrainerExerciseCategories = exports.granularEquipmentsToTrainerEquipments = exports.trainerEquipmentToGranularEquipments = exports.granularEquipmentDefaults = exports.trainerGymTypes = exports.workoutDurationOptions = void 0;
|
|
4
4
|
exports.pickExerciseForPrescription = pickExerciseForPrescription;
|
|
5
5
|
exports.generateProgram = generateProgram;
|
|
6
6
|
const _1 = require(".");
|
|
@@ -152,7 +152,7 @@ exports.defaultDurationPerFrequency = {
|
|
|
152
152
|
5: 40,
|
|
153
153
|
6: 40,
|
|
154
154
|
};
|
|
155
|
-
exports.
|
|
155
|
+
exports.workoutTemplateNames = [
|
|
156
156
|
// Full body 1x
|
|
157
157
|
'full_body_1',
|
|
158
158
|
// Full body 2x
|
package/built/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InstructionsLanguage } from './exerciseLocaleUtils';
|
|
2
|
-
import {
|
|
2
|
+
import { TrainerWorkoutTemplateName, WorkoutDurationMinutes } from './hevyTrainer';
|
|
3
3
|
import { Language } from './translations';
|
|
4
4
|
import { Lookup } from './typeUtils';
|
|
5
5
|
export * from './constants';
|
|
@@ -1263,7 +1263,7 @@ export interface TrainerWorkoutTemplate {
|
|
|
1263
1263
|
id: string;
|
|
1264
1264
|
hevy_trainer_program_id: string;
|
|
1265
1265
|
index: number;
|
|
1266
|
-
|
|
1266
|
+
name: TrainerWorkoutTemplateName;
|
|
1267
1267
|
exercises: TrainerWorkoutTemplateExercise[];
|
|
1268
1268
|
}
|
|
1269
1269
|
export interface TrainerProgramV3 {
|
|
@@ -1294,7 +1294,7 @@ export interface PostTrainerProgramV3RequestBody {
|
|
|
1294
1294
|
rest_timer_length: RestTimerLength;
|
|
1295
1295
|
templates: {
|
|
1296
1296
|
index: number;
|
|
1297
|
-
|
|
1297
|
+
name: TrainerWorkoutTemplateName;
|
|
1298
1298
|
exercises: {
|
|
1299
1299
|
exercise_template_id: string;
|
|
1300
1300
|
index: number;
|
|
@@ -1320,7 +1320,7 @@ export interface UpdateTrainerProgramV3RequestBody {
|
|
|
1320
1320
|
templates: {
|
|
1321
1321
|
id: string;
|
|
1322
1322
|
index: number;
|
|
1323
|
-
|
|
1323
|
+
name: TrainerWorkoutTemplateName;
|
|
1324
1324
|
exercises: {
|
|
1325
1325
|
exercise_template_id: string;
|
|
1326
1326
|
index: number;
|
|
@@ -236,7 +236,7 @@ const makeSettings = (overrides = {}) => {
|
|
|
236
236
|
};
|
|
237
237
|
return acc;
|
|
238
238
|
}, {});
|
|
239
|
-
const templates = hevyTrainer_1.
|
|
239
|
+
const templates = hevyTrainer_1.workoutTemplateNames.reduce((acc, name) => {
|
|
240
240
|
acc[name] = { exercises: [] };
|
|
241
241
|
return acc;
|
|
242
242
|
}, {});
|