@fiado/api-invoker 5.27.0 → 5.29.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/central-payments-webhook/CentralPaymentsWebhookApi.d.ts +18 -0
  2. package/bin/{notificationWebsockets/NotificationWebsocketApi.js → central-payments-webhook/CentralPaymentsWebhookApi.js} +26 -10
  3. package/bin/central-payments-webhook/index.d.ts +2 -0
  4. package/bin/central-payments-webhook/index.js +2 -0
  5. package/bin/central-payments-webhook/interfaces/ICentralPaymentsWebhookApi.d.ts +20 -0
  6. package/bin/container.config.js +2 -0
  7. package/bin/index.d.ts +1 -0
  8. package/bin/index.js +1 -0
  9. package/bin/people-business/api/PeopleBusinessApi.d.ts +6 -1
  10. package/bin/people-business/api/PeopleBusinessApi.js +8 -0
  11. package/bin/people-business/api/interfaces/IPeopleBusinessApi.d.ts +10 -0
  12. package/package.json +2 -2
  13. package/src/central-payments-webhook/CentralPaymentsWebhookApi.ts +45 -0
  14. package/src/central-payments-webhook/index.ts +2 -0
  15. package/src/central-payments-webhook/interfaces/ICentralPaymentsWebhookApi.ts +20 -0
  16. package/src/container.config.ts +2 -0
  17. package/src/index.ts +1 -0
  18. package/src/people-business/api/PeopleBusinessApi.ts +12 -1
  19. package/src/people-business/api/interfaces/IPeopleBusinessApi.ts +7 -0
  20. package/bin/membership/MembershipApi.d.ts +0 -12
  21. package/bin/membership/MembershipApi.js +0 -32
  22. package/bin/membership/index.d.ts +0 -2
  23. package/bin/membership/index.js +0 -2
  24. package/bin/membership/interfaces/IMembershipApi.d.ts +0 -15
  25. package/bin/notificationWebsockets/NotificationWebsocketApi.d.ts +0 -12
  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 → central-payments-webhook/interfaces/ICentralPaymentsWebhookApi.js} +0 -0
@@ -0,0 +1,18 @@
1
+ import type { IHttpRequest } from "@fiado/http-client";
2
+ import type { GetEventsSinceResponse } from "@fiado/type-kit/bin/centralPayments/index.js";
3
+ import type { ICentralPaymentsWebhookApi } from "./interfaces/ICentralPaymentsWebhookApi.js";
4
+ type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
5
+ /** Contrato y semantica completos -> `ICentralPaymentsWebhookApi`. */
6
+ export declare class CentralPaymentsWebhookApi implements ICentralPaymentsWebhookApi {
7
+ private httpRequest;
8
+ private readonly baseUrl;
9
+ constructor(httpRequest: IHttpRequest);
10
+ getEventsSince(params: {
11
+ type: string;
12
+ since: number;
13
+ pageSize?: number;
14
+ index?: string;
15
+ }): Promise<FiadoApiResponse<GetEventsSinceResponse>>;
16
+ private validateBaseUrl;
17
+ }
18
+ export {};
@@ -11,22 +11,38 @@ 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 NotificationWebsocketApi = class NotificationWebsocketApi {
14
+ /** Contrato y semantica completos -> `ICentralPaymentsWebhookApi`. */
15
+ let CentralPaymentsWebhookApi = class CentralPaymentsWebhookApi {
17
16
  httpRequest;
18
- baseUrl = process.env.NOTIFICATIONS_WEBSOCKET_LAMBDA_URL || "";
17
+ // El buildspec publica la URL en SSM con "/" final: se normaliza para no armar "//events".
18
+ baseUrl = (process.env.CENTRAL_PAYMENTS_WEBHOOK_URL || "").replace(/\/+$/, "");
19
19
  constructor(httpRequest) {
20
20
  this.httpRequest = httpRequest;
21
21
  }
22
- async deleteByDirectoryId(directoryId) {
23
- const url = `${this.baseUrl}private/directory/${directoryId}`;
24
- return await this.httpRequest.delete(url);
22
+ async getEventsSince(params) {
23
+ this.validateBaseUrl();
24
+ const query = new URLSearchParams({
25
+ type: params.type,
26
+ since: String(params.since),
27
+ });
28
+ if (params.pageSize !== undefined) {
29
+ query.append("pageSize", String(params.pageSize));
30
+ }
31
+ if (params.index) {
32
+ query.append("index", params.index);
33
+ }
34
+ const url = `${this.baseUrl}/events?${query.toString()}`;
35
+ return await this.httpRequest.get(url);
36
+ }
37
+ validateBaseUrl() {
38
+ if (!this.baseUrl) {
39
+ throw new Error("Environment variable CENTRAL_PAYMENTS_WEBHOOK_URL value not found");
40
+ }
25
41
  }
26
42
  };
27
- NotificationWebsocketApi = __decorate([
43
+ CentralPaymentsWebhookApi = __decorate([
28
44
  injectable(),
29
45
  __param(0, inject("IHttpRequest")),
30
46
  __metadata("design:paramtypes", [Object])
31
- ], NotificationWebsocketApi);
32
- export { NotificationWebsocketApi };
47
+ ], CentralPaymentsWebhookApi);
48
+ export { CentralPaymentsWebhookApi };
@@ -0,0 +1,2 @@
1
+ export * from './interfaces/ICentralPaymentsWebhookApi.js';
2
+ export * from './CentralPaymentsWebhookApi.js';
@@ -0,0 +1,2 @@
1
+ export * from './interfaces/ICentralPaymentsWebhookApi.js';
2
+ export * from './CentralPaymentsWebhookApi.js';
@@ -0,0 +1,20 @@
1
+ import type { GetEventsSinceResponse } from "@fiado/type-kit/bin/centralPayments/index.js";
2
+ type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
3
+ export interface ICentralPaymentsWebhookApi {
4
+ /**
5
+ * Devuelve los eventos de webhook de un tipo ocurridos despues de `since`.
6
+ *
7
+ * @param type Tipo de evento. Es la clave de particion del GSI `type-createdAt-index`,
8
+ * por eso es obligatorio: para varios tipos hay que llamar una vez por tipo.
9
+ * @param since Epoch en milisegundos. Devuelve los eventos con `createdAt` mayor.
10
+ * @param pageSize Default 100 en el servidor, maximo 500.
11
+ * @param index Cursor devuelto por la llamada anterior. Omitir en la primera pagina.
12
+ */
13
+ getEventsSince(params: {
14
+ type: string;
15
+ since: number;
16
+ pageSize?: number;
17
+ index?: string;
18
+ }): Promise<FiadoApiResponse<GetEventsSinceResponse>>;
19
+ }
20
+ export {};
@@ -128,6 +128,7 @@ import { ResearchSheetsApi } from "./research-sheets/index.js";
128
128
  import { AuthBusinessApi } from "./auth-business/index.js";
129
129
  // KYC verifications business — lectura confirmatoria server-side del KYC por directoryId (SureKeep F2)
130
130
  import { KycVerificationsBusinessApi } from "./kyc/index.js";
131
+ import { CentralPaymentsWebhookApi } from "./central-payments-webhook/index.js";
131
132
  import CollectionEngineApi from "./collection-engine/api/CollectionEngineApi.js";
132
133
  import DomainCallbackApi from "./domain-callback/api/DomainCallbackApi.js";
133
134
  export const apiInvokerBindings = new ContainerModule(({ bind }) => {
@@ -273,6 +274,7 @@ export const apiInvokerBindings = new ContainerModule(({ bind }) => {
273
274
  // KYC verifications business — lectura confirmatoria server-side del KYC por directoryId.
274
275
  // La consume el wizard de SureKeep F2 tras el aviso async del stream de `KycVerifications`.
275
276
  bind("IKycVerificationsBusinessApi").to(KycVerificationsBusinessApi);
277
+ bind("ICentralPaymentsWebhookApi").to(CentralPaymentsWebhookApi);
276
278
  // Collection engine — motor de cobro central multitenant (collect/registerCollectible/deregister)
277
279
  bind("ICollectionEngineApi").to(CollectionEngineApi);
278
280
  // Domain callback — el motor notifica al dominio dueño del cargo (applyCollectionResult)
package/bin/index.d.ts CHANGED
@@ -107,5 +107,6 @@ export * from "./beneficiary/index.js";
107
107
  export * from "./research-sheets/index.js";
108
108
  export * from "./auth-business/index.js";
109
109
  export * from "./kyc/index.js";
110
+ export * from "./central-payments-webhook/index.js";
110
111
  export * from "./collection-engine/index.js";
111
112
  export * from "./domain-callback/index.js";
package/bin/index.js CHANGED
@@ -107,5 +107,6 @@ export * from "./beneficiary/index.js";
107
107
  export * from "./research-sheets/index.js";
108
108
  export * from "./auth-business/index.js";
109
109
  export * from "./kyc/index.js";
110
+ export * from "./central-payments-webhook/index.js";
110
111
  export * from "./collection-engine/index.js";
111
112
  export * from "./domain-callback/index.js";
@@ -1,7 +1,8 @@
1
- import { IHttpRequest } from "@fiado/http-client";
1
+ import type { IHttpRequest } from "@fiado/http-client";
2
2
  import { IPeopleBusinessApi } from "./interfaces/IPeopleBusinessApi.js";
3
3
  type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
4
4
  import { CPStatusEnum } from "@fiado/type-kit/bin/identity/index.js";
5
+ import { PeopleBatchIncludeEnum, PeopleBatchResponse } from "@fiado/type-kit/bin/peopleBusiness/index.js";
5
6
  export default class PeopleBusinessApi implements IPeopleBusinessApi {
6
7
  private httpRequest;
7
8
  private readonly baseUrl;
@@ -18,5 +19,9 @@ export default class PeopleBusinessApi implements IPeopleBusinessApi {
18
19
  }[];
19
20
  index: string | null;
20
21
  }>>;
22
+ getByIds(params: {
23
+ ids: string[];
24
+ include?: PeopleBatchIncludeEnum;
25
+ }): Promise<FiadoApiResponse<PeopleBatchResponse>>;
21
26
  }
22
27
  export {};
@@ -31,6 +31,14 @@ let PeopleBusinessApi = class PeopleBusinessApi {
31
31
  const queryString = queryParamsArray.length > 0 ? '?' + queryParamsArray.join('&') : '';
32
32
  return this.httpRequest.get(`${this.baseUrl}private/people/get/cpstatus/${params.cpStatus}${queryString}`);
33
33
  }
34
+ getByIds(params) {
35
+ const queryParamsArray = params.ids.map((id) => `id=${encodeURIComponent(id)}`);
36
+ if (params.include) {
37
+ queryParamsArray.push(`include=${params.include}`);
38
+ }
39
+ const queryString = queryParamsArray.length > 0 ? '?' + queryParamsArray.join('&') : '';
40
+ return this.httpRequest.get(`${this.baseUrl}private/people/batch${queryString}`);
41
+ }
34
42
  };
35
43
  PeopleBusinessApi = __decorate([
36
44
  injectable(),
@@ -1,4 +1,5 @@
1
1
  import { CPStatusEnum } from "@fiado/type-kit/bin/identity/index.js";
2
+ import { PeopleBatchIncludeEnum, PeopleBatchResponse } from "@fiado/type-kit/bin/peopleBusiness/index.js";
2
3
  type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
3
4
  export interface IPeopleBusinessApi {
4
5
  getByCPStatus(params: {
@@ -13,5 +14,14 @@ export interface IPeopleBusinessApi {
13
14
  }[];
14
15
  index: string | null;
15
16
  }>>;
17
+ /**
18
+ * Lee hasta 100 peopleIds de una sola vez. `include` acota a una sola tabla; omitirlo lee
19
+ * People_GT y AccountRequirementControl_GT. La respuesta trae `notFound` con los ids que
20
+ * ninguna tabla devolvio.
21
+ */
22
+ getByIds(params: {
23
+ ids: string[];
24
+ include?: PeopleBatchIncludeEnum;
25
+ }): Promise<FiadoApiResponse<PeopleBatchResponse>>;
16
26
  }
17
27
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "5.27.0",
3
+ "version": "5.29.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.295.0",
37
+ "@fiado/type-kit": "^3.308.0",
38
38
  "dotenv": "^16.4.7"
39
39
  },
40
40
  "peerDependencies": {
@@ -0,0 +1,45 @@
1
+ import { inject, injectable } from "inversify";
2
+ import type { IHttpRequest } from "@fiado/http-client";
3
+ import type { GetEventsSinceResponse } from "@fiado/type-kit/bin/centralPayments/index.js";
4
+ import type { ICentralPaymentsWebhookApi } from "./interfaces/ICentralPaymentsWebhookApi.js";
5
+ type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
6
+
7
+ /** Contrato y semantica completos -> `ICentralPaymentsWebhookApi`. */
8
+ @injectable()
9
+ export class CentralPaymentsWebhookApi implements ICentralPaymentsWebhookApi {
10
+
11
+ // El buildspec publica la URL en SSM con "/" final: se normaliza para no armar "//events".
12
+ private readonly baseUrl = (process.env.CENTRAL_PAYMENTS_WEBHOOK_URL || "").replace(/\/+$/, "");
13
+
14
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
15
+
16
+ async getEventsSince(params: {
17
+ type: string;
18
+ since: number;
19
+ pageSize?: number;
20
+ index?: string;
21
+ }): Promise<FiadoApiResponse<GetEventsSinceResponse>> {
22
+ this.validateBaseUrl();
23
+
24
+ const query = new URLSearchParams({
25
+ type: params.type,
26
+ since: String(params.since),
27
+ });
28
+
29
+ if (params.pageSize !== undefined) {
30
+ query.append("pageSize", String(params.pageSize));
31
+ }
32
+ if (params.index) {
33
+ query.append("index", params.index);
34
+ }
35
+
36
+ const url = `${this.baseUrl}/events?${query.toString()}`;
37
+ return await this.httpRequest.get<FiadoApiResponse<GetEventsSinceResponse>>(url);
38
+ }
39
+
40
+ private validateBaseUrl(): void {
41
+ if (!this.baseUrl) {
42
+ throw new Error("Environment variable CENTRAL_PAYMENTS_WEBHOOK_URL value not found");
43
+ }
44
+ }
45
+ }
@@ -0,0 +1,2 @@
1
+ export * from './interfaces/ICentralPaymentsWebhookApi.js';
2
+ export * from './CentralPaymentsWebhookApi.js';
@@ -0,0 +1,20 @@
1
+ import type { GetEventsSinceResponse } from "@fiado/type-kit/bin/centralPayments/index.js";
2
+ type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
3
+
4
+ export interface ICentralPaymentsWebhookApi {
5
+ /**
6
+ * Devuelve los eventos de webhook de un tipo ocurridos despues de `since`.
7
+ *
8
+ * @param type Tipo de evento. Es la clave de particion del GSI `type-createdAt-index`,
9
+ * por eso es obligatorio: para varios tipos hay que llamar una vez por tipo.
10
+ * @param since Epoch en milisegundos. Devuelve los eventos con `createdAt` mayor.
11
+ * @param pageSize Default 100 en el servidor, maximo 500.
12
+ * @param index Cursor devuelto por la llamada anterior. Omitir en la primera pagina.
13
+ */
14
+ getEventsSince(params: {
15
+ type: string;
16
+ since: number;
17
+ pageSize?: number;
18
+ index?: string;
19
+ }): Promise<FiadoApiResponse<GetEventsSinceResponse>>;
20
+ }
@@ -192,6 +192,7 @@ import { IResearchSheetsApi, ResearchSheetsApi } from "./research-sheets/index.j
192
192
  import { IAuthBusinessApi, AuthBusinessApi } from "./auth-business/index.js";
193
193
  // KYC verifications business — lectura confirmatoria server-side del KYC por directoryId (SureKeep F2)
194
194
  import { IKycVerificationsBusinessApi, KycVerificationsBusinessApi } from "./kyc/index.js";
195
+ import { ICentralPaymentsWebhookApi, CentralPaymentsWebhookApi } from "./central-payments-webhook/index.js";
195
196
  // Collection engine — cliente del motor de cobro central (collect/registerCollectible/deregister)
196
197
  import { ICollectionEngineApi } from "./collection-engine/index.js";
197
198
  import CollectionEngineApi from "./collection-engine/api/CollectionEngineApi.js";
@@ -365,6 +366,7 @@ export const apiInvokerBindings = new ContainerModule(({ bind }) => {
365
366
  // KYC verifications business — lectura confirmatoria server-side del KYC por directoryId.
366
367
  // La consume el wizard de SureKeep F2 tras el aviso async del stream de `KycVerifications`.
367
368
  bind<IKycVerificationsBusinessApi>("IKycVerificationsBusinessApi").to(KycVerificationsBusinessApi);
369
+ bind<ICentralPaymentsWebhookApi>("ICentralPaymentsWebhookApi").to(CentralPaymentsWebhookApi);
368
370
 
369
371
  // Collection engine — motor de cobro central multitenant (collect/registerCollectible/deregister)
370
372
  bind<ICollectionEngineApi>("ICollectionEngineApi").to(CollectionEngineApi);
package/src/index.ts CHANGED
@@ -107,5 +107,6 @@ export * from "./beneficiary/index.js";
107
107
  export * from "./research-sheets/index.js";
108
108
  export * from "./auth-business/index.js";
109
109
  export * from "./kyc/index.js";
110
+ export * from "./central-payments-webhook/index.js";
110
111
  export * from "./collection-engine/index.js";
111
112
  export * from "./domain-callback/index.js";
@@ -1,8 +1,9 @@
1
1
  import { inject, injectable } from "inversify";
2
- import { IHttpRequest } from "@fiado/http-client";
2
+ import type { IHttpRequest } from "@fiado/http-client";
3
3
  import { IPeopleBusinessApi } from "./interfaces/IPeopleBusinessApi.js";
4
4
  type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
5
5
  import { CPStatusEnum } from "@fiado/type-kit/bin/identity/index.js";
6
+ import { PeopleBatchIncludeEnum, PeopleBatchResponse } from "@fiado/type-kit/bin/peopleBusiness/index.js";
6
7
 
7
8
 
8
9
  @injectable()
@@ -28,5 +29,15 @@ export default class PeopleBusinessApi implements IPeopleBusinessApi {
28
29
  const queryString = queryParamsArray.length > 0 ? '?' + queryParamsArray.join('&') : '';
29
30
  return this.httpRequest.get(`${this.baseUrl}private/people/get/cpstatus/${params.cpStatus}${queryString}`);
30
31
  }
32
+
33
+ getByIds(params: { ids: string[]; include?: PeopleBatchIncludeEnum; }): Promise<FiadoApiResponse<PeopleBatchResponse>> {
34
+ const queryParamsArray = params.ids.map((id) => `id=${encodeURIComponent(id)}`);
35
+ if (params.include) {
36
+ queryParamsArray.push(`include=${params.include}`);
37
+ }
38
+
39
+ const queryString = queryParamsArray.length > 0 ? '?' + queryParamsArray.join('&') : '';
40
+ return this.httpRequest.get(`${this.baseUrl}private/people/batch${queryString}`);
41
+ }
31
42
  }
32
43
 
@@ -1,8 +1,15 @@
1
1
  import { CPStatusEnum } from "@fiado/type-kit/bin/identity/index.js";
2
+ import { PeopleBatchIncludeEnum, PeopleBatchResponse } from "@fiado/type-kit/bin/peopleBusiness/index.js";
2
3
  type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
3
4
 
4
5
 
5
6
  export interface IPeopleBusinessApi {
6
7
  getByCPStatus(params: { index: string; pageSize: number; cpStatus: CPStatusEnum; sort: "ascending" | "descending"; }): Promise<FiadoApiResponse<{ items: {people: any, accountRequirementControl: any}[]; index: string | null; }>>;
7
8
 
9
+ /**
10
+ * Lee hasta 100 peopleIds de una sola vez. `include` acota a una sola tabla; omitirlo lee
11
+ * People_GT y AccountRequirementControl_GT. La respuesta trae `notFound` con los ids que
12
+ * ninguna tabla devolvio.
13
+ */
14
+ getByIds(params: { ids: string[]; include?: PeopleBatchIncludeEnum }): Promise<FiadoApiResponse<PeopleBatchResponse>>;
8
15
  }
@@ -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,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 MembershipApi = class MembershipApi {
17
- httpRequest;
18
- baseUrl = process.env.MEMBERSHIP_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
- MembershipApi = __decorate([
28
- injectable(),
29
- __param(0, inject("IHttpRequest")),
30
- __metadata("design:paramtypes", [Object])
31
- ], MembershipApi);
32
- export { MembershipApi };
@@ -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,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 {};