@tennantje/identity-types 1.0.1
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 +24 -0
- package/dist/User.d.ts +20 -0
- package/dist/User.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +32 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# @tennantje/identity-types
|
|
2
|
+
|
|
3
|
+
Shared TypeScript types for Jeremy's identity server project.
|
|
4
|
+
|
|
5
|
+
**Note**: While this package is open source, it's highly specific to my personal identity server implementation and likely won't be useful for other projects. You're welcome to use it, but it's really just here so I can share types between my frontend and backend.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @tennantje/identity-types
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { User, RegisterUserRequest } from "@tennantje/identity-types";
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Development
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm run build # Build the package
|
|
23
|
+
./release.sh # Bump version, commit, tag, push, and publish
|
|
24
|
+
```
|
package/dist/User.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface User {
|
|
2
|
+
userId: string;
|
|
3
|
+
firstName: string;
|
|
4
|
+
lastName: string;
|
|
5
|
+
email: string;
|
|
6
|
+
unverifiedEmail: string;
|
|
7
|
+
emailVerified: boolean;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
createdBy: string;
|
|
10
|
+
modifiedAt: string;
|
|
11
|
+
modifiedBy: string;
|
|
12
|
+
}
|
|
13
|
+
export type JWTUser = Pick<User, "userId" | "firstName" | "lastName" | "email">;
|
|
14
|
+
export type RegisterUserRequest = Pick<User, "firstName" | "lastName" | "email">;
|
|
15
|
+
export type RegisterUserResponse = User;
|
|
16
|
+
export type UpdateUserRequest = Partial<Omit<RegisterUserRequest, "email">>;
|
|
17
|
+
export type UpdateUserResponse = User;
|
|
18
|
+
export type UpdateUserEmailRequest = Pick<User, "unverifiedEmail">;
|
|
19
|
+
export type UpdateUserEmailResponse = User;
|
|
20
|
+
export type GetUserResponse = User;
|
package/dist/User.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './User';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './User';
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tennantje/identity-types",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Shared TypeScript types for identity server project",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"dev": "tsc --watch",
|
|
13
|
+
"clean": "rm -rf dist",
|
|
14
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"typescript",
|
|
18
|
+
"types",
|
|
19
|
+
"identity"
|
|
20
|
+
],
|
|
21
|
+
"author": "Jeremy Tennant",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"typescript": "^5.7.2"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=18"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
}
|
|
32
|
+
}
|