@fiado/api-invoker 1.2.49 → 1.2.50
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/centralPayments/CentralPaymentsConnectorApi.d.ts +4 -5
- package/bin/centralPayments/CentralPaymentsConnectorApi.js +6 -6
- package/bin/centralPayments/interfaces/ICentralPaymentsConnectorApi.d.ts +4 -5
- package/package.json +2 -2
- package/src/centralPayments/CentralPaymentsConnectorApi.ts +6 -6
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +6 -4
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.d.ts +0 -46
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.js +0 -2
|
@@ -3,7 +3,6 @@ import { IHttpRequest } from "@fiado/http-client";
|
|
|
3
3
|
import { CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
4
4
|
import { CentralPaymentsDocumentUploadRequest, HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
|
|
5
5
|
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
6
|
-
import { Status } from "@fiado/type-kit/bin/directory/enums/Status";
|
|
7
6
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
8
7
|
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
9
8
|
import { InvokerUtils } from "../utils/InvokerUtils";
|
|
@@ -20,12 +19,12 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
|
|
|
20
19
|
getOOWQuestions(externalUserId: string): Promise<FiadoApiResponse<OOWQuestionsResponse[]>>;
|
|
21
20
|
submitOOWQuestionAnswers(externalUserId: string, request: SubmitOOWQuestionAnswersRequest[]): Promise<FiadoApiResponse<GetBankAccountUserResponse>>;
|
|
22
21
|
uploadDocuments(externalUserId: string, request: CentralPaymentsDocumentUploadRequest): Promise<FiadoApiResponse<null>>;
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
changePin(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
|
|
23
|
+
getCardsById(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
25
24
|
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
26
|
-
activateCard(
|
|
25
|
+
activateCard(request: ActivateBankAccountCardRequest): Promise<FiadoApiResponse<ActivateBankAccountCardResponse>>;
|
|
27
26
|
getCardBalance(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardBalanceResponse>>;
|
|
28
|
-
|
|
27
|
+
updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
29
28
|
updateCardProgram(externalCardId: string, programId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
30
29
|
orderPhysicalCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
31
30
|
getCardsByExternalUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
@@ -57,11 +57,11 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
|
|
|
57
57
|
return await this.httpRequest.post(url, request);
|
|
58
58
|
}
|
|
59
59
|
/* CARDS */
|
|
60
|
-
async
|
|
60
|
+
async changePin(request) {
|
|
61
61
|
const url = `${this.baseUrl}/cards/pin/change`;
|
|
62
62
|
return await this.httpRequest.post(url, request);
|
|
63
63
|
}
|
|
64
|
-
async
|
|
64
|
+
async getCardsById(externalCardId) {
|
|
65
65
|
const url = `${this.baseUrl}/cards/${externalCardId}`;
|
|
66
66
|
return await this.httpRequest.get(url);
|
|
67
67
|
}
|
|
@@ -69,16 +69,16 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
|
|
|
69
69
|
const url = `${this.baseUrl}/cards/${externalCardId}/sensitive`;
|
|
70
70
|
return await this.httpRequest.get(url);
|
|
71
71
|
}
|
|
72
|
-
async activateCard(
|
|
73
|
-
const url = `${this.baseUrl}/cards/${externalCardId}/activate`;
|
|
72
|
+
async activateCard(request) {
|
|
73
|
+
const url = `${this.baseUrl}/cards/${request.externalCardId}/activate`;
|
|
74
74
|
return await this.httpRequest.post(url, request);
|
|
75
75
|
}
|
|
76
76
|
async getCardBalance(externalCardId) {
|
|
77
77
|
const url = `${this.baseUrl}/cards/${externalCardId}/balance`;
|
|
78
78
|
return await this.httpRequest.get(url);
|
|
79
79
|
}
|
|
80
|
-
async
|
|
81
|
-
const url = `${this.baseUrl}/cards/${
|
|
80
|
+
async updateCard(request) {
|
|
81
|
+
const url = `${this.baseUrl}/cards/${request.cardId}/status/${request.status}`;
|
|
82
82
|
return await this.httpRequest.put(url);
|
|
83
83
|
}
|
|
84
84
|
async updateCardProgram(externalCardId, programId) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
2
2
|
import { CentralPaymentsDocumentUploadRequest, HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
|
|
3
3
|
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
4
|
-
import { Status } from "@fiado/type-kit/bin/directory/enums/Status";
|
|
5
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
6
5
|
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
7
6
|
export interface ICentralPaymentsConnectorApi {
|
|
@@ -13,12 +12,12 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
13
12
|
getOOWQuestions(externalUserId: string): Promise<FiadoApiResponse<OOWQuestionsResponse[]>>;
|
|
14
13
|
submitOOWQuestionAnswers(externalUserId: string, request: SubmitOOWQuestionAnswersRequest[]): Promise<FiadoApiResponse<GetBankAccountUserResponse>>;
|
|
15
14
|
uploadDocuments(externalUserId: string, request: CentralPaymentsDocumentUploadRequest): Promise<FiadoApiResponse<null>>;
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
changePin(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
|
|
16
|
+
getCardsById(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
18
17
|
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
19
|
-
activateCard(
|
|
18
|
+
activateCard(request: ActivateBankAccountCardRequest): Promise<FiadoApiResponse<ActivateBankAccountCardResponse>>;
|
|
20
19
|
getCardBalance(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardBalanceResponse>>;
|
|
21
|
-
|
|
20
|
+
updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
22
21
|
updateCardProgram(externalCardId: string, programId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
23
22
|
orderPhysicalCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
24
23
|
getCardsByExternalUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.50",
|
|
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",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@fiado/gateway-adapter": "^1.1.40",
|
|
17
17
|
"@fiado/http-client": "^1.0.4",
|
|
18
18
|
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^1.8.
|
|
19
|
+
"@fiado/type-kit": "^1.8.25",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"inversify": "^6.2.2",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
|
@@ -88,12 +88,12 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/* CARDS */
|
|
91
|
-
async
|
|
91
|
+
async changePin(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>> {
|
|
92
92
|
const url = `${this.baseUrl}/cards/pin/change`;
|
|
93
93
|
return await this.httpRequest.post(url, request);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
async
|
|
96
|
+
async getCardsById(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>> {
|
|
97
97
|
const url = `${this.baseUrl}/cards/${externalCardId}`;
|
|
98
98
|
return await this.httpRequest.get(url);
|
|
99
99
|
}
|
|
@@ -103,8 +103,8 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
|
|
|
103
103
|
return await this.httpRequest.get(url);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
async activateCard(
|
|
107
|
-
const url = `${this.baseUrl}/cards/${externalCardId}/activate`;
|
|
106
|
+
async activateCard(request: ActivateBankAccountCardRequest): Promise<FiadoApiResponse<ActivateBankAccountCardResponse>> {
|
|
107
|
+
const url = `${this.baseUrl}/cards/${request.externalCardId}/activate`;
|
|
108
108
|
return await this.httpRequest.post(url, request);
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -113,8 +113,8 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
|
|
|
113
113
|
return await this.httpRequest.get(url);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
async
|
|
117
|
-
const url = `${this.baseUrl}/cards/${
|
|
116
|
+
async updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<GetBankAccountCardResponse>> {
|
|
117
|
+
const url = `${this.baseUrl}/cards/${request.cardId}/status/${request.status}`;
|
|
118
118
|
return await this.httpRequest.put(url);
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -47,17 +47,17 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
47
47
|
|
|
48
48
|
uploadDocuments(externalUserId: string, request: CentralPaymentsDocumentUploadRequest): Promise<FiadoApiResponse<null>>;
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
changePin(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
getCardsById(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
53
53
|
|
|
54
54
|
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
55
55
|
|
|
56
|
-
activateCard(
|
|
56
|
+
activateCard(request: ActivateBankAccountCardRequest): Promise<FiadoApiResponse<ActivateBankAccountCardResponse>>;
|
|
57
57
|
|
|
58
58
|
getCardBalance(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardBalanceResponse>>;
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
61
61
|
|
|
62
62
|
updateCardProgram(externalCardId: string, programId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
63
63
|
|
|
@@ -78,4 +78,6 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
78
78
|
getTransactionHistory(externalCardId: string, params: CentralPaymentsQueryParams): Promise<FiadoApiResponse<TransactionListResponse<CentralPaymentsTransactionItem>>>;
|
|
79
79
|
|
|
80
80
|
getTransactionDetails(externalTransactionId: string): Promise<FiadoApiResponse<CentralPaymentsTransactionItem>>;
|
|
81
|
+
|
|
82
|
+
// TODO CREATE VIRTUAL CARD
|
|
81
83
|
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ChangePasswordRequest, GetUserRequest, GetUserResponse, RefreshTokenRequest, RefreshTokenResponse, RespondToAuthChallengeRequest, SetPasswordRequest, SignInRequest, SignInResponse, SignUpConfirmRequest, SignUpRequest, SignUpResponse } from "@fiado/type-kit/bin/cognitoConnector";
|
|
2
|
-
export interface ICognitoApi {
|
|
3
|
-
/**
|
|
4
|
-
* Healthcheck for the cognito-connector
|
|
5
|
-
*/
|
|
6
|
-
healthcheck(): Promise<HealthcheckResponse>;
|
|
7
|
-
/**
|
|
8
|
-
* Create a new user in Cognito
|
|
9
|
-
*/
|
|
10
|
-
signUp(request: SignUpRequest): Promise<SignUpResponse>;
|
|
11
|
-
/**
|
|
12
|
-
* Confirm sign-up for a user in Cognito
|
|
13
|
-
*/
|
|
14
|
-
signUpConfirm(request: SignUpConfirmRequest): Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Sign in a user
|
|
17
|
-
*/
|
|
18
|
-
signIn(request: SignInRequest): Promise<SignInResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* Sign out a user
|
|
21
|
-
*/
|
|
22
|
-
signOut(): Promise<void>;
|
|
23
|
-
/**
|
|
24
|
-
* Change a user's password
|
|
25
|
-
*/
|
|
26
|
-
changePassword(request: ChangePasswordRequest): Promise<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Retrieve user details
|
|
29
|
-
*/
|
|
30
|
-
getUser(request: GetUserRequest): Promise<GetUserResponse>;
|
|
31
|
-
/**
|
|
32
|
-
* Refresh a user's tokens
|
|
33
|
-
*/
|
|
34
|
-
refreshToken(request: RefreshTokenRequest): Promise<RefreshTokenResponse>;
|
|
35
|
-
/**
|
|
36
|
-
* Respond to an auth challenge
|
|
37
|
-
*/
|
|
38
|
-
respondToAuthChallenge(request: RespondToAuthChallengeRequest): Promise<any>;
|
|
39
|
-
/**
|
|
40
|
-
* Reset a user's password
|
|
41
|
-
*/
|
|
42
|
-
resetPassword(request: SetPasswordRequest): Promise<void>;
|
|
43
|
-
}
|
|
44
|
-
export interface HealthcheckResponse {
|
|
45
|
-
status: string;
|
|
46
|
-
}
|