@fiado/api-invoker 5.33.0 → 5.34.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/synergypay-connector/api/SynergyPayConnectorApi.d.ts +9 -2
- package/bin/synergypay-connector/api/SynergyPayConnectorApi.js +27 -0
- package/bin/synergypay-connector/api/interfaces/ISynergyPayConnectorApi.d.ts +45 -1
- package/bin/wallet-funding-rules/api/WalletFundingRulesApi.d.ts +1 -0
- package/bin/wallet-funding-rules/api/WalletFundingRulesApi.js +4 -0
- package/bin/wallet-funding-rules/api/interfaces/IWalletFundingRulesApi.d.ts +14 -0
- package/package.json +2 -2
- package/src/synergypay-connector/api/SynergyPayConnectorApi.ts +39 -1
- package/src/synergypay-connector/api/interfaces/ISynergyPayConnectorApi.ts +51 -0
- package/src/wallet-funding-rules/api/WalletFundingRulesApi.ts +5 -0
- package/src/wallet-funding-rules/api/interfaces/IWalletFundingRulesApi.ts +14 -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/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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
1
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
3
|
import { ConnectorCatalogResponse } from "@fiado/type-kit/bin/benefitCenter/index.js";
|
|
4
|
-
import { CreateFundingReferenceRequest, CreateFundingReferenceResponse, ListFundingReferencesResponse, ApplyWalletFundingRequest, ApplyWalletFundingResponse } from "@fiado/type-kit/bin/walletFunding/index.js";
|
|
4
|
+
import { CreateFundingReferenceRequest, CreateFundingReferenceResponse, ListFundingReferencesResponse, ApplyWalletFundingRequest, ApplyWalletFundingResponse, ListFundingStoresRequest, ListFundingStoresResponse, WalletFundingReferenceStatusEnum } from "@fiado/type-kit/bin/walletFunding/index.js";
|
|
5
5
|
import { ISynergyPayConnectorApi } from "./interfaces/ISynergyPayConnectorApi.js";
|
|
6
6
|
export default class SynergyPayConnectorApi implements ISynergyPayConnectorApi {
|
|
7
7
|
private httpRequest;
|
|
@@ -14,4 +14,11 @@ export default class SynergyPayConnectorApi implements ISynergyPayConnectorApi {
|
|
|
14
14
|
includeDisabled?: boolean;
|
|
15
15
|
}): Promise<ApiGatewayResponse<ConnectorCatalogResponse>>;
|
|
16
16
|
applyFunding(request: ApplyWalletFundingRequest): Promise<ApiGatewayResponse<ApplyWalletFundingResponse>>;
|
|
17
|
+
listStores(query: ListFundingStoresRequest): Promise<ApiGatewayResponse<ListFundingStoresResponse>>;
|
|
18
|
+
cancelFundingReference(reference: string, reason?: "USER" | "WALLET_DEACTIVATED" | "OPS"): Promise<ApiGatewayResponse<{
|
|
19
|
+
reference: string;
|
|
20
|
+
status: WalletFundingReferenceStatusEnum;
|
|
21
|
+
cancelled: boolean;
|
|
22
|
+
}>>;
|
|
23
|
+
getPendingFunding(directoryId: string): Promise<ApiGatewayResponse<any>>;
|
|
17
24
|
}
|
|
@@ -39,6 +39,33 @@ let SynergyPayConnectorApi = class SynergyPayConnectorApi {
|
|
|
39
39
|
const url = `${this.baseUrl}/funding/apply`;
|
|
40
40
|
return await this.httpRequest.post(url, request);
|
|
41
41
|
}
|
|
42
|
+
async listStores(query) {
|
|
43
|
+
const params = new URLSearchParams({
|
|
44
|
+
latitude: String(query.latitude),
|
|
45
|
+
longitude: String(query.longitude),
|
|
46
|
+
});
|
|
47
|
+
// `radius` y `product` ausentes se OMITEN: el connector aplica sus
|
|
48
|
+
// defaults (el radio del proveedor y `cashin`). Mandarlos vacios los
|
|
49
|
+
// convertiria en filtros invalidos.
|
|
50
|
+
if (query.radius !== undefined)
|
|
51
|
+
params.set("radius", String(query.radius));
|
|
52
|
+
if (query.product !== undefined)
|
|
53
|
+
params.set("product", query.product);
|
|
54
|
+
const url = `${this.baseUrl}/stores?${params.toString()}`;
|
|
55
|
+
return await this.httpRequest.get(url);
|
|
56
|
+
}
|
|
57
|
+
async cancelFundingReference(reference, reason) {
|
|
58
|
+
const params = new URLSearchParams();
|
|
59
|
+
if (reason)
|
|
60
|
+
params.set("reason", reason);
|
|
61
|
+
const qs = params.toString();
|
|
62
|
+
const url = `${this.baseUrl}/funding/references/${encodeURIComponent(reference)}${qs ? `?${qs}` : ""}`;
|
|
63
|
+
return await this.httpRequest.delete(url);
|
|
64
|
+
}
|
|
65
|
+
async getPendingFunding(directoryId) {
|
|
66
|
+
const url = `${this.baseUrl}/funding/pending?directoryId=${encodeURIComponent(directoryId)}`;
|
|
67
|
+
return await this.httpRequest.get(url);
|
|
68
|
+
}
|
|
42
69
|
};
|
|
43
70
|
SynergyPayConnectorApi = __decorate([
|
|
44
71
|
injectable(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
2
|
import { ConnectorCatalogResponse } from "@fiado/type-kit/bin/benefitCenter/index.js";
|
|
3
|
-
import { CreateFundingReferenceRequest, CreateFundingReferenceResponse, ListFundingReferencesResponse, ApplyWalletFundingRequest, ApplyWalletFundingResponse } from "@fiado/type-kit/bin/walletFunding/index.js";
|
|
3
|
+
import { CreateFundingReferenceRequest, CreateFundingReferenceResponse, ListFundingReferencesResponse, ApplyWalletFundingRequest, ApplyWalletFundingResponse, ListFundingStoresRequest, ListFundingStoresResponse, WalletFundingReferenceStatusEnum } from "@fiado/type-kit/bin/walletFunding/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* Cliente del marketplace hacia synergypay-connector (privado, dentro de la VPC).
|
|
6
6
|
*
|
|
@@ -14,6 +14,8 @@ import { CreateFundingReferenceRequest, CreateFundingReferenceResponse, ListFund
|
|
|
14
14
|
* - GET /funding/references?directoryId=&status=
|
|
15
15
|
* - GET /catalog/standard?benefitId=&includeDisabled=
|
|
16
16
|
* - POST /funding/apply
|
|
17
|
+
* - GET /stores?latitude=&longitude=&radius=&product=
|
|
18
|
+
* - DELETE /funding/references/{reference}?reason=
|
|
17
19
|
*
|
|
18
20
|
* NOTA: los endpoints `/passport/*` del BackOffice (SPEC 1.3) NO están incluidos —
|
|
19
21
|
* el synergypay-connector aún no los expone (F6.1 construyó solo el money-path).
|
|
@@ -42,4 +44,46 @@ export interface ISynergyPayConnectorApi {
|
|
|
42
44
|
* queda para el cierre SETTLED (conciliación bancaria) — mismo contrato canónico.
|
|
43
45
|
*/
|
|
44
46
|
applyFunding(request: ApplyWalletFundingRequest): Promise<ApiGatewayResponse<ApplyWalletFundingResponse>>;
|
|
47
|
+
/**
|
|
48
|
+
* Directorio de tiendas cercanas donde el cliente puede presentar su
|
|
49
|
+
* referencia y entregar el efectivo.
|
|
50
|
+
*
|
|
51
|
+
* Va APARTE de la referencia a proposito: una referencia sirve en cualquier
|
|
52
|
+
* tienda afiliada, asi que el directorio cambia —altas, bajas, horarios,
|
|
53
|
+
* comisiones— sin tocar referencias vivas. El connector filtra por
|
|
54
|
+
* `product=cashin` cuando no se especifica: sin ese filtro, buena parte de
|
|
55
|
+
* las tiendas que devuelve el proveedor no aceptan deposito.
|
|
56
|
+
*/
|
|
57
|
+
listStores(query: ListFundingStoresRequest): Promise<ApiGatewayResponse<ListFundingStoresResponse>>;
|
|
58
|
+
/**
|
|
59
|
+
* Cancela una referencia en el proveedor Y en la tabla del connector, en ese
|
|
60
|
+
* orden.
|
|
61
|
+
*
|
|
62
|
+
* Es la unica palanca que frena el efectivo ANTES de que entre a la caja:
|
|
63
|
+
* rechazar el webhook no alcanza, porque cuando el proveedor llama el cobro
|
|
64
|
+
* ya ocurrio. NO cancelar por fuera (curl directo al proveedor) — las dos
|
|
65
|
+
* mitades quedan desincronizadas y creeriamos que el cliente puede
|
|
66
|
+
* depositar cuando la caja ya no se lo permite.
|
|
67
|
+
*
|
|
68
|
+
* Idempotente: cancelar algo ya cancelado devuelve `cancelled: false`, no
|
|
69
|
+
* un error.
|
|
70
|
+
*/
|
|
71
|
+
cancelFundingReference(reference: string, reason?: "USER" | "WALLET_DEACTIVATED" | "OPS"): Promise<ApiGatewayResponse<{
|
|
72
|
+
reference: string;
|
|
73
|
+
status: WalletFundingReferenceStatusEnum;
|
|
74
|
+
cancelled: boolean;
|
|
75
|
+
}>>;
|
|
76
|
+
/**
|
|
77
|
+
* Cash-in AUTORIZADO pero aun no acreditado del cliente, en el mes en curso.
|
|
78
|
+
*
|
|
79
|
+
* Este dato existe SOLO en el connector: el settlement lleva el log por
|
|
80
|
+
* cliente pero unicamente de lo ya acreditado, porque la reserva de
|
|
81
|
+
* exposicion ocurre al acreditar y no al autorizar. Sin esto, en la ventana
|
|
82
|
+
* entre autorizar y acreditar el usuario veria un disponible inflado.
|
|
83
|
+
*/
|
|
84
|
+
getPendingFunding(directoryId: string): Promise<ApiGatewayResponse<{
|
|
85
|
+
pendingAmount: number;
|
|
86
|
+
count: number;
|
|
87
|
+
currency: string;
|
|
88
|
+
}>>;
|
|
45
89
|
}
|
|
@@ -9,4 +9,5 @@ export default class WalletFundingRulesApi implements IWalletFundingRulesApi {
|
|
|
9
9
|
reserveExposure(request: ReserveExposureRequest): Promise<ApiGatewayResponse<ReserveExposureResponse>>;
|
|
10
10
|
releaseExposure(request: ReleaseExposureRequest): Promise<ApiGatewayResponse<ReleaseExposureResponse>>;
|
|
11
11
|
getExposureState(): Promise<ApiGatewayResponse<GetExposureStateResponse>>;
|
|
12
|
+
getCustomerLimit(directoryId: string): Promise<ApiGatewayResponse<any>>;
|
|
12
13
|
}
|
|
@@ -29,6 +29,10 @@ let WalletFundingRulesApi = class WalletFundingRulesApi {
|
|
|
29
29
|
const url = `${this.baseUrl}/state`;
|
|
30
30
|
return await this.httpRequest.get(url);
|
|
31
31
|
}
|
|
32
|
+
async getCustomerLimit(directoryId) {
|
|
33
|
+
const url = `${this.baseUrl}/customer-limit?directoryId=${encodeURIComponent(directoryId)}`;
|
|
34
|
+
return await this.httpRequest.get(url);
|
|
35
|
+
}
|
|
32
36
|
};
|
|
33
37
|
WalletFundingRulesApi = __decorate([
|
|
34
38
|
injectable(),
|
|
@@ -20,4 +20,18 @@ export interface IWalletFundingRulesApi {
|
|
|
20
20
|
releaseExposure(request: ReleaseExposureRequest): Promise<ApiGatewayResponse<ReleaseExposureResponse>>;
|
|
21
21
|
/** Devuelve el estado actual de la exposición agregada + circuit breaker. */
|
|
22
22
|
getExposureState(): Promise<ApiGatewayResponse<GetExposureStateResponse>>;
|
|
23
|
+
/**
|
|
24
|
+
* Tope mensual de cash-in de UN cliente: cuanto puede fondear todavia este
|
|
25
|
+
* mes por este canal.
|
|
26
|
+
*
|
|
27
|
+
* Devuelve SOLO lo acreditado. Los pendientes (autorizados sin acreditar)
|
|
28
|
+
* viven en la tabla de cada connector, porque la reserva de exposicion
|
|
29
|
+
* ocurre al acreditar y no al autorizar — los suma quien orquesta.
|
|
30
|
+
*/
|
|
31
|
+
getCustomerLimit(directoryId: string): Promise<ApiGatewayResponse<{
|
|
32
|
+
monthlyLimit: number;
|
|
33
|
+
monthlyConsumed: number;
|
|
34
|
+
remainingAmount: number;
|
|
35
|
+
currency: string;
|
|
36
|
+
}>>;
|
|
23
37
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
|
|
3
|
+
"version": "5.34.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.327.0",
|
|
38
38
|
"dotenv": "^16.4.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inject, injectable } from "inversify";
|
|
2
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
3
3
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
4
4
|
import { ConnectorCatalogResponse } from "@fiado/type-kit/bin/benefitCenter/index.js";
|
|
5
5
|
import {
|
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
ListFundingReferencesResponse,
|
|
9
9
|
ApplyWalletFundingRequest,
|
|
10
10
|
ApplyWalletFundingResponse,
|
|
11
|
+
ListFundingStoresRequest,
|
|
12
|
+
ListFundingStoresResponse,
|
|
13
|
+
WalletFundingReferenceStatusEnum,
|
|
11
14
|
} from "@fiado/type-kit/bin/walletFunding/index.js";
|
|
12
15
|
import { ISynergyPayConnectorApi } from "./interfaces/ISynergyPayConnectorApi.js";
|
|
13
16
|
|
|
@@ -49,4 +52,39 @@ export default class SynergyPayConnectorApi implements ISynergyPayConnectorApi {
|
|
|
49
52
|
const url = `${this.baseUrl}/funding/apply`;
|
|
50
53
|
return await this.httpRequest.post(url, request);
|
|
51
54
|
}
|
|
55
|
+
|
|
56
|
+
async listStores(
|
|
57
|
+
query: ListFundingStoresRequest,
|
|
58
|
+
): Promise<ApiGatewayResponse<ListFundingStoresResponse>> {
|
|
59
|
+
const params = new URLSearchParams({
|
|
60
|
+
latitude: String(query.latitude),
|
|
61
|
+
longitude: String(query.longitude),
|
|
62
|
+
});
|
|
63
|
+
// `radius` y `product` ausentes se OMITEN: el connector aplica sus
|
|
64
|
+
// defaults (el radio del proveedor y `cashin`). Mandarlos vacios los
|
|
65
|
+
// convertiria en filtros invalidos.
|
|
66
|
+
if (query.radius !== undefined) params.set("radius", String(query.radius));
|
|
67
|
+
if (query.product !== undefined) params.set("product", query.product);
|
|
68
|
+
const url = `${this.baseUrl}/stores?${params.toString()}`;
|
|
69
|
+
return await this.httpRequest.get(url);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
async cancelFundingReference(
|
|
73
|
+
reference: string,
|
|
74
|
+
reason?: "USER" | "WALLET_DEACTIVATED" | "OPS",
|
|
75
|
+
): Promise<ApiGatewayResponse<{
|
|
76
|
+
reference: string;
|
|
77
|
+
status: WalletFundingReferenceStatusEnum;
|
|
78
|
+
cancelled: boolean;
|
|
79
|
+
}>> {
|
|
80
|
+
const params = new URLSearchParams();
|
|
81
|
+
if (reason) params.set("reason", reason);
|
|
82
|
+
const qs = params.toString();
|
|
83
|
+
const url = `${this.baseUrl}/funding/references/${encodeURIComponent(reference)}${qs ? `?${qs}` : ""}`;
|
|
84
|
+
return await this.httpRequest.delete(url);
|
|
85
|
+
}
|
|
86
|
+
async getPendingFunding(directoryId: string): Promise<ApiGatewayResponse<any>> {
|
|
87
|
+
const url = `${this.baseUrl}/funding/pending?directoryId=${encodeURIComponent(directoryId)}`;
|
|
88
|
+
return await this.httpRequest.get(url);
|
|
89
|
+
}
|
|
52
90
|
}
|
|
@@ -6,6 +6,9 @@ import {
|
|
|
6
6
|
ListFundingReferencesResponse,
|
|
7
7
|
ApplyWalletFundingRequest,
|
|
8
8
|
ApplyWalletFundingResponse,
|
|
9
|
+
ListFundingStoresRequest,
|
|
10
|
+
ListFundingStoresResponse,
|
|
11
|
+
WalletFundingReferenceStatusEnum,
|
|
9
12
|
} from "@fiado/type-kit/bin/walletFunding/index.js";
|
|
10
13
|
|
|
11
14
|
/**
|
|
@@ -21,6 +24,8 @@ import {
|
|
|
21
24
|
* - GET /funding/references?directoryId=&status=
|
|
22
25
|
* - GET /catalog/standard?benefitId=&includeDisabled=
|
|
23
26
|
* - POST /funding/apply
|
|
27
|
+
* - GET /stores?latitude=&longitude=&radius=&product=
|
|
28
|
+
* - DELETE /funding/references/{reference}?reason=
|
|
24
29
|
*
|
|
25
30
|
* NOTA: los endpoints `/passport/*` del BackOffice (SPEC 1.3) NO están incluidos —
|
|
26
31
|
* el synergypay-connector aún no los expone (F6.1 construyó solo el money-path).
|
|
@@ -58,4 +63,50 @@ export interface ISynergyPayConnectorApi {
|
|
|
58
63
|
applyFunding(
|
|
59
64
|
request: ApplyWalletFundingRequest,
|
|
60
65
|
): Promise<ApiGatewayResponse<ApplyWalletFundingResponse>>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Directorio de tiendas cercanas donde el cliente puede presentar su
|
|
69
|
+
* referencia y entregar el efectivo.
|
|
70
|
+
*
|
|
71
|
+
* Va APARTE de la referencia a proposito: una referencia sirve en cualquier
|
|
72
|
+
* tienda afiliada, asi que el directorio cambia —altas, bajas, horarios,
|
|
73
|
+
* comisiones— sin tocar referencias vivas. El connector filtra por
|
|
74
|
+
* `product=cashin` cuando no se especifica: sin ese filtro, buena parte de
|
|
75
|
+
* las tiendas que devuelve el proveedor no aceptan deposito.
|
|
76
|
+
*/
|
|
77
|
+
listStores(query: ListFundingStoresRequest): Promise<ApiGatewayResponse<ListFundingStoresResponse>>;
|
|
78
|
+
/**
|
|
79
|
+
* Cancela una referencia en el proveedor Y en la tabla del connector, en ese
|
|
80
|
+
* orden.
|
|
81
|
+
*
|
|
82
|
+
* Es la unica palanca que frena el efectivo ANTES de que entre a la caja:
|
|
83
|
+
* rechazar el webhook no alcanza, porque cuando el proveedor llama el cobro
|
|
84
|
+
* ya ocurrio. NO cancelar por fuera (curl directo al proveedor) — las dos
|
|
85
|
+
* mitades quedan desincronizadas y creeriamos que el cliente puede
|
|
86
|
+
* depositar cuando la caja ya no se lo permite.
|
|
87
|
+
*
|
|
88
|
+
* Idempotente: cancelar algo ya cancelado devuelve `cancelled: false`, no
|
|
89
|
+
* un error.
|
|
90
|
+
*/
|
|
91
|
+
cancelFundingReference(
|
|
92
|
+
reference: string,
|
|
93
|
+
reason?: "USER" | "WALLET_DEACTIVATED" | "OPS",
|
|
94
|
+
): Promise<ApiGatewayResponse<{
|
|
95
|
+
reference: string;
|
|
96
|
+
status: WalletFundingReferenceStatusEnum;
|
|
97
|
+
cancelled: boolean;
|
|
98
|
+
}>>;
|
|
99
|
+
/**
|
|
100
|
+
* Cash-in AUTORIZADO pero aun no acreditado del cliente, en el mes en curso.
|
|
101
|
+
*
|
|
102
|
+
* Este dato existe SOLO en el connector: el settlement lleva el log por
|
|
103
|
+
* cliente pero unicamente de lo ya acreditado, porque la reserva de
|
|
104
|
+
* exposicion ocurre al acreditar y no al autorizar. Sin esto, en la ventana
|
|
105
|
+
* entre autorizar y acreditar el usuario veria un disponible inflado.
|
|
106
|
+
*/
|
|
107
|
+
getPendingFunding(directoryId: string): Promise<ApiGatewayResponse<{
|
|
108
|
+
pendingAmount: number;
|
|
109
|
+
count: number;
|
|
110
|
+
currency: string;
|
|
111
|
+
}>>;
|
|
61
112
|
}
|
|
@@ -34,4 +34,9 @@ export default class WalletFundingRulesApi implements IWalletFundingRulesApi {
|
|
|
34
34
|
const url = `${this.baseUrl}/state`;
|
|
35
35
|
return await this.httpRequest.get(url);
|
|
36
36
|
}
|
|
37
|
+
|
|
38
|
+
async getCustomerLimit(directoryId: string): Promise<ApiGatewayResponse<any>> {
|
|
39
|
+
const url = `${this.baseUrl}/customer-limit?directoryId=${encodeURIComponent(directoryId)}`;
|
|
40
|
+
return await this.httpRequest.get(url);
|
|
41
|
+
}
|
|
37
42
|
}
|
|
@@ -33,4 +33,18 @@ export interface IWalletFundingRulesApi {
|
|
|
33
33
|
|
|
34
34
|
/** Devuelve el estado actual de la exposición agregada + circuit breaker. */
|
|
35
35
|
getExposureState(): Promise<ApiGatewayResponse<GetExposureStateResponse>>;
|
|
36
|
+
/**
|
|
37
|
+
* Tope mensual de cash-in de UN cliente: cuanto puede fondear todavia este
|
|
38
|
+
* mes por este canal.
|
|
39
|
+
*
|
|
40
|
+
* Devuelve SOLO lo acreditado. Los pendientes (autorizados sin acreditar)
|
|
41
|
+
* viven en la tabla de cada connector, porque la reserva de exposicion
|
|
42
|
+
* ocurre al acreditar y no al autorizar — los suma quien orquesta.
|
|
43
|
+
*/
|
|
44
|
+
getCustomerLimit(directoryId: string): Promise<ApiGatewayResponse<{
|
|
45
|
+
monthlyLimit: number;
|
|
46
|
+
monthlyConsumed: number;
|
|
47
|
+
remainingAmount: number;
|
|
48
|
+
currency: string;
|
|
49
|
+
}>>;
|
|
36
50
|
}
|
|
@@ -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 {};
|