@fiado/api-invoker 1.2.61 → 1.2.63
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/README.md +64 -64
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.d.ts +46 -0
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.js +2 -0
- package/bin/service-business/ServiceApi.d.ts +7 -5
- package/bin/service-business/ServiceApi.js +5 -1
- package/bin/service-business/interfaces/IServiceApi.d.ts +7 -5
- package/package.json +27 -27
- package/src/account-beneficiary/AccountBeneficiaryApi.ts +18 -18
- package/src/account-beneficiary/index.ts +2 -2
- package/src/account-beneficiary/interfaces/IAccountBeneficiaryApi.ts +7 -7
- package/src/account-fiadoinc/AccountFiadoIncApi.ts +73 -73
- package/src/account-fiadoinc/index.ts +1 -1
- package/src/account-fiadoinc/interfaces/IAccountFiadoIncApi.ts +36 -36
- package/src/account-fiadosa/AccountFiadoSAApi.ts +37 -37
- package/src/account-fiadosa/index.ts +1 -1
- package/src/account-fiadosa/interfaces/IAccountFiadoSAApi.ts +15 -15
- package/src/account-pagoconfiado/AccountPagoConfiadoApi.ts +46 -46
- package/src/account-pagoconfiado/index.ts +2 -2
- package/src/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.ts +24 -24
- package/src/activity-business/ActivityApi.ts +36 -36
- package/src/activity-business/index.ts +5 -5
- package/src/activity-business/interfaces/IActivityApi.ts +13 -13
- package/src/activity-business/queue/ActivityPublisher.ts +28 -28
- package/src/activity-business/queue/IActivityPublisher.ts +4 -4
- package/src/address/AddressApi.ts +46 -46
- package/src/address/index.ts +3 -3
- package/src/address/interfaces/IAddressApi.ts +30 -30
- package/src/authentication/AuthenticationApi.ts +16 -16
- package/src/authentication/index.ts +4 -4
- package/src/authentication/interfaces/IAuthenticationApi.ts +5 -5
- package/src/bankAccount/BankAccountApi.ts +48 -48
- package/src/bankAccount/index.ts +1 -1
- package/src/bankAccount/interfaces/IBankAccountApi.ts +6 -6
- package/src/bbvaRst/api/BBVARstApi.ts +16 -16
- package/src/bbvaRst/api/interfaces/IBBVARstApi.ts +4 -4
- package/src/bbvaRst/index.ts +1 -1
- package/src/blacklist/BlackListApi.ts +19 -19
- package/src/blacklist/index.ts +2 -2
- package/src/blacklist/interfaces/IBlackListApi.ts +20 -20
- package/src/card/CardApi.ts +53 -53
- package/src/card/index.ts +3 -3
- package/src/card/interfaces/ICardApi.ts +16 -16
- package/src/centralPayments/CentralPaymentsConnectorApi.ts +183 -183
- package/src/centralPayments/index.ts +1 -1
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +85 -85
- package/src/cnbv-business/CnbvApi.ts +22 -22
- package/src/cnbv-business/index.ts +4 -4
- package/src/cnbv-business/interfaces/ICnbvApi.ts +6 -6
- package/src/cognitoConnector/CognitoConnectorApi.ts +106 -106
- package/src/cognitoConnector/CognitoConnectorV2.ts +81 -81
- package/src/cognitoConnector/index.ts +11 -11
- package/src/cognitoConnector/interfaces/ICognitoConnectorApi.ts +15 -15
- package/src/cognitoConnector/interfaces/ICognitoV2Api.ts +58 -58
- package/src/collector/CollectorApi.ts +25 -25
- package/src/collector/index.ts +2 -2
- package/src/collector/interfaces/ICollectorApi.ts +21 -21
- package/src/contactInformation/ContactInformationApi.ts +20 -20
- package/src/contactInformation/index.ts +2 -2
- package/src/contactInformation/interface/IContactInformationApi.ts +8 -8
- package/src/container.config.ts +126 -126
- package/src/contract-generator/ContractGeneratorApi.ts +18 -18
- package/src/contract-generator/index.ts +2 -2
- package/src/contract-generator/interfaces/IContractGeneratorApi.ts +16 -16
- package/src/device/DeviceApi.ts +23 -23
- package/src/device/index.ts +2 -2
- package/src/device/interfaces/IDeviceApi.ts +24 -24
- package/src/directories/DirectoriesApi.ts +53 -53
- package/src/directories/index.ts +3 -3
- package/src/directories/interfaces/IDirectoriesApi.ts +16 -16
- package/src/directory/DirectoryApi.ts +150 -150
- package/src/directory/index.ts +3 -3
- package/src/directory/interfaces/IDirectoryApi.ts +69 -69
- package/src/disputes/DisputesApi.ts +50 -50
- package/src/disputes/index.ts +2 -2
- package/src/disputes/interfaces/IDisputesApi.ts +54 -54
- package/src/exchangeRates/ExchangeRatesApi.ts +27 -27
- package/src/exchangeRates/index.ts +1 -1
- package/src/exchangeRates/interfaces/IExchangeRatesApi.ts +8 -8
- package/src/fiadoMessages/api/FiadoMessagesApi.ts +20 -20
- package/src/fiadoMessages/api/interfaces/IFiadoMessagesApi.ts +2 -2
- package/src/fiadoMessages/index.ts +1 -1
- package/src/fraudPreventionEngine/api/FraudPreventionEngineApi.ts +22 -22
- package/src/fraudPreventionEngine/api/interfaces/IFraudPreventionEngineApi.ts +7 -7
- package/src/fraudPreventionEngine/index.ts +1 -1
- package/src/group/GroupApi.ts +24 -24
- package/src/group/index.ts +1 -1
- package/src/group/interfaces/IGroupApi.ts +23 -23
- package/src/identity/IdentityApi.ts +78 -78
- package/src/identity/index.ts +3 -3
- package/src/identity/interfaces/IIdentityApi.ts +38 -38
- package/src/index.ts +41 -41
- package/src/legalDocument/api/LegalDocumentApi.ts +26 -26
- package/src/legalDocument/api/interfaces/ILegalDocumentApi.ts +6 -6
- package/src/legalDocument/index.ts +3 -3
- package/src/notificationMessages/index.ts +1 -1
- package/src/notificationMessages/queue/NotificationMessagePublisher.ts +22 -22
- package/src/notificationMessages/queue/interfaces/INotificationMessagesPublisher.ts +4 -4
- package/src/observations/ObservationsApi.ts +23 -23
- package/src/observations/index.ts +3 -3
- package/src/observations/interfaces/IObservationsApi.ts +9 -9
- package/src/p2pContact/api/P2pContactApi.ts +19 -19
- package/src/p2pContact/api/interfaces/IP2pContactApi.ts +4 -4
- package/src/p2pContact/index.ts +1 -1
- package/src/pomelo/api/PomeloApi.ts +99 -99
- package/src/pomelo/api/interfaces/IPomeloApi.ts +27 -27
- package/src/pomelo/index.ts +1 -1
- package/src/pomeloProcessor/api/PomeloProcessorApi.ts +17 -17
- package/src/pomeloProcessor/api/interfaces/IPomeloProcessorApi.ts +2 -2
- package/src/pomeloProcessor/index.ts +2 -2
- package/src/product-catalog/ProductCatalogApi.ts +17 -17
- package/src/product-catalog/index.ts +1 -1
- package/src/product-catalog/interfaces/IProductCatalogApi.ts +6 -6
- package/src/riskProfile/api/RiskProfileApi.ts +39 -39
- package/src/riskProfile/api/TransactionAlertApi.ts +22 -22
- package/src/riskProfile/api/interfaces/IRiskProfileApi.ts +14 -14
- package/src/riskProfile/api/interfaces/ITransactionAlertApi.ts +7 -7
- package/src/riskProfile/index.ts +7 -7
- package/src/riskProfile/queue/TransactionAlarmPublisher.ts +24 -24
- package/src/riskProfile/queue/interfaces/ITransactionAlarmPublisher.ts +4 -4
- package/src/service-business/ServiceApi.ts +66 -60
- package/src/service-business/index.ts +2 -2
- package/src/service-business/interfaces/IServiceApi.ts +48 -44
- package/src/sessionActivity/index.ts +2 -2
- package/src/sessionActivity/queue/SessionActivityPublisher.ts +22 -22
- package/src/sessionActivity/queue/interfaces/ISessionActivityPublisher.ts +4 -4
- package/src/stpAccount/api/STPAccountApi.ts +111 -111
- package/src/stpAccount/api/interfaces/ISTPAccountApi.ts +7 -7
- package/src/stpAccount/index.ts +1 -1
- package/src/stpServicePayment/api/StpServicePaymentApi.ts +40 -40
- package/src/stpServicePayment/api/interfaces/IStpServicePaymentApi.ts +13 -13
- package/src/stpServicePayment/index.ts +1 -1
- package/src/stpSpei/api/StpSpeiApi.ts +32 -32
- package/src/stpSpei/api/interfaces/IStpSpeiApi.ts +6 -6
- package/src/stpSpei/index.ts +1 -1
- package/src/tern/api/TernApi.ts +147 -147
- package/src/tern/api/interfaces/ITernApi.ts +47 -47
- package/src/tern/index.ts +1 -1
- package/src/transaction/api/TransactionApi.ts +92 -92
- package/src/transaction/api/interfaces/ITransactionApi.ts +35 -35
- package/src/transaction/index.ts +5 -5
- package/src/transaction/queue/TransactionPublisher.ts +24 -24
- package/src/transaction/queue/interfaces/ITransactionPublisher.ts +4 -4
- package/src/transactionProcessor/api/TransactionProcessorApi.ts +42 -42
- package/src/transactionProcessor/api/interfaces/ITransactionProcessorApi.ts +18 -18
- package/src/transactionProcessor/index.ts +1 -1
- package/src/utils/InvokerUtils.ts +18 -18
- package/src/zendesk/ZendeskApi.ts +24 -24
- package/src/zendesk/index.ts +3 -3
- package/src/zendesk/interfaces/IZendeskApi.ts +10 -10
- package/tsconfig.json +21 -21
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
-
import { SignUpAdditionalRequest } from "@fiado/type-kit/bin/authentication";
|
|
3
|
-
import { inject, injectable } from "inversify";
|
|
4
|
-
import { IAuthenticationApi } from "./interfaces/IAuthenticationApi";
|
|
5
|
-
|
|
6
|
-
@injectable()
|
|
7
|
-
export class AuthenticationApi implements IAuthenticationApi {
|
|
8
|
-
|
|
9
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
10
|
-
|
|
11
|
-
async signUpAdditionalCard(createAdditionalCard: SignUpAdditionalRequest): Promise<any> {
|
|
12
|
-
const url = `${process.env.AUTH_LAMBDA_URL}`;
|
|
13
|
-
const operation = "postSignUpAdditionalCard";
|
|
14
|
-
|
|
15
|
-
return await this.httpRequest.post(url, createAdditionalCard, { 'operationName': operation });
|
|
16
|
-
}
|
|
1
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
+
import { SignUpAdditionalRequest } from "@fiado/type-kit/bin/authentication";
|
|
3
|
+
import { inject, injectable } from "inversify";
|
|
4
|
+
import { IAuthenticationApi } from "./interfaces/IAuthenticationApi";
|
|
5
|
+
|
|
6
|
+
@injectable()
|
|
7
|
+
export class AuthenticationApi implements IAuthenticationApi {
|
|
8
|
+
|
|
9
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
10
|
+
|
|
11
|
+
async signUpAdditionalCard(createAdditionalCard: SignUpAdditionalRequest): Promise<any> {
|
|
12
|
+
const url = `${process.env.AUTH_LAMBDA_URL}`;
|
|
13
|
+
const operation = "postSignUpAdditionalCard";
|
|
14
|
+
|
|
15
|
+
return await this.httpRequest.post(url, createAdditionalCard, { 'operationName': operation });
|
|
16
|
+
}
|
|
17
17
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export * from './interfaces/IAuthenticationApi';
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export * from './interfaces/IAuthenticationApi';
|
|
5
5
|
export * from './AuthenticationApi';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SignUpAdditionalRequest } from "@fiado/type-kit/bin/authentication";
|
|
2
|
-
|
|
3
|
-
export interface IAuthenticationApi {
|
|
4
|
-
|
|
5
|
-
signUpAdditionalCard(createAdditionalCard: SignUpAdditionalRequest): Promise<any>;
|
|
1
|
+
import { SignUpAdditionalRequest } from "@fiado/type-kit/bin/authentication";
|
|
2
|
+
|
|
3
|
+
export interface IAuthenticationApi {
|
|
4
|
+
|
|
5
|
+
signUpAdditionalCard(createAdditionalCard: SignUpAdditionalRequest): Promise<any>;
|
|
6
6
|
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import {inject, injectable} from "inversify";
|
|
2
|
-
import {IBankAccountApi} from "./interfaces/IBankAccountApi";
|
|
3
|
-
import {IHttpRequest} from "@fiado/http-client";
|
|
4
|
-
import GetExternalBankAccountRequest from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountRequest";
|
|
5
|
-
|
|
6
|
-
@injectable()
|
|
7
|
-
export default class BankAccountApi implements IBankAccountApi {
|
|
8
|
-
private readonly baseUrl = process.env.BANK_ACCOUNT_LAMBDA_UR || "";
|
|
9
|
-
|
|
10
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async getBankAccountById(bankAccountId: string): Promise<any> {
|
|
14
|
-
const url = `${this.baseUrl}`;
|
|
15
|
-
const body: GetExternalBankAccountRequest = {
|
|
16
|
-
accountId: bankAccountId
|
|
17
|
-
} as GetExternalBankAccountRequest;
|
|
18
|
-
const headers = {
|
|
19
|
-
'Content-Type': 'application/json',
|
|
20
|
-
operationName: "postBankAccountId"
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return await this.httpRequest.post(url, body, headers);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
async getBankById(bankId: string): Promise<any> {
|
|
27
|
-
const url = `${this.baseUrl}`;
|
|
28
|
-
const body: GetExternalBankAccountRequest = {
|
|
29
|
-
bankId: bankId
|
|
30
|
-
} as GetExternalBankAccountRequest;
|
|
31
|
-
const headers = {
|
|
32
|
-
'Content-Type': 'application/json',
|
|
33
|
-
operationName: "getBanksBankId"
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
return await this.httpRequest.post(url, body, headers);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
async getBankByCode(bankCode?: string, shortBankCode?: string): Promise<any> {
|
|
40
|
-
const url = `${this.baseUrl}`;
|
|
41
|
-
const params = bankCode ? `bankCode=${bankCode}` : `shortBankCode=${shortBankCode}`;
|
|
42
|
-
const headers = {
|
|
43
|
-
'Content-Type': 'application/json',
|
|
44
|
-
operationName: "getBanks"
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
return await this.httpRequest.post(`${url}?${params}`, null, headers);
|
|
48
|
-
}
|
|
1
|
+
import {inject, injectable} from "inversify";
|
|
2
|
+
import {IBankAccountApi} from "./interfaces/IBankAccountApi";
|
|
3
|
+
import {IHttpRequest} from "@fiado/http-client";
|
|
4
|
+
import GetExternalBankAccountRequest from "@fiado/type-kit/bin/bankAccount/dtos/GetExternalBankAccountRequest";
|
|
5
|
+
|
|
6
|
+
@injectable()
|
|
7
|
+
export default class BankAccountApi implements IBankAccountApi {
|
|
8
|
+
private readonly baseUrl = process.env.BANK_ACCOUNT_LAMBDA_UR || "";
|
|
9
|
+
|
|
10
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async getBankAccountById(bankAccountId: string): Promise<any> {
|
|
14
|
+
const url = `${this.baseUrl}`;
|
|
15
|
+
const body: GetExternalBankAccountRequest = {
|
|
16
|
+
accountId: bankAccountId
|
|
17
|
+
} as GetExternalBankAccountRequest;
|
|
18
|
+
const headers = {
|
|
19
|
+
'Content-Type': 'application/json',
|
|
20
|
+
operationName: "postBankAccountId"
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return await this.httpRequest.post(url, body, headers);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async getBankById(bankId: string): Promise<any> {
|
|
27
|
+
const url = `${this.baseUrl}`;
|
|
28
|
+
const body: GetExternalBankAccountRequest = {
|
|
29
|
+
bankId: bankId
|
|
30
|
+
} as GetExternalBankAccountRequest;
|
|
31
|
+
const headers = {
|
|
32
|
+
'Content-Type': 'application/json',
|
|
33
|
+
operationName: "getBanksBankId"
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return await this.httpRequest.post(url, body, headers);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async getBankByCode(bankCode?: string, shortBankCode?: string): Promise<any> {
|
|
40
|
+
const url = `${this.baseUrl}`;
|
|
41
|
+
const params = bankCode ? `bankCode=${bankCode}` : `shortBankCode=${shortBankCode}`;
|
|
42
|
+
const headers = {
|
|
43
|
+
'Content-Type': 'application/json',
|
|
44
|
+
operationName: "getBanks"
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return await this.httpRequest.post(`${url}?${params}`, null, headers);
|
|
48
|
+
}
|
|
49
49
|
}
|
package/src/bankAccount/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './interfaces/IBankAccountApi';
|
|
1
|
+
export * from './interfaces/IBankAccountApi';
|
|
2
2
|
export * from './BankAccountApi';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface IBankAccountApi {
|
|
2
|
-
getBankAccountById(bankAccountId: string): Promise<any>;
|
|
3
|
-
|
|
4
|
-
getBankById(bankId: string): Promise<any>;
|
|
5
|
-
|
|
6
|
-
getBankByCode(bankCode?: string, shortBankCode?: string): Promise<any>;
|
|
1
|
+
export interface IBankAccountApi {
|
|
2
|
+
getBankAccountById(bankAccountId: string): Promise<any>;
|
|
3
|
+
|
|
4
|
+
getBankById(bankId: string): Promise<any>;
|
|
5
|
+
|
|
6
|
+
getBankByCode(bankCode?: string, shortBankCode?: string): Promise<any>;
|
|
7
7
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {IBBVARstApi} from "./interfaces/IBBVARstApi";
|
|
2
|
-
import {inject, injectable} from "inversify";
|
|
3
|
-
import {IHttpRequest} from "@fiado/http-client";
|
|
4
|
-
import {CreateRSTTransactionRequest} from "@fiado/type-kit/bin/bbvaRst";
|
|
5
|
-
|
|
6
|
-
@injectable()
|
|
7
|
-
export class BBVARstApi implements IBBVARstApi {
|
|
8
|
-
private readonly baseUrl = process.env.BBVA_RSTA_LAMBDA_URL || "";
|
|
9
|
-
|
|
10
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
async create(request: CreateRSTTransactionRequest): Promise<any> {
|
|
14
|
-
const url = `${this.baseUrl}/create`;
|
|
15
|
-
return await this.httpRequest.post(url, request);
|
|
16
|
-
}
|
|
1
|
+
import {IBBVARstApi} from "./interfaces/IBBVARstApi";
|
|
2
|
+
import {inject, injectable} from "inversify";
|
|
3
|
+
import {IHttpRequest} from "@fiado/http-client";
|
|
4
|
+
import {CreateRSTTransactionRequest} from "@fiado/type-kit/bin/bbvaRst";
|
|
5
|
+
|
|
6
|
+
@injectable()
|
|
7
|
+
export class BBVARstApi implements IBBVARstApi {
|
|
8
|
+
private readonly baseUrl = process.env.BBVA_RSTA_LAMBDA_URL || "";
|
|
9
|
+
|
|
10
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async create(request: CreateRSTTransactionRequest): Promise<any> {
|
|
14
|
+
const url = `${this.baseUrl}/create`;
|
|
15
|
+
return await this.httpRequest.post(url, request);
|
|
16
|
+
}
|
|
17
17
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {CreateRSTTransactionRequest} from "@fiado/type-kit/bin/bbvaRst";
|
|
2
|
-
|
|
3
|
-
export interface IBBVARstApi {
|
|
4
|
-
create(request: CreateRSTTransactionRequest): Promise<any>;
|
|
1
|
+
import {CreateRSTTransactionRequest} from "@fiado/type-kit/bin/bbvaRst";
|
|
2
|
+
|
|
3
|
+
export interface IBBVARstApi {
|
|
4
|
+
create(request: CreateRSTTransactionRequest): Promise<any>;
|
|
5
5
|
}
|
package/src/bbvaRst/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './api/interfaces/IBBVARstApi';
|
|
1
|
+
export * from './api/interfaces/IBBVARstApi';
|
|
2
2
|
export * from './api/BBVARstApi';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { inject, injectable } from "inversify";
|
|
2
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
-
import dotenv from 'dotenv';
|
|
4
|
-
import { IBlackListApi } from "./interfaces/IBlackListApi";
|
|
5
|
-
import { IdentificationParameter } from "@fiado/type-kit/bin/blacklist";
|
|
6
|
-
dotenv.config();
|
|
7
|
-
|
|
8
|
-
@injectable()
|
|
9
|
-
export class BlackListApi implements IBlackListApi {
|
|
10
|
-
|
|
11
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
12
|
-
|
|
13
|
-
private readonly baseUrl = process.env.BLACKLIST_BUSINESS_URL || "";
|
|
14
|
-
|
|
15
|
-
async getByIdentificationParameter(params: { identificationParameter: IdentificationParameter; value: string; }): Promise<void> {
|
|
16
|
-
const url = `${this.baseUrl}/search/${params.identificationParameter}/${params.value}`;
|
|
17
|
-
return await this.httpRequest.get(url);
|
|
18
|
-
}
|
|
19
|
-
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import dotenv from 'dotenv';
|
|
4
|
+
import { IBlackListApi } from "./interfaces/IBlackListApi";
|
|
5
|
+
import { IdentificationParameter } from "@fiado/type-kit/bin/blacklist";
|
|
6
|
+
dotenv.config();
|
|
7
|
+
|
|
8
|
+
@injectable()
|
|
9
|
+
export class BlackListApi implements IBlackListApi {
|
|
10
|
+
|
|
11
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
12
|
+
|
|
13
|
+
private readonly baseUrl = process.env.BLACKLIST_BUSINESS_URL || "";
|
|
14
|
+
|
|
15
|
+
async getByIdentificationParameter(params: { identificationParameter: IdentificationParameter; value: string; }): Promise<void> {
|
|
16
|
+
const url = `${this.baseUrl}/search/${params.identificationParameter}/${params.value}`;
|
|
17
|
+
return await this.httpRequest.get(url);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
20
|
}
|
package/src/blacklist/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './interfaces/IBlackListApi';
|
|
1
|
+
|
|
2
|
+
export * from './interfaces/IBlackListApi';
|
|
3
3
|
export * from './BlackListApi';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { IdentificationParameter } from "@fiado/type-kit/bin/blacklist";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Interfaz que define las operaciones que se pueden realizar en el servicio de black list.
|
|
5
|
-
*/
|
|
6
|
-
export interface IBlackListApi {
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Obtener por parametro de identificacion.
|
|
10
|
-
* @param identificationParameter tipo de parametro.
|
|
11
|
-
* @param value valor del parametro.
|
|
12
|
-
* @returns Una promesa que resuelve a void.
|
|
13
|
-
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
14
|
-
*/
|
|
15
|
-
getByIdentificationParameter(params:{
|
|
16
|
-
identificationParameter:IdentificationParameter,
|
|
17
|
-
value:string,
|
|
18
|
-
}): Promise<void>;
|
|
19
|
-
|
|
20
|
-
}
|
|
1
|
+
import { IdentificationParameter } from "@fiado/type-kit/bin/blacklist";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Interfaz que define las operaciones que se pueden realizar en el servicio de black list.
|
|
5
|
+
*/
|
|
6
|
+
export interface IBlackListApi {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Obtener por parametro de identificacion.
|
|
10
|
+
* @param identificationParameter tipo de parametro.
|
|
11
|
+
* @param value valor del parametro.
|
|
12
|
+
* @returns Una promesa que resuelve a void.
|
|
13
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
14
|
+
*/
|
|
15
|
+
getByIdentificationParameter(params:{
|
|
16
|
+
identificationParameter:IdentificationParameter,
|
|
17
|
+
value:string,
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
|
|
20
|
+
}
|
package/src/card/CardApi.ts
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
-
import { CardResponse, CardUpdateIssuanceRequest } from "@fiado/type-kit/bin/card";
|
|
4
|
-
import { CountryId } from "@fiado/type-kit/bin/country";
|
|
5
|
-
import { inject, injectable } from "inversify";
|
|
6
|
-
import { ICardApi } from "./interfaces/ICardApi";
|
|
7
|
-
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
8
|
-
|
|
9
|
-
@injectable()
|
|
10
|
-
export class CardApi implements ICardApi {
|
|
11
|
-
|
|
12
|
-
private readonly baseUrl = process.env.CARD_LAMBDA_URL || "";
|
|
13
|
-
|
|
14
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
async getById(id: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>> {
|
|
18
|
-
|
|
19
|
-
const url = `${this.baseUrl}/${countryId}?cardId=${id}`;
|
|
20
|
-
return await this.httpRequest.get(url);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async getByExternalId(externalId: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>> {
|
|
24
|
-
|
|
25
|
-
const url = `${this.baseUrl}/${countryId}?externalCardId=${externalId}`;
|
|
26
|
-
return await this.httpRequest.get(url);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async evaluateAccountLevelUpdate(directoryId: string): Promise<void> {
|
|
30
|
-
|
|
31
|
-
const url = `${this.baseUrl}accounts/levels`
|
|
32
|
-
await this.httpRequest.post(url, { directoryId });
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
async findCardIssuanceByIds(directoryIds: string[]): Promise<ApiGatewayResponse<any>> {
|
|
36
|
-
|
|
37
|
-
const queryparams = directoryIds.map((directoryId) => `directoryId=${directoryId}`).join("&");
|
|
38
|
-
|
|
39
|
-
const url = `${this.baseUrl}?${queryparams}`;
|
|
40
|
-
|
|
41
|
-
return await this.httpRequest.get(url);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
async updateIssuance(provider: Provider, input: CardUpdateIssuanceRequest): Promise<ApiGatewayResponse<void>> {
|
|
45
|
-
|
|
46
|
-
const url = `${this.baseUrl}${provider}/issuance`;
|
|
47
|
-
return await this.httpRequest.put(url, input);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import { CardResponse, CardUpdateIssuanceRequest } from "@fiado/type-kit/bin/card";
|
|
4
|
+
import { CountryId } from "@fiado/type-kit/bin/country";
|
|
5
|
+
import { inject, injectable } from "inversify";
|
|
6
|
+
import { ICardApi } from "./interfaces/ICardApi";
|
|
7
|
+
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
8
|
+
|
|
9
|
+
@injectable()
|
|
10
|
+
export class CardApi implements ICardApi {
|
|
11
|
+
|
|
12
|
+
private readonly baseUrl = process.env.CARD_LAMBDA_URL || "";
|
|
13
|
+
|
|
14
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async getById(id: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>> {
|
|
18
|
+
|
|
19
|
+
const url = `${this.baseUrl}/${countryId}?cardId=${id}`;
|
|
20
|
+
return await this.httpRequest.get(url);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async getByExternalId(externalId: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>> {
|
|
24
|
+
|
|
25
|
+
const url = `${this.baseUrl}/${countryId}?externalCardId=${externalId}`;
|
|
26
|
+
return await this.httpRequest.get(url);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async evaluateAccountLevelUpdate(directoryId: string): Promise<void> {
|
|
30
|
+
|
|
31
|
+
const url = `${this.baseUrl}accounts/levels`
|
|
32
|
+
await this.httpRequest.post(url, { directoryId });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async findCardIssuanceByIds(directoryIds: string[]): Promise<ApiGatewayResponse<any>> {
|
|
36
|
+
|
|
37
|
+
const queryparams = directoryIds.map((directoryId) => `directoryId=${directoryId}`).join("&");
|
|
38
|
+
|
|
39
|
+
const url = `${this.baseUrl}?${queryparams}`;
|
|
40
|
+
|
|
41
|
+
return await this.httpRequest.get(url);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async updateIssuance(provider: Provider, input: CardUpdateIssuanceRequest): Promise<ApiGatewayResponse<void>> {
|
|
45
|
+
|
|
46
|
+
const url = `${this.baseUrl}${provider}/issuance`;
|
|
47
|
+
return await this.httpRequest.put(url, input);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
package/src/card/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from './interfaces/ICardApi';
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export * from './interfaces/ICardApi';
|
|
4
4
|
export * from './CardApi';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { CardResponse, CardUpdateIssuanceRequest } from "@fiado/type-kit/bin/card";
|
|
3
|
-
import { CountryId } from "@fiado/type-kit/bin/country";
|
|
4
|
-
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
5
|
-
|
|
6
|
-
export interface ICardApi {
|
|
7
|
-
|
|
8
|
-
getById(id: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>>;
|
|
9
|
-
|
|
10
|
-
getByExternalId(externalId: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>>;
|
|
11
|
-
|
|
12
|
-
findCardIssuanceByIds(directoryIds: string[]): Promise<ApiGatewayResponse<any>>;
|
|
13
|
-
|
|
14
|
-
updateIssuance(provider: Provider, input: CardUpdateIssuanceRequest): Promise<ApiGatewayResponse<void>>
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
+
import { CardResponse, CardUpdateIssuanceRequest } from "@fiado/type-kit/bin/card";
|
|
3
|
+
import { CountryId } from "@fiado/type-kit/bin/country";
|
|
4
|
+
import { Provider } from "@fiado/type-kit/bin/provider";
|
|
5
|
+
|
|
6
|
+
export interface ICardApi {
|
|
7
|
+
|
|
8
|
+
getById(id: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>>;
|
|
9
|
+
|
|
10
|
+
getByExternalId(externalId: string, countryId: CountryId): Promise<ApiGatewayResponse<CardResponse>>;
|
|
11
|
+
|
|
12
|
+
findCardIssuanceByIds(directoryIds: string[]): Promise<ApiGatewayResponse<any>>;
|
|
13
|
+
|
|
14
|
+
updateIssuance(provider: Provider, input: CardUpdateIssuanceRequest): Promise<ApiGatewayResponse<void>>
|
|
15
|
+
|
|
16
|
+
|
|
17
17
|
}
|