@fiado/api-invoker 1.1.60 → 1.1.62

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.
Files changed (118) hide show
  1. package/README.md +64 -64
  2. package/bin/directory/DirectoryApi.d.ts +1 -1
  3. package/bin/directory/interfaces/IDirectoryApi.d.ts +1 -1
  4. package/bin/index.d.ts +1 -0
  5. package/bin/index.js +1 -0
  6. package/bin/pomeloProcessor/api/PomeloProcessorApi.d.ts +8 -0
  7. package/bin/pomeloProcessor/api/PomeloProcessorApi.js +32 -0
  8. package/bin/pomeloProcessor/api/interfaces/IPomeloProcessorApi.d.ts +3 -0
  9. package/bin/pomeloProcessor/api/interfaces/IPomeloProcessorApi.js +2 -0
  10. package/bin/pomeloProcessor/index.d.ts +2 -0
  11. package/bin/pomeloProcessor/index.js +18 -0
  12. package/package.json +28 -28
  13. package/src/account-beneficiary/AccountBeneficiaryApi.ts +18 -18
  14. package/src/account-beneficiary/index.ts +2 -2
  15. package/src/account-beneficiary/interfaces/IAccountBeneficiaryApi.ts +7 -7
  16. package/src/account-fiadoinc/AccountFiadoIncApi.ts +65 -65
  17. package/src/account-fiadoinc/index.ts +1 -1
  18. package/src/account-fiadoinc/interfaces/IAccountFiadoIncApi.ts +32 -32
  19. package/src/account-fiadosa/AccountFiadoSAApi.ts +32 -32
  20. package/src/account-fiadosa/index.ts +1 -1
  21. package/src/account-fiadosa/interfaces/IAccountFiadoSAApi.ts +13 -13
  22. package/src/account-pagoconfiado/AccountPagoConfiadoApi.ts +46 -46
  23. package/src/account-pagoconfiado/index.ts +2 -2
  24. package/src/account-pagoconfiado/interfaces/IAccountPagoConfiadoApi.ts +24 -24
  25. package/src/activity-business/ActivityApi.ts +34 -34
  26. package/src/activity-business/index.ts +5 -5
  27. package/src/activity-business/interfaces/IActivityApi.ts +9 -9
  28. package/src/activity-business/queue/ActivityPublisher.ts +28 -28
  29. package/src/activity-business/queue/IActivityPublisher.ts +4 -4
  30. package/src/address/AddressApi.ts +46 -46
  31. package/src/address/index.ts +3 -3
  32. package/src/address/interfaces/IAddressApi.ts +30 -30
  33. package/src/authentication/AuthenticationApi.ts +16 -16
  34. package/src/authentication/index.ts +4 -4
  35. package/src/authentication/interfaces/IAuthenticationApi.ts +5 -5
  36. package/src/bankAccount/BankAccountApi.ts +48 -48
  37. package/src/bankAccount/index.ts +1 -1
  38. package/src/bankAccount/interfaces/IBankAccountApi.ts +6 -6
  39. package/src/bbvaRst/api/BBVARstApi.ts +16 -16
  40. package/src/bbvaRst/api/interfaces/IBBVARstApi.ts +4 -4
  41. package/src/bbvaRst/index.ts +1 -1
  42. package/src/card/CardApi.ts +36 -36
  43. package/src/card/index.ts +3 -3
  44. package/src/card/interfaces/ICardApi.ts +10 -10
  45. package/src/cnbv-business/CnbvApi.ts +22 -22
  46. package/src/cnbv-business/index.ts +4 -4
  47. package/src/cnbv-business/interfaces/ICnbvApi.ts +6 -6
  48. package/src/collector/CollectorApi.ts +25 -25
  49. package/src/collector/index.ts +2 -2
  50. package/src/collector/interfaces/ICollectorApi.ts +21 -21
  51. package/src/contactInformation/ContactInformationApi.ts +20 -20
  52. package/src/contactInformation/index.ts +2 -2
  53. package/src/contactInformation/interface/IContactInformationApi.ts +8 -8
  54. package/src/container.config.ts +88 -88
  55. package/src/contract-generator/ContractGeneratorApi.ts +18 -18
  56. package/src/contract-generator/index.ts +2 -2
  57. package/src/contract-generator/interfaces/IContractGeneratorApi.ts +16 -16
  58. package/src/directory/DirectoryApi.ts +128 -128
  59. package/src/directory/index.ts +3 -3
  60. package/src/directory/interfaces/IDirectoryApi.ts +63 -63
  61. package/src/exchangeRates/ExchangeRatesApi.ts +27 -27
  62. package/src/exchangeRates/index.ts +1 -1
  63. package/src/exchangeRates/interfaces/IExchangeRatesApi.ts +8 -8
  64. package/src/fiadoMessages/api/FiadoMessagesApi.ts +20 -20
  65. package/src/fiadoMessages/api/interfaces/IFiadoMessagesApi.ts +2 -2
  66. package/src/fiadoMessages/index.ts +1 -1
  67. package/src/fraudPreventionEngine/api/FraudPreventionEngineApi.ts +22 -22
  68. package/src/fraudPreventionEngine/api/interfaces/IFraudPreventionEngineApi.ts +7 -7
  69. package/src/fraudPreventionEngine/index.ts +1 -1
  70. package/src/group/GroupApi.ts +24 -24
  71. package/src/group/index.ts +1 -1
  72. package/src/group/interfaces/IGroupApi.ts +23 -23
  73. package/src/identity/IdentityApi.ts +47 -47
  74. package/src/identity/index.ts +3 -3
  75. package/src/identity/interfaces/IIdentityApi.ts +33 -33
  76. package/src/index.ts +32 -31
  77. package/src/notificationMessages/index.ts +1 -1
  78. package/src/notificationMessages/queue/NotificationMessagePublisher.ts +22 -22
  79. package/src/notificationMessages/queue/interfaces/INotificationMessagesPublisher.ts +4 -4
  80. package/src/p2pContact/api/P2pContactApi.ts +19 -19
  81. package/src/p2pContact/api/interfaces/IP2pContactApi.ts +4 -4
  82. package/src/p2pContact/index.ts +1 -1
  83. package/src/pomelo/api/PomeloApi.ts +99 -99
  84. package/src/pomelo/api/interfaces/IPomeloApi.ts +27 -27
  85. package/src/pomelo/index.ts +1 -1
  86. package/src/pomeloProcessor/api/PomeloProcessorApi.ts +18 -0
  87. package/src/pomeloProcessor/api/interfaces/IPomeloProcessorApi.ts +3 -0
  88. package/src/pomeloProcessor/index.ts +2 -0
  89. package/src/product-catalog/ProductCatalogApi.ts +17 -17
  90. package/src/product-catalog/index.ts +1 -1
  91. package/src/product-catalog/interfaces/IProductCatalogApi.ts +6 -6
  92. package/src/riskProfile/api/RiskProfileApi.ts +29 -29
  93. package/src/riskProfile/api/interfaces/IRiskProfileApi.ts +10 -10
  94. package/src/riskProfile/index.ts +4 -4
  95. package/src/riskProfile/queue/TransactionAlarmPublisher.ts +24 -24
  96. package/src/riskProfile/queue/interfaces/ITransactionAlarmPublisher.ts +4 -4
  97. package/src/sessionActivity/index.ts +2 -2
  98. package/src/sessionActivity/queue/SessionActivityPublisher.ts +22 -22
  99. package/src/sessionActivity/queue/interfaces/ISessionActivityPublisher.ts +4 -4
  100. package/src/stpAccount/api/STPAccountApi.ts +111 -111
  101. package/src/stpAccount/api/interfaces/ISTPAccountApi.ts +7 -7
  102. package/src/stpAccount/index.ts +1 -1
  103. package/src/stpServicePayment/api/StpServicePaymentApi.ts +40 -40
  104. package/src/stpServicePayment/api/interfaces/IStpServicePaymentApi.ts +13 -13
  105. package/src/stpServicePayment/index.ts +1 -1
  106. package/src/stpSpei/api/StpSpeiApi.ts +32 -32
  107. package/src/stpSpei/api/interfaces/IStpSpeiApi.ts +6 -6
  108. package/src/stpSpei/index.ts +1 -1
  109. package/src/tern/api/TernApi.ts +137 -137
  110. package/src/tern/api/interfaces/ITernApi.ts +38 -38
  111. package/src/tern/index.ts +1 -1
  112. package/src/transaction/index.ts +2 -2
  113. package/src/transaction/queue/TransactionPublisher.ts +24 -24
  114. package/src/transaction/queue/interfaces/ITransactionPublisher.ts +4 -4
  115. package/src/transactionProcessor/api/TransactionProcessorApi.ts +37 -37
  116. package/src/transactionProcessor/api/interfaces/ITransactionProcessorApi.ts +15 -15
  117. package/src/transactionProcessor/index.ts +1 -1
  118. package/tsconfig.json +21 -21
@@ -1,63 +1,63 @@
1
- import { Profile } from "@fiado/type-kit/bin/directory/enums/Profile";
2
- import { Status } from "@fiado/type-kit/bin/directory/enums/Status";
3
- import { Provider } from "@fiado/type-kit/bin/provider";
4
-
5
- /**
6
- * Interfaz para el servicio Directory que permite operaciones sobre directorios.
7
- */
8
- export interface IDirectoryApi {
9
- /**
10
- * Obtiene una lista de directorios por sus IDs.
11
- * @param ids Array de IDs de directorios (UUIDs) a buscar.
12
- * @returns Una promesa que resuelve a un arreglo de objetos de directorio.
13
- * Puede devolver un arreglo vacío si no se encuentran coincidencias.
14
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
15
- */
16
- getByIds(ids: string[]): Promise<any>;
17
-
18
- /**
19
- * Actualiza el ID de usuario externo en un directorio.
20
- * @param directoryId ID del directorio (UUID) a actualizar.
21
- * @param provider Proveedor de autenticación del usuario.
22
- * @param externalUserId ID de usuario externo.
23
- * @returns Una promesa que resuelve a un objeto vacío.
24
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
25
- */
26
-
27
- updateExternalUserId(directoryId: string, provider: Provider, externalUserId: string): Promise<void>;
28
-
29
- /**
30
- * Actualiza el alcance de un directorio.
31
- * @param directoryId ID del directorio (UUID) a actualizar.
32
- * @param scope Alcance a actualizar.
33
- * @returns Una promesa que resuelve a un objeto vacío.
34
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
35
- */
36
- updateScope(directoryId: string, scope: string[]): Promise<void>;
37
-
38
- /**
39
- * Obtiene un directorio por su ID de directorio propietario.
40
- * @param ownerDirectoryId ID de directorio propietario (UUID) a buscar.
41
- * @returns Una promesa que resuelve a un objeto de directorio.
42
- * Puede devolver un objeto vacío si no se encuentra coincidencia.
43
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
44
- */
45
- getByOwnerDirectoryId(ownerDirectoryId: string): Promise<any>
46
-
47
- /**
48
- * Obtiene un directorio por su número de teléfono.
49
- * @param phoneNumber Número de teléfono a buscar.
50
- * @returns Una promesa que resuelve a un objeto de directorio.
51
- * Puede devolver un objeto vacío si no se encuentra coincidencia.
52
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
53
- */
54
- getByPhoneNumber(phoneNumber: string): Promise<any>
55
-
56
- addOwnerDirectoryId(directoryId: string, newOwnerDirectoryId): Promise<any>
57
-
58
- updateUserProfile(directoryId: string, profile: Profile): Promise<void>
59
-
60
- updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId): Promise<any>
61
-
62
- updateStatus(directoryId: string, status: Status.CANCELLED): Promise<void>
63
- }
1
+ import { Profile } from "@fiado/type-kit/bin/directory/enums/Profile";
2
+ import { Status } from "@fiado/type-kit/bin/directory/enums/Status";
3
+ import { Provider } from "@fiado/type-kit/bin/provider";
4
+
5
+ /**
6
+ * Interfaz para el servicio Directory que permite operaciones sobre directorios.
7
+ */
8
+ export interface IDirectoryApi {
9
+ /**
10
+ * Obtiene una lista de directorios por sus IDs.
11
+ * @param ids Array de IDs de directorios (UUIDs) a buscar.
12
+ * @returns Una promesa que resuelve a un arreglo de objetos de directorio.
13
+ * Puede devolver un arreglo vacío si no se encuentran coincidencias.
14
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
15
+ */
16
+ getByIds(ids: string[]): Promise<any>;
17
+
18
+ /**
19
+ * Actualiza el ID de usuario externo en un directorio.
20
+ * @param directoryId ID del directorio (UUID) a actualizar.
21
+ * @param provider Proveedor de autenticación del usuario.
22
+ * @param externalUserId ID de usuario externo.
23
+ * @returns Una promesa que resuelve a un objeto vacío.
24
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
25
+ */
26
+
27
+ updateExternalUserId(directoryId: string, provider: Provider, externalUserId: string): Promise<void>;
28
+
29
+ /**
30
+ * Actualiza el alcance de un directorio.
31
+ * @param directoryId ID del directorio (UUID) a actualizar.
32
+ * @param scope Alcance a actualizar.
33
+ * @returns Una promesa que resuelve a un objeto vacío.
34
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
35
+ */
36
+ updateScope(directoryId: string, scope: string[]): Promise<void>;
37
+
38
+ /**
39
+ * Obtiene un directorio por su ID de directorio propietario.
40
+ * @param ownerDirectoryId ID de directorio propietario (UUID) a buscar.
41
+ * @returns Una promesa que resuelve a un objeto de directorio.
42
+ * Puede devolver un objeto vacío si no se encuentra coincidencia.
43
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
44
+ */
45
+ getByOwnerDirectoryId(ownerDirectoryId: string): Promise<any>
46
+
47
+ /**
48
+ * Obtiene un directorio por su número de teléfono.
49
+ * @param phoneNumber Número de teléfono a buscar.
50
+ * @returns Una promesa que resuelve a un objeto de directorio.
51
+ * Puede devolver un objeto vacío si no se encuentra coincidencia.
52
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
53
+ */
54
+ getByPhoneNumber(phoneNumber: string): Promise<any>
55
+
56
+ addOwnerDirectoryId(directoryId: string, newOwnerDirectoryId): Promise<any>
57
+
58
+ updateUserProfile(directoryId: string, profile: Profile): Promise<void>
59
+
60
+ updateOwnerDirectoryId(directoryId: string, newOwnerDirectoryId): Promise<any>
61
+
62
+ updateStatus(directoryId: string, status: Status): Promise<void>
63
+ }
@@ -1,28 +1,28 @@
1
- import {IExchangeRatesApi} from "./interfaces/IExchangeRatesApi";
2
- import {inject, injectable} from "inversify";
3
- import {IHttpRequest} from "@fiado/http-client";
4
- import GetExchangeRatesRequest from "@fiado/type-kit/bin/exchangeRate/dtos/GetExchangeRatesRequest";
5
- import {ExchangeRateCreateRequest} from "@fiado/type-kit/bin/exchangeRate";
6
- import {promises} from "node:dns";
7
-
8
- @injectable()
9
- export default class ExchangeRatesApi implements IExchangeRatesApi {
10
- private readonly baseUrl = process.env.EXCHANGE_RATES_LAMBDA_URL || "";
11
-
12
- constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
13
- }
14
-
15
- async getExchangeRates(request: GetExchangeRatesRequest): Promise<any> {
16
- const headers = {
17
- "operationName": "getExchangeRates"
18
- }
19
- return await this.httpRequest.post(this.baseUrl, request, headers);
20
- }
21
-
22
- async postExchangeRates(request: ExchangeRateCreateRequest): Promise<any> {
23
- const headers = {
24
- "operationName": "postExchangeRates"
25
- }
26
- return await this.httpRequest.post(this.baseUrl, request, headers);
27
- }
1
+ import {IExchangeRatesApi} from "./interfaces/IExchangeRatesApi";
2
+ import {inject, injectable} from "inversify";
3
+ import {IHttpRequest} from "@fiado/http-client";
4
+ import GetExchangeRatesRequest from "@fiado/type-kit/bin/exchangeRate/dtos/GetExchangeRatesRequest";
5
+ import {ExchangeRateCreateRequest} from "@fiado/type-kit/bin/exchangeRate";
6
+ import {promises} from "node:dns";
7
+
8
+ @injectable()
9
+ export default class ExchangeRatesApi implements IExchangeRatesApi {
10
+ private readonly baseUrl = process.env.EXCHANGE_RATES_LAMBDA_URL || "";
11
+
12
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
13
+ }
14
+
15
+ async getExchangeRates(request: GetExchangeRatesRequest): Promise<any> {
16
+ const headers = {
17
+ "operationName": "getExchangeRates"
18
+ }
19
+ return await this.httpRequest.post(this.baseUrl, request, headers);
20
+ }
21
+
22
+ async postExchangeRates(request: ExchangeRateCreateRequest): Promise<any> {
23
+ const headers = {
24
+ "operationName": "postExchangeRates"
25
+ }
26
+ return await this.httpRequest.post(this.baseUrl, request, headers);
27
+ }
28
28
  }
@@ -1,2 +1,2 @@
1
- export * from './interfaces/IExchangeRatesApi';
1
+ export * from './interfaces/IExchangeRatesApi';
2
2
  export * from './ExchangeRatesApi';
@@ -1,9 +1,9 @@
1
- import GetExchangeRatesRequest from "@fiado/type-kit/bin/exchangeRate/dtos/GetExchangeRatesRequest";
2
- import {ExchangeRateCreateRequest} from "@fiado/type-kit/bin/exchangeRate";
3
-
4
-
5
- export interface IExchangeRatesApi {
6
- getExchangeRates(request: GetExchangeRatesRequest): Promise<any>;
7
-
8
- postExchangeRates(request: ExchangeRateCreateRequest): Promise<any>;
1
+ import GetExchangeRatesRequest from "@fiado/type-kit/bin/exchangeRate/dtos/GetExchangeRatesRequest";
2
+ import {ExchangeRateCreateRequest} from "@fiado/type-kit/bin/exchangeRate";
3
+
4
+
5
+ export interface IExchangeRatesApi {
6
+ getExchangeRates(request: GetExchangeRatesRequest): Promise<any>;
7
+
8
+ postExchangeRates(request: ExchangeRateCreateRequest): Promise<any>;
9
9
  }
@@ -1,21 +1,21 @@
1
- import {inject, injectable} from "inversify";
2
- import {IHttpRequest} from "@fiado/http-client";
3
- import {IFiadoMessagesApi} from "./interfaces/IFiadoMessagesApi";
4
-
5
- @injectable()
6
- export class FiadoMessagesApi implements IFiadoMessagesApi {
7
- private readonly baseUrl = process.env.MESSAGE_LAMBDA_URL || "";
8
-
9
- constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
10
- }
11
-
12
- async getValidatedOtpByDirectoryIdAndOtpCode(directoryId: string, otpCode: string): Promise<any> {
13
- const url: string = `${this.baseUrl}`;
14
- const operationName: string = "getValidatedOtpByDirectoryIdAndOtpCode";
15
- const request = {
16
- directoryId: directoryId,
17
- otpCode: otpCode
18
- };
19
- return await this.httpRequest.post(`${url}`, request, {'operationName': operationName});
20
- }
1
+ import {inject, injectable} from "inversify";
2
+ import {IHttpRequest} from "@fiado/http-client";
3
+ import {IFiadoMessagesApi} from "./interfaces/IFiadoMessagesApi";
4
+
5
+ @injectable()
6
+ export class FiadoMessagesApi implements IFiadoMessagesApi {
7
+ private readonly baseUrl = process.env.MESSAGE_LAMBDA_URL || "";
8
+
9
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
10
+ }
11
+
12
+ async getValidatedOtpByDirectoryIdAndOtpCode(directoryId: string, otpCode: string): Promise<any> {
13
+ const url: string = `${this.baseUrl}`;
14
+ const operationName: string = "getValidatedOtpByDirectoryIdAndOtpCode";
15
+ const request = {
16
+ directoryId: directoryId,
17
+ otpCode: otpCode
18
+ };
19
+ return await this.httpRequest.post(`${url}`, request, {'operationName': operationName});
20
+ }
21
21
  }
@@ -1,3 +1,3 @@
1
- export interface IFiadoMessagesApi {
2
- getValidatedOtpByDirectoryIdAndOtpCode(directoryId: string, otpCode: string): Promise<any>;
1
+ export interface IFiadoMessagesApi {
2
+ getValidatedOtpByDirectoryIdAndOtpCode(directoryId: string, otpCode: string): Promise<any>;
3
3
  }
@@ -1,2 +1,2 @@
1
- export * from './api/interfaces/IFiadoMessagesApi';
1
+ export * from './api/interfaces/IFiadoMessagesApi';
2
2
  export * from './api/FiadoMessagesApi';
@@ -1,23 +1,23 @@
1
- import {IFraudPreventionEngineApi} from "./interfaces/IFraudPreventionEngineApi";
2
- import {inject, injectable} from "inversify";
3
- import {IHttpRequest} from "@fiado/http-client";
4
- import GetAccountLevelParams from "@fiado/type-kit/bin/fraudPreventionEngine/dtos/GetAccountLevelParams";
5
- import CreateAccountLevelRequest from "@fiado/type-kit/bin/fraudPreventionEngine/dtos/CreateAccountLevelRequest";
6
-
7
- @injectable()
8
- export default class FraudPreventionEngineApi implements IFraudPreventionEngineApi {
9
- private readonly baseUrl = process.env.FRAUD_PREVENTION_ENGINE_LAMBDA_URL || "";
10
-
11
- constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
12
- }
13
-
14
- async getAccountLevel(params: GetAccountLevelParams): Promise<any> {
15
- const url: string = `${this.baseUrl}/account/levels?${Object.entries(params).map(([key, value]) => `${key}=${encodeURIComponent(value)}`).join('&')}`;
16
- return await this.httpRequest.get(url);
17
- }
18
-
19
- async createAccountLevel(request: CreateAccountLevelRequest): Promise<any> {
20
- const url: string = `${this.baseUrl}/account/levels`;
21
- return await this.httpRequest.post(url, request);
22
- }
1
+ import {IFraudPreventionEngineApi} from "./interfaces/IFraudPreventionEngineApi";
2
+ import {inject, injectable} from "inversify";
3
+ import {IHttpRequest} from "@fiado/http-client";
4
+ import GetAccountLevelParams from "@fiado/type-kit/bin/fraudPreventionEngine/dtos/GetAccountLevelParams";
5
+ import CreateAccountLevelRequest from "@fiado/type-kit/bin/fraudPreventionEngine/dtos/CreateAccountLevelRequest";
6
+
7
+ @injectable()
8
+ export default class FraudPreventionEngineApi implements IFraudPreventionEngineApi {
9
+ private readonly baseUrl = process.env.FRAUD_PREVENTION_ENGINE_LAMBDA_URL || "";
10
+
11
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
12
+ }
13
+
14
+ async getAccountLevel(params: GetAccountLevelParams): Promise<any> {
15
+ const url: string = `${this.baseUrl}/account/levels?${Object.entries(params).map(([key, value]) => `${key}=${encodeURIComponent(value)}`).join('&')}`;
16
+ return await this.httpRequest.get(url);
17
+ }
18
+
19
+ async createAccountLevel(request: CreateAccountLevelRequest): Promise<any> {
20
+ const url: string = `${this.baseUrl}/account/levels`;
21
+ return await this.httpRequest.post(url, request);
22
+ }
23
23
  }
@@ -1,8 +1,8 @@
1
- import GetAccountLevelParams from "@fiado/type-kit/bin/fraudPreventionEngine/dtos/GetAccountLevelParams";
2
- import CreateAccountLevelRequest from "@fiado/type-kit/bin/fraudPreventionEngine/dtos/CreateAccountLevelRequest";
3
-
4
- export interface IFraudPreventionEngineApi {
5
- getAccountLevel(params: GetAccountLevelParams): Promise<any>;
6
-
7
- createAccountLevel(request: CreateAccountLevelRequest): Promise<any>;
1
+ import GetAccountLevelParams from "@fiado/type-kit/bin/fraudPreventionEngine/dtos/GetAccountLevelParams";
2
+ import CreateAccountLevelRequest from "@fiado/type-kit/bin/fraudPreventionEngine/dtos/CreateAccountLevelRequest";
3
+
4
+ export interface IFraudPreventionEngineApi {
5
+ getAccountLevel(params: GetAccountLevelParams): Promise<any>;
6
+
7
+ createAccountLevel(request: CreateAccountLevelRequest): Promise<any>;
8
8
  }
@@ -1,2 +1,2 @@
1
- export * from './api/interfaces/IFraudPreventionEngineApi';
1
+ export * from './api/interfaces/IFraudPreventionEngineApi';
2
2
  export * from './api/FraudPreventionEngineApi';
@@ -1,25 +1,25 @@
1
- import { inject, injectable } from "inversify";
2
- import { IHttpRequest } from "@fiado/http-client";
3
- import dotenv from 'dotenv';
4
- import { GroupAddDirectoryRequest } from "@fiado/type-kit/bin/group";
5
- import { IGroupApi } from "./interfaces/IGroupApi";
6
-
7
- dotenv.config();
8
-
9
- @injectable()
10
- export class GroupApi implements IGroupApi {
11
-
12
- private readonly baseUrl = process.env.FIADO_GROUP_LAMBDA_URL || "";
13
-
14
- constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
15
-
16
- async findByCategory(categoryId: string): Promise<any> {
17
- const url = `${this.baseUrl}groups/categories/${categoryId}`;
18
- return await this.httpRequest.get(`${url}`);
19
- }
20
-
21
- async members(params: GroupAddDirectoryRequest): Promise<any> {
22
- const url = `${this.baseUrl}members`;
23
- return await this.httpRequest.post(`${url}`,params);
24
- }
1
+ import { inject, injectable } from "inversify";
2
+ import { IHttpRequest } from "@fiado/http-client";
3
+ import dotenv from 'dotenv';
4
+ import { GroupAddDirectoryRequest } from "@fiado/type-kit/bin/group";
5
+ import { IGroupApi } from "./interfaces/IGroupApi";
6
+
7
+ dotenv.config();
8
+
9
+ @injectable()
10
+ export class GroupApi implements IGroupApi {
11
+
12
+ private readonly baseUrl = process.env.FIADO_GROUP_LAMBDA_URL || "";
13
+
14
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
15
+
16
+ async findByCategory(categoryId: string): Promise<any> {
17
+ const url = `${this.baseUrl}groups/categories/${categoryId}`;
18
+ return await this.httpRequest.get(`${url}`);
19
+ }
20
+
21
+ async members(params: GroupAddDirectoryRequest): Promise<any> {
22
+ const url = `${this.baseUrl}members`;
23
+ return await this.httpRequest.post(`${url}`,params);
24
+ }
25
25
  }
@@ -1,2 +1,2 @@
1
- export * from './interfaces/IGroupApi';
1
+ export * from './interfaces/IGroupApi';
2
2
  export * from './GroupApi';
@@ -1,23 +1,23 @@
1
- import { GroupAddDirectoryRequest } from "@fiado/type-kit/bin/group";
2
-
3
- /**
4
- * Interfaz para el servicio Directory que permite operaciones sobre directorios.
5
- */
6
- export interface IGroupApi {
7
-
8
- /**
9
- * Agrega o elimina miembros a un grupo.
10
- * @param GroupAddDirectoryRequest
11
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
12
- */
13
- members(params: GroupAddDirectoryRequest): Promise<any>;
14
-
15
-
16
- /**
17
- * Buscar grupos por categoria.
18
- * @param categoryId ID de la categoria.
19
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
20
- */
21
- findByCategory(categoryId: string): Promise<any>;
22
-
23
- }
1
+ import { GroupAddDirectoryRequest } from "@fiado/type-kit/bin/group";
2
+
3
+ /**
4
+ * Interfaz para el servicio Directory que permite operaciones sobre directorios.
5
+ */
6
+ export interface IGroupApi {
7
+
8
+ /**
9
+ * Agrega o elimina miembros a un grupo.
10
+ * @param GroupAddDirectoryRequest
11
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
12
+ */
13
+ members(params: GroupAddDirectoryRequest): Promise<any>;
14
+
15
+
16
+ /**
17
+ * Buscar grupos por categoria.
18
+ * @param categoryId ID de la categoria.
19
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
20
+ */
21
+ findByCategory(categoryId: string): Promise<any>;
22
+
23
+ }
@@ -1,48 +1,48 @@
1
- import { inject, injectable } from "inversify";
2
- import { IIdentityApi } from "./interfaces/IIdentityApi";
3
- import { IHttpRequest } from "@fiado/http-client";
4
- import dotenv from 'dotenv';
5
- import { PeopleUpdateRequest } from "@fiado/type-kit/bin/identity";
6
- dotenv.config();
7
-
8
- @injectable()
9
- export class IdentityApi implements IIdentityApi {
10
-
11
- private readonly baseUrl = process.env.IDENTITY_LAMBDA_URL || "";
12
-
13
- constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
14
-
15
- async getPeopleByIds(ids: string[]): Promise<any> {
16
-
17
- if (ids.length === 0) {
18
- throw new Error("At least one people ID is required.")
19
- }
20
-
21
- const url = `${this.baseUrl}identities/people?${ids.map(id => `id=${encodeURIComponent(id)}`).join('&')}`;
22
- return await this.httpRequest.get(`${url}`);
23
- }
24
-
25
- async updatePeopleById(id: string, data: PeopleUpdateRequest): Promise<void> {
26
-
27
- if (!id) {
28
- throw new Error("People ID is required.")
29
- }
30
-
31
- const url = `${this.baseUrl}identities/people/${id}`;
32
- await this.httpRequest.put<void>(url, data);
33
-
34
- }
35
-
36
- async getProfilePicture(directoryId: string): Promise<any> {
37
-
38
- if (!directoryId) {
39
- throw new Error("Directory ID is required.")
40
- }
41
-
42
- const url = `${this.baseUrl}identities/profile?directoryId=${directoryId}&typeOfDirectoryId=USER`;
43
- const operationName = "getUserInfoByIds";
44
-
45
- return await this.httpRequest.get<any>(url, { 'operationName': operationName });
46
-
47
- }
1
+ import { inject, injectable } from "inversify";
2
+ import { IIdentityApi } from "./interfaces/IIdentityApi";
3
+ import { IHttpRequest } from "@fiado/http-client";
4
+ import dotenv from 'dotenv';
5
+ import { PeopleUpdateRequest } from "@fiado/type-kit/bin/identity";
6
+ dotenv.config();
7
+
8
+ @injectable()
9
+ export class IdentityApi implements IIdentityApi {
10
+
11
+ private readonly baseUrl = process.env.IDENTITY_LAMBDA_URL || "";
12
+
13
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
14
+
15
+ async getPeopleByIds(ids: string[]): Promise<any> {
16
+
17
+ if (ids.length === 0) {
18
+ throw new Error("At least one people ID is required.")
19
+ }
20
+
21
+ const url = `${this.baseUrl}identities/people?${ids.map(id => `id=${encodeURIComponent(id)}`).join('&')}`;
22
+ return await this.httpRequest.get(`${url}`);
23
+ }
24
+
25
+ async updatePeopleById(id: string, data: PeopleUpdateRequest): Promise<void> {
26
+
27
+ if (!id) {
28
+ throw new Error("People ID is required.")
29
+ }
30
+
31
+ const url = `${this.baseUrl}identities/people/${id}`;
32
+ await this.httpRequest.put<void>(url, data);
33
+
34
+ }
35
+
36
+ async getProfilePicture(directoryId: string): Promise<any> {
37
+
38
+ if (!directoryId) {
39
+ throw new Error("Directory ID is required.")
40
+ }
41
+
42
+ const url = `${this.baseUrl}identities/profile?directoryId=${directoryId}&typeOfDirectoryId=USER`;
43
+ const operationName = "getUserInfoByIds";
44
+
45
+ return await this.httpRequest.get<any>(url, { 'operationName': operationName });
46
+
47
+ }
48
48
  }
@@ -1,4 +1,4 @@
1
-
2
-
3
- export * from './interfaces/IIdentityApi';
1
+
2
+
3
+ export * from './interfaces/IIdentityApi';
4
4
  export * from './IdentityApi';
@@ -1,33 +1,33 @@
1
- import { PeopleUpdateRequest } from "@fiado/type-kit/bin/identity";
2
-
3
- /**
4
- * Interfaz para el servicio Directory que permite operaciones sobre directorios.
5
- */
6
- export interface IIdentityApi {
7
- /**
8
- * Obtiene una lista de people por sus IDs.
9
- * @param ids Array de IDs de peopleId (UUIDs) a buscar.
10
- * @returns Una promesa que resuelve a un arreglo de objetos de people.
11
- * Puede devolver un arreglo vacío si no se encuentran coincidencias.
12
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
13
- */
14
- getPeopleByIds(ids: string[]): Promise<any>;
15
-
16
- /**
17
- * Actualiza la información de un people.
18
- * @param id ID de people a actualizar.
19
- * @param data Datos de people a actualizar.
20
- * @returns Una promesa que resuelve a void.
21
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
22
- */
23
- updatePeopleById(id: string, data: PeopleUpdateRequest): Promise<void>;
24
-
25
- /**
26
- * Obtiene la URL de la imagen de perfil de un usuario.
27
- * @param directoryId ID de directorio del usuario.
28
- * @returns Una promesa que resuelve a un objeto con la URL de la imagen de perfil.
29
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
30
- */
31
- getProfilePicture(directoryId: string): Promise<any>;
32
-
33
- }
1
+ import { PeopleUpdateRequest } from "@fiado/type-kit/bin/identity";
2
+
3
+ /**
4
+ * Interfaz para el servicio Directory que permite operaciones sobre directorios.
5
+ */
6
+ export interface IIdentityApi {
7
+ /**
8
+ * Obtiene una lista de people por sus IDs.
9
+ * @param ids Array de IDs de peopleId (UUIDs) a buscar.
10
+ * @returns Una promesa que resuelve a un arreglo de objetos de people.
11
+ * Puede devolver un arreglo vacío si no se encuentran coincidencias.
12
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
13
+ */
14
+ getPeopleByIds(ids: string[]): Promise<any>;
15
+
16
+ /**
17
+ * Actualiza la información de un people.
18
+ * @param id ID de people a actualizar.
19
+ * @param data Datos de people a actualizar.
20
+ * @returns Una promesa que resuelve a void.
21
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
22
+ */
23
+ updatePeopleById(id: string, data: PeopleUpdateRequest): Promise<void>;
24
+
25
+ /**
26
+ * Obtiene la URL de la imagen de perfil de un usuario.
27
+ * @param directoryId ID de directorio del usuario.
28
+ * @returns Una promesa que resuelve a un objeto con la URL de la imagen de perfil.
29
+ * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
30
+ */
31
+ getProfilePicture(directoryId: string): Promise<any>;
32
+
33
+ }