@plus45/types 1.0.0 → 1.1.0

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 ADDED
@@ -0,0 +1,13 @@
1
+ # Plus45-Types
2
+
3
+ This is a type library so that common types may be shared and maintained between the frontend and backend. The types are stored in the `/types` directory.
4
+
5
+ # Publishing
6
+
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
+
9
+ ```bash
10
+ npm install plus45-types
11
+ ```
12
+
13
+ \*\*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.
package/index.ts CHANGED
@@ -1,19 +1,5 @@
1
- export type User = {
2
- id: string;
3
- first_name: string;
4
- last_name: string;
5
- username: string;
6
- email: string;
7
- lang: string;
8
- created_at: string;
9
- };
1
+ import { Exercise } from "./types/exercise/exercise";
2
+ import { AccessToken } from "./types/user/access_token";
3
+ import { User } from "./types/user/user";
10
4
 
11
- export type AccessToken = {
12
- id: string;
13
- user_id: string;
14
- hashed_token: string;
15
- expires_at: Date;
16
- user_agent: string;
17
- ip_address: string;
18
- created_at: Date;
19
- };
5
+ export type { Exercise, AccessToken, User };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plus45/types",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "main": "index.ts",
5
5
  "types": "index.ts"
6
6
  }
@@ -0,0 +1,7 @@
1
+ export type Exercise = {
2
+ id: string;
3
+ name: string;
4
+ created_by: string;
5
+ type: string;
6
+ created_at: Date;
7
+ };
@@ -0,0 +1,9 @@
1
+ export type AccessToken = {
2
+ id: string;
3
+ user_id: string;
4
+ hashed_token: string;
5
+ expires_at: Date;
6
+ user_agent: string;
7
+ ip_address: string;
8
+ created_at: Date;
9
+ };
@@ -0,0 +1,9 @@
1
+ export type User = {
2
+ id: string;
3
+ first_name: string;
4
+ last_name: string;
5
+ username: string;
6
+ email: string;
7
+ lang: string;
8
+ created_at: string;
9
+ };