@fiado/api-invoker 1.2.98 → 1.3.0
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 +9 -9
- package/bin/centralPayments/interfaces/ICentralPaymentsConnectorApi.d.ts +8 -8
- package/bin/pricelist-business/PriceListApi.js +1 -2
- package/package.json +2 -2
- package/src/centralPayments/CentralPaymentsConnectorApi.ts +16 -15
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +12 -11
- package/src/pricelist-business/PriceListApi.ts +2 -2
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.d.ts +0 -46
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.js +0 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ICentralPaymentsConnectorApi } from "./interfaces/ICentralPaymentsConnectorApi";
|
|
2
1
|
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
-
import { BankAccountP2pTransferRequest, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
4
|
-
import {
|
|
5
|
-
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, CreateBankAccountCardRequest, CreateBankAccountCardResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
2
|
+
import { BankAccountP2pTransferRequest, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountSensitiveInformationResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
3
|
+
import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
6
4
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
5
|
+
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
6
|
+
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
7
|
+
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, CreateBankAccountCardRequest, CreateBankAccountCardResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
8
|
+
import { HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
|
|
9
|
+
import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
|
|
7
10
|
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
8
11
|
import { InvokerUtils } from "../utils/InvokerUtils";
|
|
9
|
-
import {
|
|
10
|
-
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
11
|
-
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
12
|
-
import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
12
|
+
import { ICentralPaymentsConnectorApi } from "./interfaces/ICentralPaymentsConnectorApi";
|
|
13
13
|
export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi {
|
|
14
14
|
private readonly httpRequest;
|
|
15
15
|
private readonly _invokerUtils;
|
|
@@ -25,7 +25,7 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
|
|
|
25
25
|
uploadDocuments(externalUserId: string, request: ProviderDocumentUploadRequest): Promise<FiadoApiResponse<ProviderDocumentUploadResponse>>;
|
|
26
26
|
changePin(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
|
|
27
27
|
getCardsById(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
28
|
-
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<
|
|
28
|
+
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountSensitiveInformationResponse>>;
|
|
29
29
|
activateCard(request: ActivateBankAccountCardRequest): Promise<FiadoApiResponse<ActivateBankAccountCardResponse>>;
|
|
30
30
|
getCardBalance(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardBalanceResponse>>;
|
|
31
31
|
updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { BankAccountP2pTransferRequest, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
2
|
-
import {
|
|
3
|
-
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, CreateBankAccountCardRequest, CreateBankAccountCardResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
1
|
+
import { BankAccountP2pTransferRequest, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountSensitiveInformationResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
|
|
2
|
+
import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
4
3
|
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
5
|
-
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
6
|
-
import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
|
|
7
|
-
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
8
4
|
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
9
|
-
import
|
|
5
|
+
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
6
|
+
import { ActivateBankAccountCardRequest, ActivateBankAccountCardResponse, CardBatchRequest, CardBatchResponse, CardStatementListResponse, CreateBankAccountCardRequest, CreateBankAccountCardResponse, GetBankAccountCardBalanceResponse, GetBankAccountCardResponse, StatementDocumentResponse, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
|
|
7
|
+
import { HealthcheckResponse, OOWQuestionsResponse, SubmitOOWQuestionAnswersRequest } from "@fiado/type-kit/bin/centralPayments";
|
|
8
|
+
import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
|
|
9
|
+
import { CentralPaymentsQueryParams, CentralPaymentsTransactionItem, TransactionListResponse } from "@fiado/type-kit/bin/transaction";
|
|
10
10
|
export interface ICentralPaymentsConnectorApi {
|
|
11
11
|
healthcheck(): Promise<FiadoApiResponse<HealthcheckResponse>>;
|
|
12
12
|
createCardholder(request: CreateBankAccountUserRequest): Promise<FiadoApiResponse<CreateBankAccountUserResponse>>;
|
|
@@ -18,7 +18,7 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
18
18
|
uploadDocuments(externalUserId: string, request: ProviderDocumentUploadRequest): Promise<FiadoApiResponse<ProviderDocumentUploadResponse>>;
|
|
19
19
|
changePin(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<UpdateBankAccountCardResponse>>;
|
|
20
20
|
getCardsById(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
21
|
-
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<
|
|
21
|
+
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountSensitiveInformationResponse>>;
|
|
22
22
|
activateCard(request: ActivateBankAccountCardRequest): Promise<FiadoApiResponse<ActivateBankAccountCardResponse>>;
|
|
23
23
|
getCardBalance(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardBalanceResponse>>;
|
|
24
24
|
updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
@@ -43,8 +43,7 @@ let PriceListApi = class PriceListApi {
|
|
|
43
43
|
directories.forEach(directory => {
|
|
44
44
|
queryParams.push(`directoryId=${directory}`);
|
|
45
45
|
});
|
|
46
|
-
|
|
47
|
-
const url = `${this.baseUrl}discounts/directories?${queryParams.join('&')}`;
|
|
46
|
+
const url = `${this.baseUrl}discounts/directories/${serviceId}?${queryParams.join('&')}`;
|
|
48
47
|
return await this.httpRequest.get(`${url}`);
|
|
49
48
|
}
|
|
50
49
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
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.5",
|
|
18
18
|
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^1.8.
|
|
19
|
+
"@fiado/type-kit": "^1.8.67",
|
|
20
20
|
"dotenv": "^16.4.7",
|
|
21
21
|
"inversify": "^6.2.2",
|
|
22
22
|
"reflect-metadata": "^0.2.2"
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {inject, injectable} from "inversify";
|
|
3
|
-
import {IHttpRequest} from "@fiado/http-client";
|
|
1
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
4
2
|
import {
|
|
5
3
|
BankAccountP2pTransferRequest,
|
|
6
4
|
CreateBankAccountUserRequest,
|
|
7
5
|
CreateBankAccountUserResponse,
|
|
8
6
|
GetBankAccountResponse,
|
|
7
|
+
GetBankAccountSensitiveInformationResponse,
|
|
9
8
|
GetBankAccountUserResponse,
|
|
10
9
|
UpdateBankAccountUserRequest
|
|
11
10
|
} from "@fiado/type-kit/bin/account";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "@fiado/type-kit/bin/centralPayments";
|
|
11
|
+
import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
12
|
+
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
13
|
+
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
14
|
+
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
17
15
|
import {
|
|
18
16
|
ActivateBankAccountCardRequest,
|
|
19
17
|
ActivateBankAccountCardResponse,
|
|
@@ -28,17 +26,20 @@ import {
|
|
|
28
26
|
UpdateBankAccountCardRequest,
|
|
29
27
|
UpdateBankAccountCardResponse
|
|
30
28
|
} from "@fiado/type-kit/bin/card";
|
|
31
|
-
import
|
|
29
|
+
import {
|
|
30
|
+
HealthcheckResponse,
|
|
31
|
+
OOWQuestionsResponse,
|
|
32
|
+
SubmitOOWQuestionAnswersRequest
|
|
33
|
+
} from "@fiado/type-kit/bin/centralPayments";
|
|
34
|
+
import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
|
|
32
35
|
import {
|
|
33
36
|
CentralPaymentsQueryParams,
|
|
34
37
|
CentralPaymentsTransactionItem,
|
|
35
38
|
TransactionListResponse
|
|
36
39
|
} from "@fiado/type-kit/bin/transaction";
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import
|
|
40
|
-
import {CreateExternalBankAccountRequest, CreateExternalBankAccountResponse} from "@fiado/type-kit/bin/bankAccount";
|
|
41
|
-
import {BankAccountP2pTransferResponse} from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
40
|
+
import { inject, injectable } from "inversify";
|
|
41
|
+
import { InvokerUtils } from "../utils/InvokerUtils";
|
|
42
|
+
import { ICentralPaymentsConnectorApi } from "./interfaces/ICentralPaymentsConnectorApi";
|
|
42
43
|
|
|
43
44
|
@injectable()
|
|
44
45
|
export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi {
|
|
@@ -105,7 +106,7 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
|
|
|
105
106
|
return await this.httpRequest.get(url);
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
async getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<
|
|
109
|
+
async getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountSensitiveInformationResponse>> {
|
|
109
110
|
const url = `${this.baseUrl}/cards/${externalCardId}/sensitive`;
|
|
110
111
|
return await this.httpRequest.get(url);
|
|
111
112
|
}
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
CreateBankAccountUserRequest,
|
|
4
4
|
CreateBankAccountUserResponse,
|
|
5
5
|
GetBankAccountResponse,
|
|
6
|
+
GetBankAccountSensitiveInformationResponse,
|
|
6
7
|
GetBankAccountUserResponse,
|
|
7
8
|
UpdateBankAccountUserRequest
|
|
8
9
|
} from "@fiado/type-kit/bin/account";
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from "@fiado/type-kit/bin/centralPayments";
|
|
10
|
+
import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
11
|
+
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
12
|
+
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
13
|
+
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
14
14
|
import {
|
|
15
15
|
ActivateBankAccountCardRequest,
|
|
16
16
|
ActivateBankAccountCardResponse,
|
|
@@ -25,16 +25,17 @@ import {
|
|
|
25
25
|
UpdateBankAccountCardRequest,
|
|
26
26
|
UpdateBankAccountCardResponse
|
|
27
27
|
} from "@fiado/type-kit/bin/card";
|
|
28
|
-
import
|
|
28
|
+
import {
|
|
29
|
+
HealthcheckResponse,
|
|
30
|
+
OOWQuestionsResponse,
|
|
31
|
+
SubmitOOWQuestionAnswersRequest
|
|
32
|
+
} from "@fiado/type-kit/bin/centralPayments";
|
|
33
|
+
import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
|
|
29
34
|
import {
|
|
30
35
|
CentralPaymentsQueryParams,
|
|
31
36
|
CentralPaymentsTransactionItem,
|
|
32
37
|
TransactionListResponse
|
|
33
38
|
} from "@fiado/type-kit/bin/transaction";
|
|
34
|
-
import { ProviderDocumentUploadRequest, ProviderDocumentUploadResponse } from "@fiado/type-kit/bin/provider";
|
|
35
|
-
import GetExternalBankAccountResponse from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountResponse";
|
|
36
|
-
import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
|
|
37
|
-
import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
|
|
38
39
|
|
|
39
40
|
export interface ICentralPaymentsConnectorApi {
|
|
40
41
|
healthcheck(): Promise<FiadoApiResponse<HealthcheckResponse>>;
|
|
@@ -57,7 +58,7 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
57
58
|
|
|
58
59
|
getCardsById(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
59
60
|
|
|
60
|
-
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<
|
|
61
|
+
getCardSensitiveInformation(externalCardId: string): Promise<FiadoApiResponse<GetBankAccountSensitiveInformationResponse>>;
|
|
61
62
|
|
|
62
63
|
activateCard(request: ActivateBankAccountCardRequest): Promise<FiadoApiResponse<ActivateBankAccountCardResponse>>;
|
|
63
64
|
|
|
@@ -39,8 +39,8 @@ export class PriceListApi implements IPriceListApi {
|
|
|
39
39
|
queryParams.push(`directoryId=${directory}`)
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
const url = `${this.baseUrl}discounts/directories?${queryParams.join('&')}`;
|
|
42
|
+
|
|
43
|
+
const url = `${this.baseUrl}discounts/directories/${serviceId}?${queryParams.join('&')}`;
|
|
44
44
|
return await this.httpRequest.get(`${url}`);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -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
|
-
}
|