@fiado/api-invoker 1.2.53 → 1.2.54
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/centralPayments/CentralPaymentsConnectorApi.d.ts +1 -0
- package/bin/centralPayments/CentralPaymentsConnectorApi.js +4 -0
- package/bin/centralPayments/interfaces/ICentralPaymentsConnectorApi.d.ts +1 -0
- 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 +177 -172
- package/src/centralPayments/index.ts +1 -1
- package/src/centralPayments/interfaces/ICentralPaymentsConnectorApi.ts +83 -81
- 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 +60 -60
- package/src/service-business/index.ts +2 -2
- package/src/service-business/interfaces/IServiceApi.ts +44 -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 +137 -137
- package/src/tern/api/interfaces/ITernApi.ts +38 -38
- 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
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.d.ts +0 -46
- package/bin/cognitoConnector/interfaces/ICognitoConnectorApiV2.js +0 -2
package/README.md
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
# fiado-api-invoker
|
|
2
|
-
|
|
3
|
-
`fiado-api-invoker` es una librería diseñada para facilitar la invocación de APIs privadas de AWS Lambda a través de API Gateway dentro de la misma VPC. Esta librería simplifica el proceso de configuración y llamada a servicios, permitiendo a los desarrolladores centrarse en la lógica de negocio.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Configuración
|
|
7
|
-
|
|
8
|
-
Antes de usar la librería, asegúrate de configurar la URL base del API Gateway privado que corresponda por ejemplo si vas a usar los servicios del Lambda `Directory` se puede hacer estableciendo la variable de entorno `DIRECTORY_LAMBDA_URL`.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Instalación
|
|
12
|
-
```bash
|
|
13
|
-
`npm install fiado-api-invoker @fiado/http-client`
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Configuración del Contenedor de InversifyJS
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
import { Container } from "inversify";
|
|
20
|
-
import { IHttpRequest, AxiosHttpRequest } from "@fiado/http-client";
|
|
21
|
-
import { apiInvokerContainer } from '@fiado/api-invoker';
|
|
22
|
-
|
|
23
|
-
// Crea el contenedor principal de tu aplicación
|
|
24
|
-
const container = new Container();
|
|
25
|
-
|
|
26
|
-
// Aplica las configuraciones de vinculación de fiado-gateway-adapter al contenedor
|
|
27
|
-
container.load(gatewayAdapterBindings);
|
|
28
|
-
|
|
29
|
-
// Registro del cliente HTTP
|
|
30
|
-
container.bind<IHttpRequest>("IHttpRequest").to(AxiosHttpRequest);
|
|
31
|
-
|
|
32
|
-
// Exporta el contenedor para su uso en toda tu aplicación
|
|
33
|
-
export { container };
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
## Uso de IDirectoryApi en Servicios del Proyecto
|
|
40
|
-
|
|
41
|
-
Para utilizar `fiado-api-invoker`, necesitas configurar el contenedor de InversifyJS en tu aplicación. Aquí te mostramos cómo registrar las dependencias necesarias:
|
|
42
|
-
|
|
43
|
-
```typescript
|
|
44
|
-
import { inject, injectable } from "inversify";
|
|
45
|
-
import { IDirectoryApi } from "fiado-api-invoker";
|
|
46
|
-
import { log } from "@fiado/logger";
|
|
47
|
-
|
|
48
|
-
@injectable()
|
|
49
|
-
export class SomeService {
|
|
50
|
-
constructor(@inject("IDirectoryApi") private directoryApi: IDirectoryApi) {}
|
|
51
|
-
|
|
52
|
-
public async fetchDirectoryDetails(directoryIds: string[]): Promise<void> {
|
|
53
|
-
try {
|
|
54
|
-
const details = await this.directoryApi.getByIds(directoryIds);
|
|
55
|
-
log.info(details);
|
|
56
|
-
|
|
57
|
-
} catch (error) {
|
|
58
|
-
log.error("Error fetching directory details:", error);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
|
|
1
|
+
# fiado-api-invoker
|
|
2
|
+
|
|
3
|
+
`fiado-api-invoker` es una librería diseñada para facilitar la invocación de APIs privadas de AWS Lambda a través de API Gateway dentro de la misma VPC. Esta librería simplifica el proceso de configuración y llamada a servicios, permitiendo a los desarrolladores centrarse en la lógica de negocio.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Configuración
|
|
7
|
+
|
|
8
|
+
Antes de usar la librería, asegúrate de configurar la URL base del API Gateway privado que corresponda por ejemplo si vas a usar los servicios del Lambda `Directory` se puede hacer estableciendo la variable de entorno `DIRECTORY_LAMBDA_URL`.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## Instalación
|
|
12
|
+
```bash
|
|
13
|
+
`npm install fiado-api-invoker @fiado/http-client`
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Configuración del Contenedor de InversifyJS
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { Container } from "inversify";
|
|
20
|
+
import { IHttpRequest, AxiosHttpRequest } from "@fiado/http-client";
|
|
21
|
+
import { apiInvokerContainer } from '@fiado/api-invoker';
|
|
22
|
+
|
|
23
|
+
// Crea el contenedor principal de tu aplicación
|
|
24
|
+
const container = new Container();
|
|
25
|
+
|
|
26
|
+
// Aplica las configuraciones de vinculación de fiado-gateway-adapter al contenedor
|
|
27
|
+
container.load(gatewayAdapterBindings);
|
|
28
|
+
|
|
29
|
+
// Registro del cliente HTTP
|
|
30
|
+
container.bind<IHttpRequest>("IHttpRequest").to(AxiosHttpRequest);
|
|
31
|
+
|
|
32
|
+
// Exporta el contenedor para su uso en toda tu aplicación
|
|
33
|
+
export { container };
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## Uso de IDirectoryApi en Servicios del Proyecto
|
|
40
|
+
|
|
41
|
+
Para utilizar `fiado-api-invoker`, necesitas configurar el contenedor de InversifyJS en tu aplicación. Aquí te mostramos cómo registrar las dependencias necesarias:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { inject, injectable } from "inversify";
|
|
45
|
+
import { IDirectoryApi } from "fiado-api-invoker";
|
|
46
|
+
import { log } from "@fiado/logger";
|
|
47
|
+
|
|
48
|
+
@injectable()
|
|
49
|
+
export class SomeService {
|
|
50
|
+
constructor(@inject("IDirectoryApi") private directoryApi: IDirectoryApi) {}
|
|
51
|
+
|
|
52
|
+
public async fetchDirectoryDetails(directoryIds: string[]): Promise<void> {
|
|
53
|
+
try {
|
|
54
|
+
const details = await this.directoryApi.getByIds(directoryIds);
|
|
55
|
+
log.info(details);
|
|
56
|
+
|
|
57
|
+
} catch (error) {
|
|
58
|
+
log.error("Error fetching directory details:", error);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
|
|
@@ -27,6 +27,7 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
|
|
|
27
27
|
updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
28
28
|
updateCardProgram(externalCardId: string, programId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
29
29
|
orderPhysicalCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
30
|
+
createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
30
31
|
getCardsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
31
32
|
generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
32
33
|
getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
@@ -89,6 +89,10 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
|
|
|
89
89
|
const url = `${this.baseUrl}/cards/physical/order/${externalUserId}`;
|
|
90
90
|
return await this.httpRequest.put(url);
|
|
91
91
|
}
|
|
92
|
+
async createSecondaryCard(externalUserId) {
|
|
93
|
+
const url = `${this.baseUrl}/cards/cardholders/${externalUserId}/secondary`;
|
|
94
|
+
return await this.httpRequest.put(url);
|
|
95
|
+
}
|
|
92
96
|
async getCardsByUserId(externalUserId) {
|
|
93
97
|
const url = `${this.baseUrl}/cards/cardholders/${externalUserId}`;
|
|
94
98
|
return await this.httpRequest.get(url);
|
|
@@ -20,6 +20,7 @@ export interface ICentralPaymentsConnectorApi {
|
|
|
20
20
|
updateCard(request: UpdateBankAccountCardRequest): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
21
21
|
updateCardProgram(externalCardId: string, programId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
22
22
|
orderPhysicalCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
23
|
+
createSecondaryCard(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
23
24
|
getCardsByUserId(externalUserId: string): Promise<FiadoApiResponse<GetBankAccountCardResponse>>;
|
|
24
25
|
generateCardsInBatch(request: CardBatchRequest): Promise<FiadoApiResponse<CardBatchResponse>>;
|
|
25
26
|
getCardBatch(batchId: string): Promise<FiadoApiResponse<CardBatchResponse>>;
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
|
|
5
|
-
"main": "bin/index.js",
|
|
6
|
-
"types": "bin/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "test",
|
|
9
|
-
"build": "tsc"
|
|
10
|
-
},
|
|
11
|
-
"keywords": [],
|
|
12
|
-
"author": "Fiado Inc",
|
|
13
|
-
"license": "ISC",
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"@aws-sdk/client-sqs": "^3.758.0",
|
|
16
|
-
"@fiado/gateway-adapter": "^1.1.40",
|
|
17
|
-
"@fiado/http-client": "^1.0.4",
|
|
18
|
-
"@fiado/logger": "^1.0.3",
|
|
19
|
-
"@fiado/type-kit": "^1.8.25",
|
|
20
|
-
"dotenv": "^16.4.7",
|
|
21
|
-
"inversify": "^6.2.2",
|
|
22
|
-
"reflect-metadata": "^0.2.2"
|
|
23
|
-
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@types/node": "^20.17.24"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@fiado/api-invoker",
|
|
3
|
+
"version": "1.2.54",
|
|
4
|
+
"description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a través de invocaciones http",
|
|
5
|
+
"main": "bin/index.js",
|
|
6
|
+
"types": "bin/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "test",
|
|
9
|
+
"build": "tsc"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [],
|
|
12
|
+
"author": "Fiado Inc",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@aws-sdk/client-sqs": "^3.758.0",
|
|
16
|
+
"@fiado/gateway-adapter": "^1.1.40",
|
|
17
|
+
"@fiado/http-client": "^1.0.4",
|
|
18
|
+
"@fiado/logger": "^1.0.3",
|
|
19
|
+
"@fiado/type-kit": "^1.8.25",
|
|
20
|
+
"dotenv": "^16.4.7",
|
|
21
|
+
"inversify": "^6.2.2",
|
|
22
|
+
"reflect-metadata": "^0.2.2"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/node": "^20.17.24"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { inject, injectable } from "inversify";
|
|
2
|
-
import { IAccountBeneficiaryApi } from "./interfaces/IAccountBeneficiaryApi";
|
|
3
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
4
|
-
import { AccountBeneficiaryCreateRequest } from "@fiado/type-kit/bin/beneficiary";
|
|
5
|
-
import { CountryId } from "@fiado/type-kit/bin/country";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@injectable()
|
|
9
|
-
export class AccountBeneficiaryApi implements IAccountBeneficiaryApi {
|
|
10
|
-
private readonly baseUrl = process.env.ACCOUNT_BENEFICIARY_LAMBDA_URL || "";
|
|
11
|
-
|
|
12
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
async create(directoryId: string, countryId: CountryId, input: AccountBeneficiaryCreateRequest[]): Promise<void> {
|
|
16
|
-
const url = `${this.baseUrl}${countryId}/users/${directoryId}`;
|
|
17
|
-
return await this.httpRequest.post(url, input);
|
|
18
|
-
}
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import { IAccountBeneficiaryApi } from "./interfaces/IAccountBeneficiaryApi";
|
|
3
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
4
|
+
import { AccountBeneficiaryCreateRequest } from "@fiado/type-kit/bin/beneficiary";
|
|
5
|
+
import { CountryId } from "@fiado/type-kit/bin/country";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@injectable()
|
|
9
|
+
export class AccountBeneficiaryApi implements IAccountBeneficiaryApi {
|
|
10
|
+
private readonly baseUrl = process.env.ACCOUNT_BENEFICIARY_LAMBDA_URL || "";
|
|
11
|
+
|
|
12
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async create(directoryId: string, countryId: CountryId, input: AccountBeneficiaryCreateRequest[]): Promise<void> {
|
|
16
|
+
const url = `${this.baseUrl}${countryId}/users/${directoryId}`;
|
|
17
|
+
return await this.httpRequest.post(url, input);
|
|
18
|
+
}
|
|
19
19
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './interfaces/IAccountBeneficiaryApi';
|
|
1
|
+
|
|
2
|
+
export * from './interfaces/IAccountBeneficiaryApi';
|
|
3
3
|
export * from './AccountBeneficiaryApi';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AccountBeneficiaryCreateRequest } from "@fiado/type-kit/bin/beneficiary";
|
|
2
|
-
import { CountryId } from "@fiado/type-kit/bin/country";
|
|
3
|
-
|
|
4
|
-
export interface IAccountBeneficiaryApi {
|
|
5
|
-
|
|
6
|
-
create(directoryId: string, countryId: CountryId, input: AccountBeneficiaryCreateRequest[]): Promise<void>;
|
|
7
|
-
|
|
1
|
+
import { AccountBeneficiaryCreateRequest } from "@fiado/type-kit/bin/beneficiary";
|
|
2
|
+
import { CountryId } from "@fiado/type-kit/bin/country";
|
|
3
|
+
|
|
4
|
+
export interface IAccountBeneficiaryApi {
|
|
5
|
+
|
|
6
|
+
create(directoryId: string, countryId: CountryId, input: AccountBeneficiaryCreateRequest[]): Promise<void>;
|
|
7
|
+
|
|
8
8
|
}
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import {IAccountFiadoIncApi} from "./interfaces/IAccountFiadoIncApi";
|
|
2
|
-
import {
|
|
3
|
-
AccountCreateRequest,
|
|
4
|
-
AccountCreateResponse,
|
|
5
|
-
AccountUpdateBalanceRequest,
|
|
6
|
-
AccountUpdateRequest,
|
|
7
|
-
ExecuteP2pOperationRequest,
|
|
8
|
-
ExecutePocketOperationRequest,
|
|
9
|
-
GetAccountResponse,
|
|
10
|
-
GetPocketBalanceResponse
|
|
11
|
-
} from "@fiado/type-kit/bin/account";
|
|
12
|
-
import {inject, injectable} from "inversify";
|
|
13
|
-
import {IHttpRequest} from "@fiado/http-client";
|
|
14
|
-
import {OperationEnum} from "@fiado/type-kit/bin/transaction";
|
|
15
|
-
import {Provider} from "@fiado/type-kit/bin/provider";
|
|
16
|
-
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
17
|
-
|
|
18
|
-
@injectable()
|
|
19
|
-
export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
|
|
20
|
-
private readonly baseUrl = process.env.ACCOUNT_FIADOINC_LAMBDA_URL || "";
|
|
21
|
-
|
|
22
|
-
constructor(@inject("IHttpRequest") private readonly httpRequest: IHttpRequest) {
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async confirmUserCreation(provider: Provider, externalUserId: string): Promise<FiadoApiResponse<AccountCreateResponse>> {
|
|
26
|
-
const url = `${this.baseUrl}${provider}/users/${externalUserId}/confirm`;
|
|
27
|
-
return await this.httpRequest.put(url);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
async createAccount(provider: Provider, data: AccountCreateRequest): Promise<FiadoApiResponse<AccountCreateResponse>> {
|
|
31
|
-
const url = `${this.baseUrl}${provider}`;
|
|
32
|
-
return await this.httpRequest.post(url, data);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
async getAccountByDirectoryId(provider: Provider, directoryId: string): Promise<FiadoApiResponse<GetAccountResponse[]>> {
|
|
36
|
-
const url = `${this.baseUrl}${provider}/users/${directoryId}/`;
|
|
37
|
-
return await this.httpRequest.get(url);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
async getPocketBalance(provider: Provider, directoryId: string): Promise<FiadoApiResponse<GetPocketBalanceResponse>> {
|
|
41
|
-
const url = `${this.baseUrl}${provider}/pockets/users/${directoryId}/balance`;
|
|
42
|
-
return await this.httpRequest.get(url);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
async updatePocketBalance(provider: Provider, pocketId: string, request: AccountUpdateBalanceRequest): Promise<FiadoApiResponse<null>> {
|
|
46
|
-
const url = `${this.baseUrl}${provider}/pockets/${pocketId}/balance`;
|
|
47
|
-
return await this.httpRequest.put(url, request);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async getPocketBalanceById(provider: Provider, pocketId: string): Promise<FiadoApiResponse<GetPocketBalanceResponse>> {
|
|
51
|
-
const url = `${this.baseUrl}${provider}/pockets/${pocketId}/balance/${provider}`;
|
|
52
|
-
return await this.httpRequest.get(url);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
async executePocketTransaction(provider: Provider, pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<FiadoApiResponse<any>> {
|
|
56
|
-
const url = `${this.baseUrl}${provider}/pockets/${pocketId}/${operation}`;
|
|
57
|
-
return await this.httpRequest.post(url, request);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
async executeP2pTransaction(provider: Provider, request: ExecuteP2pOperationRequest): Promise<FiadoApiResponse<any>> {
|
|
61
|
-
const url = `${this.baseUrl}${provider}/p2p/send`;
|
|
62
|
-
return await this.httpRequest.post(url, request);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
async deletePocket(provider: Provider, pocketId: string): Promise<FiadoApiResponse<void>> {
|
|
66
|
-
const url = `${this.baseUrl}${provider}/pockets/${pocketId}`;
|
|
67
|
-
return await this.httpRequest.delete(url);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
async update(provider: Provider, directoryId: string, data: AccountUpdateRequest): Promise<FiadoApiResponse<void>> {
|
|
71
|
-
const url = `${this.baseUrl}${provider}/users/${directoryId}`;
|
|
72
|
-
return await this.httpRequest.put(url, data);
|
|
73
|
-
}
|
|
1
|
+
import {IAccountFiadoIncApi} from "./interfaces/IAccountFiadoIncApi";
|
|
2
|
+
import {
|
|
3
|
+
AccountCreateRequest,
|
|
4
|
+
AccountCreateResponse,
|
|
5
|
+
AccountUpdateBalanceRequest,
|
|
6
|
+
AccountUpdateRequest,
|
|
7
|
+
ExecuteP2pOperationRequest,
|
|
8
|
+
ExecutePocketOperationRequest,
|
|
9
|
+
GetAccountResponse,
|
|
10
|
+
GetPocketBalanceResponse
|
|
11
|
+
} from "@fiado/type-kit/bin/account";
|
|
12
|
+
import {inject, injectable} from "inversify";
|
|
13
|
+
import {IHttpRequest} from "@fiado/http-client";
|
|
14
|
+
import {OperationEnum} from "@fiado/type-kit/bin/transaction";
|
|
15
|
+
import {Provider} from "@fiado/type-kit/bin/provider";
|
|
16
|
+
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
17
|
+
|
|
18
|
+
@injectable()
|
|
19
|
+
export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
|
|
20
|
+
private readonly baseUrl = process.env.ACCOUNT_FIADOINC_LAMBDA_URL || "";
|
|
21
|
+
|
|
22
|
+
constructor(@inject("IHttpRequest") private readonly httpRequest: IHttpRequest) {
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async confirmUserCreation(provider: Provider, externalUserId: string): Promise<FiadoApiResponse<AccountCreateResponse>> {
|
|
26
|
+
const url = `${this.baseUrl}${provider}/users/${externalUserId}/confirm`;
|
|
27
|
+
return await this.httpRequest.put(url);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async createAccount(provider: Provider, data: AccountCreateRequest): Promise<FiadoApiResponse<AccountCreateResponse>> {
|
|
31
|
+
const url = `${this.baseUrl}${provider}`;
|
|
32
|
+
return await this.httpRequest.post(url, data);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async getAccountByDirectoryId(provider: Provider, directoryId: string): Promise<FiadoApiResponse<GetAccountResponse[]>> {
|
|
36
|
+
const url = `${this.baseUrl}${provider}/users/${directoryId}/`;
|
|
37
|
+
return await this.httpRequest.get(url);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async getPocketBalance(provider: Provider, directoryId: string): Promise<FiadoApiResponse<GetPocketBalanceResponse>> {
|
|
41
|
+
const url = `${this.baseUrl}${provider}/pockets/users/${directoryId}/balance`;
|
|
42
|
+
return await this.httpRequest.get(url);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async updatePocketBalance(provider: Provider, pocketId: string, request: AccountUpdateBalanceRequest): Promise<FiadoApiResponse<null>> {
|
|
46
|
+
const url = `${this.baseUrl}${provider}/pockets/${pocketId}/balance`;
|
|
47
|
+
return await this.httpRequest.put(url, request);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
async getPocketBalanceById(provider: Provider, pocketId: string): Promise<FiadoApiResponse<GetPocketBalanceResponse>> {
|
|
51
|
+
const url = `${this.baseUrl}${provider}/pockets/${pocketId}/balance/${provider}`;
|
|
52
|
+
return await this.httpRequest.get(url);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async executePocketTransaction(provider: Provider, pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<FiadoApiResponse<any>> {
|
|
56
|
+
const url = `${this.baseUrl}${provider}/pockets/${pocketId}/${operation}`;
|
|
57
|
+
return await this.httpRequest.post(url, request);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async executeP2pTransaction(provider: Provider, request: ExecuteP2pOperationRequest): Promise<FiadoApiResponse<any>> {
|
|
61
|
+
const url = `${this.baseUrl}${provider}/p2p/send`;
|
|
62
|
+
return await this.httpRequest.post(url, request);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async deletePocket(provider: Provider, pocketId: string): Promise<FiadoApiResponse<void>> {
|
|
66
|
+
const url = `${this.baseUrl}${provider}/pockets/${pocketId}`;
|
|
67
|
+
return await this.httpRequest.delete(url);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async update(provider: Provider, directoryId: string, data: AccountUpdateRequest): Promise<FiadoApiResponse<void>> {
|
|
71
|
+
const url = `${this.baseUrl}${provider}/users/${directoryId}`;
|
|
72
|
+
return await this.httpRequest.put(url, data);
|
|
73
|
+
}
|
|
74
74
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './interfaces/IAccountFiadoIncApi';
|
|
1
|
+
export * from './interfaces/IAccountFiadoIncApi';
|
|
2
2
|
export * from './AccountFiadoIncApi';
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AccountCreateRequest,
|
|
3
|
-
AccountCreateResponse,
|
|
4
|
-
AccountUpdateBalanceRequest,
|
|
5
|
-
AccountUpdateRequest,
|
|
6
|
-
ExecuteP2pOperationRequest,
|
|
7
|
-
ExecutePocketOperationRequest,
|
|
8
|
-
GetAccountResponse,
|
|
9
|
-
GetPocketBalanceResponse
|
|
10
|
-
} from "@fiado/type-kit/bin/account";
|
|
11
|
-
import {OperationEnum} from "@fiado/type-kit/bin/transaction";
|
|
12
|
-
import {Provider} from "@fiado/type-kit/bin/provider";
|
|
13
|
-
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export interface IAccountFiadoIncApi {
|
|
17
|
-
|
|
18
|
-
confirmUserCreation(provider: Provider, externalUserId: string): Promise<FiadoApiResponse<AccountCreateResponse>>;
|
|
19
|
-
|
|
20
|
-
createAccount(provider: Provider, data: AccountCreateRequest): Promise<FiadoApiResponse<AccountCreateResponse>>;
|
|
21
|
-
|
|
22
|
-
getAccountByDirectoryId(provider: Provider, directoryId: string): Promise<FiadoApiResponse<GetAccountResponse[]>>;
|
|
23
|
-
|
|
24
|
-
getPocketBalance(provider: Provider, directoryId: string): Promise<FiadoApiResponse<GetPocketBalanceResponse>>;
|
|
25
|
-
|
|
26
|
-
updatePocketBalance(provider: Provider, pocketId: string, request: AccountUpdateBalanceRequest): Promise<FiadoApiResponse<null>>;
|
|
27
|
-
|
|
28
|
-
getPocketBalanceById(provider: Provider, pocketId: string): Promise<FiadoApiResponse<GetPocketBalanceResponse>>;
|
|
29
|
-
|
|
30
|
-
executePocketTransaction(provider: Provider, pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<FiadoApiResponse<any>>;
|
|
31
|
-
|
|
32
|
-
executeP2pTransaction(provider: Provider, request: ExecuteP2pOperationRequest): Promise<FiadoApiResponse<any>>;
|
|
33
|
-
|
|
34
|
-
deletePocket(provider: Provider, pocketId: string): Promise<FiadoApiResponse<void>>
|
|
35
|
-
|
|
36
|
-
update(provider: Provider, directoryId: string, data: AccountUpdateRequest): Promise<FiadoApiResponse<void>>
|
|
1
|
+
import {
|
|
2
|
+
AccountCreateRequest,
|
|
3
|
+
AccountCreateResponse,
|
|
4
|
+
AccountUpdateBalanceRequest,
|
|
5
|
+
AccountUpdateRequest,
|
|
6
|
+
ExecuteP2pOperationRequest,
|
|
7
|
+
ExecutePocketOperationRequest,
|
|
8
|
+
GetAccountResponse,
|
|
9
|
+
GetPocketBalanceResponse
|
|
10
|
+
} from "@fiado/type-kit/bin/account";
|
|
11
|
+
import {OperationEnum} from "@fiado/type-kit/bin/transaction";
|
|
12
|
+
import {Provider} from "@fiado/type-kit/bin/provider";
|
|
13
|
+
import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export interface IAccountFiadoIncApi {
|
|
17
|
+
|
|
18
|
+
confirmUserCreation(provider: Provider, externalUserId: string): Promise<FiadoApiResponse<AccountCreateResponse>>;
|
|
19
|
+
|
|
20
|
+
createAccount(provider: Provider, data: AccountCreateRequest): Promise<FiadoApiResponse<AccountCreateResponse>>;
|
|
21
|
+
|
|
22
|
+
getAccountByDirectoryId(provider: Provider, directoryId: string): Promise<FiadoApiResponse<GetAccountResponse[]>>;
|
|
23
|
+
|
|
24
|
+
getPocketBalance(provider: Provider, directoryId: string): Promise<FiadoApiResponse<GetPocketBalanceResponse>>;
|
|
25
|
+
|
|
26
|
+
updatePocketBalance(provider: Provider, pocketId: string, request: AccountUpdateBalanceRequest): Promise<FiadoApiResponse<null>>;
|
|
27
|
+
|
|
28
|
+
getPocketBalanceById(provider: Provider, pocketId: string): Promise<FiadoApiResponse<GetPocketBalanceResponse>>;
|
|
29
|
+
|
|
30
|
+
executePocketTransaction(provider: Provider, pocketId: string, operation: OperationEnum, request: ExecutePocketOperationRequest): Promise<FiadoApiResponse<any>>;
|
|
31
|
+
|
|
32
|
+
executeP2pTransaction(provider: Provider, request: ExecuteP2pOperationRequest): Promise<FiadoApiResponse<any>>;
|
|
33
|
+
|
|
34
|
+
deletePocket(provider: Provider, pocketId: string): Promise<FiadoApiResponse<void>>
|
|
35
|
+
|
|
36
|
+
update(provider: Provider, directoryId: string, data: AccountUpdateRequest): Promise<FiadoApiResponse<void>>
|
|
37
37
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { IAccountFiadoSAApi } from "./interfaces/IAccountFiadoSAApi";
|
|
2
|
-
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse, SPEITransferUpdateRequest } from "@fiado/type-kit/bin/account";
|
|
3
|
-
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
4
|
-
import { inject, injectable } from "inversify";
|
|
5
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
6
|
-
|
|
7
|
-
@injectable()
|
|
8
|
-
export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
|
|
9
|
-
private readonly baseUrl = process.env.ACCOUNT_FIADOSA_LAMBDA_URL || "";
|
|
10
|
-
|
|
11
|
-
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
async cancelAccount(directoryId: string, accountNumber: string, documentNumber: string): Promise<ApiGatewayResponse<void>> {
|
|
15
|
-
const url = `${this.baseUrl}/cancel`;
|
|
16
|
-
return await this.httpRequest.post(url, { directoryId, accountNumber, documentNumber });
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>> {
|
|
20
|
-
const url = `${this.baseUrl}`;
|
|
21
|
-
return await this.httpRequest.post(url, data);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
async getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>> {
|
|
25
|
-
const url = `${this.baseUrl}users/${directoryId}`;
|
|
26
|
-
return await this.httpRequest.get(url);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
30
|
-
const url = `${this.baseUrl}users/${directoryId}`;
|
|
31
|
-
return await this.httpRequest.put(url, data);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
async updateSpeiTransferRequest(transactionNumber: string, input: Partial<SPEITransferUpdateRequest>): Promise<ApiGatewayResponse<void>> {
|
|
35
|
-
const url = `${this.baseUrl}/spei/${transactionNumber}`;
|
|
36
|
-
return await this.httpRequest.put(url, input);
|
|
37
|
-
}
|
|
1
|
+
import { IAccountFiadoSAApi } from "./interfaces/IAccountFiadoSAApi";
|
|
2
|
+
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse, SPEITransferUpdateRequest } from "@fiado/type-kit/bin/account";
|
|
3
|
+
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
4
|
+
import { inject, injectable } from "inversify";
|
|
5
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
6
|
+
|
|
7
|
+
@injectable()
|
|
8
|
+
export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
|
|
9
|
+
private readonly baseUrl = process.env.ACCOUNT_FIADOSA_LAMBDA_URL || "";
|
|
10
|
+
|
|
11
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async cancelAccount(directoryId: string, accountNumber: string, documentNumber: string): Promise<ApiGatewayResponse<void>> {
|
|
15
|
+
const url = `${this.baseUrl}/cancel`;
|
|
16
|
+
return await this.httpRequest.post(url, { directoryId, accountNumber, documentNumber });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>> {
|
|
20
|
+
const url = `${this.baseUrl}`;
|
|
21
|
+
return await this.httpRequest.post(url, data);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>> {
|
|
25
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
26
|
+
return await this.httpRequest.get(url);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>> {
|
|
30
|
+
const url = `${this.baseUrl}users/${directoryId}`;
|
|
31
|
+
return await this.httpRequest.put(url, data);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async updateSpeiTransferRequest(transactionNumber: string, input: Partial<SPEITransferUpdateRequest>): Promise<ApiGatewayResponse<void>> {
|
|
35
|
+
const url = `${this.baseUrl}/spei/${transactionNumber}`;
|
|
36
|
+
return await this.httpRequest.put(url, input);
|
|
37
|
+
}
|
|
38
38
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './interfaces/IAccountFiadoSAApi';
|
|
1
|
+
export * from './interfaces/IAccountFiadoSAApi';
|
|
2
2
|
export * from './AccountFiadoSAApi';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse, SPEITransferUpdateRequest } from "@fiado/type-kit/bin/account";
|
|
2
|
-
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface IAccountFiadoSAApi {
|
|
6
|
-
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
|
|
7
|
-
|
|
8
|
-
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
9
|
-
|
|
10
|
-
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>
|
|
11
|
-
|
|
12
|
-
cancelAccount(directoryId: string, accountNumber: string, documentNumber: string): Promise<ApiGatewayResponse<void>>;
|
|
13
|
-
|
|
14
|
-
updateSpeiTransferRequest(id: string, input: Partial<SPEITransferUpdateRequest>): Promise<ApiGatewayResponse<void>>;
|
|
15
|
-
|
|
1
|
+
import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse, SPEITransferUpdateRequest } from "@fiado/type-kit/bin/account";
|
|
2
|
+
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export interface IAccountFiadoSAApi {
|
|
6
|
+
createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
|
|
7
|
+
|
|
8
|
+
getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
|
|
9
|
+
|
|
10
|
+
update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>
|
|
11
|
+
|
|
12
|
+
cancelAccount(directoryId: string, accountNumber: string, documentNumber: string): Promise<ApiGatewayResponse<void>>;
|
|
13
|
+
|
|
14
|
+
updateSpeiTransferRequest(id: string, input: Partial<SPEITransferUpdateRequest>): Promise<ApiGatewayResponse<void>>;
|
|
15
|
+
|
|
16
16
|
}
|