@fiado/api-invoker 1.0.44 → 1.0.46

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.
@@ -1,5 +1,5 @@
1
1
  import { IAccountFiadoIncApi } from "./interfaces/IAccountFiadoIncApi";
2
- import { AccountCreateRequest, AccountCreateResponse } from "@fiado/type-kit/bin/account";
2
+ import { AccountCreateRequest, AccountCreateResponse, GetAccountResponse } from "@fiado/type-kit/bin/account";
3
3
  import { IHttpRequest } from "@fiado/http-client";
4
4
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
5
5
  export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
@@ -7,4 +7,5 @@ export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
7
7
  private readonly baseUrl;
8
8
  constructor(httpRequest: IHttpRequest);
9
9
  createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
10
+ getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
10
11
  }
@@ -22,6 +22,10 @@ let AccountFiadoIncApi = class AccountFiadoIncApi {
22
22
  const url = `${this.baseUrl}`;
23
23
  return await this.httpRequest.post(url, data);
24
24
  }
25
+ async getAccountByDirectoryId(directoryId) {
26
+ const url = `${this.baseUrl}/${directoryId}`;
27
+ return await this.httpRequest.get(url);
28
+ }
25
29
  };
26
30
  AccountFiadoIncApi = __decorate([
27
31
  (0, inversify_1.injectable)(),
@@ -1,5 +1,6 @@
1
- import { AccountCreateRequest, AccountCreateResponse } from "@fiado/type-kit/bin/account";
1
+ import { AccountCreateRequest, AccountCreateResponse, GetAccountResponse } from "@fiado/type-kit/bin/account";
2
2
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
3
3
  export interface IAccountFiadoIncApi {
4
4
  createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
5
+ getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
5
6
  }
@@ -6,5 +6,5 @@ export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
6
6
  private httpRequest;
7
7
  private readonly baseUrl;
8
8
  constructor(httpRequest: IHttpRequest);
9
- createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
9
+ createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
10
10
  }
@@ -1,5 +1,5 @@
1
1
  import { AccountCreateRequest, AccountCreateResponse } from "@fiado/type-kit/bin/account";
2
2
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
3
3
  export interface IAccountFiadoSAApi {
4
- createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
4
+ createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import { IAccountPagoConfiadoApi } from "./interfaces/IAccountPagoConfiadoApi";
2
- import { AccountCreateRequest, AccountCreateResponse } from "@fiado/type-kit/bin/account";
2
+ import { AccountCreateRequest, AccountCreateResponse, GetAccountResponse } from "@fiado/type-kit/bin/account";
3
3
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
4
4
  import { IHttpRequest } from "@fiado/http-client";
5
5
  export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
@@ -7,4 +7,5 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
7
7
  private readonly baseUrl;
8
8
  constructor(httpRequest: IHttpRequest);
9
9
  createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
10
+ getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
10
11
  }
@@ -22,6 +22,10 @@ let AccountPagoConfiadoApi = class AccountPagoConfiadoApi {
22
22
  const url = `${this.baseUrl}`;
23
23
  return await this.httpRequest.post(url, data);
24
24
  }
25
+ async getAccountByDirectoryId(directoryId) {
26
+ const url = `${this.baseUrl}/${directoryId}`;
27
+ return await this.httpRequest.get(url);
28
+ }
25
29
  };
26
30
  AccountPagoConfiadoApi = __decorate([
27
31
  (0, inversify_1.injectable)(),
@@ -1,5 +1,6 @@
1
- import { AccountCreateRequest, AccountCreateResponse } from "@fiado/type-kit/bin/account";
1
+ import { AccountCreateRequest, AccountCreateResponse, GetAccountResponse } from "@fiado/type-kit/bin/account";
2
2
  import { ApiGatewayResponse } from "@fiado/gateway-adapter";
3
3
  export interface IAccountPagoConfiadoApi {
4
4
  createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
5
+ getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "description": "Sirve como un puente entre diferentes funciones lambda, facilitando la comunicación entre ellas a traves de invocaciones http",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  "@fiado/api-invoker": "^1.0.19",
17
17
  "@fiado/gateway-adapter": "^1.0.30",
18
18
  "@fiado/http-client": "^1.0.1",
19
- "@fiado/type-kit": "^1.0.89",
19
+ "@fiado/type-kit": "^1.0.92",
20
20
  "dotenv": "^16.4.5",
21
21
  "inversify": "^6.0.2",
22
22
  "reflect-metadata": "^0.2.1",
@@ -1,5 +1,5 @@
1
1
  import {IAccountFiadoIncApi} from "./interfaces/IAccountFiadoIncApi";
2
- import {AccountCreateRequest, AccountCreateResponse} from "@fiado/type-kit/bin/account";
2
+ import {AccountCreateRequest, AccountCreateResponse, GetAccountResponse} from "@fiado/type-kit/bin/account";
3
3
  import {inject, injectable} from "inversify";
4
4
  import {IHttpRequest} from "@fiado/http-client";
5
5
  import {ApiGatewayResponse} from "@fiado/gateway-adapter";
@@ -15,4 +15,9 @@ export default class AccountFiadoIncApi implements IAccountFiadoIncApi {
15
15
  const url = `${this.baseUrl}`;
16
16
  return await this.httpRequest.post(url, data);
17
17
  }
18
+
19
+ async getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>> {
20
+ const url = `${this.baseUrl}/${directoryId}`;
21
+ return await this.httpRequest.get(url);
22
+ }
18
23
  }
@@ -1,7 +1,9 @@
1
- import { AccountCreateRequest, AccountCreateResponse } from "@fiado/type-kit/bin/account";
1
+ import {AccountCreateRequest, AccountCreateResponse, GetAccountResponse} from "@fiado/type-kit/bin/account";
2
2
  import {ApiGatewayResponse} from "@fiado/gateway-adapter";
3
3
 
4
4
 
5
5
  export interface IAccountFiadoIncApi {
6
6
  createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
7
+
8
+ getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
7
9
  }
@@ -11,7 +11,7 @@ export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
11
11
  constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
12
12
  }
13
13
 
14
- async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>> {
14
+ async createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>> {
15
15
  const url = `${this.baseUrl}`;
16
16
  return await this.httpRequest.post(url, data);
17
17
  }
@@ -3,5 +3,5 @@ import {ApiGatewayResponse} from "@fiado/gateway-adapter";
3
3
 
4
4
 
5
5
  export interface IAccountFiadoSAApi {
6
- createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
6
+ createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import {IAccountPagoConfiadoApi} from "./interfaces/IAccountPagoConfiadoApi";
2
- import {AccountCreateRequest, AccountCreateResponse} from "@fiado/type-kit/bin/account";
2
+ import {AccountCreateRequest, AccountCreateResponse, GetAccountResponse} from "@fiado/type-kit/bin/account";
3
3
  import {ApiGatewayResponse} from "@fiado/gateway-adapter";
4
4
  import {inject, injectable} from "inversify";
5
5
  import {IHttpRequest} from "@fiado/http-client";
@@ -15,4 +15,9 @@ export default class AccountPagoConfiadoApi implements IAccountPagoConfiadoApi {
15
15
  const url = `${this.baseUrl}`;
16
16
  return await this.httpRequest.post(url, data);
17
17
  }
18
+
19
+ async getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>> {
20
+ const url = `${this.baseUrl}/${directoryId}`;
21
+ return await this.httpRequest.get(url);
22
+ }
18
23
  }
@@ -1,7 +1,9 @@
1
- import {AccountCreateRequest, AccountCreateResponse} from "@fiado/type-kit/bin/account";
1
+ import {AccountCreateRequest, AccountCreateResponse, GetAccountResponse} from "@fiado/type-kit/bin/account";
2
2
  import {ApiGatewayResponse} from "@fiado/gateway-adapter";
3
3
 
4
4
 
5
5
  export interface IAccountPagoConfiadoApi {
6
6
  createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse>>;
7
+
8
+ getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
7
9
  }