hevy-shared 1.0.683 → 1.0.684
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 +4 -36
- package/built/index.js +7 -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,8 @@ export interface UserHevyProSubcription {
|
|
|
453
451
|
subscription_cancels_on?: string;
|
|
454
452
|
};
|
|
455
453
|
}
|
|
454
|
+
export declare const ALL_CALENDAR_VIEW_OPTIONS: readonly ["month", "year", "multi_year"];
|
|
455
|
+
export type CalendarViewOption = typeof ALL_CALENDAR_VIEW_OPTIONS;
|
|
456
456
|
export interface UserPreferences {
|
|
457
457
|
username: string;
|
|
458
458
|
language?: Language;
|
|
@@ -474,6 +474,7 @@ export interface UserPreferences {
|
|
|
474
474
|
default_workout_biometrics_visibility_public?: boolean;
|
|
475
475
|
/** Only updateable by the backend within a special API */
|
|
476
476
|
volume_includes_warmup_sets?: boolean;
|
|
477
|
+
calendar_view_selection?: CalendarViewOption;
|
|
477
478
|
}
|
|
478
479
|
export type UpdateUserPreferencesRequest = Omit<UserPreferences, 'username' | 'volume_includes_warmup_sets'>;
|
|
479
480
|
export type FollowingStatus = 'not-following' | 'following' | 'requested';
|
|
@@ -600,10 +601,6 @@ export declare const exerciseCategories: readonly ["isolation", "compound", "ass
|
|
|
600
601
|
export type TrainingGoal = Lookup<typeof trainingGoals>;
|
|
601
602
|
export type TrainingLevel = Lookup<typeof trainingLevels>;
|
|
602
603
|
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
604
|
/**
|
|
608
605
|
* Base properties that all exercise templates must have
|
|
609
606
|
*/
|
|
@@ -1013,23 +1010,13 @@ export interface BaseRoutine {
|
|
|
1013
1010
|
coach_id: string | null;
|
|
1014
1011
|
notes: string | null;
|
|
1015
1012
|
coach_force_rpe_enabled: boolean;
|
|
1016
|
-
hevy_trainer_program_id: string | null;
|
|
1017
1013
|
}
|
|
1018
1014
|
export interface Routine extends BaseRoutine {
|
|
1019
1015
|
username: string;
|
|
1020
|
-
coach_id: null;
|
|
1021
1016
|
}
|
|
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'>;
|
|
1017
|
+
export type CoachsShallowLibraryRoutine = Omit<BaseRoutine, 'exercises' | 'profile_pic'>;
|
|
1029
1018
|
export interface CoachesRoutine extends BaseRoutine {
|
|
1030
1019
|
coach_id: string;
|
|
1031
|
-
username: null;
|
|
1032
|
-
hevy_trainer_program_id: null;
|
|
1033
1020
|
}
|
|
1034
1021
|
export interface CoachAndCoachsClientsRoutineSyncResponse {
|
|
1035
1022
|
updated: BaseRoutine[];
|
|
@@ -1192,25 +1179,6 @@ export interface GetTeamInviteResponse {
|
|
|
1192
1179
|
export interface OutstandingInvitesForCoachTeamResponse {
|
|
1193
1180
|
invites: CoachTeamInvite[];
|
|
1194
1181
|
}
|
|
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
1182
|
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
1183
|
type MeasurementProperties = {
|
|
1216
1184
|
[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.measurementsList = exports.isWorkoutBiometrics = exports.isHeartRateSamples = exports.isPublicWorkout = exports.isSetType = exports.isRPE = exports.validRpeValues = exports.isSetPersonalRecordType = exports.supportedInstructionsLanguages = exports.
|
|
18
|
-
exports.isSuggestedUserSource = exports.isValidUserWorkoutMetricsType =
|
|
17
|
+
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.ALL_CALENDAR_VIEW_OPTIONS = 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 = exports.isValidUserWorkoutMetricsType = void 0;
|
|
19
19
|
const typeUtils_1 = require("./typeUtils");
|
|
20
20
|
__exportStar(require("./constants"), exports);
|
|
21
21
|
__exportStar(require("./utils"), exports);
|
|
@@ -105,6 +105,11 @@ const _supportedProStores = [
|
|
|
105
105
|
'paddle',
|
|
106
106
|
'hevy-coach',
|
|
107
107
|
];
|
|
108
|
+
exports.ALL_CALENDAR_VIEW_OPTIONS = [
|
|
109
|
+
'month',
|
|
110
|
+
'year',
|
|
111
|
+
'multi_year',
|
|
112
|
+
];
|
|
108
113
|
exports.coreMuscles = ['abdominals'];
|
|
109
114
|
exports.shoulderMuscles = ['shoulders'];
|
|
110
115
|
exports.armMuscles = ['biceps', 'triceps', 'forearms'];
|
|
@@ -208,7 +213,6 @@ exports.isExerciseType = isExerciseType;
|
|
|
208
213
|
exports.customExericseTypes = exports.exerciseTypes.filter((type) => type !== 'floors_duration' && type !== 'steps_duration');
|
|
209
214
|
const isCustomExerciseType = (x) => (0, typeUtils_1.isInArray)(x, exports.customExericseTypes);
|
|
210
215
|
exports.isCustomExerciseType = isCustomExerciseType;
|
|
211
|
-
// Hevy Trainer related types
|
|
212
216
|
exports.trainingGoals = ['strength', 'build_muscle', 'fat_loss'];
|
|
213
217
|
exports.trainingLevels = ['beginner', 'intermediate', 'advanced'];
|
|
214
218
|
exports.exerciseCategories = [
|
|
@@ -216,12 +220,6 @@ exports.exerciseCategories = [
|
|
|
216
220
|
'compound',
|
|
217
221
|
'assistance-compound',
|
|
218
222
|
];
|
|
219
|
-
exports.hevyTrainerProgramEquipments = [
|
|
220
|
-
'barbell',
|
|
221
|
-
'dumbbell',
|
|
222
|
-
'machine',
|
|
223
|
-
];
|
|
224
|
-
exports.weeklyTrainingFrequencies = [1, 2, 3, 4, 5, 6];
|
|
225
223
|
exports.supportedInstructionsLanguages = [
|
|
226
224
|
'en',
|
|
227
225
|
'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