@fiado/api-invoker 1.4.0 → 1.4.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/bin/authentication/AuthenticationApi.d.ts +1 -0
- package/bin/authentication/AuthenticationApi.js +5 -0
- package/bin/authentication/interfaces/IAuthenticationApi.d.ts +1 -0
- package/bin/cognitoConnector/CognitoConnectorApi.d.ts +1 -0
- package/bin/cognitoConnector/CognitoConnectorApi.js +4 -0
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApi.d.ts +1 -0
- package/package.json +1 -1
- package/src/authentication/AuthenticationApi.ts +7 -0
- package/src/authentication/interfaces/IAuthenticationApi.ts +1 -0
- package/src/cognitoConnector/CognitoConnectorApi.ts +4 -0
- package/src/cognitoConnector/interfaces/ICognitoConnectorApi.ts +1 -0
|
@@ -5,4 +5,5 @@ export declare class AuthenticationApi implements IAuthenticationApi {
|
|
|
5
5
|
private httpRequest;
|
|
6
6
|
constructor(httpRequest: IHttpRequest);
|
|
7
7
|
signUpAdditionalCard(createAdditionalCard: SignUpAdditionalRequest): Promise<any>;
|
|
8
|
+
deleteAuthSessionByDirectoryId(directoryId: string): Promise<any>;
|
|
8
9
|
}
|
|
@@ -23,6 +23,11 @@ let AuthenticationApi = class AuthenticationApi {
|
|
|
23
23
|
const operation = "postSignUpAdditionalCard";
|
|
24
24
|
return await this.httpRequest.post(url, createAdditionalCard, { 'operationName': operation });
|
|
25
25
|
}
|
|
26
|
+
async deleteAuthSessionByDirectoryId(directoryId) {
|
|
27
|
+
const url = `${process.env.AUTH_LAMBDA_URL}`;
|
|
28
|
+
const operation = "deleteAuthSessionByDirectoryId";
|
|
29
|
+
return await this.httpRequest.delete(url, { directoryId }, { 'operationName': operation });
|
|
30
|
+
}
|
|
26
31
|
};
|
|
27
32
|
exports.AuthenticationApi = AuthenticationApi;
|
|
28
33
|
exports.AuthenticationApi = AuthenticationApi = __decorate([
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SignUpAdditionalRequest } from "@fiado/type-kit/bin/authentication";
|
|
2
2
|
export interface IAuthenticationApi {
|
|
3
3
|
signUpAdditionalCard(createAdditionalCard: SignUpAdditionalRequest): Promise<any>;
|
|
4
|
+
deleteAuthSessionByDirectoryId(directoryId: string): Promise<any>;
|
|
4
5
|
}
|
|
@@ -5,6 +5,7 @@ export default class CognitoConnectorApi implements ICognitoConnectorApi {
|
|
|
5
5
|
private httpRequest;
|
|
6
6
|
private readonly baseUrl;
|
|
7
7
|
constructor(httpRequest: IHttpRequest);
|
|
8
|
+
deleteCognitoUserByDirectoryId(directoryId: string): Promise<void>;
|
|
8
9
|
signUp(input: SignUpRequest): Promise<SignUpResponse>;
|
|
9
10
|
signIn(input: SignInRequest): Promise<SignInResponse>;
|
|
10
11
|
getUser(input: GetUserRequest): Promise<GetUserResponse>;
|
|
@@ -18,6 +18,10 @@ let CognitoConnectorApi = class CognitoConnectorApi {
|
|
|
18
18
|
this.httpRequest = httpRequest;
|
|
19
19
|
this.baseUrl = process.env.INDETITY_SERVER_BASE_URL || "";
|
|
20
20
|
}
|
|
21
|
+
async deleteCognitoUserByDirectoryId(directoryId) {
|
|
22
|
+
const url = `${this.baseUrl}cognito/deleteUser/${directoryId}`;
|
|
23
|
+
return await this.httpRequest.delete(url);
|
|
24
|
+
}
|
|
21
25
|
async signUp(input) {
|
|
22
26
|
const url = `${this.baseUrl}cognito/signUp`;
|
|
23
27
|
const response = await this.httpRequest.post(url, input, { operationName: "postConnectorCognitoSignUp" });
|
|
@@ -9,4 +9,5 @@ export interface ICognitoConnectorApi {
|
|
|
9
9
|
changePassword(input: SetPasswordRequest): Promise<void>;
|
|
10
10
|
respondToNewPasswordChallenge(input: RespondToAuthChallengeRequest): Promise<SignInResponse>;
|
|
11
11
|
resetPassword(username: string, typeOfDirectoryId: TypeOfDirectoryId): Promise<void>;
|
|
12
|
+
deleteCognitoUserByDirectoryId(directoryId: string): Promise<void>;
|
|
12
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -14,4 +14,11 @@ export class AuthenticationApi implements IAuthenticationApi {
|
|
|
14
14
|
|
|
15
15
|
return await this.httpRequest.post(url, createAdditionalCard, { 'operationName': operation });
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
async deleteAuthSessionByDirectoryId (directoryId: string): Promise<any> {
|
|
19
|
+
const url = `${process.env.AUTH_LAMBDA_URL}`;
|
|
20
|
+
const operation = "deleteAuthSessionByDirectoryId";
|
|
21
|
+
|
|
22
|
+
return await this.httpRequest.delete(url, {directoryId}, { 'operationName': operation });
|
|
23
|
+
}
|
|
17
24
|
}
|
|
@@ -3,4 +3,5 @@ import { SignUpAdditionalRequest } from "@fiado/type-kit/bin/authentication";
|
|
|
3
3
|
export interface IAuthenticationApi {
|
|
4
4
|
|
|
5
5
|
signUpAdditionalCard(createAdditionalCard: SignUpAdditionalRequest): Promise<any>;
|
|
6
|
+
deleteAuthSessionByDirectoryId(directoryId: string): Promise<any>;
|
|
6
7
|
}
|
|
@@ -9,6 +9,10 @@ export default class CognitoConnectorApi implements ICognitoConnectorApi {
|
|
|
9
9
|
private readonly baseUrl = process.env.INDETITY_SERVER_BASE_URL || "";
|
|
10
10
|
|
|
11
11
|
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
12
|
+
async deleteCognitoUserByDirectoryId(directoryId: string): Promise<void> {
|
|
13
|
+
const url = `${this.baseUrl}cognito/deleteUser/${directoryId}`;
|
|
14
|
+
return await this.httpRequest.delete(url);
|
|
15
|
+
}
|
|
12
16
|
|
|
13
17
|
|
|
14
18
|
async signUp(input: SignUpRequest): Promise<SignUpResponse> {
|
|
@@ -13,4 +13,5 @@ export interface ICognitoConnectorApi {
|
|
|
13
13
|
changePassword(input: SetPasswordRequest): Promise<void>;
|
|
14
14
|
respondToNewPasswordChallenge(input: RespondToAuthChallengeRequest): Promise<SignInResponse>;
|
|
15
15
|
resetPassword(username: string, typeOfDirectoryId: TypeOfDirectoryId): Promise<void>;
|
|
16
|
+
deleteCognitoUserByDirectoryId(directoryId: string): Promise<void>;
|
|
16
17
|
}
|