hevy-shared 1.0.1007 → 1.0.1009

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
@@ -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 } from './typeUtils';
5
+ import { Lookup, TODO } from './typeUtils';
6
6
  import { z } from 'zod';
7
7
  export * from './schemas';
8
8
  export * from './constants';
@@ -888,6 +888,7 @@ export interface Workout {
888
888
  biometrics?: WorkoutBiometrics;
889
889
  is_biometrics_public: boolean;
890
890
  trainer_program_id: string | undefined;
891
+ gym: TODO<Gym> | undefined;
891
892
  }
892
893
  export interface CustomExerciseImage {
893
894
  type: 'image';
@@ -967,6 +968,7 @@ export interface PostWorkoutRequestWorkout {
967
968
  biometrics?: WorkoutBiometrics;
968
969
  is_biometrics_public: boolean;
969
970
  trainer_program_id: string | undefined;
971
+ gym: TODO<Gym> | undefined;
970
972
  }
971
973
  export type WorkoutDataImporterReport = {
972
974
  state: 'idle';
@@ -1619,6 +1621,18 @@ export interface UserMetadataResponse {
1619
1621
  export interface NetworkInfoRequest {
1620
1622
  networkType: NetworkType;
1621
1623
  }
1624
+ export type CommercialGym = {
1625
+ type: 'commercial';
1626
+ id: string;
1627
+ name: string;
1628
+ fullAddress: string;
1629
+ city: string;
1630
+ distanceM: number;
1631
+ };
1632
+ export type HomeGym = {
1633
+ type: 'home';
1634
+ };
1635
+ export type Gym = CommercialGym | HomeGym;
1622
1636
  export interface StripePrice {
1623
1637
  product_id: string;
1624
1638
  billing_period: 'month' | 'year' | 'pay-once';
@@ -1995,16 +2009,12 @@ export interface ExerciseHistoryWorkout {
1995
2009
  export declare const supportedScopes: readonly ["read-workout", "modify-workout", "read-routine", "modify-routine", "unrestricted"];
1996
2010
  export type OAuthScope = Lookup<typeof supportedScopes>;
1997
2011
  export declare const isOAuthScope: (x: string) => x is OAuthScope;
1998
- export type WorkoutMediaBackoffice = WorkoutMedia & {
1999
- deleted: boolean;
2000
- notes?: string;
2001
- };
2002
2012
  export interface WorkoutsWithMediaBackofficeResponse {
2003
2013
  username: string;
2004
2014
  workouts: {
2005
2015
  id: string;
2006
2016
  name: string;
2007
- media: WorkoutMediaBackoffice[];
2017
+ media: WorkoutMedia[];
2008
2018
  }[];
2009
2019
  }
2010
2020
  export interface GetAccountsByEmailResponse {
@@ -1,4 +1,4 @@
1
- import { ExerciseType, RPE, SetType, ShareToPlatform, WorkoutBiometrics, WorkoutMedia, WorkoutVisibility } from '.';
1
+ import { ExerciseType, Gym, RPE, SetType, ShareToPlatform, TODO, 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,6 +36,7 @@ export interface NormalizedWorkout {
36
36
  clientId: string;
37
37
  biometrics?: WorkoutBiometrics;
38
38
  trainerProgramId: string | undefined;
39
+ gym: TODO<Gym> | undefined;
39
40
  }
40
41
  export interface NormalizedSet {
41
42
  index: number;
@@ -161,6 +161,7 @@ class WorkoutBuilder {
161
161
  healthConnect: false,
162
162
  },
163
163
  clientId: '',
164
+ gym: undefined,
164
165
  });
165
166
  this._exercises = [];
166
167
  }
@@ -68,3 +68,9 @@ 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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hevy-shared",
3
- "version": "1.0.1007",
3
+ "version": "1.0.1009",
4
4
  "description": "",
5
5
  "main": "built/index.js",
6
6
  "types": "built/index.d.ts",