@fiado/api-invoker 1.0.49 → 1.0.51

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.
@@ -17,6 +17,7 @@ const AccountFiadoSAApi_1 = __importDefault(require("./account-fiadosa/AccountFi
17
17
  const STPAccountApi_1 = __importDefault(require("./stpAccount/api/STPAccountApi"));
18
18
  const sessionActivity_1 = require("./sessionActivity");
19
19
  const ExchangeRatesApi_1 = __importDefault(require("./exchangeRates/ExchangeRatesApi"));
20
+ const authentication_1 = require("./authentication");
20
21
  exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
21
22
  bind("IDirectoryApi").to(directory_1.DirectoryApi);
22
23
  bind("IIdentityApi").to(identity_1.IdentityApi);
@@ -30,4 +31,5 @@ exports.apiInvokerBindings = new inversify_1.ContainerModule((bind) => {
30
31
  bind("IAccountFiadoSAApi").to(AccountFiadoSAApi_1.default);
31
32
  bind("INotificationMessagesPublisher").to(NotificationMessagePublisher_1.default);
32
33
  bind("ISessionActivityPublisher").to(sessionActivity_1.SessionActivityPublisher);
34
+ bind("IAuthenticationApi").to(authentication_1.AuthenticationApi);
33
35
  });
@@ -9,4 +9,5 @@ export declare class DirectoryApi implements IDirectoryApi {
9
9
  updateExternalUserId(directoryId: string, provider: Provider, externalUserId: string): Promise<void>;
10
10
  updateScope(directoryId: string, scope: string[]): Promise<void>;
11
11
  getByOwnerDirectoryId(ownerDirectoryId: string): Promise<any>;
12
+ getByPhoneNumber(phoneNumber: string): Promise<any>;
12
13
  }
@@ -58,6 +58,11 @@ let DirectoryApi = class DirectoryApi {
58
58
  const operationName = "getByOwnerDirectoryId";
59
59
  return await this.httpRequest.post(`${url}`, null, { 'operationName': operationName });
60
60
  }
61
+ async getByPhoneNumber(phoneNumber) {
62
+ const url = `${this.baseUrl}?phoneNumber=${phoneNumber}`;
63
+ const operationName = "getUserInfoByParams";
64
+ return await this.httpRequest.post(`${url}`, null, { 'operationName': operationName });
65
+ }
61
66
  };
62
67
  exports.DirectoryApi = DirectoryApi;
63
68
  exports.DirectoryApi = DirectoryApi = __decorate([
@@ -36,4 +36,12 @@ export interface IDirectoryApi {
36
36
  * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
37
37
  */
38
38
  getByOwnerDirectoryId(ownerDirectoryId: string): Promise<any>;
39
+ /**
40
+ * Obtiene un directorio por su número de teléfono.
41
+ * @param phoneNumber Número de teléfono a buscar.
42
+ * @returns Una promesa que resuelve a un objeto de directorio.
43
+ * Puede devolver un objeto vacío si no se encuentra coincidencia.
44
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
45
+ */
46
+ getByPhoneNumber(phoneNumber: string): Promise<any>;
39
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
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",
@@ -19,6 +19,7 @@ import STPAccountApi from "./stpAccount/api/STPAccountApi";
19
19
  import {ISessionActivityPublisher, SessionActivityPublisher} from "./sessionActivity";
20
20
  import {IExchangeRatesApi} from "./exchangeRates";
21
21
  import ExchangeRatesApi from "./exchangeRates/ExchangeRatesApi";
22
+ import { AuthenticationApi, IAuthenticationApi } from "./authentication";
22
23
 
23
24
  export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) => {
24
25
  bind<IDirectoryApi>("IDirectoryApi").to(DirectoryApi);
@@ -33,4 +34,5 @@ export const apiInvokerBindings = new ContainerModule((bind: interfaces.Bind) =>
33
34
  bind<IAccountFiadoSAApi>("IAccountFiadoSAApi").to(AccountFiadoSAApi);
34
35
  bind<INotificationMessagesPublisher>("INotificationMessagesPublisher").to(NotificationMessagePublisher);
35
36
  bind<ISessionActivityPublisher>("ISessionActivityPublisher").to(SessionActivityPublisher);
37
+ bind<IAuthenticationApi>("IAuthenticationApi").to(AuthenticationApi);
36
38
  });
@@ -61,6 +61,14 @@ export class DirectoryApi implements IDirectoryApi {
61
61
  const operationName = "getByOwnerDirectoryId";
62
62
 
63
63
 
64
+ return await this.httpRequest.post(`${url}`, null, { 'operationName': operationName });
65
+ }
66
+
67
+ public async getByPhoneNumber(phoneNumber: string): Promise<any> {
68
+
69
+ const url = `${this.baseUrl}?phoneNumber=${phoneNumber}`;
70
+ const operationName = "getUserInfoByParams";
71
+
64
72
  return await this.httpRequest.post(`${url}`, null, { 'operationName': operationName });
65
73
  }
66
74
  }
@@ -41,4 +41,13 @@ export interface IDirectoryApi {
41
41
  * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
42
42
  */
43
43
  getByOwnerDirectoryId(ownerDirectoryId: string): Promise<any>
44
+
45
+ /**
46
+ * Obtiene un directorio por su número de teléfono.
47
+ * @param phoneNumber Número de teléfono a buscar.
48
+ * @returns Una promesa que resuelve a un objeto de directorio.
49
+ * Puede devolver un objeto vacío si no se encuentra coincidencia.
50
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
51
+ */
52
+ getByPhoneNumber(phoneNumber: string): Promise<any>
44
53
  }