hevy-shared 1.0.1124 → 1.0.1126

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
@@ -841,6 +841,12 @@ export interface HeartRateSample {
841
841
  timestamp_ms: number;
842
842
  bpm: number;
843
843
  }
844
+ export interface GeospatialPoint {
845
+ timestamp: number;
846
+ latitude: number;
847
+ longitude: number;
848
+ elevation: number;
849
+ }
844
850
  /** Routines */
845
851
  export interface RoutineSet {
846
852
  index: number;
@@ -1318,6 +1324,7 @@ export interface UserExerciseSet {
1318
1324
  rpe: RPE | null;
1319
1325
  user_bodyweight_kg: number | null;
1320
1326
  custom_metric: number | null;
1327
+ geospatial_data: GeospatialPoint[] | null;
1321
1328
  }
1322
1329
  export type SetCountMuscleSplitResponse = {
1323
1330
  [key in MuscleGroup]: number;
@@ -1,4 +1,4 @@
1
- import { ExerciseType, RPE, SetType, ShareToPlatform, WorkoutBiometrics, WorkoutMedia, WorkoutVisibility } from '..';
1
+ import { ExerciseType, GeospatialPoint, 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.
@@ -52,6 +52,7 @@ export interface NormalizedSet {
52
52
  targetRpe?: RPE;
53
53
  completed: boolean;
54
54
  completedAt?: string;
55
+ geospatialData?: GeospatialPoint[];
55
56
  }
56
57
  export interface NormalizedExercise {
57
58
  title: string;
@@ -1,4 +1,4 @@
1
- import { RPE, SetType, WorkoutBiometrics, WorkoutMedia } from '..';
1
+ import { GeospatialPoint, RPE, SetType, WorkoutBiometrics, WorkoutMedia } from '..';
2
2
  export interface PostWorkoutRequest {
3
3
  workout: PostWorkoutRequestWorkout;
4
4
  /**
@@ -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;
@@ -62,12 +66,13 @@ export interface PostWorkoutRequestSet {
62
66
  custom_metric?: number;
63
67
  rpe?: RPE;
64
68
  completed_at?: string;
69
+ geospatial_data?: GeospatialPoint[];
65
70
  }
66
71
  /**
67
72
  * Used to update an existing workout. Props that are defined will be used to
68
73
  * update the corresponding values of the workout in the database, and those
69
74
  * that are undefined will not be changed.
70
75
  */
71
- 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'>> & {
72
77
  start_and_end_time?: Required<Pick<PostWorkoutRequestWorkout, 'start_time' | 'end_time'>>;
73
78
  };
@@ -1,4 +1,4 @@
1
- import { ExerciseType, MuscleGroup, PreviewWorkoutLike, RPE, SetPersonalRecordType, SetType, WorkoutBiometrics, WorkoutComment, WorkoutMedia } from '..';
1
+ import { ExerciseType, GeospatialPoint, MuscleGroup, PreviewWorkoutLike, RPE, SetPersonalRecordType, SetType, WorkoutBiometrics, WorkoutComment, WorkoutMedia } from '..';
2
2
  import { LocalizedExerciseTitles } from './shared';
3
3
  export interface UserWorkout {
4
4
  id: string;
@@ -38,7 +38,6 @@ export interface UserWorkout {
38
38
  biometrics?: WorkoutBiometrics;
39
39
  is_biometrics_public: boolean;
40
40
  gym: UserWorkoutGym | undefined;
41
- is_home_gym: boolean;
42
41
  }
43
42
  export interface UserWorkoutExercise extends LocalizedExerciseTitles {
44
43
  id: string;
@@ -81,11 +80,15 @@ export interface UserWorkoutExerciseSet {
81
80
  value: number;
82
81
  }[];
83
82
  completed_at: string | null;
83
+ geospatial_data: GeospatialPoint[] | null;
84
84
  }
85
85
  type CommercialGym = {
86
86
  type: 'commercial';
87
87
  name: string;
88
88
  city: string;
89
89
  };
90
- export type UserWorkoutGym = CommercialGym;
90
+ type HomeGym = {
91
+ type: 'home';
92
+ };
93
+ export type UserWorkoutGym = CommercialGym | HomeGym;
91
94
  export {};
@@ -1,4 +1,4 @@
1
- import { ExerciseType, MuscleGroup, PreviewWorkoutLike, RPE, SetPersonalRecordType, SetType, WorkoutBiometrics, WorkoutComment, WorkoutMedia } from '..';
1
+ import { ExerciseType, GeospatialPoint, MuscleGroup, PreviewWorkoutLike, RPE, SetPersonalRecordType, SetType, WorkoutBiometrics, WorkoutComment, WorkoutMedia } from '..';
2
2
  import { LocalizedExerciseTitles } from './shared';
3
3
  export interface OwnedWorkout {
4
4
  id: string;
@@ -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;
@@ -76,4 +80,5 @@ export interface OwnedWorkoutExerciseSet {
76
80
  value: number;
77
81
  }[];
78
82
  completed_at: string | null;
83
+ geospatial_data: GeospatialPoint[] | null;
79
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hevy-shared",
3
- "version": "1.0.1124",
3
+ "version": "1.0.1126",
4
4
  "description": "",
5
5
  "main": "built/index.js",
6
6
  "types": "built/index.d.ts",