hevy-shared 1.0.1015 → 1.0.1017
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 +23 -15
- package/built/normalizedWorkoutUtils.d.ts +2 -2
- package/built/typeUtils.d.ts +0 -6
- package/package.json +1 -1
package/built/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { InstructionsLanguage } from './exerciseLocaleUtils';
|
|
|
2
2
|
import { WorkoutDurationMinutes } from './hevyTrainer';
|
|
3
3
|
import { BugReportQuestionSchema, CreateBugReportRequestBodySchema, postEmailBackofficeSchema } from './schemas';
|
|
4
4
|
import { Language } from './translations';
|
|
5
|
-
import { Lookup
|
|
5
|
+
import { Lookup } from './typeUtils';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
export * from './schemas';
|
|
8
8
|
export * from './constants';
|
|
@@ -888,7 +888,7 @@ export interface Workout {
|
|
|
888
888
|
biometrics?: WorkoutBiometrics;
|
|
889
889
|
is_biometrics_public: boolean;
|
|
890
890
|
trainer_program_id: string | undefined;
|
|
891
|
-
gym:
|
|
891
|
+
gym: Gym | undefined;
|
|
892
892
|
}
|
|
893
893
|
export interface CustomExerciseImage {
|
|
894
894
|
type: 'image';
|
|
@@ -968,7 +968,7 @@ export interface PostWorkoutRequestWorkout {
|
|
|
968
968
|
biometrics?: WorkoutBiometrics;
|
|
969
969
|
is_biometrics_public: boolean;
|
|
970
970
|
trainer_program_id: string | undefined;
|
|
971
|
-
gym:
|
|
971
|
+
gym: WorkoutGym | undefined;
|
|
972
972
|
}
|
|
973
973
|
export type WorkoutDataImporterReport = {
|
|
974
974
|
state: 'idle';
|
|
@@ -1306,23 +1306,22 @@ export interface UpdateHevyTrainerProgramRequestBody {
|
|
|
1306
1306
|
program: {
|
|
1307
1307
|
version: 1;
|
|
1308
1308
|
programId: string;
|
|
1309
|
-
title: string
|
|
1310
|
-
level: TrainingLevel
|
|
1311
|
-
goal: TrainingGoal
|
|
1312
|
-
equipments: GranularEquipment[]
|
|
1313
|
-
weekly_frequency: WeeklyTrainingFrequency
|
|
1314
|
-
focus_muscle
|
|
1315
|
-
next_workout_index: number
|
|
1316
|
-
workout_duration_minutes: WorkoutDurationMinutes
|
|
1317
|
-
rest_timer_length: RestTimerLength
|
|
1318
|
-
cardio_preference: CardioPreference
|
|
1309
|
+
title: string;
|
|
1310
|
+
level: TrainingLevel;
|
|
1311
|
+
goal: TrainingGoal;
|
|
1312
|
+
equipments: GranularEquipment[];
|
|
1313
|
+
weekly_frequency: WeeklyTrainingFrequency;
|
|
1314
|
+
focus_muscle?: SimplifiedMuscleGroup;
|
|
1315
|
+
next_workout_index: number;
|
|
1316
|
+
workout_duration_minutes: WorkoutDurationMinutes;
|
|
1317
|
+
rest_timer_length: RestTimerLength;
|
|
1318
|
+
cardio_preference: CardioPreference;
|
|
1319
1319
|
routines: {
|
|
1320
1320
|
id: string;
|
|
1321
1321
|
title: string;
|
|
1322
1322
|
notes: string | null;
|
|
1323
1323
|
exercises: RoutineUpdateExercise[];
|
|
1324
|
-
|
|
1325
|
-
}[] | null;
|
|
1324
|
+
}[];
|
|
1326
1325
|
};
|
|
1327
1326
|
}
|
|
1328
1327
|
/** @deprecated Use HevyTrainerProgram instead */
|
|
@@ -1634,6 +1633,15 @@ export type HomeGym = {
|
|
|
1634
1633
|
type: 'home';
|
|
1635
1634
|
};
|
|
1636
1635
|
export type Gym = CommercialGym | HomeGym;
|
|
1636
|
+
export type GymType = Gym['type'];
|
|
1637
|
+
export type WorkoutCommercialGym = {
|
|
1638
|
+
type: 'commercial';
|
|
1639
|
+
id: string;
|
|
1640
|
+
};
|
|
1641
|
+
export type WorkoutHomeGym = {
|
|
1642
|
+
type: 'home';
|
|
1643
|
+
};
|
|
1644
|
+
export type WorkoutGym = WorkoutCommercialGym | WorkoutHomeGym;
|
|
1637
1645
|
export interface StripePrice {
|
|
1638
1646
|
product_id: string;
|
|
1639
1647
|
billing_period: 'month' | 'year' | 'pay-once';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExerciseType, Gym, RPE, SetType, ShareToPlatform,
|
|
1
|
+
import { ExerciseType, Gym, RPE, SetType, ShareToPlatform, WorkoutBiometrics, WorkoutMedia, WorkoutVisibility } from '.';
|
|
2
2
|
/**
|
|
3
3
|
* Events are used to determine the start time, end time and duration of a
|
|
4
4
|
* `NormalizedWorkout`, in a way that can be persisted to disk.
|
|
@@ -36,7 +36,7 @@ export interface NormalizedWorkout {
|
|
|
36
36
|
clientId: string;
|
|
37
37
|
biometrics?: WorkoutBiometrics;
|
|
38
38
|
trainerProgramId: string | undefined;
|
|
39
|
-
gym:
|
|
39
|
+
gym: Gym | undefined;
|
|
40
40
|
}
|
|
41
41
|
export interface NormalizedSet {
|
|
42
42
|
index: number;
|
package/built/typeUtils.d.ts
CHANGED
|
@@ -68,9 +68,3 @@ export declare const parseJSON: (...args: Parameters<typeof JSON.parse>) => unkn
|
|
|
68
68
|
*/
|
|
69
69
|
export declare const typeSafeIndex: <T>(array: T[], index: number) => T | undefined;
|
|
70
70
|
export declare const TODO: (message?: string) => never;
|
|
71
|
-
/**
|
|
72
|
-
* @deprecated Placeholder for avoiding cross-repo type issues due to merges.
|
|
73
|
-
* Meant to be replaced with the enclosed type T as the earliest possible dev
|
|
74
|
-
* convenience. DO NOT USE THIS IN PRODUCTION!
|
|
75
|
-
*/
|
|
76
|
-
export type TODO<T> = T & never;
|