hevy-shared 1.0.680 → 1.0.682
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 +3 -35
- package/built/index.js +2 -9
- package/built/notifications.d.ts +2 -5
- package/built/tests/testUtils.js +0 -1
- package/package.json +1 -1
package/built/index.d.ts
CHANGED
|
@@ -105,7 +105,6 @@ export interface UserAccountResponse {
|
|
|
105
105
|
birthday?: string;
|
|
106
106
|
sex?: Sex;
|
|
107
107
|
email_consent: boolean;
|
|
108
|
-
email_verified: boolean;
|
|
109
108
|
}
|
|
110
109
|
export interface CoachAppPushTarget {
|
|
111
110
|
type: 'android' | 'ios';
|
|
@@ -452,6 +451,7 @@ export interface UserHevyProSubcription {
|
|
|
452
451
|
subscription_cancels_on?: string;
|
|
453
452
|
};
|
|
454
453
|
}
|
|
454
|
+
type CalendarViewOption = 'month' | 'year' | 'multi-year';
|
|
455
455
|
export interface UserPreferences {
|
|
456
456
|
username: string;
|
|
457
457
|
language?: Language;
|
|
@@ -473,6 +473,7 @@ export interface UserPreferences {
|
|
|
473
473
|
default_workout_biometrics_visibility_public?: boolean;
|
|
474
474
|
/** Only updateable by the backend within a special API */
|
|
475
475
|
volume_includes_warmup_sets?: boolean;
|
|
476
|
+
calendar_view_selection?: CalendarViewOption;
|
|
476
477
|
}
|
|
477
478
|
export type UpdateUserPreferencesRequest = Omit<UserPreferences, 'username' | 'volume_includes_warmup_sets'>;
|
|
478
479
|
export type FollowingStatus = 'not-following' | 'following' | 'requested';
|
|
@@ -599,10 +600,6 @@ export declare const exerciseCategories: readonly ["isolation", "compound", "ass
|
|
|
599
600
|
export type TrainingGoal = Lookup<typeof trainingGoals>;
|
|
600
601
|
export type TrainingLevel = Lookup<typeof trainingLevels>;
|
|
601
602
|
export type ExerciseCategory = Lookup<typeof exerciseCategories>;
|
|
602
|
-
export type HevyTrainerProgramEquipment = Extract<Equipment, 'barbell' | 'dumbbell' | 'machine'>;
|
|
603
|
-
export declare const hevyTrainerProgramEquipments: readonly ["barbell", "dumbbell", "machine"];
|
|
604
|
-
export declare const weeklyTrainingFrequencies: readonly [1, 2, 3, 4, 5, 6];
|
|
605
|
-
export type WeeklyTrainingFrequency = Lookup<typeof weeklyTrainingFrequencies>;
|
|
606
603
|
/**
|
|
607
604
|
* Base properties that all exercise templates must have
|
|
608
605
|
*/
|
|
@@ -1012,23 +1009,13 @@ export interface BaseRoutine {
|
|
|
1012
1009
|
coach_id: string | null;
|
|
1013
1010
|
notes: string | null;
|
|
1014
1011
|
coach_force_rpe_enabled: boolean;
|
|
1015
|
-
hevy_trainer_program_id: string | null;
|
|
1016
1012
|
}
|
|
1017
1013
|
export interface Routine extends BaseRoutine {
|
|
1018
1014
|
username: string;
|
|
1019
|
-
coach_id: null;
|
|
1020
1015
|
}
|
|
1021
|
-
export
|
|
1022
|
-
hevy_trainer_program_id: string;
|
|
1023
|
-
program_id: null;
|
|
1024
|
-
coach_force_rpe_enabled: false;
|
|
1025
|
-
folder_id: null;
|
|
1026
|
-
}
|
|
1027
|
-
export type CoachsShallowLibraryRoutine = Omit<BaseRoutine, 'exercises' | 'profile_pic' | 'hevy_trainer_program_id' | 'username'>;
|
|
1016
|
+
export type CoachsShallowLibraryRoutine = Omit<BaseRoutine, 'exercises' | 'profile_pic'>;
|
|
1028
1017
|
export interface CoachesRoutine extends BaseRoutine {
|
|
1029
1018
|
coach_id: string;
|
|
1030
|
-
username: null;
|
|
1031
|
-
hevy_trainer_program_id: null;
|
|
1032
1019
|
}
|
|
1033
1020
|
export interface CoachAndCoachsClientsRoutineSyncResponse {
|
|
1034
1021
|
updated: BaseRoutine[];
|
|
@@ -1191,25 +1178,6 @@ export interface GetTeamInviteResponse {
|
|
|
1191
1178
|
export interface OutstandingInvitesForCoachTeamResponse {
|
|
1192
1179
|
invites: CoachTeamInvite[];
|
|
1193
1180
|
}
|
|
1194
|
-
export interface HevyTrainerProgram {
|
|
1195
|
-
title: string;
|
|
1196
|
-
level: TrainingLevel;
|
|
1197
|
-
goal: TrainingGoal;
|
|
1198
|
-
equipments: HevyTrainerProgramEquipment[];
|
|
1199
|
-
weekly_frequency: WeeklyTrainingFrequency;
|
|
1200
|
-
routines: HevyTrainerRoutine[];
|
|
1201
|
-
next_workout_index: number;
|
|
1202
|
-
}
|
|
1203
|
-
export interface PostHevyTrainerProgramRequestBody {
|
|
1204
|
-
program: {
|
|
1205
|
-
title: string;
|
|
1206
|
-
level: TrainingLevel;
|
|
1207
|
-
goal: TrainingGoal;
|
|
1208
|
-
equipments: HevyTrainerProgramEquipment[];
|
|
1209
|
-
weekly_frequency: WeeklyTrainingFrequency;
|
|
1210
|
-
routines: RoutineUpdate[];
|
|
1211
|
-
};
|
|
1212
|
-
}
|
|
1213
1181
|
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"];
|
|
1214
1182
|
type MeasurementProperties = {
|
|
1215
1183
|
[key in typeof measurementsList[number]]?: number;
|
package/built/index.js
CHANGED
|
@@ -14,8 +14,8 @@ 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.
|
|
18
|
-
exports.isSuggestedUserSource =
|
|
17
|
+
exports.isValidUserWorkoutMetricsType = exports.isBodyMeasurementKey = exports.measurementsList = exports.isWorkoutBiometrics = exports.isHeartRateSamples = exports.isPublicWorkout = exports.isSetType = exports.isRPE = exports.validRpeValues = exports.isSetPersonalRecordType = exports.supportedInstructionsLanguages = exports.exerciseCategories = exports.trainingLevels = exports.trainingGoals = 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.isSimplifiedMuscleGroup = exports.simplifiedMuscleGroups = exports.miscellaneousMuscles = exports.chestMuscles = exports.backMuscles = exports.legMuscles = exports.armMuscles = exports.shoulderMuscles = exports.coreMuscles = 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
|
+
exports.isSuggestedUserSource = void 0;
|
|
19
19
|
const typeUtils_1 = require("./typeUtils");
|
|
20
20
|
__exportStar(require("./constants"), exports);
|
|
21
21
|
__exportStar(require("./utils"), exports);
|
|
@@ -208,7 +208,6 @@ 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
|
|
212
211
|
exports.trainingGoals = ['strength', 'build_muscle', 'fat_loss'];
|
|
213
212
|
exports.trainingLevels = ['beginner', 'intermediate', 'advanced'];
|
|
214
213
|
exports.exerciseCategories = [
|
|
@@ -216,12 +215,6 @@ exports.exerciseCategories = [
|
|
|
216
215
|
'compound',
|
|
217
216
|
'assistance-compound',
|
|
218
217
|
];
|
|
219
|
-
exports.hevyTrainerProgramEquipments = [
|
|
220
|
-
'barbell',
|
|
221
|
-
'dumbbell',
|
|
222
|
-
'machine',
|
|
223
|
-
];
|
|
224
|
-
exports.weeklyTrainingFrequencies = [1, 2, 3, 4, 5, 6];
|
|
225
218
|
exports.supportedInstructionsLanguages = [
|
|
226
219
|
'en',
|
|
227
220
|
'it',
|
package/built/notifications.d.ts
CHANGED
|
@@ -141,7 +141,7 @@ export type NotificationMobilePushDataType = NotificationType | 'chat-update' |
|
|
|
141
141
|
* For iOS/Apple see https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app
|
|
142
142
|
* For Android see https://firebase.google.com/docs/cloud-messaging/concept-options#data_messages
|
|
143
143
|
*/
|
|
144
|
-
export type DataOnlyMobilePushDataType = 'coach-data-changed' | 'coach-program-changed' | 'sync-workouts' | 'sync-routines' | 'sync-routine-folders' | 'sync-exercise-templates-and-customizations' | '
|
|
144
|
+
export type DataOnlyMobilePushDataType = 'coach-data-changed' | 'coach-program-changed' | 'sync-workouts' | 'sync-routines' | 'sync-routine-folders' | 'sync-exercise-templates-and-customizations' | 'hevy-pro-status-changed' | 'hevy-pro-subscription-renewed';
|
|
145
145
|
export interface CoachDataChangedMobilePushData extends BaseMobilePushData {
|
|
146
146
|
type: 'coach-data-changed';
|
|
147
147
|
additionalHevyData: ClientsCoachData;
|
|
@@ -170,9 +170,6 @@ export interface SyncRoutineFoldersMobilePushData extends BaseMobilePushData {
|
|
|
170
170
|
export interface SyncCustomExercisesAndCoachCustomizationsMobilePushData extends BaseMobilePushData {
|
|
171
171
|
type: 'sync-exercise-templates-and-customizations';
|
|
172
172
|
}
|
|
173
|
-
export interface SyncAccountMobilePushData extends BaseMobilePushData {
|
|
174
|
-
type: 'sync-account';
|
|
175
|
-
}
|
|
176
173
|
export interface CoachProgramFinishesNextWeekMobilePushData extends BaseMobilePushData {
|
|
177
174
|
type: 'coach-program-finishes-next-week';
|
|
178
175
|
}
|
|
@@ -206,4 +203,4 @@ export interface GracePeriodResolveMobilePushData extends BaseMobilePushData {
|
|
|
206
203
|
type: 'grace-period-resolve';
|
|
207
204
|
deeplink: string;
|
|
208
205
|
}
|
|
209
|
-
export type MobilePushData = ChatUpdateMobilePushData | SyncCustomExercisesAndCoachCustomizationsMobilePushData | SyncWorkoutsMobilePushData | SyncRoutineFoldersMobilePushData | SyncRoutinesMobilePushData |
|
|
206
|
+
export type MobilePushData = ChatUpdateMobilePushData | SyncCustomExercisesAndCoachCustomizationsMobilePushData | SyncWorkoutsMobilePushData | SyncRoutineFoldersMobilePushData | SyncRoutinesMobilePushData | ProStatusChangedPushMobilePushData | HevyProSubscriptionRenewedMobilePushData | CoachProgramChangedMobilePushData | CoachDataChangedMobilePushData | ContactOnHevyMobilePushData | CoachClientInviteMobilePushData | AcceptFollowRequestMobilePushData | FollowRequestMobilePushData | FollowMobilePushData | WorkoutLikeMobilePushData | WorkoutCommentLikeMobilePushData | WorkoutCommentMentionMobilePushData | WorkoutCommentDiscussionMobilePushData | WorkoutCommentReplyMobilePushData | WorkoutCommentMobilePushData | WorkoutMentionMobilePushData | WorkoutCompleteMobilePushData | CoachProgramFinishesNextWeekMobilePushData | CoachProgramStartsTodayMobilePushData | CoachLoggedYourWorkoutMobilePushData | CoachLoggedYourMeasurementsMobilePushData | MonthlyReportMobilePushData | GracePeriodEnterMobilePushData | GracePeriodResolveMobilePushData;
|
package/built/tests/testUtils.js
CHANGED