@fiado/api-invoker 1.5.12 → 1.5.13

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.
@@ -14,9 +14,4 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
14
14
  update(directoryId: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
15
15
  updateByAccountNumber(accountNumber: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
16
16
  getAccountByAccountNumber(accountNumber: string): Promise<ApiGatewayResponse<void>>;
17
- getAccountListByDateMinorOrEqual(params: {
18
- index?: string | null;
19
- pageSize?: string;
20
- date?: string;
21
- }): Promise<ApiGatewayResponse<any>>;
22
17
  }
@@ -46,20 +46,6 @@ let AccountPagoConfiadoApi = class AccountPagoConfiadoApi {
46
46
  const url = `${this.baseUrl}users/accountNumber/${accountNumber}`;
47
47
  return await this.httpRequest.get(url);
48
48
  }
49
- async getAccountListByDateMinorOrEqual(params) {
50
- let queryParams = [];
51
- if (params.index) {
52
- queryParams.push(`index=${params.index}`);
53
- }
54
- if (params.pageSize) {
55
- queryParams.push(`pageSize=${params.pageSize}`);
56
- }
57
- if (params.date) {
58
- queryParams.push(`date=${params.date}`);
59
- }
60
- const url = `${this.baseUrl}?${queryParams.join('&')}`;
61
- return await this.httpRequest.get(url);
62
- }
63
49
  };
64
50
  AccountPagoConfiadoApi = __decorate([
65
51
  (0, inversify_1.injectable)(),
@@ -9,9 +9,4 @@ export interface IAccountPagoConfiadoApi {
9
9
  updateByAccountNumber(accountNumber: string, data: AccountUpdateRequest): Promise<ApiGatewayResponse<void>>;
10
10
  getAccountByAccountNumber(accountNumber: string): Promise<ApiGatewayResponse<void>>;
11
11
  cancelAccount(directoryId: string, accountNumber?: string, documentNumber?: string): Promise<ApiGatewayResponse<void>>;
12
- getAccountListByDateMinorOrEqual(params: {
13
- index?: string | null;
14
- pageSize?: string;
15
- date?: string;
16
- }): Promise<ApiGatewayResponse<any>>;
17
12
  }
@@ -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 });
File without changes
File without changes
@@ -24,4 +24,5 @@ export default class OnboardingBusinessApi implements IOnboardingBusinessApi {
24
24
  index?: string;
25
25
  pageSize?: string;
26
26
  }): Promise<any>;
27
+ getBatchByIds(ids: string[]): Promise<any>;
27
28
  }
@@ -90,6 +90,10 @@ let OnboardingBusinessApi = class OnboardingBusinessApi {
90
90
  const url = `${this.baseUrl}private/getList`;
91
91
  return await this.httpRequest.get(`${url}`);
92
92
  }
93
+ async getBatchByIds(ids) {
94
+ const url = `${this.baseUrl}private/getBatchByIds`;
95
+ return await this.httpRequest.post(`${url}`, { ids });
96
+ }
93
97
  };
94
98
  OnboardingBusinessApi = __decorate([
95
99
  (0, inversify_1.injectable)(),
@@ -19,4 +19,5 @@ export interface IOnboardingBusinessApi {
19
19
  index?: string;
20
20
  pageSize?: string;
21
21
  }): Promise<any>;
22
+ getBatchByIds(ids: string[]): Promise<any>;
22
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.5.12",
3
+ "version": "1.5.13",
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.50",
17
17
  "@fiado/http-client": "^1.0.7",
18
18
  "@fiado/logger": "^1.0.3",
19
- "@fiado/type-kit": "^2.0.76",
19
+ "@fiado/type-kit": "^2.1.14",
20
20
  "dotenv": "^16.4.7",
21
21
  "inversify": "^6.2.2",
22
22
  "reflect-metadata": "^0.2.2"
@@ -9,7 +9,7 @@ import { Provider } from "@fiado/type-kit/bin/provider";
9
9
  export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
10
10
  private readonly baseUrl = process.env.ACCOUNT_PAGOCONFIADO_LAMBDA_URL || "";
11
11
 
12
- constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
12
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
13
13
 
14
14
  async cancelAccount(directoryId:string,accountNumber?: string, documentNumber?: string): Promise<ApiGatewayResponse<void>> {
15
15
  const url = `${this.baseUrl}/cancel`;
@@ -45,24 +45,4 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
45
45
  const url = `${this.baseUrl}users/accountNumber/${accountNumber}`;
46
46
  return await this.httpRequest.get(url);
47
47
  }
48
-
49
- async getAccountListByDateMinorOrEqual(params: { index?: string | null; pageSize?: string; date?: string; }): Promise<ApiGatewayResponse<any>> {
50
-
51
- let queryParams = [];
52
-
53
- if (params.index) {
54
- queryParams.push(`index=${params.index}`);
55
- }
56
-
57
- if (params.pageSize) {
58
- queryParams.push(`pageSize=${params.pageSize}`);
59
- }
60
-
61
- if (params.date) {
62
- queryParams.push(`date=${params.date}`);
63
- }
64
-
65
- const url = `${this.baseUrl}?${queryParams.join('&')}`;
66
- return await this.httpRequest.get(url);
67
- }
68
48
  }
@@ -5,14 +5,14 @@ import {
5
5
  AccountUpdateRequest,
6
6
  GetAccountResponse
7
7
  } from "@fiado/type-kit/bin/account";
8
- import { ApiGatewayResponse } from "@fiado/gateway-adapter";
8
+ import {ApiGatewayResponse} from "@fiado/gateway-adapter";
9
9
  import { Provider } from "@fiado/type-kit/bin/provider";
10
10
 
11
11
 
12
12
  export interface IAccountPagoConfiadoApi {
13
13
  createAccount(provider: Provider, data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
14
14
 
15
- getAccountByDirectoryId(directoryId: string, provider: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
15
+ getAccountByDirectoryId(directoryId: string, provider:string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
16
16
 
17
17
  updateAccountBalance(accountId: string, params: AccountUpdateBalanceRequest): Promise<ApiGatewayResponse<Boolean>>;
18
18
 
@@ -22,14 +22,5 @@ export interface IAccountPagoConfiadoApi {
22
22
 
23
23
  getAccountByAccountNumber(accountNumber: string): Promise<ApiGatewayResponse<void>>;
24
24
 
25
- cancelAccount(directoryId: string, accountNumber?: string, documentNumber?: string): Promise<ApiGatewayResponse<void>>;
26
-
27
- getAccountListByDateMinorOrEqual(
28
- params: {
29
-
30
- index?: string | null,
31
- pageSize?: string,
32
- date?: string,
33
- }
34
- ): Promise<ApiGatewayResponse<any>>;
25
+ cancelAccount(directoryId:string,accountNumber?:string,documentNumber?:string): Promise<ApiGatewayResponse<void>>;
35
26
  }
@@ -85,7 +85,11 @@ export default class OnboardingBusinessApi implements IOnboardingBusinessApi {
85
85
  const url = `${this.baseUrl}private/getList`;
86
86
  return await this.httpRequest.get(`${url}`);
87
87
  }
88
-
88
+
89
+ async getBatchByIds(ids: string[]): Promise<any> {
90
+ const url = `${this.baseUrl}private/getBatchByIds`;
91
+ return await this.httpRequest.post(`${url}`, { ids });
92
+ }
89
93
 
90
94
  }
91
95
 
@@ -5,4 +5,6 @@ export interface IOnboardingBusinessApi {
5
5
  getByReferralCode(params:{referralCode: string; index?: string; pageSize?: string;}): Promise<any>
6
6
  getByMyReferralCode(referralCode: string): Promise<any>
7
7
  getList(params:{index?: string; pageSize?: string; }): Promise<any>
8
+
9
+ getBatchByIds(ids: string[]): Promise<any>
8
10
  }