@fiado/api-invoker 1.0.46 → 1.0.47

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 { IAccountFiadoSAApi } from "./interfaces/IAccountFiadoSAApi";
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 AccountFiadoSAApi implements IAccountFiadoSAApi {
@@ -7,4 +7,5 @@ export default class AccountFiadoSAApi implements IAccountFiadoSAApi {
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 AccountFiadoSAApi = class AccountFiadoSAApi {
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
  AccountFiadoSAApi = __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 IAccountFiadoSAApi {
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.46",
3
+ "version": "1.0.47",
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",
@@ -1,5 +1,5 @@
1
1
  import {IAccountFiadoSAApi} from "./interfaces/IAccountFiadoSAApi";
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 AccountFiadoSAApi implements IAccountFiadoSAApi {
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,10 @@
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 IAccountFiadoSAApi {
6
6
  createAccount(data: AccountCreateRequest): Promise<ApiGatewayResponse<AccountCreateResponse[]>>;
7
+
8
+ getAccountByDirectoryId(directoryId: string): Promise<ApiGatewayResponse<GetAccountResponse[]>>;
9
+
7
10
  }