hevy-shared 1.0.701 → 1.0.702

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
@@ -72,7 +72,6 @@ export interface AccountResponse {
72
72
  is_coached: boolean;
73
73
  birthday?: string;
74
74
  sex?: Sex;
75
- height_cm?: number;
76
75
  }
77
76
  export interface UserAccountResponse {
78
77
  id: string;
@@ -107,7 +106,6 @@ export interface UserAccountResponse {
107
106
  sex?: Sex;
108
107
  email_consent: boolean;
109
108
  email_verified: boolean;
110
- height_cm?: number;
111
109
  }
112
110
  export interface CoachAppPushTarget {
113
111
  type: 'android' | 'ios';
@@ -162,7 +160,6 @@ export interface AccountUpdate {
162
160
  accepted_terms_and_conditions?: boolean;
163
161
  sex?: Sex;
164
162
  birthday?: string;
165
- height_cm?: number;
166
163
  }
167
164
  export interface AppleSignUpRequest {
168
165
  email?: string;
package/built/utils.d.ts CHANGED
@@ -14,6 +14,11 @@ export declare const roundToTwoDecimal: (value: number) => number;
14
14
  export declare const roundToOneDecimal: (value: number) => number;
15
15
  export declare const roundToWholeNumber: (value: number) => number;
16
16
  export declare const isValidUsername: (username: string) => boolean;
17
+ export declare const secondsToClockParts: (totalSeconds: number) => {
18
+ hours: number;
19
+ minutes: number;
20
+ seconds: number;
21
+ };
17
22
  /**
18
23
  * 01:25
19
24
  * 02:25:36
package/built/utils.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getYoutubeVideoId = exports.validateYoutubeUrl = exports.splitAtUsernamesAndLinks = exports.isVersionAGreaterOrEqualToVersionB = exports.generateUserGroupValue = exports.generateUserGroup = exports.isBaseExerciseTemplate = exports.getStrengthLevelFromPercentile = exports.numberToLocaleString = exports.numberWithCommas = exports.setVolume = exports.oneRepMax = exports.oneRepMaxPercentageMap = exports.workoutSetCount = exports.userExerciseSetWeight = exports.workoutDistanceMeters = exports.workoutReps = exports.workoutDurationSeconds = exports.removeAccents = exports.getClosestDataPointAroundTargetDate = exports.getClosestDataPointBeforeTargetDate = exports.findMapped = exports.stringToNumber = exports.forceStringToNumber = exports.formatDurationInput = exports.isValidFormattedTime = exports.isWholeNumber = exports.isNumber = exports.isValidUuid = exports.isValidPhoneNumber = exports.isValidWebUrl = exports.URL_REGEX = exports.isValidEmail = exports.secondsToWordFormatMinutes = exports.secondsToWordFormat = exports.secondsToClockFormat = exports.isValidUsername = exports.roundToWholeNumber = exports.roundToOneDecimal = exports.roundToTwoDecimal = exports.divide = exports.clampNumber = exports.num = void 0;
3
+ exports.getYoutubeVideoId = exports.validateYoutubeUrl = exports.splitAtUsernamesAndLinks = exports.isVersionAGreaterOrEqualToVersionB = exports.generateUserGroupValue = exports.generateUserGroup = exports.isBaseExerciseTemplate = exports.getStrengthLevelFromPercentile = exports.numberToLocaleString = exports.numberWithCommas = exports.setVolume = exports.oneRepMax = exports.oneRepMaxPercentageMap = exports.workoutSetCount = exports.userExerciseSetWeight = exports.workoutDistanceMeters = exports.workoutReps = exports.workoutDurationSeconds = exports.removeAccents = exports.getClosestDataPointAroundTargetDate = exports.getClosestDataPointBeforeTargetDate = exports.findMapped = exports.stringToNumber = exports.forceStringToNumber = exports.formatDurationInput = exports.isValidFormattedTime = exports.isWholeNumber = exports.isNumber = exports.isValidUuid = exports.isValidPhoneNumber = exports.isValidWebUrl = exports.URL_REGEX = exports.isValidEmail = exports.secondsToWordFormatMinutes = exports.secondsToWordFormat = exports.secondsToClockFormat = exports.secondsToClockParts = exports.isValidUsername = exports.roundToWholeNumber = exports.roundToOneDecimal = exports.roundToTwoDecimal = exports.divide = exports.clampNumber = exports.num = void 0;
4
4
  /**
5
5
  * Doesn't matter what you throw in the function it'll
6
6
  * always return a number. Non number values will return
@@ -47,6 +47,13 @@ const isValidUsername = (username) => {
47
47
  return re.test(username);
48
48
  };
49
49
  exports.isValidUsername = isValidUsername;
50
+ const secondsToClockParts = (totalSeconds) => {
51
+ const hours = Math.floor(totalSeconds / 3600);
52
+ const minutes = Math.floor((totalSeconds - hours * 3600) / 60);
53
+ const seconds = totalSeconds - hours * 3600 - minutes * 60;
54
+ return { hours, minutes, seconds };
55
+ };
56
+ exports.secondsToClockParts = secondsToClockParts;
50
57
  /**
51
58
  * 01:25
52
59
  * 02:25:36
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hevy-shared",
3
- "version": "1.0.701",
3
+ "version": "1.0.702",
4
4
  "description": "",
5
5
  "main": "built/index.js",
6
6
  "types": "built/index.d.ts",