@tennantje/identity-types 1.0.5 → 1.0.6
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/dist/ApiResponse.d.ts +10 -0
- package/dist/ApiResponse.js +1 -0
- package/dist/Miscellaneous.d.ts +3 -2
- package/dist/OAuth.d.ts +7 -6
- package/dist/Session.d.ts +7 -6
- package/dist/User.d.ts +5 -4
- package/dist/WebAuthn.d.ts +13 -12
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/Miscellaneous.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiResponse } from './ApiResponse';
|
|
1
2
|
export type ActivateUserRequest = {
|
|
2
3
|
userId: string;
|
|
3
4
|
verificationCode: string;
|
|
@@ -6,9 +7,9 @@ export type VerifyEmailChangeRequest = {
|
|
|
6
7
|
userId: string;
|
|
7
8
|
verificationCode: string;
|
|
8
9
|
};
|
|
9
|
-
export type GetCurrentUserResponse = {
|
|
10
|
+
export type GetCurrentUserResponse = ApiResponse<{
|
|
10
11
|
userId: string;
|
|
11
12
|
firstName: string;
|
|
12
13
|
lastName: string;
|
|
13
14
|
email: string;
|
|
14
|
-
}
|
|
15
|
+
}>;
|
package/dist/OAuth.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiResponse } from './ApiResponse';
|
|
1
2
|
export type CreateOAuthClientRequest = {
|
|
2
3
|
clientName: string;
|
|
3
4
|
clientType: "CONFIDENTIAL_CLIENT" | "PUBLIC_CLIENT";
|
|
@@ -21,18 +22,18 @@ export interface OAuthClient {
|
|
|
21
22
|
clientWebsite: string;
|
|
22
23
|
clientLogoUri: string;
|
|
23
24
|
}
|
|
24
|
-
export type CreateOAuthClientResponse = OAuthClient
|
|
25
|
+
export type CreateOAuthClientResponse = ApiResponse<OAuthClient>;
|
|
25
26
|
export type GetOAuthClientRequest = {
|
|
26
27
|
clientId: string;
|
|
27
28
|
};
|
|
28
|
-
export type GetOAuthClientResponse = OAuthClient
|
|
29
|
-
export type GetOAuthClientsResponse = {
|
|
29
|
+
export type GetOAuthClientResponse = ApiResponse<OAuthClient>;
|
|
30
|
+
export type GetOAuthClientsResponse = ApiResponse<{
|
|
30
31
|
clients: OAuthClient[];
|
|
31
|
-
}
|
|
32
|
-
export type OAuthAuthorizeResponse = {
|
|
32
|
+
}>;
|
|
33
|
+
export type OAuthAuthorizeResponse = ApiResponse<{
|
|
33
34
|
success: boolean;
|
|
34
35
|
redirect_uri: string;
|
|
35
|
-
}
|
|
36
|
+
}>;
|
|
36
37
|
export type OAuthTokenResponse = {
|
|
37
38
|
access_token?: string;
|
|
38
39
|
token_type?: string;
|
package/dist/Session.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import { ApiResponse } from './ApiResponse';
|
|
1
2
|
export type RequestLoginCodeRequest = {
|
|
2
3
|
email: string;
|
|
3
4
|
};
|
|
4
|
-
export type RequestLoginCodeResponse = {
|
|
5
|
+
export type RequestLoginCodeResponse = ApiResponse<{
|
|
5
6
|
message: string;
|
|
6
7
|
email: string;
|
|
7
|
-
}
|
|
8
|
+
}>;
|
|
8
9
|
export type VerifyLoginCodeRequest = {
|
|
9
10
|
email: string;
|
|
10
11
|
loginCode: string;
|
|
11
12
|
};
|
|
12
|
-
export type RefreshResponse = {
|
|
13
|
+
export type RefreshResponse = ApiResponse<{
|
|
13
14
|
message: string;
|
|
14
|
-
}
|
|
15
|
-
export type LogoutResponse = {
|
|
15
|
+
}>;
|
|
16
|
+
export type LogoutResponse = ApiResponse<{
|
|
16
17
|
message: string;
|
|
17
|
-
}
|
|
18
|
+
}>;
|
package/dist/User.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApiResponse } from './ApiResponse';
|
|
1
2
|
export interface User {
|
|
2
3
|
userId: string;
|
|
3
4
|
firstName: string;
|
|
@@ -12,9 +13,9 @@ export interface User {
|
|
|
12
13
|
}
|
|
13
14
|
export type JWTUser = Pick<User, "userId" | "firstName" | "lastName" | "email">;
|
|
14
15
|
export type RegisterUserRequest = Pick<User, "firstName" | "lastName" | "email">;
|
|
15
|
-
export type RegisterUserResponse = User
|
|
16
|
+
export type RegisterUserResponse = ApiResponse<User>;
|
|
16
17
|
export type UpdateUserRequest = Partial<Omit<RegisterUserRequest, "email">>;
|
|
17
|
-
export type UpdateUserResponse = User
|
|
18
|
+
export type UpdateUserResponse = ApiResponse<User>;
|
|
18
19
|
export type UpdateUserEmailRequest = Pick<User, "unverifiedEmail">;
|
|
19
|
-
export type UpdateUserEmailResponse = User
|
|
20
|
-
export type GetUserResponse = User
|
|
20
|
+
export type UpdateUserEmailResponse = ApiResponse<User>;
|
|
21
|
+
export type GetUserResponse = ApiResponse<User>;
|
package/dist/WebAuthn.d.ts
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
import { ApiResponse } from './ApiResponse';
|
|
2
|
+
export type BeginWebAuthnRegistrationResponse = ApiResponse<{
|
|
2
3
|
registrationOptions: any;
|
|
3
|
-
}
|
|
4
|
+
}>;
|
|
4
5
|
export type CompleteWebAuthnRegistrationRequest = {
|
|
5
6
|
registrationResponse: any;
|
|
6
7
|
};
|
|
7
|
-
export type CompleteWebAuthnRegistrationResponse = {
|
|
8
|
+
export type CompleteWebAuthnRegistrationResponse = ApiResponse<{
|
|
8
9
|
success: boolean;
|
|
9
|
-
}
|
|
10
|
+
}>;
|
|
10
11
|
export type BeginWebAuthnAuthenticationRequest = {
|
|
11
12
|
email: string;
|
|
12
13
|
};
|
|
13
|
-
export type BeginWebAuthnAuthenticationResponse = {
|
|
14
|
+
export type BeginWebAuthnAuthenticationResponse = ApiResponse<{
|
|
14
15
|
authenticationOptions: any;
|
|
15
|
-
}
|
|
16
|
+
}>;
|
|
16
17
|
export type CompleteWebAuthnAuthenticationRequest = {
|
|
17
18
|
email: string;
|
|
18
19
|
authenticationResponse: any;
|
|
19
20
|
};
|
|
20
|
-
export type CompleteWebAuthnAuthenticationResponse = {
|
|
21
|
+
export type CompleteWebAuthnAuthenticationResponse = ApiResponse<{
|
|
21
22
|
success: boolean;
|
|
22
|
-
}
|
|
23
|
+
}>;
|
|
23
24
|
export interface PasskeySummary {
|
|
24
25
|
credentialId: string;
|
|
25
26
|
deviceType: string;
|
|
@@ -27,12 +28,12 @@ export interface PasskeySummary {
|
|
|
27
28
|
transports: string[];
|
|
28
29
|
createdAt: string;
|
|
29
30
|
}
|
|
30
|
-
export type ListPasskeysResponse = {
|
|
31
|
+
export type ListPasskeysResponse = ApiResponse<{
|
|
31
32
|
passkeys: PasskeySummary[];
|
|
32
|
-
}
|
|
33
|
+
}>;
|
|
33
34
|
export type DeletePasskeyRequest = {
|
|
34
35
|
credentialId: string;
|
|
35
36
|
};
|
|
36
|
-
export type DeletePasskeyResponse = {
|
|
37
|
+
export type DeletePasskeyResponse = ApiResponse<{
|
|
37
38
|
success: boolean;
|
|
38
|
-
}
|
|
39
|
+
}>;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED