@fiado/api-invoker 1.3.23 → 1.3.25

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.
@@ -9,6 +9,7 @@ export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
9
9
  private readonly publisher;
10
10
  private readonly baseUrl;
11
11
  constructor(httpRequest: IHttpRequest, publisher: IPublisher);
12
+ replaceExternalAccount(provider: Provider, directoryId: string, externalAccountId: string, isPrincipal: boolean): Promise<FiadoApiResponse<void>>;
12
13
  /** ACCOUNTS **/
13
14
  confirmUserCreation(provider: Provider, externalUserId: string, request: AccountCreateRequest): Promise<FiadoApiResponse<AccountCreateResponse>>;
14
15
  createAccount(provider: Provider, data: AccountCreateRequest): Promise<FiadoApiResponse<AccountCreateResponse>>;
@@ -19,6 +19,10 @@ let AccountFiadoIncApi = class AccountFiadoIncApi {
19
19
  this.publisher = publisher;
20
20
  this.baseUrl = process.env.ACCOUNT_FIADOINC_LAMBDA_URL || "";
21
21
  }
22
+ async replaceExternalAccount(provider, directoryId, externalAccountId, isPrincipal) {
23
+ const url = `${this.baseUrl}${provider}/account/replace`;
24
+ return await this.httpRequest.post(url, { directoryId, externalAccountId, isPrincipal });
25
+ }
22
26
  /** ACCOUNTS **/
23
27
  async confirmUserCreation(provider, externalUserId, request) {
24
28
  const url = `${this.baseUrl}${provider}/users/confirm/${externalUserId}`;
@@ -13,4 +13,5 @@ export interface IAccountFiadoIncApi extends IPublisher {
13
13
  executePocketTransaction(provider: Provider, pocketId: string, request: ExecutePocketOperationRequest): Promise<FiadoApiResponse<ExecutePocketOperationResponse[]>>;
14
14
  deletePocket(provider: Provider, pocketId: string): Promise<FiadoApiResponse<void>>;
15
15
  update(provider: Provider, directoryId: string, data: AccountUpdateRequest): Promise<FiadoApiResponse<void>>;
16
+ replaceExternalAccount(provider: Provider, directoryId: string, externalAccountId: string, isPrincipal: boolean): Promise<FiadoApiResponse<void>>;
16
17
  }
@@ -1,5 +1,5 @@
1
1
  import { IHttpRequest } from "@fiado/http-client";
2
- import { BankAccountAchTransferRequest, BankAccountAchTransferResponse, BankAccountP2pTransferRequest, BankAccountPocketTransferRequest, BankAccountPocketTransferResponse, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountSensitiveInformationResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
2
+ import { BankAccountAchTransferRequest, BankAccountAchTransferResponse, BankAccountMCSendTransferRequest, BankAccountMCSendTransferResponse, BankAccountP2pTransferRequest, BankAccountPocketTransferRequest, BankAccountPocketTransferResponse, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountSensitiveInformationResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
3
3
  import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
4
4
  import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
5
5
  import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
@@ -47,6 +47,7 @@ export declare class CentralPaymentsConnectorApi implements ICentralPaymentsConn
47
47
  executeCardToCardTransaction(request: BankAccountP2pTransferRequest): Promise<FiadoApiResponse<BankAccountP2pTransferResponse>>;
48
48
  executeFinancialOperation(request: BankAccountPocketTransferRequest[]): Promise<FiadoApiResponse<BankAccountPocketTransferResponse[]>>;
49
49
  executeAchTransaction(request: BankAccountAchTransferRequest): Promise<FiadoApiResponse<BankAccountAchTransferResponse>>;
50
+ executeMCSendTransaction(request: BankAccountMCSendTransferRequest): Promise<FiadoApiResponse<BankAccountMCSendTransferResponse>>;
50
51
  executeFinancialOperationReversal(request: ProviderTransactionReversalRequest): Promise<FiadoApiResponse<ProviderTransactionReversalResponse>>;
51
52
  getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>>;
52
53
  createCardholderACHBankAccount(externalUserId: string, request: CreateExternalBankAccountRequest): Promise<FiadoApiResponse<CreateExternalBankAccountResponse>>;
@@ -157,6 +157,10 @@ let CentralPaymentsConnectorApi = class CentralPaymentsConnectorApi {
157
157
  const url = `${this.baseUrl}/transactions/ach/transfer`;
158
158
  return await this.httpRequest.post(url, request);
159
159
  }
160
+ async executeMCSendTransaction(request) {
161
+ const url = `${this.baseUrl}/transactions/mc/transfer`;
162
+ return await this.httpRequest.post(url, request);
163
+ }
160
164
  async executeFinancialOperationReversal(request) {
161
165
  const url = `${this.baseUrl}/transactions/reversal`;
162
166
  return await this.httpRequest.post(url, request);
@@ -1,4 +1,4 @@
1
- import { BankAccountAchTransferRequest, BankAccountAchTransferResponse, BankAccountP2pTransferRequest, BankAccountPocketTransferRequest, BankAccountPocketTransferResponse, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountSensitiveInformationResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
1
+ import { BankAccountAchTransferRequest, BankAccountAchTransferResponse, BankAccountMCSendTransferRequest, BankAccountMCSendTransferResponse, BankAccountP2pTransferRequest, BankAccountPocketTransferRequest, BankAccountPocketTransferResponse, CreateBankAccountUserRequest, CreateBankAccountUserResponse, GetBankAccountResponse, GetBankAccountSensitiveInformationResponse, GetBankAccountUserResponse, UpdateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
2
2
  import { BankAccountP2pTransferResponse } from "@fiado/type-kit/bin/account/dtos/BankAccountP2pTransferResponse";
3
3
  import FiadoApiResponse from "@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse";
4
4
  import { CreateExternalBankAccountRequest, CreateExternalBankAccountResponse } from "@fiado/type-kit/bin/bankAccount";
@@ -40,6 +40,7 @@ export interface ICentralPaymentsConnectorApi {
40
40
  executeCardToCardTransaction(request: BankAccountP2pTransferRequest): Promise<FiadoApiResponse<BankAccountP2pTransferResponse>>;
41
41
  executeFinancialOperation(request: BankAccountPocketTransferRequest[]): Promise<FiadoApiResponse<BankAccountPocketTransferResponse[]>>;
42
42
  executeAchTransaction(request: BankAccountAchTransferRequest): Promise<FiadoApiResponse<BankAccountAchTransferResponse>>;
43
+ executeMCSendTransaction(request: BankAccountMCSendTransferRequest): Promise<FiadoApiResponse<BankAccountMCSendTransferResponse>>;
43
44
  executeFinancialOperationReversal(request: ProviderTransactionReversalRequest): Promise<FiadoApiResponse<ProviderTransactionReversalResponse>>;
44
45
  getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>>;
45
46
  createCardholderACHBankAccount(externalUserId: string, request: CreateExternalBankAccountRequest): Promise<FiadoApiResponse<CreateExternalBankAccountResponse>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.3.23",
3
+ "version": "1.3.25",
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.9.14",
19
+ "@fiado/type-kit": "^1.9.25",
20
20
  "dotenv": "^16.4.7",
21
21
  "inversify": "^6.2.2",
22
22
  "reflect-metadata": "^0.2.2"
@@ -27,6 +27,10 @@ export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
27
27
  @inject("IPublisher") private readonly publisher: IPublisher
28
28
  ) {
29
29
  }
30
+ async replaceExternalAccount(provider: Provider, directoryId: string, externalAccountId: string, isPrincipal: boolean): Promise<FiadoApiResponse<void>> {
31
+ const url = `${this.baseUrl}${provider}/account/replace`;
32
+ return await this.httpRequest.post(url, {directoryId,externalAccountId,isPrincipal});
33
+ }
30
34
 
31
35
  /** ACCOUNTS **/
32
36
  async confirmUserCreation(provider: Provider, externalUserId: string, request: AccountCreateRequest): Promise<FiadoApiResponse<AccountCreateResponse>> {
@@ -36,4 +36,6 @@ export interface IAccountFiadoIncApi extends IPublisher {
36
36
  deletePocket(provider: Provider, pocketId: string): Promise<FiadoApiResponse<void>>
37
37
 
38
38
  update(provider: Provider, directoryId: string, data: AccountUpdateRequest): Promise<FiadoApiResponse<void>>
39
+
40
+ replaceExternalAccount(provider: Provider, directoryId: string, externalAccountId:string, isPrincipal:boolean): Promise<FiadoApiResponse<void>>
39
41
  }
@@ -2,6 +2,8 @@ import { IHttpRequest } from "@fiado/http-client";
2
2
  import {
3
3
  BankAccountAchTransferRequest,
4
4
  BankAccountAchTransferResponse,
5
+ BankAccountMCSendTransferRequest,
6
+ BankAccountMCSendTransferResponse,
5
7
  BankAccountP2pTransferRequest,
6
8
  BankAccountPocketTransferRequest,
7
9
  BankAccountPocketTransferResponse,
@@ -228,6 +230,11 @@ export class CentralPaymentsConnectorApi implements ICentralPaymentsConnectorApi
228
230
  return await this.httpRequest.post(url, request);
229
231
  }
230
232
 
233
+ async executeMCSendTransaction(request: BankAccountMCSendTransferRequest): Promise<FiadoApiResponse<BankAccountMCSendTransferResponse>> {
234
+ const url = `${this.baseUrl}/transactions/mc/transfer`;
235
+ return await this.httpRequest.post(url, request);
236
+ }
237
+
231
238
  async executeFinancialOperationReversal(request: ProviderTransactionReversalRequest): Promise<FiadoApiResponse<ProviderTransactionReversalResponse>> {
232
239
  const url = `${this.baseUrl}/transactions/reversal`;
233
240
  return await this.httpRequest.post(url, request);
@@ -1,6 +1,8 @@
1
1
  import {
2
2
  BankAccountAchTransferRequest,
3
3
  BankAccountAchTransferResponse,
4
+ BankAccountMCSendTransferRequest,
5
+ BankAccountMCSendTransferResponse,
4
6
  BankAccountP2pTransferRequest,
5
7
  BankAccountPocketTransferRequest,
6
8
  BankAccountPocketTransferResponse,
@@ -110,6 +112,8 @@ export interface ICentralPaymentsConnectorApi {
110
112
 
111
113
  executeAchTransaction(request: BankAccountAchTransferRequest): Promise<FiadoApiResponse<BankAccountAchTransferResponse>>;
112
114
 
115
+ executeMCSendTransaction(request: BankAccountMCSendTransferRequest): Promise<FiadoApiResponse<BankAccountMCSendTransferResponse>>;
116
+
113
117
  executeFinancialOperationReversal(request: ProviderTransactionReversalRequest): Promise<FiadoApiResponse<ProviderTransactionReversalResponse>>;
114
118
 
115
119
  getCardholderACHBankAccounts(externalUserId: string): Promise<FiadoApiResponse<GetExternalBankAccountResponse[]>>;