@fiado/api-invoker 1.2.5 → 1.2.7
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/bin/cognitoConnector/CognitoConnectorApi.d.ts +1 -0
- package/bin/cognitoConnector/CognitoConnectorApi.js +4 -0
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApi.d.ts +2 -0
- package/package.json +1 -1
- package/src/cognitoConnector/CognitoConnectorApi.ts +7 -0
- package/src/cognitoConnector/interfaces/ICognitoConnectorApi.ts +2 -0
|
@@ -12,4 +12,5 @@ export default class CognitoConnectorApi implements ICognitoConnectorApi {
|
|
|
12
12
|
refreshToken(input: RefreshTokenRequest): Promise<RefreshTokenResponse>;
|
|
13
13
|
changePassword(input: SetPasswordRequest): Promise<void>;
|
|
14
14
|
respondToNewPasswordChallenge(input: RespondToAuthChallengeRequest): Promise<SignInResponse>;
|
|
15
|
+
resetPassword(username: string, typeOfDirectoryId: string): Promise<void>;
|
|
15
16
|
}
|
|
@@ -72,6 +72,10 @@ let CognitoConnectorApi = class CognitoConnectorApi {
|
|
|
72
72
|
};
|
|
73
73
|
return dataResponse;
|
|
74
74
|
}
|
|
75
|
+
async resetPassword(username, typeOfDirectoryId) {
|
|
76
|
+
const url = `${this.baseUrl}cognito/resetPassword`;
|
|
77
|
+
return await this.httpRequest.post(url, { username, typeOfDirectoryId }, { operationName: "postConnectorCognitoResetPassword" });
|
|
78
|
+
}
|
|
75
79
|
};
|
|
76
80
|
CognitoConnectorApi = __decorate([
|
|
77
81
|
(0, inversify_1.injectable)(),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GetUserRequest, GetUserResponse, RefreshTokenRequest, RefreshTokenResponse, RespondToAuthChallengeRequest, SetPasswordRequest, SignInRequest, SignInResponse, SignUpConfirmRequest, SignUpRequest, SignUpResponse } from "@fiado/type-kit/bin/cognitoConnector";
|
|
2
|
+
import { TypeOfDirectoryId } from "@fiado/type-kit/bin/directory";
|
|
2
3
|
export interface ICognitoConnectorApi {
|
|
3
4
|
signUp(input: SignUpRequest): Promise<SignUpResponse>;
|
|
4
5
|
signIn(input: SignInRequest): Promise<SignInResponse>;
|
|
@@ -7,4 +8,5 @@ export interface ICognitoConnectorApi {
|
|
|
7
8
|
refreshToken(input: RefreshTokenRequest): Promise<RefreshTokenResponse>;
|
|
8
9
|
changePassword(input: SetPasswordRequest): Promise<void>;
|
|
9
10
|
respondToNewPasswordChallenge(input: RespondToAuthChallengeRequest): Promise<SignInResponse>;
|
|
11
|
+
resetPassword(username: string, typeOfDirectoryId: TypeOfDirectoryId): Promise<void>;
|
|
10
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.07",
|
|
4
4
|
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a traves de invocaciones http",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -96,6 +96,13 @@ export default class CognitoConnectorApi implements ICognitoConnectorApi {
|
|
|
96
96
|
|
|
97
97
|
return dataResponse;
|
|
98
98
|
}
|
|
99
|
+
|
|
100
|
+
async resetPassword(username: string, typeOfDirectoryId: string): Promise<void> {
|
|
101
|
+
|
|
102
|
+
const url = `${this.baseUrl}cognito/resetPassword`;
|
|
103
|
+
|
|
104
|
+
return await this.httpRequest.post(url, { username, typeOfDirectoryId }, { operationName: "postConnectorCognitoResetPassword" });
|
|
105
|
+
}
|
|
99
106
|
}
|
|
100
107
|
|
|
101
108
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GetUserRequest, GetUserResponse, RefreshTokenRequest, RefreshTokenResponse, RespondToAuthChallengeRequest, SetPasswordRequest, SignInRequest, SignInResponse, SignUpConfirmRequest, SignUpRequest, SignUpResponse } from "@fiado/type-kit/bin/cognitoConnector";
|
|
2
|
+
import { TypeOfDirectoryId } from "@fiado/type-kit/bin/directory";
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
|
|
@@ -11,4 +12,5 @@ export interface ICognitoConnectorApi {
|
|
|
11
12
|
refreshToken(input: RefreshTokenRequest): Promise<RefreshTokenResponse>;
|
|
12
13
|
changePassword(input: SetPasswordRequest): Promise<void>;
|
|
13
14
|
respondToNewPasswordChallenge(input: RespondToAuthChallengeRequest): Promise<SignInResponse>;
|
|
15
|
+
resetPassword(username: string, typeOfDirectoryId: TypeOfDirectoryId): Promise<void>;
|
|
14
16
|
}
|