@plus45/types 1.1.3 → 1.1.4

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/README.md CHANGED
@@ -19,5 +19,5 @@ Make sure to push changes to the plus45-types directory to main when updating.
19
19
  If a new update is published for the @plus45/types package, you must manually update and install the new packages. You can do so by entering this in the `frontend` or `backend` directories:
20
20
 
21
21
  ```bash
22
- pnpm update @plus45/types
22
+ pnpm add @plus45/types@latest
23
23
  ```
package/index.ts CHANGED
@@ -2,5 +2,6 @@ import { Exercise } from "./types/exercise/exercise";
2
2
  import ExerciseType from "./types/exercise/exercise_types";
3
3
  import { AccessToken } from "./types/user/access_token";
4
4
  import { User } from "./types/user/user";
5
+ import { ExerciseUnit } from "./types/exercise/exercise_units";
5
6
 
6
- export type { Exercise, ExerciseType, AccessToken, User };
7
+ export type { Exercise, ExerciseType, ExerciseUnit, AccessToken, User };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plus45/types",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "main": "index.ts",
5
5
  "types": "index.ts"
6
6
  }
@@ -1,11 +1,15 @@
1
+ import ExerciseType from "./exercise_types";
2
+ import { ExerciseUnit } from "./exercise_units";
3
+
1
4
  export type Exercise = {
2
5
  id: string;
3
6
  name: string;
4
7
  created_by: string;
5
- type: string;
8
+ type: ExerciseType;
6
9
  description?: string;
7
10
  sets?: number;
8
- value?: number;
9
11
  reps?: number;
12
+ value?: number;
13
+ value_unit?: ExerciseUnit;
10
14
  created_at: Date;
11
15
  };
@@ -0,0 +1,9 @@
1
+ export enum ExerciseUnit {
2
+ // Time
3
+ seconds = "SECONDS",
4
+ minutes = "MINUTES",
5
+
6
+ // Weight
7
+ pounds = "POUNDS",
8
+ kilograms = "KILOGRAMS"
9
+ }