@fiado/api-invoker 1.2.78 → 1.2.79

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.
@@ -2,12 +2,13 @@ import { IAccountFiadoSAApi } from "./interfaces/IAccountFiadoSAApi";
2
2
  import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse, SPEITransferUpdateRequest } from "@fiado/type-kit/bin/account";
3
3
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
4
4
  import { IHttpRequest } from "@fiado/http-client";
5
+ import { Provider } from "@fiado/type-kit/bin/provider";
5
6
  export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
6
7
  private httpRequest;
7
8
  private readonly baseUrl;
8
9
  constructor(httpRequest: IHttpRequest);
9
10
  cancelAccount(directoryId: string, accountNumber: string, documentNumber: string): Promise<ApiGatewayResponse<void>>;
10
- createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
11
+ createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
11
12
  getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
12
13
  update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
13
14
  updateSpeiTransferRequest(transactionNumber: string, input: Partial<SPEITransferUpdateRequest>): Promise<ApiGatewayResponse<void>>;
@@ -22,7 +22,7 @@ let AccountFiadoSAApi = class AccountFiadoSAApi {
22
22
  const url = `${this.baseUrl}/cancel`;
23
23
  return await this.httpRequest.post(url, { directoryId, accountNumber, documentNumber });
24
24
  }
25
- async createAccount(data) {
25
+ async createAccount(provider, data) {
26
26
  const url = `${this.baseUrl}`;
27
27
  return await this.httpRequest.post(url, data);
28
28
  }
@@ -1,7 +1,8 @@
1
1
  import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse, SPEITransferUpdateRequest } from "@fiado/type-kit/bin/account";
2
2
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
3
+ import { Provider } from "@fiado/type-kit/bin/provider";
3
4
  export interface IAccountFiadoSAApi {
4
- createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
5
+ createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
5
6
  getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
6
7
  update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
7
8
  cancelAccount(directoryId: string, accountNumber: string, documentNumber: string): Promise<ApiGatewayResponse<void>>;
@@ -2,12 +2,13 @@ import { IAccountPagoConfiadoApi } from "./interfaces/IAccountPagoConfiadoApi";
2
2
  import { AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, AccountUpdateRequest, GetAccountResponse } from "@fiado/type-kit/bin/account";
3
3
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
4
4
  import { IHttpRequest } from "@fiado/http-client";
5
+ import { Provider } from "@fiado/type-kit/bin/provider";
5
6
  export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
6
7
  private httpRequest;
7
8
  private readonly baseUrl;
8
9
  constructor(httpRequest: IHttpRequest);
9
10
  cancelAccount(directoryId: string, accountNumber?: string, documentNumber?: string): Promise<ApiGatewayResponse<void>>;
10
- createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
11
+ createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
11
12
  getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
12
13
  updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
13
14
  update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
@@ -22,7 +22,7 @@ let AccountPagoConfiadoApi = class AccountPagoConfiadoApi {
22
22
  const url = `${this.baseUrl}/cancel`;
23
23
  return await this.httpRequest.post(url, { directoryId, accountNumber, documentNumber });
24
24
  }
25
- async createAccount(data) {
25
+ async createAccount(provider, data) {
26
26
  const url = `${this.baseUrl}`;
27
27
  return await this.httpRequest.post(url, data);
28
28
  }
@@ -1,7 +1,8 @@
1
1
  import { AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest, AccountUpdateRequest, GetAccountResponse } from "@fiado/type-kit/bin/account";
2
2
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
3
+ import { Provider } from "@fiado/type-kit/bin/provider";
3
4
  export interface IAccountPagoConfiadoApi {
4
- createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
5
+ createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
5
6
  getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
6
7
  updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
7
8
  update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
@@ -0,0 +1,46 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,7 @@
1
1
  import { CreateBankAccountRequest, CreateBankAccountUserRequest } from "@fiado/type-kit/bin/account";
2
2
  import { GetBankAccountUserRequest } from "@fiado/type-kit/bin/account/dtos/GetBankAccountUserRequest";
3
3
  import { GetBankAccountRequest } from "@fiado/type-kit/bin/account/dtos/GetBankAccountRequest";
4
- import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardRequest, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card";
4
+ import { ActivateBankAccountCardRequest, AssignCardRequest, CreateBankAccountCardRequest, UpdateBankAccountCardRequest, UpdateBankAccountCardResponse } from "@fiado/type-kit/bin/card";
5
5
  export interface ITernApi {
6
6
  getUser(request: GetBankAccountUserRequest): Promise<any>;
7
7
  getAccount(request: GetBankAccountRequest): Promise<any>;
@@ -11,7 +11,7 @@ export interface ITernApi {
11
11
  getCardsById(externalCardId: string): Promise<any>;
12
12
  createCard(request: CreateBankAccountCardRequest): Promise<any>;
13
13
  blockCard(request: UpdateBankAccountCardRequest): Promise<any>;
14
- changePin(request: UpdateBankAccountCardRequest): Promise<any>;
14
+ changePin(request: UpdateBankAccountCardRequest): Promise<UpdateBankAccountCardResponse>;
15
15
  updateCard(request: UpdateBankAccountCardRequest): Promise<any>;
16
16
  activateCard(request: ActivateBankAccountCardRequest): Promise<any>;
17
17
  assignCardToUser(request: AssignCardRequest): Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.2.78",
3
+ "version": "1.2.79",
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",
@@ -3,6 +3,7 @@ import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetA
3
3
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
4
4
  import { inject, injectable } from "inversify";
5
5
  import { IHttpRequest } from "@fiado/http-client";
6
+ import { Provider } from "@fiado/type-kit/bin/provider";
6
7
 
7
8
  @injectable()
8
9
  export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
@@ -16,7 +17,7 @@ export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
16
17
  return await this.httpRequest.post(url, { directoryId, accountNumber, documentNumber });
17
18
  }
18
19
 
19
- async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>> {
20
+ async createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>> {
20
21
  const url = `${this.baseUrl}`;
21
22
  return await this.httpRequest.post(url, data);
22
23
  }
@@ -1,9 +1,10 @@
1
1
  import { AccountCreateRequest, AccountCreateResponse, AccountUpdateRequest, GetAccountResponse, SPEITransferUpdateRequest } from "@fiado/type-kit/bin/account";
2
2
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
3
+ import { Provider } from "@fiado/type-kit/bin/provider";
3
4
 
4
5
 
5
6
  export interface IAccountFiadoSAApi {
6
- createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
7
+ createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
7
8
 
8
9
  getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
9
10
 
@@ -3,6 +3,7 @@ import {AccountCreateRequest, AccountCreateResponse, AccountUpdateBalanceRequest
3
3
  import {ApiGatewayResponse} from "@fiado/gateway-adapter";
4
4
  import {inject, injectable} from "inversify";
5
5
  import {IHttpRequest} from "@fiado/http-client";
6
+ import { Provider } from "@fiado/type-kit/bin/provider";
6
7
 
7
8
  @injectable()
8
9
  export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
@@ -15,7 +16,7 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
15
16
  return await this.httpRequest.post(url, {directoryId,accountNumber,documentNumber});
16
17
  }
17
18
 
18
- async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>> {
19
+ async createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>> {
19
20
  const url = `${this.baseUrl}`;
20
21
  return await this.httpRequest.post(url, data);
21
22
  }
@@ -6,10 +6,11 @@ import {
6
6
  GetAccountResponse
7
7
  } from "@fiado/type-kit/bin/account";
8
8
  import {ApiGatewayResponse} from "@fiado/gateway-adapter";
9
+ import { Provider } from "@fiado/type-kit/bin/provider";
9
10
 
10
11
 
11
12
  export interface IAccountPagoConfiadoApi {
12
- createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
13
+ createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
13
14
 
14
15
  getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
15
16
 
@@ -5,7 +5,8 @@ import {
5
5
  ActivateBankAccountCardRequest,
6
6
  AssignCardRequest,
7
7
  CreateBankAccountCardRequest,
8
- UpdateBankAccountCardRequest
8
+ UpdateBankAccountCardRequest,
9
+ UpdateBankAccountCardResponse
9
10
  } from "@fiado/type-kit/bin/card";
10
11
 
11
12
  export interface ITernApi {
@@ -25,7 +26,7 @@ export interface ITernApi {
25
26
 
26
27
  blockCard(request: UpdateBankAccountCardRequest): Promise<any>;
27
28
 
28
- changePin(request: UpdateBankAccountCardRequest): Promise<any>;
29
+ changePin(request: UpdateBankAccountCardRequest): Promise<UpdateBankAccountCardResponse>;
29
30
 
30
31
  updateCard(request: UpdateBankAccountCardRequest): Promise<any>;
31
32