@fiado/api-invoker 5.21.0 → 5.23.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.
- package/bin/card/CardApi.d.ts +3 -2
- package/bin/card/CardApi.js +7 -0
- package/bin/card/interfaces/ICardApi.d.ts +24 -1
- package/bin/zendesk/queue/ZendeskAlertsPublisher.js +7 -2
- package/package.json +1 -1
- package/src/card/CardApi.ts +16 -2
- package/src/card/interfaces/ICardApi.ts +25 -1
- package/src/zendesk/queue/ZendeskAlertsPublisher.ts +7 -2
- package/bin/membership/MembershipApi.d.ts +0 -12
- package/bin/membership/MembershipApi.js +0 -32
- package/bin/membership/index.d.ts +0 -2
- package/bin/membership/index.js +0 -2
- package/bin/membership/interfaces/IMembershipApi.d.ts +0 -15
- package/bin/membership/interfaces/IMembershipApi.js +0 -1
- package/bin/notificationWebsockets/NotificationWebsocketApi.d.ts +0 -12
- package/bin/notificationWebsockets/NotificationWebsocketApi.js +0 -32
- package/bin/notificationWebsockets/interfaces/INotificationWebsocketApi.d.ts +0 -15
- package/bin/notificationWebsockets/interfaces/INotificationWebsocketApi.js +0 -1
- package/bin/performance-profile/PerformanceProfileApi.d.ts +0 -12
- package/bin/performance-profile/PerformanceProfileApi.js +0 -32
- package/bin/performance-profile/index.d.ts +0 -2
- package/bin/performance-profile/index.js +0 -2
- package/bin/performance-profile/interfaces/IPerformanceProfileApi.d.ts +0 -15
- package/bin/performance-profile/interfaces/IPerformanceProfileApi.js +0 -1
- package/bin/presence-websocket/PresenceWebsocketApi.d.ts +0 -12
- package/bin/presence-websocket/PresenceWebsocketApi.js +0 -32
- package/bin/presence-websocket/index.d.ts +0 -2
- package/bin/presence-websocket/index.js +0 -2
- package/bin/presence-websocket/interfaces/IPresenceWebsocketApi.d.ts +0 -15
- package/bin/presence-websocket/interfaces/IPresenceWebsocketApi.js +0 -1
package/bin/card/CardApi.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
-
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
2
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import { CardApplicationRequest, CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
4
4
|
import { CardsByStatusResponse, ICardApi } from "./interfaces/ICardApi.js";
|
|
5
5
|
import { Provider } from "@fiado/type-kit/bin/provider/index.js";
|
|
6
6
|
import { InfoSelfVerifiedStatus } from "@fiado/type-kit/bin/identity/index.js";
|
|
@@ -19,4 +19,5 @@ export declare class CardApi implements ICardApi {
|
|
|
19
19
|
updateIssuanceObservation(directoryId: string, input: CardIssuanceObservationUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
20
20
|
issuance(directoryId: string, USA_InfoSelfVerified: InfoSelfVerifiedStatus): Promise<void>;
|
|
21
21
|
updateShipping(provider: Provider, shippingId: string, input: UpdateBankAccountCardRequest): Promise<ApiGatewayResponse<void>>;
|
|
22
|
+
cardApplication(directoryId: string, provider: Provider, input: CardApplicationRequest): Promise<void>;
|
|
22
23
|
}
|
package/bin/card/CardApi.js
CHANGED
|
@@ -70,6 +70,13 @@ let CardApi = class CardApi {
|
|
|
70
70
|
const url = `${this.baseUrl}${provider}/shipping/${shippingId}`;
|
|
71
71
|
return await this.httpRequest.put(url, input);
|
|
72
72
|
}
|
|
73
|
+
async cardApplication(directoryId, provider, input) {
|
|
74
|
+
const url = `${this.baseUrl}cards/virtual`;
|
|
75
|
+
// `directoryId` y `provider` van DESPUES del spread a proposito: son los
|
|
76
|
+
// dos campos que el endpoint exige, y un `input` que los trajera con
|
|
77
|
+
// otro valor no debe poder pisarlos.
|
|
78
|
+
await this.httpRequest.post(url, { ...input, directoryId, provider });
|
|
79
|
+
}
|
|
73
80
|
};
|
|
74
81
|
CardApi = __decorate([
|
|
75
82
|
injectable(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
2
|
+
import { CardApplicationRequest, CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
3
3
|
import { InfoSelfVerifiedStatus } from "@fiado/type-kit/bin/identity/index.js";
|
|
4
4
|
import { Provider } from "@fiado/type-kit/bin/provider/index.js";
|
|
5
5
|
export interface CardsByStatusResponse {
|
|
@@ -17,4 +17,27 @@ export interface ICardApi {
|
|
|
17
17
|
updateIssuanceObservation(directoryId: string, input: CardIssuanceObservationUpdateRequest): Promise<ApiGatewayResponse<void>>;
|
|
18
18
|
issuance(directoryId: string, USA_InfoSelfVerified: InfoSelfVerifiedStatus): Promise<void>;
|
|
19
19
|
updateShipping(provider: Provider, shippingId: string, input: UpdateBankAccountCardRequest): Promise<ApiGatewayResponse<void>>;
|
|
20
|
+
/**
|
|
21
|
+
* Emite la tarjeta virtual de un directorio y la registra en
|
|
22
|
+
* `fiado-card-business`, invocable SERVICIO-A-SERVICIO.
|
|
23
|
+
*
|
|
24
|
+
* Hasta esta version esta interfaz declaraba diez metodos y **ninguno
|
|
25
|
+
* creaba tarjetas**: la creacion existia solo en tres rutas humanas
|
|
26
|
+
* (`publicCardApplication`, `agentsCardApplication`,
|
|
27
|
+
* `backofficeCardApplication`), detras de autorizacion de usuario o de
|
|
28
|
+
* agente. Eso dejaba a `account-issuance-business` —que crea la cuenta de
|
|
29
|
+
* Pomelo— sin forma de completarla con su tarjeta.
|
|
30
|
+
*
|
|
31
|
+
* `directoryId` y `provider` viajan en el BODY, no en la ruta: el endpoint
|
|
32
|
+
* es de servicio y no hay token del que sacar el directorio, a diferencia
|
|
33
|
+
* de `publicCardApplication`.
|
|
34
|
+
*
|
|
35
|
+
* **Es idempotente del lado del servidor**: si el directorio ya tiene una
|
|
36
|
+
* tarjeta virtual no cancelada para ese proveedor, no se llama al proveedor
|
|
37
|
+
* y responde 200 igual. El llamador puede reintentar sin duplicar.
|
|
38
|
+
*
|
|
39
|
+
* Devuelve `void`: la ruta no responde la tarjeta creada, asi que el exito
|
|
40
|
+
* es "no lanzo". Un fallo llega como error HTTP.
|
|
41
|
+
*/
|
|
42
|
+
cardApplication(directoryId: string, provider: Provider, input: CardApplicationRequest): Promise<void>;
|
|
20
43
|
}
|
|
@@ -18,9 +18,14 @@ let ZendeskAlertsPublisher = class ZendeskAlertsPublisher {
|
|
|
18
18
|
async publish(message) {
|
|
19
19
|
try {
|
|
20
20
|
const client = new SQSClient();
|
|
21
|
+
const queueUrl = this.ZENDESK_ALERTS_QUEUE;
|
|
22
|
+
// Condicional a la URL: la FIFO exige MessageGroupId y la estándar lo rechaza.
|
|
23
|
+
// Serializa por usuario; sin MessageDeduplicationId (la cola dedup por contenido).
|
|
24
|
+
const directoryId = message.payload?.directoryId;
|
|
21
25
|
const sendMessageRequest = {
|
|
22
|
-
QueueUrl:
|
|
23
|
-
MessageBody: JSON.stringify(message)
|
|
26
|
+
QueueUrl: queueUrl,
|
|
27
|
+
MessageBody: JSON.stringify(message),
|
|
28
|
+
...(queueUrl?.endsWith(".fifo") && directoryId ? { MessageGroupId: directoryId } : {})
|
|
24
29
|
};
|
|
25
30
|
const command = new SendMessageCommand(sendMessageRequest);
|
|
26
31
|
await client.send(command);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.23.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",
|
package/src/card/CardApi.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
// `import type`: `IHttpRequest` es una interfaz, y el import de VALOR rompe
|
|
3
|
+
// bajo ESM en jest ("does not provide an export named 'IHttpRequest'"), que es
|
|
4
|
+
// lo que impedia testear esta clase. Mismo estilo que los demas Api del repo
|
|
5
|
+
// que si tienen suite (p. ej. `RetailCardsBusinessApi`). No cambia el runtime:
|
|
6
|
+
// tsc borra las dos formas por igual.
|
|
7
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
8
|
+
import { CardApplicationRequest, CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
4
9
|
import { inject, injectable } from "inversify";
|
|
5
10
|
import { CardsByStatusResponse, ICardApi } from "./interfaces/ICardApi.js";
|
|
6
11
|
import { Provider } from "@fiado/type-kit/bin/provider/index.js";
|
|
@@ -96,6 +101,15 @@ export class CardApi implements ICardApi {
|
|
|
96
101
|
return await this.httpRequest.put(url, input);
|
|
97
102
|
}
|
|
98
103
|
|
|
104
|
+
async cardApplication(directoryId: string, provider: Provider, input: CardApplicationRequest): Promise<void> {
|
|
105
|
+
|
|
106
|
+
const url = `${this.baseUrl}cards/virtual`;
|
|
107
|
+
// `directoryId` y `provider` van DESPUES del spread a proposito: son los
|
|
108
|
+
// dos campos que el endpoint exige, y un `input` que los trajera con
|
|
109
|
+
// otro valor no debe poder pisarlos.
|
|
110
|
+
await this.httpRequest.post(url, { ...input, directoryId, provider });
|
|
111
|
+
}
|
|
112
|
+
|
|
99
113
|
}
|
|
100
114
|
|
|
101
115
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
2
|
+
import { CardApplicationRequest, CardIssuanceObservationUpdateRequest, CardResponse, CardUpdateIssuanceRequest, Status, UpdateBankAccountCardRequest } from "@fiado/type-kit/bin/card/index.js";
|
|
3
3
|
import { InfoSelfVerifiedStatus } from "@fiado/type-kit/bin/identity/index.js";
|
|
4
4
|
import { Provider } from "@fiado/type-kit/bin/provider/index.js";
|
|
5
5
|
|
|
@@ -30,4 +30,28 @@ export interface ICardApi {
|
|
|
30
30
|
|
|
31
31
|
updateShipping(provider: Provider, shippingId: string, input: UpdateBankAccountCardRequest): Promise<ApiGatewayResponse<void>>;
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Emite la tarjeta virtual de un directorio y la registra en
|
|
35
|
+
* `fiado-card-business`, invocable SERVICIO-A-SERVICIO.
|
|
36
|
+
*
|
|
37
|
+
* Hasta esta version esta interfaz declaraba diez metodos y **ninguno
|
|
38
|
+
* creaba tarjetas**: la creacion existia solo en tres rutas humanas
|
|
39
|
+
* (`publicCardApplication`, `agentsCardApplication`,
|
|
40
|
+
* `backofficeCardApplication`), detras de autorizacion de usuario o de
|
|
41
|
+
* agente. Eso dejaba a `account-issuance-business` —que crea la cuenta de
|
|
42
|
+
* Pomelo— sin forma de completarla con su tarjeta.
|
|
43
|
+
*
|
|
44
|
+
* `directoryId` y `provider` viajan en el BODY, no en la ruta: el endpoint
|
|
45
|
+
* es de servicio y no hay token del que sacar el directorio, a diferencia
|
|
46
|
+
* de `publicCardApplication`.
|
|
47
|
+
*
|
|
48
|
+
* **Es idempotente del lado del servidor**: si el directorio ya tiene una
|
|
49
|
+
* tarjeta virtual no cancelada para ese proveedor, no se llama al proveedor
|
|
50
|
+
* y responde 200 igual. El llamador puede reintentar sin duplicar.
|
|
51
|
+
*
|
|
52
|
+
* Devuelve `void`: la ruta no responde la tarjeta creada, asi que el exito
|
|
53
|
+
* es "no lanzo". Un fallo llega como error HTTP.
|
|
54
|
+
*/
|
|
55
|
+
cardApplication(directoryId: string, provider: Provider, input: CardApplicationRequest): Promise<void>;
|
|
56
|
+
|
|
33
57
|
}
|
|
@@ -24,9 +24,14 @@ export default class ZendeskAlertsPublisher implements IZendeskAlertsPublisher {
|
|
|
24
24
|
private async publish(message: IZendeskAlertMessage): Promise<void> {
|
|
25
25
|
try {
|
|
26
26
|
const client: SQSClient = new SQSClient();
|
|
27
|
+
const queueUrl = this.ZENDESK_ALERTS_QUEUE;
|
|
28
|
+
// Condicional a la URL: la FIFO exige MessageGroupId y la estándar lo rechaza.
|
|
29
|
+
// Serializa por usuario; sin MessageDeduplicationId (la cola dedup por contenido).
|
|
30
|
+
const directoryId = (message.payload as { directoryId?: string })?.directoryId;
|
|
27
31
|
const sendMessageRequest: SendMessageRequest = {
|
|
28
|
-
QueueUrl:
|
|
29
|
-
MessageBody: JSON.stringify(message)
|
|
32
|
+
QueueUrl: queueUrl,
|
|
33
|
+
MessageBody: JSON.stringify(message),
|
|
34
|
+
...(queueUrl?.endsWith(".fifo") && directoryId ? { MessageGroupId: directoryId } : {})
|
|
30
35
|
};
|
|
31
36
|
const command: SendMessageCommand = new SendMessageCommand(sendMessageRequest);
|
|
32
37
|
await client.send(command);
|
|
@@ -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 };
|
package/bin/membership/index.js
DELETED
|
@@ -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 +0,0 @@
|
|
|
1
|
-
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 +0,0 @@
|
|
|
1
|
-
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,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 +0,0 @@
|
|
|
1
|
-
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,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 {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|