@fiado/api-invoker 5.35.0 → 5.37.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 (37) hide show
  1. package/.github/workflows/npm-publish.yml +31 -0
  2. package/bin/datacultrConnector/api/DatacultrConnectorApi.d.ts +28 -0
  3. package/bin/datacultrConnector/api/DatacultrConnectorApi.js +60 -0
  4. package/bin/datacultrConnector/api/interfaces/IDatacultrConnectorApi.d.ts +105 -0
  5. package/bin/datacultrConnector/index.d.ts +2 -0
  6. package/bin/datacultrConnector/index.js +2 -0
  7. package/bin/index.d.ts +1 -0
  8. package/bin/index.js +1 -0
  9. package/bin/retailCustomer/api/interfaces/IRetailCustomerBusinessApi.d.ts +1 -1
  10. package/package.json +1 -1
  11. package/src/datacultrConnector/api/DatacultrConnectorApi.ts +86 -0
  12. package/src/datacultrConnector/api/interfaces/IDatacultrConnectorApi.ts +144 -0
  13. package/src/datacultrConnector/index.ts +2 -0
  14. package/src/index.ts +1 -0
  15. package/src/retailCustomer/api/interfaces/IRetailCustomerBusinessApi.ts +1 -1
  16. package/bin/membership/MembershipApi.d.ts +0 -12
  17. package/bin/membership/MembershipApi.js +0 -32
  18. package/bin/membership/index.d.ts +0 -2
  19. package/bin/membership/index.js +0 -2
  20. package/bin/membership/interfaces/IMembershipApi.d.ts +0 -15
  21. package/bin/notificationWebsockets/NotificationWebsocketApi.d.ts +0 -12
  22. package/bin/notificationWebsockets/NotificationWebsocketApi.js +0 -32
  23. package/bin/notificationWebsockets/interfaces/INotificationWebsocketApi.d.ts +0 -15
  24. package/bin/notificationWebsockets/interfaces/INotificationWebsocketApi.js +0 -1
  25. package/bin/performance-profile/PerformanceProfileApi.d.ts +0 -12
  26. package/bin/performance-profile/PerformanceProfileApi.js +0 -32
  27. package/bin/performance-profile/index.d.ts +0 -2
  28. package/bin/performance-profile/index.js +0 -2
  29. package/bin/performance-profile/interfaces/IPerformanceProfileApi.d.ts +0 -15
  30. package/bin/performance-profile/interfaces/IPerformanceProfileApi.js +0 -1
  31. package/bin/presence-websocket/PresenceWebsocketApi.d.ts +0 -12
  32. package/bin/presence-websocket/PresenceWebsocketApi.js +0 -32
  33. package/bin/presence-websocket/index.d.ts +0 -2
  34. package/bin/presence-websocket/index.js +0 -2
  35. package/bin/presence-websocket/interfaces/IPresenceWebsocketApi.d.ts +0 -15
  36. package/bin/presence-websocket/interfaces/IPresenceWebsocketApi.js +0 -1
  37. /package/bin/{membership/interfaces/IMembershipApi.js → datacultrConnector/api/interfaces/IDatacultrConnectorApi.js} +0 -0
@@ -0,0 +1,31 @@
1
+ name: "Publish to npm"
2
+
3
+ on:
4
+ push:
5
+ branches: [ develop ]
6
+ paths-ignore:
7
+ - '**.md'
8
+ - 'docs/**'
9
+ - '.github/**'
10
+ - '.gitignore'
11
+ - '.npmignore'
12
+ workflow_dispatch:
13
+ inputs:
14
+ dry-run:
15
+ description: 'Corre build, test y npm publish --dry-run sin publicar de verdad'
16
+ required: false
17
+ default: false
18
+ type: boolean
19
+
20
+ concurrency:
21
+ group: npm-publish-${{ github.ref }}
22
+ cancel-in-progress: false
23
+
24
+ jobs:
25
+ publish:
26
+ uses: Fiado-Today/github-workflows/.github/workflows/npm-publish.yml@develop
27
+ permissions:
28
+ contents: write
29
+ with:
30
+ dry-run: ${{ inputs.dry-run == true }}
31
+ secrets: inherit
@@ -0,0 +1,28 @@
1
+ import type { IHttpRequest } from "@fiado/http-client";
2
+ import { StandardResponse } from "@fiado/gateway-adapter";
3
+ import { DeviceAutoLockScheduleRequest, DeviceAutoLockScheduleResponse, DeviceEnrollInitiateResponse, DeviceEnrollRequest, DeviceEnrollStatusRequest, DeviceEnrollStatusResponse, DeviceLastSeenRequest, DeviceLastSeenResponse, DeviceLockRequest, DeviceLockResponse, DeviceStatusRequest, DeviceStatusResponse, DeviceUnlockRequest, DeviceUnlockResponse } from "@fiado/type-kit/bin/mdm/index.js";
4
+ import { DeviceBatchRequest, DeviceBatchResult, IDatacultrConnectorApi } from "./interfaces/IDatacultrConnectorApi.js";
5
+ /**
6
+ * Publisher HTTP del lambda `datacultr-connector` (provider MDM de SureKeep). Contrato y semántica
7
+ * completos → `IDatacultrConnectorApi` (paths sin prefijo `/private`, sin tenant, `StandardResponse`
8
+ * → leer `result.data`, granularidad por ítem, y la limitación de `enrollDevices`).
9
+ *
10
+ * Env var requerida en el consumer: `DATACULTR_CONNECTOR_URL`.
11
+ * El template.yml del consumer la setea con:
12
+ *
13
+ * DATACULTR_CONNECTOR_URL: '{{resolve:ssm:datacultr-connector}}'
14
+ *
15
+ * Convención CLAUDE.md global: SSM key = nombre del lambda owner de la URL.
16
+ */
17
+ export default class DatacultrConnectorApi implements IDatacultrConnectorApi {
18
+ private httpRequest;
19
+ private readonly baseUrl;
20
+ constructor(httpRequest: IHttpRequest);
21
+ enrollDevices(input: DeviceBatchRequest<DeviceEnrollRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceEnrollInitiateResponse>>>;
22
+ enrollStatus(input: DeviceBatchRequest<DeviceEnrollStatusRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceEnrollStatusResponse>>>;
23
+ getStatus(input: DeviceBatchRequest<DeviceStatusRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceStatusResponse>>>;
24
+ getLastSeen(input: DeviceBatchRequest<DeviceLastSeenRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceLastSeenResponse>>>;
25
+ lockDevices(input: DeviceBatchRequest<DeviceLockRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceLockResponse>>>;
26
+ unlockDevices(input: DeviceBatchRequest<DeviceUnlockRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceUnlockResponse>>>;
27
+ autoLockSchedule(input: DeviceBatchRequest<DeviceAutoLockScheduleRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceAutoLockScheduleResponse>>>;
28
+ }
@@ -0,0 +1,60 @@
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
+ /**
15
+ * Publisher HTTP del lambda `datacultr-connector` (provider MDM de SureKeep). Contrato y semántica
16
+ * completos → `IDatacultrConnectorApi` (paths sin prefijo `/private`, sin tenant, `StandardResponse`
17
+ * → leer `result.data`, granularidad por ítem, y la limitación de `enrollDevices`).
18
+ *
19
+ * Env var requerida en el consumer: `DATACULTR_CONNECTOR_URL`.
20
+ * El template.yml del consumer la setea con:
21
+ *
22
+ * DATACULTR_CONNECTOR_URL: '{{resolve:ssm:datacultr-connector}}'
23
+ *
24
+ * Convención CLAUDE.md global: SSM key = nombre del lambda owner de la URL.
25
+ */
26
+ let DatacultrConnectorApi = class DatacultrConnectorApi {
27
+ httpRequest;
28
+ // El buildspec publica la URL en SSM con "/" final — se normaliza para no armar "//devices".
29
+ baseUrl = (process.env.DATACULTR_CONNECTOR_URL || "").replace(/\/+$/, "");
30
+ constructor(httpRequest) {
31
+ this.httpRequest = httpRequest;
32
+ }
33
+ async enrollDevices(input) {
34
+ return await this.httpRequest.post(`${this.baseUrl}/devices/enroll`, input);
35
+ }
36
+ async enrollStatus(input) {
37
+ return await this.httpRequest.post(`${this.baseUrl}/devices/enroll/status`, input);
38
+ }
39
+ async getStatus(input) {
40
+ return await this.httpRequest.post(`${this.baseUrl}/devices/status`, input);
41
+ }
42
+ async getLastSeen(input) {
43
+ return await this.httpRequest.post(`${this.baseUrl}/devices/last-seen`, input);
44
+ }
45
+ async lockDevices(input) {
46
+ return await this.httpRequest.post(`${this.baseUrl}/devices/lock`, input);
47
+ }
48
+ async unlockDevices(input) {
49
+ return await this.httpRequest.post(`${this.baseUrl}/devices/unlock`, input);
50
+ }
51
+ async autoLockSchedule(input) {
52
+ return await this.httpRequest.post(`${this.baseUrl}/devices/auto-lock-schedule`, input);
53
+ }
54
+ };
55
+ DatacultrConnectorApi = __decorate([
56
+ injectable(),
57
+ __param(0, inject("IHttpRequest")),
58
+ __metadata("design:paramtypes", [Object])
59
+ ], DatacultrConnectorApi);
60
+ export default DatacultrConnectorApi;
@@ -0,0 +1,105 @@
1
+ import { StandardResponse } from "@fiado/gateway-adapter";
2
+ import { DeviceAutoLockScheduleRequest, DeviceAutoLockScheduleResponse, DeviceEnrollInitiateResponse, DeviceEnrollRequest, DeviceEnrollStatusRequest, DeviceEnrollStatusResponse, DeviceLastSeenRequest, DeviceLastSeenResponse, DeviceLockRequest, DeviceLockResponse, DeviceStatusRequest, DeviceStatusResponse, DeviceUnlockRequest, DeviceUnlockResponse } from "@fiado/type-kit/bin/mdm/index.js";
3
+ /**
4
+ * Contrato del publisher HTTP del lambda `datacultr-connector` — el provider MDM que traduce el
5
+ * contrato agnóstico de dispositivo (`@fiado/type-kit/bin/mdm`) a la API de Datacultr. Su consumidor
6
+ * es el módulo `device/` de `loan-credit-business` (`MdmConnectorClient`), que NUNCA le pega por
7
+ * `http-client` directo: entre lambdas Fiado se habla siempre por `@fiado/api-invoker`.
8
+ *
9
+ * ─────────────────────────────────────────────────────────────────────────────
10
+ * PATHS — `/devices/...`, SIN prefijo `/private`.
11
+ * ─────────────────────────────────────────────────────────────────────────────
12
+ * A diferencia de la mayoría de los privados Fiado (`/private/...`), el `PrivateController` de este
13
+ * connector declara los paths como `/devices/enroll`, `/devices/status`, etc. El aislamiento no lo da
14
+ * el prefijo sino la red: la API privada es `EndpointConfiguration: PRIVATE` con ResourcePolicy que
15
+ * deniega todo lo que no venga de los VPC Endpoints de Fiado.
16
+ *
17
+ * ─────────────────────────────────────────────────────────────────────────────
18
+ * SIN TENANT — hoy el connector es efectivamente single-tenant.
19
+ * ─────────────────────────────────────────────────────────────────────────────
20
+ * Ningún método lleva `tenantId` porque el destino NO lo resuelve: su `PrivateController` no lee
21
+ * `X-Tenant-Id` ni `x-tenant-issuer` (cero referencias en el repo). Las credenciales de Datacultr
22
+ * salen de un único secret del lambda. DEUDA a levantar cuando el connector implemente M6
23
+ * (multi-tenant del MDM): ahí este contrato suma el tenant y pasa a ser un cambio MAJOR.
24
+ *
25
+ * ─────────────────────────────────────────────────────────────────────────────
26
+ * AUTORIZACIÓN — `Feature.ANONIMUS`.
27
+ * ─────────────────────────────────────────────────────────────────────────────
28
+ * Los privados del connector son `Feature.ANONIMUS`: sin RBAC y sin claims. La única protección es
29
+ * la VPC, así que el caller no manda `Authorization` ni headers de identidad.
30
+ *
31
+ * ⚠️ Retorno `StandardResponse<T>` — el consumer lee `result.data`, NO `result.body`.
32
+ * Errores de transporte (falla el lambda entero, no un ítem): el publisher RECHAZA con el
33
+ * `DomainError` tipado del destino. Nunca fallback: el caller jamás recibe un batch vacío
34
+ * disfrazado de éxito.
35
+ *
36
+ * Granularidad POR ÍTEM — el batch NUNCA falla entero:
37
+ * - Cada `results[i]` trae su propio `status` (`SUCCESS` | `PENDING` | `ERROR`) y un `error` opcional.
38
+ * Un 200 puede traer ítems en `ERROR`: el caller TIENE que recorrer `results` y decidir por ítem.
39
+ * - El `error.code` del ítem es un `MdmErrorCodeEnum` (`PROVIDER_NOT_SUPPORTED`, `DEVICE_NOT_FOUND`,
40
+ * `PROVIDER_TIMEOUT`, …). El `status` no lleva el motivo: el motivo vive solo en `error`.
41
+ *
42
+ * Env var requerida en el consumer: `DATACULTR_CONNECTOR_URL`.
43
+ * El template.yml del consumer la setea con:
44
+ *
45
+ * DATACULTR_CONNECTOR_URL: '{{resolve:ssm:datacultr-connector}}'
46
+ *
47
+ * Convención CLAUDE.md global: SSM key = nombre del lambda owner de la URL.
48
+ */
49
+ /**
50
+ * Sobre de entrada de los endpoints batch del connector. No vive en `@fiado/type-kit/bin/mdm`
51
+ * porque los DTOs publicados son de UN imei; el sobre es dominio del líder (gap E8), migrar a
52
+ * type-kit cuando lo publique.
53
+ */
54
+ export interface DeviceBatchRequest<TItem> {
55
+ items: TItem[];
56
+ }
57
+ /** Sobre de salida de los endpoints batch: viaja dentro de `StandardResponse.data`. Mismo gap E8. */
58
+ export interface DeviceBatchResult<TItem> {
59
+ results: TItem[];
60
+ }
61
+ export interface IDatacultrConnectorApi {
62
+ /**
63
+ * POST `/devices/enroll` — pre-registra la expectativa de enrolamiento de cada IMEI.
64
+ *
65
+ * ⚠️ NO TOCA AL PROVEEDOR. Textual del openapi del destino: "Pre-registrar expectativa de
66
+ * enrollment (no toca provider) — DC no acepta enrollment outbound; el webhook inbound (B10) es
67
+ * quien actualiza la row a SUCCESS". Solo persiste una row `PENDING` en `PendingOperation_GT`.
68
+ *
69
+ * ⚠️ Y Datacultr confirmó por correo (2026-08-18) que NO MANDA WEBHOOKS. Sumando las dos: hoy un
70
+ * enrolamiento iniciado por esta vía queda `PENDING` PARA SIEMPRE. El caller NO debe tratar el
71
+ * `PENDING` como "en vuelo, ya se va a resolver" — no hay quien lo resuelva mientras el webhook
72
+ * inbound no exista. El enrolamiento real se hace hoy fuera de banda, en la consola de Datacultr.
73
+ */
74
+ enrollDevices(input: DeviceBatchRequest<DeviceEnrollRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceEnrollInitiateResponse>>>;
75
+ /**
76
+ * POST `/devices/enroll/status` — estado del enrolamiento de cada IMEI. Lee DDB, no toca al
77
+ * proveedor.
78
+ *
79
+ * ⚠️ Espeja la limitación de `enrollDevices`: como nadie actualiza la row (Datacultr no manda
80
+ * webhooks), este método devuelve `PENDING` indefinidamente para todo lo iniciado por esa vía.
81
+ * Un `PENDING` acá NO es señal de progreso.
82
+ */
83
+ enrollStatus(input: DeviceBatchRequest<DeviceEnrollStatusRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceEnrollStatusResponse>>>;
84
+ /**
85
+ * POST `/devices/status` — estado actual de cada IMEI (bloqueado, libre, sin enrolar).
86
+ * Si el batch trae un solo ítem, el destino cae a Registration Status y enriquece brand/model.
87
+ */
88
+ getStatus(input: DeviceBatchRequest<DeviceStatusRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceStatusResponse>>>;
89
+ /** POST `/devices/last-seen` — último contacto reportado por cada IMEI (señal de vida). */
90
+ getLastSeen(input: DeviceBatchRequest<DeviceLastSeenRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceLastSeenResponse>>>;
91
+ /**
92
+ * POST `/devices/lock` — bloquea cada IMEI.
93
+ * Los ítems con `mode: TEMPORARY` se degradan por ítem con `PROVIDER_NOT_SUPPORTED` sin llegar al
94
+ * proveedor: Datacultr solo soporta el bloqueo firme.
95
+ */
96
+ lockDevices(input: DeviceBatchRequest<DeviceLockRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceLockResponse>>>;
97
+ /** POST `/devices/unlock` — desbloquea cada IMEI. */
98
+ unlockDevices(input: DeviceBatchRequest<DeviceUnlockRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceUnlockResponse>>>;
99
+ /**
100
+ * POST `/devices/auto-lock-schedule` — programa el bloqueo de cada IMEI en una fecha futura.
101
+ * `lockAt` es ISO8601 UTC y el destino valida `lockAt > now` antes de llamar al proveedor.
102
+ * Es la vía real del bloqueo en Datacultr: el inmediato no surte efecto, el programado sí.
103
+ */
104
+ autoLockSchedule(input: DeviceBatchRequest<DeviceAutoLockScheduleRequest>): Promise<StandardResponse<DeviceBatchResult<DeviceAutoLockScheduleResponse>>>;
105
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./api/interfaces/IDatacultrConnectorApi.js";
2
+ export { default as DatacultrConnectorApi } from "./api/DatacultrConnectorApi.js";
@@ -0,0 +1,2 @@
1
+ export * from "./api/interfaces/IDatacultrConnectorApi.js";
2
+ export { default as DatacultrConnectorApi } from "./api/DatacultrConnectorApi.js";
package/bin/index.d.ts CHANGED
@@ -110,3 +110,4 @@ export * from "./kyc/index.js";
110
110
  export * from "./central-payments-webhook/index.js";
111
111
  export * from "./collection-engine/index.js";
112
112
  export * from "./domain-callback/index.js";
113
+ export * from "./datacultrConnector/index.js";
package/bin/index.js CHANGED
@@ -110,3 +110,4 @@ export * from "./kyc/index.js";
110
110
  export * from "./central-payments-webhook/index.js";
111
111
  export * from "./collection-engine/index.js";
112
112
  export * from "./domain-callback/index.js";
113
+ export * from "./datacultrConnector/index.js";
@@ -54,7 +54,7 @@ export interface IRetailCustomerBusinessApi {
54
54
  /**
55
55
  * PUT /private/customers/{customerId}/account-result?tenantId= — aterriza el resultado terminal de
56
56
  * la apertura de cuenta async (D35). Solo acepta OPEN/FAILED (nunca el intermedio OPENING). OPEN
57
- * llega con `pcfClabe`/`pcfAccountLevel`; FAILED con `failReason`.
57
+ * llega con `pcfAccountLevel`; FAILED con `failReason`.
58
58
  *
59
59
  * @throws si el cliente no existe (`404 CUSTOMER_NOT_FOUND`).
60
60
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/api-invoker",
3
- "version": "5.35.0",
3
+ "version": "5.37.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",
@@ -0,0 +1,86 @@
1
+ import { inject, injectable } from "inversify";
2
+ import type { IHttpRequest } from "@fiado/http-client";
3
+ import { StandardResponse } from "@fiado/gateway-adapter";
4
+ import {
5
+ DeviceAutoLockScheduleRequest,
6
+ DeviceAutoLockScheduleResponse,
7
+ DeviceEnrollInitiateResponse,
8
+ DeviceEnrollRequest,
9
+ DeviceEnrollStatusRequest,
10
+ DeviceEnrollStatusResponse,
11
+ DeviceLastSeenRequest,
12
+ DeviceLastSeenResponse,
13
+ DeviceLockRequest,
14
+ DeviceLockResponse,
15
+ DeviceStatusRequest,
16
+ DeviceStatusResponse,
17
+ DeviceUnlockRequest,
18
+ DeviceUnlockResponse,
19
+ } from "@fiado/type-kit/bin/mdm/index.js";
20
+ import {
21
+ DeviceBatchRequest,
22
+ DeviceBatchResult,
23
+ IDatacultrConnectorApi,
24
+ } from "./interfaces/IDatacultrConnectorApi.js";
25
+
26
+ /**
27
+ * Publisher HTTP del lambda `datacultr-connector` (provider MDM de SureKeep). Contrato y semántica
28
+ * completos → `IDatacultrConnectorApi` (paths sin prefijo `/private`, sin tenant, `StandardResponse`
29
+ * → leer `result.data`, granularidad por ítem, y la limitación de `enrollDevices`).
30
+ *
31
+ * Env var requerida en el consumer: `DATACULTR_CONNECTOR_URL`.
32
+ * El template.yml del consumer la setea con:
33
+ *
34
+ * DATACULTR_CONNECTOR_URL: '{{resolve:ssm:datacultr-connector}}'
35
+ *
36
+ * Convención CLAUDE.md global: SSM key = nombre del lambda owner de la URL.
37
+ */
38
+ @injectable()
39
+ export default class DatacultrConnectorApi implements IDatacultrConnectorApi {
40
+ // El buildspec publica la URL en SSM con "/" final — se normaliza para no armar "//devices".
41
+ private readonly baseUrl = (process.env.DATACULTR_CONNECTOR_URL || "").replace(/\/+$/, "");
42
+
43
+ constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
44
+
45
+ async enrollDevices(
46
+ input: DeviceBatchRequest<DeviceEnrollRequest>,
47
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceEnrollInitiateResponse>>> {
48
+ return await this.httpRequest.post(`${this.baseUrl}/devices/enroll`, input);
49
+ }
50
+
51
+ async enrollStatus(
52
+ input: DeviceBatchRequest<DeviceEnrollStatusRequest>,
53
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceEnrollStatusResponse>>> {
54
+ return await this.httpRequest.post(`${this.baseUrl}/devices/enroll/status`, input);
55
+ }
56
+
57
+ async getStatus(
58
+ input: DeviceBatchRequest<DeviceStatusRequest>,
59
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceStatusResponse>>> {
60
+ return await this.httpRequest.post(`${this.baseUrl}/devices/status`, input);
61
+ }
62
+
63
+ async getLastSeen(
64
+ input: DeviceBatchRequest<DeviceLastSeenRequest>,
65
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceLastSeenResponse>>> {
66
+ return await this.httpRequest.post(`${this.baseUrl}/devices/last-seen`, input);
67
+ }
68
+
69
+ async lockDevices(
70
+ input: DeviceBatchRequest<DeviceLockRequest>,
71
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceLockResponse>>> {
72
+ return await this.httpRequest.post(`${this.baseUrl}/devices/lock`, input);
73
+ }
74
+
75
+ async unlockDevices(
76
+ input: DeviceBatchRequest<DeviceUnlockRequest>,
77
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceUnlockResponse>>> {
78
+ return await this.httpRequest.post(`${this.baseUrl}/devices/unlock`, input);
79
+ }
80
+
81
+ async autoLockSchedule(
82
+ input: DeviceBatchRequest<DeviceAutoLockScheduleRequest>,
83
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceAutoLockScheduleResponse>>> {
84
+ return await this.httpRequest.post(`${this.baseUrl}/devices/auto-lock-schedule`, input);
85
+ }
86
+ }
@@ -0,0 +1,144 @@
1
+ import { StandardResponse } from "@fiado/gateway-adapter";
2
+ import {
3
+ DeviceAutoLockScheduleRequest,
4
+ DeviceAutoLockScheduleResponse,
5
+ DeviceEnrollInitiateResponse,
6
+ DeviceEnrollRequest,
7
+ DeviceEnrollStatusRequest,
8
+ DeviceEnrollStatusResponse,
9
+ DeviceLastSeenRequest,
10
+ DeviceLastSeenResponse,
11
+ DeviceLockRequest,
12
+ DeviceLockResponse,
13
+ DeviceStatusRequest,
14
+ DeviceStatusResponse,
15
+ DeviceUnlockRequest,
16
+ DeviceUnlockResponse,
17
+ } from "@fiado/type-kit/bin/mdm/index.js";
18
+
19
+ /**
20
+ * Contrato del publisher HTTP del lambda `datacultr-connector` — el provider MDM que traduce el
21
+ * contrato agnóstico de dispositivo (`@fiado/type-kit/bin/mdm`) a la API de Datacultr. Su consumidor
22
+ * es el módulo `device/` de `loan-credit-business` (`MdmConnectorClient`), que NUNCA le pega por
23
+ * `http-client` directo: entre lambdas Fiado se habla siempre por `@fiado/api-invoker`.
24
+ *
25
+ * ─────────────────────────────────────────────────────────────────────────────
26
+ * PATHS — `/devices/...`, SIN prefijo `/private`.
27
+ * ─────────────────────────────────────────────────────────────────────────────
28
+ * A diferencia de la mayoría de los privados Fiado (`/private/...`), el `PrivateController` de este
29
+ * connector declara los paths como `/devices/enroll`, `/devices/status`, etc. El aislamiento no lo da
30
+ * el prefijo sino la red: la API privada es `EndpointConfiguration: PRIVATE` con ResourcePolicy que
31
+ * deniega todo lo que no venga de los VPC Endpoints de Fiado.
32
+ *
33
+ * ─────────────────────────────────────────────────────────────────────────────
34
+ * SIN TENANT — hoy el connector es efectivamente single-tenant.
35
+ * ─────────────────────────────────────────────────────────────────────────────
36
+ * Ningún método lleva `tenantId` porque el destino NO lo resuelve: su `PrivateController` no lee
37
+ * `X-Tenant-Id` ni `x-tenant-issuer` (cero referencias en el repo). Las credenciales de Datacultr
38
+ * salen de un único secret del lambda. DEUDA a levantar cuando el connector implemente M6
39
+ * (multi-tenant del MDM): ahí este contrato suma el tenant y pasa a ser un cambio MAJOR.
40
+ *
41
+ * ─────────────────────────────────────────────────────────────────────────────
42
+ * AUTORIZACIÓN — `Feature.ANONIMUS`.
43
+ * ─────────────────────────────────────────────────────────────────────────────
44
+ * Los privados del connector son `Feature.ANONIMUS`: sin RBAC y sin claims. La única protección es
45
+ * la VPC, así que el caller no manda `Authorization` ni headers de identidad.
46
+ *
47
+ * ⚠️ Retorno `StandardResponse<T>` — el consumer lee `result.data`, NO `result.body`.
48
+ * Errores de transporte (falla el lambda entero, no un ítem): el publisher RECHAZA con el
49
+ * `DomainError` tipado del destino. Nunca fallback: el caller jamás recibe un batch vacío
50
+ * disfrazado de éxito.
51
+ *
52
+ * Granularidad POR ÍTEM — el batch NUNCA falla entero:
53
+ * - Cada `results[i]` trae su propio `status` (`SUCCESS` | `PENDING` | `ERROR`) y un `error` opcional.
54
+ * Un 200 puede traer ítems en `ERROR`: el caller TIENE que recorrer `results` y decidir por ítem.
55
+ * - El `error.code` del ítem es un `MdmErrorCodeEnum` (`PROVIDER_NOT_SUPPORTED`, `DEVICE_NOT_FOUND`,
56
+ * `PROVIDER_TIMEOUT`, …). El `status` no lleva el motivo: el motivo vive solo en `error`.
57
+ *
58
+ * Env var requerida en el consumer: `DATACULTR_CONNECTOR_URL`.
59
+ * El template.yml del consumer la setea con:
60
+ *
61
+ * DATACULTR_CONNECTOR_URL: '{{resolve:ssm:datacultr-connector}}'
62
+ *
63
+ * Convención CLAUDE.md global: SSM key = nombre del lambda owner de la URL.
64
+ */
65
+
66
+ /**
67
+ * Sobre de entrada de los endpoints batch del connector. No vive en `@fiado/type-kit/bin/mdm`
68
+ * porque los DTOs publicados son de UN imei; el sobre es dominio del líder (gap E8), migrar a
69
+ * type-kit cuando lo publique.
70
+ */
71
+ export interface DeviceBatchRequest<TItem> {
72
+ items: TItem[];
73
+ }
74
+
75
+ /** Sobre de salida de los endpoints batch: viaja dentro de `StandardResponse.data`. Mismo gap E8. */
76
+ export interface DeviceBatchResult<TItem> {
77
+ results: TItem[];
78
+ }
79
+
80
+ export interface IDatacultrConnectorApi {
81
+ /**
82
+ * POST `/devices/enroll` — pre-registra la expectativa de enrolamiento de cada IMEI.
83
+ *
84
+ * ⚠️ NO TOCA AL PROVEEDOR. Textual del openapi del destino: "Pre-registrar expectativa de
85
+ * enrollment (no toca provider) — DC no acepta enrollment outbound; el webhook inbound (B10) es
86
+ * quien actualiza la row a SUCCESS". Solo persiste una row `PENDING` en `PendingOperation_GT`.
87
+ *
88
+ * ⚠️ Y Datacultr confirmó por correo (2026-08-18) que NO MANDA WEBHOOKS. Sumando las dos: hoy un
89
+ * enrolamiento iniciado por esta vía queda `PENDING` PARA SIEMPRE. El caller NO debe tratar el
90
+ * `PENDING` como "en vuelo, ya se va a resolver" — no hay quien lo resuelva mientras el webhook
91
+ * inbound no exista. El enrolamiento real se hace hoy fuera de banda, en la consola de Datacultr.
92
+ */
93
+ enrollDevices(
94
+ input: DeviceBatchRequest<DeviceEnrollRequest>,
95
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceEnrollInitiateResponse>>>;
96
+
97
+ /**
98
+ * POST `/devices/enroll/status` — estado del enrolamiento de cada IMEI. Lee DDB, no toca al
99
+ * proveedor.
100
+ *
101
+ * ⚠️ Espeja la limitación de `enrollDevices`: como nadie actualiza la row (Datacultr no manda
102
+ * webhooks), este método devuelve `PENDING` indefinidamente para todo lo iniciado por esa vía.
103
+ * Un `PENDING` acá NO es señal de progreso.
104
+ */
105
+ enrollStatus(
106
+ input: DeviceBatchRequest<DeviceEnrollStatusRequest>,
107
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceEnrollStatusResponse>>>;
108
+
109
+ /**
110
+ * POST `/devices/status` — estado actual de cada IMEI (bloqueado, libre, sin enrolar).
111
+ * Si el batch trae un solo ítem, el destino cae a Registration Status y enriquece brand/model.
112
+ */
113
+ getStatus(
114
+ input: DeviceBatchRequest<DeviceStatusRequest>,
115
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceStatusResponse>>>;
116
+
117
+ /** POST `/devices/last-seen` — último contacto reportado por cada IMEI (señal de vida). */
118
+ getLastSeen(
119
+ input: DeviceBatchRequest<DeviceLastSeenRequest>,
120
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceLastSeenResponse>>>;
121
+
122
+ /**
123
+ * POST `/devices/lock` — bloquea cada IMEI.
124
+ * Los ítems con `mode: TEMPORARY` se degradan por ítem con `PROVIDER_NOT_SUPPORTED` sin llegar al
125
+ * proveedor: Datacultr solo soporta el bloqueo firme.
126
+ */
127
+ lockDevices(
128
+ input: DeviceBatchRequest<DeviceLockRequest>,
129
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceLockResponse>>>;
130
+
131
+ /** POST `/devices/unlock` — desbloquea cada IMEI. */
132
+ unlockDevices(
133
+ input: DeviceBatchRequest<DeviceUnlockRequest>,
134
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceUnlockResponse>>>;
135
+
136
+ /**
137
+ * POST `/devices/auto-lock-schedule` — programa el bloqueo de cada IMEI en una fecha futura.
138
+ * `lockAt` es ISO8601 UTC y el destino valida `lockAt > now` antes de llamar al proveedor.
139
+ * Es la vía real del bloqueo en Datacultr: el inmediato no surte efecto, el programado sí.
140
+ */
141
+ autoLockSchedule(
142
+ input: DeviceBatchRequest<DeviceAutoLockScheduleRequest>,
143
+ ): Promise<StandardResponse<DeviceBatchResult<DeviceAutoLockScheduleResponse>>>;
144
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./api/interfaces/IDatacultrConnectorApi.js";
2
+ export { default as DatacultrConnectorApi } from "./api/DatacultrConnectorApi.js";
package/src/index.ts CHANGED
@@ -110,3 +110,4 @@ export * from "./kyc/index.js";
110
110
  export * from "./central-payments-webhook/index.js";
111
111
  export * from "./collection-engine/index.js";
112
112
  export * from "./domain-callback/index.js";
113
+ export * from "./datacultrConnector/index.js";
@@ -67,7 +67,7 @@ export interface IRetailCustomerBusinessApi {
67
67
  /**
68
68
  * PUT /private/customers/{customerId}/account-result?tenantId= — aterriza el resultado terminal de
69
69
  * la apertura de cuenta async (D35). Solo acepta OPEN/FAILED (nunca el intermedio OPENING). OPEN
70
- * llega con `pcfClabe`/`pcfAccountLevel`; FAILED con `failReason`.
70
+ * llega con `pcfAccountLevel`; FAILED con `failReason`.
71
71
  *
72
72
  * @throws si el cliente no existe (`404 CUSTOMER_NOT_FOUND`).
73
73
  */
@@ -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,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 {};