hevy-shared 1.0.683 → 1.0.685
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 -36
- 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,8 +105,6 @@ export interface UserAccountResponse {
|
|
|
105
105
|
birthday?: string;
|
|
106
106
|
sex?: Sex;
|
|
107
107
|
email_consent: boolean;
|
|
108
|
-
/** Indicates whether the account needs additional (email) verification to access certain APIs */
|
|
109
|
-
sensitive_api_requires_verification: boolean;
|
|
110
108
|
}
|
|
111
109
|
export interface CoachAppPushTarget {
|
|
112
110
|
type: 'android' | 'ios';
|
|
@@ -453,6 +451,7 @@ export interface UserHevyProSubcription {
|
|
|
453
451
|
subscription_cancels_on?: string;
|
|
454
452
|
};
|
|
455
453
|
}
|
|
454
|
+
export type CalendarViewOption = 'month' | 'year' | 'multi_year';
|
|
456
455
|
export interface UserPreferences {
|
|
457
456
|
username: string;
|
|
458
457
|
language?: Language;
|
|
@@ -474,6 +473,7 @@ export interface UserPreferences {
|
|
|
474
473
|
default_workout_biometrics_visibility_public?: boolean;
|
|
475
474
|
/** Only updateable by the backend within a special API */
|
|
476
475
|
volume_includes_warmup_sets?: boolean;
|
|
476
|
+
calendar_view_selection?: CalendarViewOption;
|
|
477
477
|
}
|
|
478
478
|
export type UpdateUserPreferencesRequest = Omit<UserPreferences, 'username' | 'volume_includes_warmup_sets'>;
|
|
479
479
|
export type FollowingStatus = 'not-following' | 'following' | 'requested';
|
|
@@ -600,10 +600,6 @@ export declare const exerciseCategories: readonly ["isolation", "compound", "ass
|
|
|
600
600
|
export type TrainingGoal = Lookup<typeof trainingGoals>;
|
|
601
601
|
export type TrainingLevel = Lookup<typeof trainingLevels>;
|
|
602
602
|
export type ExerciseCategory = Lookup<typeof exerciseCategories>;
|
|
603
|
-
export type HevyTrainerProgramEquipment = Extract<Equipment, 'barbell' | 'dumbbell' | 'machine'>;
|
|
604
|
-
export declare const hevyTrainerProgramEquipments: readonly ["barbell", "dumbbell", "machine"];
|
|
605
|
-
export declare const weeklyTrainingFrequencies: readonly [1, 2, 3, 4, 5, 6];
|
|
606
|
-
export type WeeklyTrainingFrequency = Lookup<typeof weeklyTrainingFrequencies>;
|
|
607
603
|
/**
|
|
608
604
|
* Base properties that all exercise templates must have
|
|
609
605
|
*/
|
|
@@ -1013,23 +1009,13 @@ export interface BaseRoutine {
|
|
|
1013
1009
|
coach_id: string | null;
|
|
1014
1010
|
notes: string | null;
|
|
1015
1011
|
coach_force_rpe_enabled: boolean;
|
|
1016
|
-
hevy_trainer_program_id: string | null;
|
|
1017
1012
|
}
|
|
1018
1013
|
export interface Routine extends BaseRoutine {
|
|
1019
1014
|
username: string;
|
|
1020
|
-
coach_id: null;
|
|
1021
1015
|
}
|
|
1022
|
-
export
|
|
1023
|
-
hevy_trainer_program_id: string;
|
|
1024
|
-
program_id: null;
|
|
1025
|
-
coach_force_rpe_enabled: false;
|
|
1026
|
-
folder_id: null;
|
|
1027
|
-
}
|
|
1028
|
-
export type CoachsShallowLibraryRoutine = Omit<BaseRoutine, 'exercises' | 'profile_pic' | 'hevy_trainer_program_id' | 'username'>;
|
|
1016
|
+
export type CoachsShallowLibraryRoutine = Omit<BaseRoutine, 'exercises' | 'profile_pic'>;
|
|
1029
1017
|
export interface CoachesRoutine extends BaseRoutine {
|
|
1030
1018
|
coach_id: string;
|
|
1031
|
-
username: null;
|
|
1032
|
-
hevy_trainer_program_id: null;
|
|
1033
1019
|
}
|
|
1034
1020
|
export interface CoachAndCoachsClientsRoutineSyncResponse {
|
|
1035
1021
|
updated: BaseRoutine[];
|
|
@@ -1192,25 +1178,6 @@ export interface GetTeamInviteResponse {
|
|
|
1192
1178
|
export interface OutstandingInvitesForCoachTeamResponse {
|
|
1193
1179
|
invites: CoachTeamInvite[];
|
|
1194
1180
|
}
|
|
1195
|
-
export interface HevyTrainerProgram {
|
|
1196
|
-
title: string;
|
|
1197
|
-
level: TrainingLevel;
|
|
1198
|
-
goal: TrainingGoal;
|
|
1199
|
-
equipments: HevyTrainerProgramEquipment[];
|
|
1200
|
-
weekly_frequency: WeeklyTrainingFrequency;
|
|
1201
|
-
routines: HevyTrainerRoutine[];
|
|
1202
|
-
next_workout_index: number;
|
|
1203
|
-
}
|
|
1204
|
-
export interface PostHevyTrainerProgramRequestBody {
|
|
1205
|
-
program: {
|
|
1206
|
-
title: string;
|
|
1207
|
-
level: TrainingLevel;
|
|
1208
|
-
goal: TrainingGoal;
|
|
1209
|
-
equipments: HevyTrainerProgramEquipment[];
|
|
1210
|
-
weekly_frequency: WeeklyTrainingFrequency;
|
|
1211
|
-
routines: RoutineUpdate[];
|
|
1212
|
-
};
|
|
1213
|
-
}
|
|
1214
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"];
|
|
1215
1182
|
type MeasurementProperties = {
|
|
1216
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