hevy-shared 1.0.1053 → 1.0.1055
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
CHANGED
|
@@ -303,8 +303,21 @@ export interface BackofficeExistingUserResponse {
|
|
|
303
303
|
public_api_key: string | null;
|
|
304
304
|
limited_discovery: boolean;
|
|
305
305
|
coach_trial_expire_date?: string;
|
|
306
|
-
hevy_trainer_program:
|
|
306
|
+
hevy_trainer_program: BackofficeTrainerProgram | null;
|
|
307
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* A user has at most one active Hevy Trainer program, on either the v2 schema
|
|
310
|
+
* (program → routines) or the v3 schema (program → templates). The backoffice
|
|
311
|
+
* receives whichever exists as a discriminated union keyed by `schema_version`
|
|
312
|
+
* so the front-end can render each shape.
|
|
313
|
+
*/
|
|
314
|
+
export type BackofficeTrainerProgram = {
|
|
315
|
+
schema_version: 'v2';
|
|
316
|
+
program: HevyTrainerProgram;
|
|
317
|
+
} | {
|
|
318
|
+
schema_version: 'v3';
|
|
319
|
+
program: TrainerProgramV3;
|
|
320
|
+
};
|
|
308
321
|
export interface BackofficeDeletedUserResponse {
|
|
309
322
|
state: 'deleted-account';
|
|
310
323
|
id: string;
|
|
@@ -27,13 +27,12 @@ export interface OwnedWorkout {
|
|
|
27
27
|
is_private: boolean;
|
|
28
28
|
biometrics?: WorkoutBiometrics;
|
|
29
29
|
is_biometrics_public: boolean;
|
|
30
|
-
trainer_program_id: string | undefined;
|
|
31
30
|
trainer_workout_template_id: string | undefined;
|
|
32
31
|
gym_id: string | undefined;
|
|
33
32
|
is_home_gym: boolean;
|
|
34
33
|
}
|
|
35
34
|
export interface TrainerWorkout extends OwnedWorkout {
|
|
36
|
-
|
|
35
|
+
trainer_workout_template_id: string;
|
|
37
36
|
}
|
|
38
37
|
export interface OwnedWorkoutExercise {
|
|
39
38
|
id: string;
|