hevy-shared 1.0.673 → 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 +32 -1
- package/built/index.js +1 -0
- package/built/notifications.d.ts +5 -2
- package/built/tests/testUtils.js +1 -0
- package/package.json +1 -1
package/built/index.d.ts
CHANGED
|
@@ -105,6 +105,7 @@ export interface UserAccountResponse {
|
|
|
105
105
|
birthday?: string;
|
|
106
106
|
sex?: Sex;
|
|
107
107
|
email_consent: boolean;
|
|
108
|
+
email_verified: boolean;
|
|
108
109
|
}
|
|
109
110
|
export interface CoachAppPushTarget {
|
|
110
111
|
type: 'android' | 'ios';
|
|
@@ -598,6 +599,8 @@ export declare const exerciseCategories: readonly ["isolation", "compound", "ass
|
|
|
598
599
|
export type TrainingGoal = Lookup<typeof trainingGoals>;
|
|
599
600
|
export type TrainingLevel = Lookup<typeof trainingLevels>;
|
|
600
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;
|
|
601
604
|
/**
|
|
602
605
|
* Base properties that all exercise templates must have
|
|
603
606
|
*/
|
|
@@ -1007,13 +1010,23 @@ export interface BaseRoutine {
|
|
|
1007
1010
|
coach_id: string | null;
|
|
1008
1011
|
notes: string | null;
|
|
1009
1012
|
coach_force_rpe_enabled: boolean;
|
|
1013
|
+
hevy_trainer_program_id: string | null;
|
|
1010
1014
|
}
|
|
1011
1015
|
export interface Routine extends BaseRoutine {
|
|
1012
1016
|
username: string;
|
|
1017
|
+
coach_id: null;
|
|
1013
1018
|
}
|
|
1014
|
-
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'>;
|
|
1015
1027
|
export interface CoachesRoutine extends BaseRoutine {
|
|
1016
1028
|
coach_id: string;
|
|
1029
|
+
username: null;
|
|
1017
1030
|
}
|
|
1018
1031
|
export interface CoachAndCoachsClientsRoutineSyncResponse {
|
|
1019
1032
|
updated: BaseRoutine[];
|
|
@@ -1176,6 +1189,24 @@ export interface GetTeamInviteResponse {
|
|
|
1176
1189
|
export interface OutstandingInvitesForCoachTeamResponse {
|
|
1177
1190
|
invites: CoachTeamInvite[];
|
|
1178
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
|
+
}
|
|
1179
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"];
|
|
1180
1211
|
type MeasurementProperties = {
|
|
1181
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/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' | 'hevy-pro-status-changed' | 'hevy-pro-subscription-renewed';
|
|
144
|
+
export type DataOnlyMobilePushDataType = 'coach-data-changed' | 'coach-program-changed' | 'sync-workouts' | 'sync-routines' | 'sync-routine-folders' | 'sync-exercise-templates-and-customizations' | 'sync-account' | 'hevy-pro-status-changed' | 'hevy-pro-subscription-renewed' | never;
|
|
145
145
|
export interface CoachDataChangedMobilePushData extends BaseMobilePushData {
|
|
146
146
|
type: 'coach-data-changed';
|
|
147
147
|
additionalHevyData: ClientsCoachData;
|
|
@@ -170,6 +170,9 @@ 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
|
+
}
|
|
173
176
|
export interface CoachProgramFinishesNextWeekMobilePushData extends BaseMobilePushData {
|
|
174
177
|
type: 'coach-program-finishes-next-week';
|
|
175
178
|
}
|
|
@@ -203,4 +206,4 @@ export interface GracePeriodResolveMobilePushData extends BaseMobilePushData {
|
|
|
203
206
|
type: 'grace-period-resolve';
|
|
204
207
|
deeplink: string;
|
|
205
208
|
}
|
|
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;
|
|
209
|
+
export type MobilePushData = ChatUpdateMobilePushData | SyncCustomExercisesAndCoachCustomizationsMobilePushData | SyncWorkoutsMobilePushData | SyncRoutineFoldersMobilePushData | SyncRoutinesMobilePushData | SyncAccountMobilePushData | 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