@fiado/api-invoker 5.28.0 → 5.30.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/ai-engine-connector/AiEngineApi.d.ts +2 -2
- package/bin/ai-engine-connector/AiEngineApi.js +5 -3
- package/bin/ai-engine-connector/interfaces/IAiEngineApi.d.ts +9 -2
- package/bin/central-payments-webhook/CentralPaymentsWebhookApi.d.ts +18 -0
- package/bin/{notificationWebsockets/NotificationWebsocketApi.js → central-payments-webhook/CentralPaymentsWebhookApi.js} +26 -10
- package/bin/central-payments-webhook/index.d.ts +2 -0
- package/bin/central-payments-webhook/index.js +2 -0
- package/bin/central-payments-webhook/interfaces/ICentralPaymentsWebhookApi.d.ts +20 -0
- package/bin/container.config.js +2 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +1 -0
- package/package.json +2 -2
- package/src/ai-engine-connector/AiEngineApi.ts +12 -4
- package/src/ai-engine-connector/interfaces/IAiEngineApi.ts +15 -2
- package/src/central-payments-webhook/CentralPaymentsWebhookApi.ts +45 -0
- package/src/central-payments-webhook/index.ts +2 -0
- package/src/central-payments-webhook/interfaces/ICentralPaymentsWebhookApi.ts +20 -0
- package/src/container.config.ts +2 -0
- package/src/index.ts +1 -0
- 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/notificationWebsockets/NotificationWebsocketApi.d.ts +0 -12
- 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/{membership/interfaces/IMembershipApi.js → central-payments-webhook/interfaces/ICentralPaymentsWebhookApi.js} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { IAiEngineApi } from "./interfaces/IAiEngineApi.js";
|
|
3
|
-
import { AiAnalyzeResponse } from "@fiado/type-kit/bin/aiEngine/index.js";
|
|
3
|
+
import { AiAnalyzeResponse, AiImageInput } from "@fiado/type-kit/bin/aiEngine/index.js";
|
|
4
4
|
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
5
5
|
export declare class AiEngineApi implements IAiEngineApi {
|
|
6
6
|
private readonly httpRequest;
|
|
7
7
|
private readonly baseUrl;
|
|
8
8
|
constructor(httpRequest: IHttpRequest);
|
|
9
|
-
analyze(prompt: string, systemPrompt?: string, modelId?: string): Promise<FiadoApiResponse<AiAnalyzeResponse>>;
|
|
9
|
+
analyze(prompt: string, systemPrompt?: string, modelId?: string, images?: AiImageInput[], maxTokens?: number): Promise<FiadoApiResponse<AiAnalyzeResponse>>;
|
|
10
10
|
}
|
|
11
11
|
export {};
|
|
@@ -20,11 +20,13 @@ let AiEngineApi = class AiEngineApi {
|
|
|
20
20
|
constructor(httpRequest) {
|
|
21
21
|
this.httpRequest = httpRequest;
|
|
22
22
|
}
|
|
23
|
-
async analyze(prompt, systemPrompt, modelId) {
|
|
23
|
+
async analyze(prompt, systemPrompt, modelId, images, maxTokens) {
|
|
24
24
|
try {
|
|
25
25
|
const url = `${this.baseUrl}ai/analyze`;
|
|
26
|
-
const body = { prompt, systemPrompt, modelId };
|
|
27
|
-
|
|
26
|
+
const body = { prompt, systemPrompt, modelId, maxTokens, images };
|
|
27
|
+
// No se loguea el body: las imagenes en base64 lo harian ilegible y
|
|
28
|
+
// el prompt puede traer datos del cliente.
|
|
29
|
+
log.info(`Calling AI Engine at: ${url}`, { images: images?.length ?? 0 });
|
|
28
30
|
return await this.httpRequest.post(url, body, { 'operationName': 'aiAnalyze' });
|
|
29
31
|
}
|
|
30
32
|
catch (error) {
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import { AiAnalyzeResponse } from "@fiado/type-kit/bin/aiEngine/index.js";
|
|
1
|
+
import { AiAnalyzeResponse, AiImageInput } from "@fiado/type-kit/bin/aiEngine/index.js";
|
|
2
2
|
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
3
3
|
export interface IAiEngineApi {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Analiza un prompt con Claude via Bedrock.
|
|
6
|
+
*
|
|
7
|
+
* @param images Imagenes en base64. Se envian antes del texto del prompt.
|
|
8
|
+
* Omitir para analisis de solo texto.
|
|
9
|
+
* @param maxTokens Limite de tokens de salida. Default del servidor si se omite.
|
|
10
|
+
*/
|
|
11
|
+
analyze(prompt: string, systemPrompt?: string, modelId?: string, images?: AiImageInput[], maxTokens?: number): Promise<FiadoApiResponse<AiAnalyzeResponse>>;
|
|
5
12
|
}
|
|
6
13
|
export {};
|
|
@@ -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
|
-
|
|
15
|
-
|
|
16
|
-
let NotificationWebsocketApi = class NotificationWebsocketApi {
|
|
14
|
+
/** Contrato y semantica completos -> `ICentralPaymentsWebhookApi`. */
|
|
15
|
+
let CentralPaymentsWebhookApi = class CentralPaymentsWebhookApi {
|
|
17
16
|
httpRequest;
|
|
18
|
-
|
|
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
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
43
|
+
CentralPaymentsWebhookApi = __decorate([
|
|
28
44
|
injectable(),
|
|
29
45
|
__param(0, inject("IHttpRequest")),
|
|
30
46
|
__metadata("design:paramtypes", [Object])
|
|
31
|
-
],
|
|
32
|
-
export {
|
|
47
|
+
], CentralPaymentsWebhookApi);
|
|
48
|
+
export { CentralPaymentsWebhookApi };
|
|
@@ -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 {};
|
package/bin/container.config.js
CHANGED
|
@@ -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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.30.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.
|
|
37
|
+
"@fiado/type-kit": "^3.309.0",
|
|
38
38
|
"dotenv": "^16.4.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -2,7 +2,7 @@ import dotenv from 'dotenv';
|
|
|
2
2
|
import { inject, injectable } from "inversify";
|
|
3
3
|
import { IHttpRequest } from "@fiado/http-client";
|
|
4
4
|
import { IAiEngineApi } from "./interfaces/IAiEngineApi.js";
|
|
5
|
-
import { AiAnalyzeRequest, AiAnalyzeResponse } from "@fiado/type-kit/bin/aiEngine/index.js";
|
|
5
|
+
import { AiAnalyzeRequest, AiAnalyzeResponse, AiImageInput } from "@fiado/type-kit/bin/aiEngine/index.js";
|
|
6
6
|
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
7
7
|
import { log } from "@fiado/logger";
|
|
8
8
|
dotenv.config();
|
|
@@ -14,11 +14,19 @@ export class AiEngineApi implements IAiEngineApi {
|
|
|
14
14
|
|
|
15
15
|
constructor(@inject("IHttpRequest") private readonly httpRequest: IHttpRequest) {}
|
|
16
16
|
|
|
17
|
-
public async analyze(
|
|
17
|
+
public async analyze(
|
|
18
|
+
prompt: string,
|
|
19
|
+
systemPrompt?: string,
|
|
20
|
+
modelId?: string,
|
|
21
|
+
images?: AiImageInput[],
|
|
22
|
+
maxTokens?: number,
|
|
23
|
+
): Promise<FiadoApiResponse<AiAnalyzeResponse>> {
|
|
18
24
|
try {
|
|
19
25
|
const url = `${this.baseUrl}ai/analyze`;
|
|
20
|
-
const body: AiAnalyzeRequest = { prompt, systemPrompt, modelId };
|
|
21
|
-
|
|
26
|
+
const body: AiAnalyzeRequest = { prompt, systemPrompt, modelId, maxTokens, images };
|
|
27
|
+
// No se loguea el body: las imagenes en base64 lo harian ilegible y
|
|
28
|
+
// el prompt puede traer datos del cliente.
|
|
29
|
+
log.info(`Calling AI Engine at: ${url}`, { images: images?.length ?? 0 });
|
|
22
30
|
return await this.httpRequest.post(url, body, { 'operationName': 'aiAnalyze' });
|
|
23
31
|
} catch (error) {
|
|
24
32
|
log.error('Error calling AI Engine from api-invoker', error as Error);
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
import { AiAnalyzeResponse } from "@fiado/type-kit/bin/aiEngine/index.js";
|
|
1
|
+
import { AiAnalyzeResponse, AiImageInput } from "@fiado/type-kit/bin/aiEngine/index.js";
|
|
2
2
|
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
3
3
|
|
|
4
4
|
export interface IAiEngineApi {
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Analiza un prompt con Claude via Bedrock.
|
|
7
|
+
*
|
|
8
|
+
* @param images Imagenes en base64. Se envian antes del texto del prompt.
|
|
9
|
+
* Omitir para analisis de solo texto.
|
|
10
|
+
* @param maxTokens Limite de tokens de salida. Default del servidor si se omite.
|
|
11
|
+
*/
|
|
12
|
+
analyze(
|
|
13
|
+
prompt: string,
|
|
14
|
+
systemPrompt?: string,
|
|
15
|
+
modelId?: string,
|
|
16
|
+
images?: AiImageInput[],
|
|
17
|
+
maxTokens?: number,
|
|
18
|
+
): Promise<FiadoApiResponse<AiAnalyzeResponse>>;
|
|
6
19
|
}
|
|
@@ -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,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
|
+
}
|
package/src/container.config.ts
CHANGED
|
@@ -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,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,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 +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 {};
|