@plus45/types 1.1.0 → 1.1.2

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
@@ -7,7 +7,17 @@ This is a type library so that common types may be shared and maintained between
7
7
  After updating types, you can push the changes by first going to `package.json` and incrementing the version number. Then, in the `plus45-types` directory, run this command:
8
8
 
9
9
  ```bash
10
- npm install plus45-types
10
+ npm publish
11
11
  ```
12
12
 
13
+ Make sure to push changes to the plus45-types directory to main when updating.
14
+
13
15
  \*\*If you get an error that says "This command requires you to be logged in," you must be a member of the Plus45 organization. You can sign into your npm account by typing `npm login`, press enter, then follow the steps to log in. You should now be able to publish.
16
+
17
+ # Updating Packages
18
+
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
+
21
+ ```bash
22
+ pnpm update @plus45/types
23
+ ```
package/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Exercise } from "./types/exercise/exercise";
2
+ import ExerciseType from "./types/exercise/exercise_types";
2
3
  import { AccessToken } from "./types/user/access_token";
3
4
  import { User } from "./types/user/user";
4
5
 
5
- export type { Exercise, AccessToken, User };
6
+ export type { Exercise, ExerciseType, AccessToken, User };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plus45/types",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "main": "index.ts",
5
5
  "types": "index.ts"
6
6
  }
@@ -3,5 +3,9 @@ export type Exercise = {
3
3
  name: string;
4
4
  created_by: string;
5
5
  type: string;
6
+ description?: string;
7
+ sets?: number;
8
+ value?: number;
9
+ weight?: number;
6
10
  created_at: Date;
7
11
  };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Enum for different types of exercises.
3
+ */
4
+ enum ExerciseType {
5
+ /**
6
+ * Sets-Reps based exercise (e.g. 3x10)
7
+ */
8
+ STRENGTH = "STRENGTH",
9
+
10
+ /**
11
+ * Time based exercise (e.g. 3x30s)
12
+ */
13
+ TIME = "TIME",
14
+
15
+ /**
16
+ * Distance based exercise (e.g. 3x400m)
17
+ */
18
+ DISTANCE = "DISTANCE",
19
+
20
+ /**
21
+ * Custom exercise (uses string as data)
22
+ */
23
+ CUSTOM = "CUSTOM"
24
+ }
25
+
26
+ export default ExerciseType;