@fiado/api-invoker 5.4.0 → 5.6.0

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 (40) hide show
  1. package/bin/container.config.js +2 -0
  2. package/bin/identity/IdentityApi.d.ts +2 -1
  3. package/bin/identity/IdentityApi.js +7 -0
  4. package/bin/identity/interfaces/IIdentityApi.d.ts +14 -1
  5. package/bin/index.d.ts +1 -0
  6. package/bin/index.js +1 -0
  7. package/bin/metamap-connector/MetamapConnectorApi.d.ts +10 -0
  8. package/bin/{membership/MembershipApi.js → metamap-connector/MetamapConnectorApi.js} +8 -10
  9. package/bin/metamap-connector/index.d.ts +2 -0
  10. package/bin/metamap-connector/index.js +2 -0
  11. package/bin/metamap-connector/interfaces/IMetamapConnectorApi.d.ts +10 -0
  12. package/package.json +2 -2
  13. package/src/container.config.ts +3 -0
  14. package/src/identity/IdentityApi.ts +9 -0
  15. package/src/identity/interfaces/IIdentityApi.ts +15 -0
  16. package/src/index.ts +1 -0
  17. package/src/metamap-connector/MetamapConnectorApi.ts +17 -0
  18. package/src/metamap-connector/index.ts +2 -0
  19. package/src/metamap-connector/interfaces/IMetamapConnectorApi.ts +11 -0
  20. package/bin/membership/MembershipApi.d.ts +0 -12
  21. package/bin/membership/index.d.ts +0 -2
  22. package/bin/membership/index.js +0 -2
  23. package/bin/membership/interfaces/IMembershipApi.d.ts +0 -15
  24. package/bin/notificationWebsockets/NotificationWebsocketApi.d.ts +0 -12
  25. package/bin/notificationWebsockets/NotificationWebsocketApi.js +0 -32
  26. package/bin/notificationWebsockets/interfaces/INotificationWebsocketApi.d.ts +0 -15
  27. package/bin/notificationWebsockets/interfaces/INotificationWebsocketApi.js +0 -1
  28. package/bin/performance-profile/PerformanceProfileApi.d.ts +0 -12
  29. package/bin/performance-profile/PerformanceProfileApi.js +0 -32
  30. package/bin/performance-profile/index.d.ts +0 -2
  31. package/bin/performance-profile/index.js +0 -2
  32. package/bin/performance-profile/interfaces/IPerformanceProfileApi.d.ts +0 -15
  33. package/bin/performance-profile/interfaces/IPerformanceProfileApi.js +0 -1
  34. package/bin/presence-websocket/PresenceWebsocketApi.d.ts +0 -12
  35. package/bin/presence-websocket/PresenceWebsocketApi.js +0 -32
  36. package/bin/presence-websocket/index.d.ts +0 -2
  37. package/bin/presence-websocket/index.js +0 -2
  38. package/bin/presence-websocket/interfaces/IPresenceWebsocketApi.d.ts +0 -15
  39. package/bin/presence-websocket/interfaces/IPresenceWebsocketApi.js +0 -1
  40. /package/bin/{membership/interfaces/IMembershipApi.js → metamap-connector/interfaces/IMetamapConnectorApi.js} +0 -0
@@ -8,6 +8,7 @@ import { AddressApi } from "./address/index.js";
8
8
  import { Publisher } from "./account-fiadoinc/index.js";
9
9
  import AccountFiadoIncApi from "./account-fiadoinc/AccountFiadoIncApi.js";
10
10
  import AccountPagoConfiadoApi from "./account-pagoconfiado/AccountPagoConfiadoApi.js";
11
+ import MetamapConnectorApi from "./metamap-connector/MetamapConnectorApi.js";
11
12
  import AccountFiadoSAApi from "./account-fiadosa/AccountFiadoSAApi.js";
12
13
  import STPAccountApi from "./stpAccount/api/STPAccountApi.js";
13
14
  import { SessionActivityPublisher } from "./sessionActivity/index.js";
@@ -137,6 +138,7 @@ export const apiInvokerBindings = new ContainerModule(({ bind }) => {
137
138
  bind("ISTPAccountApi").to(STPAccountApi);
138
139
  bind("IAccountFiadoIncApi").to(AccountFiadoIncApi);
139
140
  bind("IAccountPagoConfiadoApi").to(AccountPagoConfiadoApi);
141
+ bind("IMetamapConnectorApi").to(MetamapConnectorApi);
140
142
  bind("IAccountFiadoSAApi").to(AccountFiadoSAApi);
141
143
  bind("INotificationMessagesPublisher").to(NotificationMessagePublisher);
142
144
  bind("INotificationWSMessagesPublisher").to(NotificationWSMessagePublisher);
@@ -1,7 +1,7 @@
1
1
  import { IIdentityApi } from "./interfaces/IIdentityApi.js";
2
2
  import { LegacyApiResponse } from "./interfaces/LegacyApiResponse.js";
3
3
  import type { IHttpRequest } from "@fiado/http-client";
4
- import { PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse, PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse } from "@fiado/type-kit/bin/identity/index.js";
4
+ import { PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse, PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse, PeopleSelfieResponse } from "@fiado/type-kit/bin/identity/index.js";
5
5
  export declare class IdentityApi implements IIdentityApi {
6
6
  private httpRequest;
7
7
  private readonly baseUrl;
@@ -14,6 +14,7 @@ export declare class IdentityApi implements IIdentityApi {
14
14
  getPeopleByFullName(fullName: string): Promise<any>;
15
15
  privateGetDocumentsUrlSigned(directoryId: string, documentNames: string[]): Promise<any>;
16
16
  getUserDocuments(directoryId: string): Promise<any>;
17
+ privateGetPeopleSelfie(directoryId: string): Promise<LegacyApiResponse<PeopleSelfieResponse>>;
17
18
  privateGetPeopleByDirectoryId(directoryId: string): Promise<LegacyApiResponse<PeopleResponse>>;
18
19
  privateGetLastAgentDocument(directoryId: string): Promise<LegacyApiResponse<AgentDocumentKeyResponse[]>>;
19
20
  privateUploadAgentDocument(directoryId: string, actorDirectoryId: string, document: UploadDocumentRequest): Promise<LegacyApiResponse<DocumentUploadResponse>>;
@@ -75,6 +75,13 @@ let IdentityApi = class IdentityApi {
75
75
  const url = `${this.baseUrl}identities/private/people/${directoryId}/documents`;
76
76
  return await this.httpRequest.get(url);
77
77
  }
78
+ async privateGetPeopleSelfie(directoryId) {
79
+ if (!directoryId) {
80
+ throw new Error("Directory ID is required.");
81
+ }
82
+ const url = `${this.baseUrl}identities/private/people/${encodeURIComponent(directoryId)}/selfie`;
83
+ return await this.httpRequest.get(url);
84
+ }
78
85
  // ── Gemelos PRIVATE de los endpoints de agentes (proxy RBAC v2, DEC-PROT-011) ──
79
86
  // Retornan el ENVELOPE legacy completo (httpRequest devuelve response.data = el body de identity),
80
87
  // para que el proxy /v2 de people-business lo re-emita campo por campo (drop-in, sin doble-wrap).
@@ -1,4 +1,4 @@
1
- import { PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse, PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse } from "@fiado/type-kit/bin/identity/index.js";
1
+ import { PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse, PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse, PeopleSelfieResponse } from "@fiado/type-kit/bin/identity/index.js";
2
2
  import { LegacyApiResponse } from "./LegacyApiResponse.js";
3
3
  /**
4
4
  * Interfaz para el servicio Directory que permite operaciones sobre directorios.
@@ -36,6 +36,19 @@ export interface IIdentityApi {
36
36
  * Retorna { directoryId, keys: string[] }.
37
37
  */
38
38
  getUserDocuments(directoryId: string): Promise<any>;
39
+ /**
40
+ * Selfie guardada del usuario: devuelve una URL firmada temporal (no la imagen).
41
+ *
42
+ * Pensado para el facematch de Metamap contra la merchant database: la `url` se pasa a
43
+ * `IMetamapConnectorApi.buildFacematchSignature` para obtener el `userPhotoLinkHash`, y el par
44
+ * va en el `metadata` de la verificación con `customInput: true`. El presigned vence
45
+ * (`expiresInSeconds`), así que la firma y el disparo del facematch van dentro de esa ventana.
46
+ *
47
+ * Devuelve el envelope legacy completo porque el resultado se discrimina por `code`, no por
48
+ * status: `PROCESS_OK` con la selfie, `SELFIE_NOT_FOUND` si el usuario tiene cuenta pero no hay
49
+ * imagen (el toolkit lo emite como HTTP 200). Sin cuenta, el endpoint responde 401 `NO_ACCOUNT`.
50
+ */
51
+ privateGetPeopleSelfie(directoryId: string): Promise<LegacyApiResponse<PeopleSelfieResponse>>;
39
52
  /** Gemelo private de agentGetPeopleByDirectoryId (con masking del manager). */
40
53
  privateGetPeopleByDirectoryId(directoryId: string): Promise<LegacyApiResponse<PeopleResponse>>;
41
54
  /** Gemelo private de getUserDocumentsAgents (último documento). */
package/bin/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from "./container.config.js";
10
10
  export * from "./account-fiadoinc/index.js";
11
11
  export * from "./account-fiadosa/index.js";
12
12
  export * from "./account-pagoconfiado/index.js";
13
+ export * from "./metamap-connector/index.js";
13
14
  export * from "./account-beneficiary/index.js";
14
15
  export * from "./exchangeRates/index.js";
15
16
  export * from "./authentication/index.js";
package/bin/index.js CHANGED
@@ -10,6 +10,7 @@ export * from "./container.config.js";
10
10
  export * from "./account-fiadoinc/index.js";
11
11
  export * from "./account-fiadosa/index.js";
12
12
  export * from "./account-pagoconfiado/index.js";
13
+ export * from "./metamap-connector/index.js";
13
14
  export * from "./account-beneficiary/index.js";
14
15
  export * from "./exchangeRates/index.js";
15
16
  export * from "./authentication/index.js";
@@ -0,0 +1,10 @@
1
+ import { IMetamapConnectorApi } from "./interfaces/IMetamapConnectorApi.js";
2
+ import { BuildFacematchSignatureRequest, FacematchSignatureResponse } from "@fiado/type-kit/bin/metamapConnector/index.js";
3
+ import { ApiGatewayResponse } from "@fiado/gateway-adapter";
4
+ import { IHttpRequest } from "@fiado/http-client";
5
+ export default class MetamapConnectorApi implements IMetamapConnectorApi {
6
+ private httpRequest;
7
+ private readonly baseUrl;
8
+ constructor(httpRequest: IHttpRequest);
9
+ buildFacematchSignature(data: BuildFacematchSignatureRequest): Promise<ApiGatewayResponse<FacematchSignatureResponse>>;
10
+ }
@@ -11,22 +11,20 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
13
  import { inject, injectable } from "inversify";
14
- import dotenv from 'dotenv';
15
- dotenv.config();
16
- let MembershipApi = class MembershipApi {
14
+ let MetamapConnectorApi = class MetamapConnectorApi {
17
15
  httpRequest;
18
- baseUrl = process.env.MEMBERSHIP_BUSINESS_LAMBDA_URL || "";
16
+ baseUrl = process.env.METAMAP_CONNECTOR_LAMBDA_URL || "";
19
17
  constructor(httpRequest) {
20
18
  this.httpRequest = httpRequest;
21
19
  }
22
- async deleteByDirectoryId(directoryId) {
23
- const url = `${this.baseUrl}private/directory/${directoryId}`;
24
- return await this.httpRequest.delete(url);
20
+ async buildFacematchSignature(data) {
21
+ const url = `${this.baseUrl}facematch/signature`;
22
+ return await this.httpRequest.post(url, data);
25
23
  }
26
24
  };
27
- MembershipApi = __decorate([
25
+ MetamapConnectorApi = __decorate([
28
26
  injectable(),
29
27
  __param(0, inject("IHttpRequest")),
30
28
  __metadata("design:paramtypes", [Object])
31
- ], MembershipApi);
32
- export { MembershipApi };
29
+ ], MetamapConnectorApi);
30
+ export default MetamapConnectorApi;
@@ -0,0 +1,2 @@
1
+ export * from './interfaces/IMetamapConnectorApi.js';
2
+ export * from './MetamapConnectorApi.js';
@@ -0,0 +1,2 @@
1
+ export * from './interfaces/IMetamapConnectorApi.js';
2
+ export * from './MetamapConnectorApi.js';
@@ -0,0 +1,10 @@
1
+ import { BuildFacematchSignatureRequest, FacematchSignatureResponse } from "@fiado/type-kit/bin/metamapConnector/index.js";
2
+ import { ApiGatewayResponse } from "@fiado/gateway-adapter";
3
+ export interface IMetamapConnectorApi {
4
+ /**
5
+ * Arma la firma que Metamap exige para el facematch contra una foto de referencia
6
+ * (`userPhotoLinkHash`) sin exponer el Client Secret. `POST /private/facematch/signature`
7
+ * del metamap-connector.
8
+ */
9
+ buildFacematchSignature(data: BuildFacematchSignatureRequest): Promise<ApiGatewayResponse<FacematchSignatureResponse>>;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "5.4.0",
3
+ "version": "5.6.0",
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
  "type": "module",
6
6
  "main": "bin/index.js",
@@ -34,7 +34,7 @@
34
34
  "@fiado/gateway-adapter": "^3.9.0",
35
35
  "@fiado/http-client": "^2.0.1",
36
36
  "@fiado/logger": "^1.1.3",
37
- "@fiado/type-kit": "^3.221.0",
37
+ "@fiado/type-kit": "^3.225.0",
38
38
  "dotenv": "^16.4.7"
39
39
  },
40
40
  "peerDependencies": {
@@ -12,6 +12,8 @@ import { IAccountFiadoIncApi, IPublisher, Publisher } from "./account-fiadoinc/i
12
12
  import AccountFiadoIncApi from "./account-fiadoinc/AccountFiadoIncApi.js";
13
13
  import { IAccountPagoConfiadoApi } from "./account-pagoconfiado/index.js";
14
14
  import AccountPagoConfiadoApi from "./account-pagoconfiado/AccountPagoConfiadoApi.js";
15
+ import { IMetamapConnectorApi } from "./metamap-connector/index.js";
16
+ import MetamapConnectorApi from "./metamap-connector/MetamapConnectorApi.js";
15
17
  import { IAccountFiadoSAApi } from "./account-fiadosa/index.js";
16
18
  import AccountFiadoSAApi from "./account-fiadosa/AccountFiadoSAApi.js";
17
19
  import { ISTPAccountApi } from "./stpAccount/index.js";
@@ -199,6 +201,7 @@ export const apiInvokerBindings = new ContainerModule(({ bind }) => {
199
201
  bind<ISTPAccountApi>("ISTPAccountApi").to(STPAccountApi);
200
202
  bind<IAccountFiadoIncApi>("IAccountFiadoIncApi").to(AccountFiadoIncApi);
201
203
  bind<IAccountPagoConfiadoApi>("IAccountPagoConfiadoApi").to(AccountPagoConfiadoApi);
204
+ bind<IMetamapConnectorApi>("IMetamapConnectorApi").to(MetamapConnectorApi);
202
205
  bind<IAccountFiadoSAApi>("IAccountFiadoSAApi").to(AccountFiadoSAApi);
203
206
  bind<INotificationMessagesPublisher>("INotificationMessagesPublisher").to(NotificationMessagePublisher);
204
207
  bind<INotificationWSMessagesPublisher>("INotificationWSMessagesPublisher").to(NotificationWSMessagePublisher);
@@ -6,6 +6,7 @@ import dotenv from 'dotenv';
6
6
  import {
7
7
  PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse,
8
8
  PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse,
9
+ PeopleSelfieResponse,
9
10
  } from "@fiado/type-kit/bin/identity/index.js";
10
11
 
11
12
  dotenv.config();
@@ -98,6 +99,14 @@ export class IdentityApi implements IIdentityApi {
98
99
  return await this.httpRequest.get(url);
99
100
  }
100
101
 
102
+ async privateGetPeopleSelfie(directoryId: string): Promise<LegacyApiResponse<PeopleSelfieResponse>> {
103
+ if (!directoryId) {
104
+ throw new Error("Directory ID is required.")
105
+ }
106
+ const url = `${this.baseUrl}identities/private/people/${encodeURIComponent(directoryId)}/selfie`;
107
+ return await this.httpRequest.get<LegacyApiResponse<PeopleSelfieResponse>>(url);
108
+ }
109
+
101
110
  // ── Gemelos PRIVATE de los endpoints de agentes (proxy RBAC v2, DEC-PROT-011) ──
102
111
  // Retornan el ENVELOPE legacy completo (httpRequest devuelve response.data = el body de identity),
103
112
  // para que el proxy /v2 de people-business lo re-emita campo por campo (drop-in, sin doble-wrap).
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  PeopleUpdateRequest, UploadDocumentRequest, PeopleResponse,
3
3
  PeopleSelfVerifiedRequest, AgentDocumentKeyResponse, DocumentUploadResponse,
4
+ PeopleSelfieResponse,
4
5
  } from "@fiado/type-kit/bin/identity/index.js";
5
6
  import { LegacyApiResponse } from "./LegacyApiResponse.js";
6
7
 
@@ -48,6 +49,20 @@ export interface IIdentityApi {
48
49
  */
49
50
  getUserDocuments(directoryId: string): Promise<any>
50
51
 
52
+ /**
53
+ * Selfie guardada del usuario: devuelve una URL firmada temporal (no la imagen).
54
+ *
55
+ * Pensado para el facematch de Metamap contra la merchant database: la `url` se pasa a
56
+ * `IMetamapConnectorApi.buildFacematchSignature` para obtener el `userPhotoLinkHash`, y el par
57
+ * va en el `metadata` de la verificación con `customInput: true`. El presigned vence
58
+ * (`expiresInSeconds`), así que la firma y el disparo del facematch van dentro de esa ventana.
59
+ *
60
+ * Devuelve el envelope legacy completo porque el resultado se discrimina por `code`, no por
61
+ * status: `PROCESS_OK` con la selfie, `SELFIE_NOT_FOUND` si el usuario tiene cuenta pero no hay
62
+ * imagen (el toolkit lo emite como HTTP 200). Sin cuenta, el endpoint responde 401 `NO_ACCOUNT`.
63
+ */
64
+ privateGetPeopleSelfie(directoryId: string): Promise<LegacyApiResponse<PeopleSelfieResponse>>
65
+
51
66
  // ── Gemelos PRIVATE de los endpoints de agentes (proxy RBAC v2, DEC-PROT-011) ──
52
67
  // Devuelven el ENVELOPE legacy completo (LegacyApiResponse) tal como lo emite identity,
53
68
  // para que el proxy /v2 de people-business lo re-emita campo por campo (drop-in exacto, sin doble-wrap).
package/src/index.ts CHANGED
@@ -10,6 +10,7 @@ export * from "./container.config.js";
10
10
  export * from "./account-fiadoinc/index.js";
11
11
  export * from "./account-fiadosa/index.js";
12
12
  export * from "./account-pagoconfiado/index.js";
13
+ export * from "./metamap-connector/index.js";
13
14
  export * from "./account-beneficiary/index.js";
14
15
  export * from "./exchangeRates/index.js";
15
16
  export * from "./authentication/index.js";
@@ -0,0 +1,17 @@
1
+ import { IMetamapConnectorApi } from "./interfaces/IMetamapConnectorApi.js";
2
+ import { BuildFacematchSignatureRequest, FacematchSignatureResponse } from "@fiado/type-kit/bin/metamapConnector/index.js";
3
+ import { ApiGatewayResponse } from "@fiado/gateway-adapter";
4
+ import { inject, injectable } from "inversify";
5
+ import { IHttpRequest } from "@fiado/http-client";
6
+
7
+ @injectable()
8
+ export default class MetamapConnectorApi implements IMetamapConnectorApi {
9
+ private readonly baseUrl = process.env.METAMAP_CONNECTOR_LAMBDA_URL || "";
10
+
11
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
12
+
13
+ async buildFacematchSignature(data: BuildFacematchSignatureRequest): Promise<ApiGatewayResponse<FacematchSignatureResponse>> {
14
+ const url = `${this.baseUrl}facematch/signature`;
15
+ return await this.httpRequest.post(url, data);
16
+ }
17
+ }
@@ -0,0 +1,2 @@
1
+ export * from './interfaces/IMetamapConnectorApi.js';
2
+ export * from './MetamapConnectorApi.js';
@@ -0,0 +1,11 @@
1
+ import { BuildFacematchSignatureRequest, FacematchSignatureResponse } from "@fiado/type-kit/bin/metamapConnector/index.js";
2
+ import { ApiGatewayResponse } from "@fiado/gateway-adapter";
3
+
4
+ export interface IMetamapConnectorApi {
5
+ /**
6
+ * Arma la firma que Metamap exige para el facematch contra una foto de referencia
7
+ * (`userPhotoLinkHash`) sin exponer el Client Secret. `POST /private/facematch/signature`
8
+ * del metamap-connector.
9
+ */
10
+ buildFacematchSignature(data: BuildFacematchSignatureRequest): Promise<ApiGatewayResponse<FacematchSignatureResponse>>;
11
+ }
@@ -1,12 +0,0 @@
1
- import { IHttpRequest } from "@fiado/http-client";
2
- import { IMembershipApi } from "./interfaces/IMembershipApi.js";
3
- type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
4
- export declare class MembershipApi implements IMembershipApi {
5
- private httpRequest;
6
- private readonly baseUrl;
7
- constructor(httpRequest: IHttpRequest);
8
- deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
9
- deletedCount: number;
10
- }>>;
11
- }
12
- export {};
@@ -1,2 +0,0 @@
1
- export * from './interfaces/IMembershipApi.js';
2
- export * from './MembershipApi.js';
@@ -1,2 +0,0 @@
1
- export * from './interfaces/IMembershipApi.js';
2
- export * from './MembershipApi.js';
@@ -1,15 +0,0 @@
1
- type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
2
- /**
3
- * Interfaz para el servicio Membership (membership-business).
4
- */
5
- export interface IMembershipApi {
6
- /**
7
- * Borra en cascada las membresías asociadas a un directoryId.
8
- * @param directoryId ID del directorio.
9
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
10
- */
11
- deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
12
- deletedCount: number;
13
- }>>;
14
- }
15
- export {};
@@ -1,12 +0,0 @@
1
- import { IHttpRequest } from "@fiado/http-client";
2
- import { INotificationWebsocketApi } from "./interfaces/INotificationWebsocketApi.js";
3
- type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
4
- export declare class NotificationWebsocketApi implements INotificationWebsocketApi {
5
- private httpRequest;
6
- private readonly baseUrl;
7
- constructor(httpRequest: IHttpRequest);
8
- deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
9
- deletedCount: number;
10
- }>>;
11
- }
12
- export {};
@@ -1,32 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11
- return function (target, key) { decorator(target, key, paramIndex); }
12
- };
13
- import { inject, injectable } from "inversify";
14
- import dotenv from 'dotenv';
15
- dotenv.config();
16
- let NotificationWebsocketApi = class NotificationWebsocketApi {
17
- httpRequest;
18
- baseUrl = process.env.NOTIFICATIONS_WEBSOCKET_LAMBDA_URL || "";
19
- constructor(httpRequest) {
20
- this.httpRequest = httpRequest;
21
- }
22
- async deleteByDirectoryId(directoryId) {
23
- const url = `${this.baseUrl}private/directory/${directoryId}`;
24
- return await this.httpRequest.delete(url);
25
- }
26
- };
27
- NotificationWebsocketApi = __decorate([
28
- injectable(),
29
- __param(0, inject("IHttpRequest")),
30
- __metadata("design:paramtypes", [Object])
31
- ], NotificationWebsocketApi);
32
- export { NotificationWebsocketApi };
@@ -1,15 +0,0 @@
1
- type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
2
- /**
3
- * Interfaz para el servicio Notifications Websocket (notifications-websocket).
4
- */
5
- export interface INotificationWebsocketApi {
6
- /**
7
- * Borra en cascada las conexiones/notificaciones WS asociadas a un directoryId.
8
- * @param directoryId ID del directorio.
9
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
10
- */
11
- deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
12
- deletedCount: number;
13
- }>>;
14
- }
15
- export {};
@@ -1,12 +0,0 @@
1
- import { IHttpRequest } from "@fiado/http-client";
2
- import { IPerformanceProfileApi } from "./interfaces/IPerformanceProfileApi.js";
3
- type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
4
- export declare class PerformanceProfileApi implements IPerformanceProfileApi {
5
- private httpRequest;
6
- private readonly baseUrl;
7
- constructor(httpRequest: IHttpRequest);
8
- deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
9
- deletedCount: number;
10
- }>>;
11
- }
12
- export {};
@@ -1,32 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11
- return function (target, key) { decorator(target, key, paramIndex); }
12
- };
13
- import { inject, injectable } from "inversify";
14
- import dotenv from 'dotenv';
15
- dotenv.config();
16
- let PerformanceProfileApi = class PerformanceProfileApi {
17
- httpRequest;
18
- baseUrl = process.env.PERFORMANCE_PROFILE_BUSINESS_LAMBDA_URL || "";
19
- constructor(httpRequest) {
20
- this.httpRequest = httpRequest;
21
- }
22
- async deleteByDirectoryId(directoryId) {
23
- const url = `${this.baseUrl}private/directory/${directoryId}`;
24
- return await this.httpRequest.delete(url);
25
- }
26
- };
27
- PerformanceProfileApi = __decorate([
28
- injectable(),
29
- __param(0, inject("IHttpRequest")),
30
- __metadata("design:paramtypes", [Object])
31
- ], PerformanceProfileApi);
32
- export { PerformanceProfileApi };
@@ -1,2 +0,0 @@
1
- export * from './interfaces/IPerformanceProfileApi.js';
2
- export * from './PerformanceProfileApi.js';
@@ -1,2 +0,0 @@
1
- export * from './interfaces/IPerformanceProfileApi.js';
2
- export * from './PerformanceProfileApi.js';
@@ -1,15 +0,0 @@
1
- type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
2
- /**
3
- * Interfaz para el servicio Performance Profile (performance-profile-business).
4
- */
5
- export interface IPerformanceProfileApi {
6
- /**
7
- * Borra en cascada los perfiles de desempeño asociados a un directoryId.
8
- * @param directoryId ID del directorio.
9
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
10
- */
11
- deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
12
- deletedCount: number;
13
- }>>;
14
- }
15
- export {};
@@ -1,12 +0,0 @@
1
- import { IHttpRequest } from "@fiado/http-client";
2
- import { IPresenceWebsocketApi } from "./interfaces/IPresenceWebsocketApi.js";
3
- type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
4
- export declare class PresenceWebsocketApi implements IPresenceWebsocketApi {
5
- private httpRequest;
6
- private readonly baseUrl;
7
- constructor(httpRequest: IHttpRequest);
8
- deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
9
- deletedCount: number;
10
- }>>;
11
- }
12
- export {};
@@ -1,32 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- var __param = (this && this.__param) || function (paramIndex, decorator) {
11
- return function (target, key) { decorator(target, key, paramIndex); }
12
- };
13
- import { inject, injectable } from "inversify";
14
- import dotenv from 'dotenv';
15
- dotenv.config();
16
- let PresenceWebsocketApi = class PresenceWebsocketApi {
17
- httpRequest;
18
- baseUrl = process.env.PRESENCE_WEBSOCKET_LAMBDA_URL || "";
19
- constructor(httpRequest) {
20
- this.httpRequest = httpRequest;
21
- }
22
- async deleteByDirectoryId(directoryId) {
23
- const url = `${this.baseUrl}private/directory/${directoryId}`;
24
- return await this.httpRequest.delete(url);
25
- }
26
- };
27
- PresenceWebsocketApi = __decorate([
28
- injectable(),
29
- __param(0, inject("IHttpRequest")),
30
- __metadata("design:paramtypes", [Object])
31
- ], PresenceWebsocketApi);
32
- export { PresenceWebsocketApi };
@@ -1,2 +0,0 @@
1
- export * from './interfaces/IPresenceWebsocketApi.js';
2
- export * from './PresenceWebsocketApi.js';
@@ -1,2 +0,0 @@
1
- export * from './interfaces/IPresenceWebsocketApi.js';
2
- export * from './PresenceWebsocketApi.js';
@@ -1,15 +0,0 @@
1
- type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
2
- /**
3
- * Interfaz para el servicio Presence Websocket (presence-websocket).
4
- */
5
- export interface IPresenceWebsocketApi {
6
- /**
7
- * Borra en cascada los registros de presencia asociados a un directoryId.
8
- * @param directoryId ID del directorio.
9
- * @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
10
- */
11
- deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
12
- deletedCount: number;
13
- }>>;
14
- }
15
- export {};