@tennantje/identity-types 1.0.8 → 1.0.13

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.
@@ -1,11 +1,3 @@
1
- export type ActivateUserRequest = {
2
- userId: string;
3
- verificationCode: string;
4
- };
5
- export type VerifyEmailChangeRequest = {
6
- userId: string;
7
- verificationCode: string;
8
- };
9
1
  export type GetCurrentUserResponse = {
10
2
  userId: string;
11
3
  firstName: string;
package/dist/Session.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { User } from './User';
1
2
  export type RequestLoginCodeRequest = {
2
3
  email: string;
3
4
  };
@@ -9,6 +10,7 @@ export type VerifyLoginCodeRequest = {
9
10
  email: string;
10
11
  loginCode: string;
11
12
  };
13
+ export type VerifyLoginCodeResponse = User;
12
14
  export type RefreshResponse = {
13
15
  message: string;
14
16
  };
package/dist/User.d.ts CHANGED
@@ -18,3 +18,18 @@ export type UpdateUserResponse = User;
18
18
  export type UpdateUserEmailRequest = Pick<User, "unverifiedEmail">;
19
19
  export type UpdateUserEmailResponse = User;
20
20
  export type GetUserResponse = User;
21
+ export type ActivateUserRequest = {
22
+ email: string;
23
+ verificationCode: string;
24
+ };
25
+ export type ActivateUserResponse = User;
26
+ export type VerifyEmailChangeRequest = {
27
+ email: string;
28
+ verificationCode: string;
29
+ };
30
+ export type VerifyEmailChangeResponse = User;
31
+ export type GetLoginMethodsRequest = Pick<User, "email">;
32
+ export interface GetLoginMethodsResponse {
33
+ email: boolean;
34
+ passkey: boolean;
35
+ }
@@ -1,8 +1,9 @@
1
+ import type { PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialRequestOptionsJSON, RegistrationResponseJSON, AuthenticationResponseJSON } from "@simplewebauthn/server";
1
2
  export type BeginWebAuthnRegistrationResponse = {
2
- registrationOptions: any;
3
+ registrationOptions: PublicKeyCredentialCreationOptionsJSON;
3
4
  };
4
5
  export type CompleteWebAuthnRegistrationRequest = {
5
- registrationResponse: any;
6
+ registrationResponse: RegistrationResponseJSON;
6
7
  };
7
8
  export type CompleteWebAuthnRegistrationResponse = {
8
9
  success: boolean;
@@ -11,11 +12,11 @@ export type BeginWebAuthnAuthenticationRequest = {
11
12
  email: string;
12
13
  };
13
14
  export type BeginWebAuthnAuthenticationResponse = {
14
- authenticationOptions: any;
15
+ authenticationOptions: PublicKeyCredentialRequestOptionsJSON;
15
16
  };
16
17
  export type CompleteWebAuthnAuthenticationRequest = {
17
18
  email: string;
18
- authenticationResponse: any;
19
+ authenticationResponse: AuthenticationResponseJSON;
19
20
  };
20
21
  export type CompleteWebAuthnAuthenticationResponse = {
21
22
  success: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tennantje/identity-types",
3
- "version": "1.0.8",
3
+ "version": "1.0.13",
4
4
  "description": "Shared TypeScript types for identity server project",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -32,5 +32,8 @@
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"
35
+ },
36
+ "dependencies": {
37
+ "@simplewebauthn/server": "^13.2.2"
35
38
  }
36
39
  }