hevy-shared 1.0.1034 → 1.0.1036

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.
@@ -13,4 +13,4 @@ export declare const ADJUST_EVENT_TOKENS: {
13
13
  updateAge29Through44: string;
14
14
  updateAge45AndUp: string;
15
15
  };
16
- export type AdjustEventToken = typeof ADJUST_EVENT_TOKENS[keyof typeof ADJUST_EVENT_TOKENS];
16
+ export type AdjustEventToken = (typeof ADJUST_EVENT_TOKENS)[keyof typeof ADJUST_EVENT_TOKENS];
@@ -51,7 +51,7 @@ declare const VOLUME_COMPARISONS: readonly [{
51
51
  readonly subtitleKey: "shareable.volumeCompare.airplane.subtitle";
52
52
  readonly weightKg: 40000;
53
53
  }];
54
- export type VolumeComparisonAssetName = typeof VOLUME_COMPARISONS[number]['asset'];
54
+ export type VolumeComparisonAssetName = (typeof VOLUME_COMPARISONS)[number]['asset'];
55
55
  export declare const getVolumeComparison: (volumeKg: number) => {
56
56
  readonly asset: "motorcycle";
57
57
  readonly subtitleKey: "shareable.volumeCompare.motorcycle.subtitle";
@@ -1,10 +1,10 @@
1
1
  import { WeeklyTrainingFrequency, TrainingGoal, TrainingLevel, SimplifiedMuscleGroup, MuscleGroup, LibraryExercise, ExerciseCategory, GranularEquipment, HevyTrainerProgramEquipment, RestTimerLength, CardioPreference } from '.';
2
- export type HevyTrainerExerciseCategory = typeof hevyTrainerExerciseCategories[number];
3
- export type HevyTrainerRoutineName = typeof routineNames[number];
2
+ export type HevyTrainerExerciseCategory = (typeof hevyTrainerExerciseCategories)[number];
3
+ export type HevyTrainerRoutineName = (typeof routineNames)[number];
4
4
  export declare const workoutDurationOptions: readonly [40, 60, 80];
5
- export type WorkoutDurationMinutes = typeof workoutDurationOptions[number];
5
+ export type WorkoutDurationMinutes = (typeof workoutDurationOptions)[number];
6
6
  export declare const trainerGymTypes: readonly ["home_gym", "garage_gym", "commercial_gym", "full_gym"];
7
- export type TrainerGymType = typeof trainerGymTypes[number];
7
+ export type TrainerGymType = (typeof trainerGymTypes)[number];
8
8
  export declare const granularEquipmentDefaults: {
9
9
  [key in TrainerGymType]: GranularEquipment[];
10
10
  };
package/built/index.d.ts CHANGED
@@ -654,8 +654,8 @@ export declare const cardioPreferences: readonly ["no-cardio", "workout-start",
654
654
  export type TrainingGoal = Lookup<typeof trainingGoals>;
655
655
  export type TrainingLevel = Lookup<typeof trainingLevels>;
656
656
  export type ExerciseCategory = Lookup<typeof exerciseCategories>;
657
- export type RestTimerLength = typeof restTimerLengths[number];
658
- export type CardioPreference = typeof cardioPreferences[number];
657
+ export type RestTimerLength = (typeof restTimerLengths)[number];
658
+ export type CardioPreference = (typeof cardioPreferences)[number];
659
659
  export type HevyTrainerProgramEquipment = Extract<Equipment, 'barbell' | 'dumbbell' | 'machine'>;
660
660
  export declare const hevyTrainerProgramEquipments: readonly ["barbell", "dumbbell", "machine"];
661
661
  export declare const granularEquipments: readonly ["barbell", "dumbbell", "kettlebell", "plate", "medicine_ball", "ez_bar", "landmine", "trap_bar", "pullup_bar", "dip_bar", "squat_rack", "flat_bench", "adjustable_bench", "dual_cable_machine", "single_cable_machine", "lat_pulldown_cable", "leg_press_machine", "smith_machine", "t_bar", "plate_machines", "stack_machines", "treadmill", "elliptical_trainer", "rowing_machine", "spinning", "stair_machine", "air_bike", "suspension_band", "resistance_band", "battle_rope", "rings", "jump_rope"];
@@ -1154,7 +1154,7 @@ export interface UpdateHevyTrainerProgramOldRequestBody {
1154
1154
  }
1155
1155
  export declare const measurementsList: readonly ["weight_kg", "lean_mass_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"];
1156
1156
  type MeasurementProperties = {
1157
- [key in typeof measurementsList[number]]?: number;
1157
+ [key in (typeof measurementsList)[number]]?: number;
1158
1158
  };
1159
1159
  export type BodyMeasurementKey = Lookup<typeof measurementsList>;
1160
1160
  export declare const isBodyMeasurementKey: (key: string) => key is BodyMeasurementKey;
@@ -1406,7 +1406,8 @@ export type CommercialGym = {
1406
1406
  name: string;
1407
1407
  fullAddress: string;
1408
1408
  city: string;
1409
- distanceM: number;
1409
+ latitude: number;
1410
+ longitude: number;
1410
1411
  };
1411
1412
  export type HomeGym = {
1412
1413
  type: 'home';
@@ -11,7 +11,7 @@ export interface WorkoutSync {
11
11
  isMore: boolean;
12
12
  updated_at?: string;
13
13
  }
14
- export type Workout = OwnedWorkout & Partial<UserWorkout>;
15
- export type WorkoutExercise = OwnedWorkoutExercise & Partial<UserWorkoutExercise>;
16
- export type WorkoutExerciseSet = OwnedWorkoutExerciseSet & Partial<UserWorkoutExerciseSet>;
14
+ export type Workout = OwnedWorkout | UserWorkout;
15
+ export type WorkoutExercise = OwnedWorkoutExercise | UserWorkoutExercise;
16
+ export type WorkoutExerciseSet = OwnedWorkoutExerciseSet | UserWorkoutExerciseSet;
17
17
  export declare function isOwnedWorkout(workout: OwnedWorkout | UserWorkout): workout is OwnedWorkout;
@@ -20,8 +20,7 @@ __exportStar(require("./userWorkout"), exports);
20
20
  __exportStar(require("./publicWorkout"), exports);
21
21
  __exportStar(require("./normalizedWorkout"), exports);
22
22
  __exportStar(require("./postWorkoutRequest"), exports);
23
- // Stub
23
+ // Placeholder, will be done better but this works for now
24
24
  function isOwnedWorkout(workout) {
25
- void workout;
26
- return true;
25
+ return 'gymId' in workout;
27
26
  }
@@ -25,7 +25,6 @@ export interface UserWorkout {
25
25
  apple_watch: boolean;
26
26
  wearos_watch: boolean;
27
27
  verified: boolean;
28
- created_at: string;
29
28
  updated_at: string;
30
29
  nth_workout: number;
31
30
  /**
@@ -39,13 +38,8 @@ export interface UserWorkout {
39
38
  */
40
39
  include_warmup_sets: boolean;
41
40
  is_private: boolean;
42
- /**
43
- * If applicable, the user ID of the coach who logged this workout
44
- */
45
- logged_by_coach_id?: string;
46
41
  biometrics?: WorkoutBiometrics;
47
42
  is_biometrics_public: boolean;
48
- trainer_program_id: string | undefined;
49
43
  gym: UserWorkoutGym | undefined;
50
44
  }
51
45
  export interface UserWorkoutExercise {
@@ -28,21 +28,7 @@ export interface OwnedWorkout {
28
28
  created_at: string;
29
29
  updated_at: string;
30
30
  nth_workout: number;
31
- /**
32
- * See https://github.com/hevyapp/hevy-backend/pull/193 to understand
33
- * why we added estimated_volume_kg
34
- */
35
- estimated_volume_kg: number;
36
- /**
37
- * Whether to include warmup sets in various calculations.
38
- * https://github.com/hevyapp/hevy-shared/pull/312
39
- */
40
- include_warmup_sets: boolean;
41
31
  is_private: boolean;
42
- /**
43
- * If applicable, the user ID of the coach who logged this workout
44
- */
45
- logged_by_coach_id?: string;
46
32
  biometrics?: WorkoutBiometrics;
47
33
  is_biometrics_public: boolean;
48
34
  trainer_program_id: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hevy-shared",
3
- "version": "1.0.1034",
3
+ "version": "1.0.1036",
4
4
  "description": "",
5
5
  "main": "built/index.js",
6
6
  "types": "built/index.d.ts",
@@ -43,7 +43,7 @@
43
43
  "eslint-config-prettier": "^8.5.0",
44
44
  "eslint-plugin-prettier": "^4.0.0",
45
45
  "jest": "^29.7.0",
46
- "prettier": "^2.6.2",
46
+ "prettier": "^2.8.8",
47
47
  "ts-jest": "^29.1.2",
48
48
  "typescript": "5.8.2"
49
49
  },