hevy-shared 1.0.1128 → 1.0.1130

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.
@@ -34,8 +34,12 @@ export interface PostWorkoutRequestWorkout {
34
34
  is_biometrics_public: boolean;
35
35
  trainer_program_id: string | undefined;
36
36
  trainer_workout_template_id: string | undefined;
37
- gym_id: string | null;
38
- is_home_gym: boolean;
37
+ gym: {
38
+ type: 'commercial';
39
+ gym_id: string;
40
+ } | {
41
+ type: 'home';
42
+ } | null;
39
43
  }
40
44
  export interface PostWorkoutRequestExercise {
41
45
  title: string;
@@ -69,6 +73,6 @@ export interface PostWorkoutRequestSet {
69
73
  * update the corresponding values of the workout in the database, and those
70
74
  * that are undefined will not be changed.
71
75
  */
72
- export type UpdateWorkoutRequestWorkout = Partial<Pick<PostWorkoutRequestWorkout, 'title' | 'description' | 'media' | 'exercises' | 'is_private' | 'is_biometrics_public' | 'gym_id' | 'is_home_gym'>> & {
76
+ export type UpdateWorkoutRequestWorkout = Partial<Pick<PostWorkoutRequestWorkout, 'title' | 'description' | 'media' | 'exercises' | 'is_private' | 'is_biometrics_public' | 'gym'>> & {
73
77
  start_and_end_time?: Required<Pick<PostWorkoutRequestWorkout, 'start_time' | 'end_time'>>;
74
78
  };
@@ -37,8 +37,7 @@ export interface UserWorkout {
37
37
  is_private: boolean;
38
38
  biometrics?: WorkoutBiometrics;
39
39
  is_biometrics_public: boolean;
40
- gym: UserWorkoutGym | undefined;
41
- is_home_gym: boolean;
40
+ userGym: UserWorkoutGym | undefined;
42
41
  }
43
42
  export interface UserWorkoutExercise extends LocalizedExerciseTitles {
44
43
  id: string;
@@ -88,5 +87,8 @@ type CommercialGym = {
88
87
  name: string;
89
88
  city: string;
90
89
  };
91
- export type UserWorkoutGym = CommercialGym;
90
+ type HomeGym = {
91
+ type: 'home';
92
+ };
93
+ export type UserWorkoutGym = CommercialGym | HomeGym;
92
94
  export {};
@@ -29,8 +29,12 @@ export interface OwnedWorkout {
29
29
  biometrics?: WorkoutBiometrics;
30
30
  is_biometrics_public: boolean;
31
31
  trainer_workout_template_id: string | undefined;
32
- gym_id: string | undefined;
33
- is_home_gym: boolean;
32
+ gym: {
33
+ type: 'commercial';
34
+ gym_id: string;
35
+ } | {
36
+ type: 'home';
37
+ } | null;
34
38
  }
35
39
  export interface TrainerWorkout extends OwnedWorkout {
36
40
  trainer_workout_template_id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hevy-shared",
3
- "version": "1.0.1128",
3
+ "version": "1.0.1130",
4
4
  "description": "",
5
5
  "main": "built/index.js",
6
6
  "types": "built/index.d.ts",