@fiado/api-invoker 4.70.0 → 4.71.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/activity-business/ActivityApi.d.ts +5 -0
- package/bin/activity-business/ActivityApi.js +4 -0
- package/bin/activity-business/interfaces/IActivityApi.d.ts +10 -0
- package/bin/address/AddressApi.d.ts +5 -0
- package/bin/address/AddressApi.js +4 -0
- package/bin/address/interfaces/IAddressApi.d.ts +10 -0
- package/bin/auth-business/AuthBusinessApi.d.ts +12 -0
- package/bin/auth-business/AuthBusinessApi.js +32 -0
- package/bin/auth-business/index.d.ts +2 -0
- package/bin/auth-business/index.js +2 -0
- package/bin/auth-business/interfaces/IAuthBusinessApi.d.ts +15 -0
- package/bin/auth-business/interfaces/IAuthBusinessApi.js +1 -0
- package/bin/bankAccount/BankAccountApi.d.ts +3 -0
- package/bin/bankAccount/BankAccountApi.js +4 -0
- package/bin/bankAccount/interfaces/IBankAccountApi.d.ts +10 -0
- package/bin/beneficiary/BeneficiaryApi.d.ts +12 -0
- package/bin/beneficiary/BeneficiaryApi.js +32 -0
- package/bin/beneficiary/index.d.ts +2 -0
- package/bin/beneficiary/index.js +2 -0
- package/bin/beneficiary/interfaces/IBeneficiaryApi.d.ts +15 -0
- package/bin/beneficiary/interfaces/IBeneficiaryApi.js +1 -0
- package/bin/contactInformation/ContactInformationApi.d.ts +5 -0
- package/bin/contactInformation/ContactInformationApi.js +4 -0
- package/bin/contactInformation/interface/IContactInformationApi.d.ts +10 -0
- package/bin/container.config.js +13 -0
- package/bin/directorySetting/DirectorySettingApi.d.ts +3 -0
- package/bin/directorySetting/DirectorySettingApi.js +4 -0
- package/bin/directorySetting/interfaces/IDirectorySettingApi.d.ts +8 -0
- package/bin/group/GroupApi.d.ts +3 -0
- package/bin/group/GroupApi.js +4 -0
- package/bin/group/interfaces/IGroupApi.d.ts +8 -0
- package/bin/index.d.ts +6 -0
- package/bin/index.js +6 -0
- package/bin/membership/MembershipApi.d.ts +12 -0
- package/bin/membership/MembershipApi.js +32 -0
- package/bin/membership/index.d.ts +2 -0
- package/bin/membership/index.js +2 -0
- package/bin/membership/interfaces/IMembershipApi.d.ts +15 -0
- package/bin/membership/interfaces/IMembershipApi.js +1 -0
- package/bin/notificationWebsockets/NotificationWebsocketApi.d.ts +12 -0
- package/bin/notificationWebsockets/NotificationWebsocketApi.js +32 -0
- package/bin/notificationWebsockets/index.d.ts +2 -0
- package/bin/notificationWebsockets/index.js +2 -0
- package/bin/notificationWebsockets/interfaces/INotificationWebsocketApi.d.ts +15 -0
- package/bin/notificationWebsockets/interfaces/INotificationWebsocketApi.js +1 -0
- package/bin/performance-profile/PerformanceProfileApi.d.ts +12 -0
- package/bin/performance-profile/PerformanceProfileApi.js +32 -0
- package/bin/performance-profile/index.d.ts +2 -0
- package/bin/performance-profile/index.js +2 -0
- package/bin/performance-profile/interfaces/IPerformanceProfileApi.d.ts +15 -0
- package/bin/performance-profile/interfaces/IPerformanceProfileApi.js +1 -0
- package/bin/presence-websocket/PresenceWebsocketApi.d.ts +12 -0
- package/bin/presence-websocket/PresenceWebsocketApi.js +32 -0
- package/bin/presence-websocket/index.d.ts +2 -0
- package/bin/presence-websocket/index.js +2 -0
- package/bin/presence-websocket/interfaces/IPresenceWebsocketApi.d.ts +15 -0
- package/bin/presence-websocket/interfaces/IPresenceWebsocketApi.js +1 -0
- package/bin/riskProfile/api/RiskProfileApi.d.ts +4 -0
- package/bin/riskProfile/api/RiskProfileApi.js +4 -0
- package/bin/riskProfile/api/interfaces/IRiskProfileApi.d.ts +9 -0
- package/bin/zendesk/ZendeskApi.d.ts +3 -0
- package/bin/zendesk/ZendeskApi.js +4 -0
- package/bin/zendesk/interfaces/IZendeskApi.d.ts +8 -0
- package/package.json +1 -1
- package/src/activity-business/ActivityApi.ts +6 -0
- package/src/activity-business/interfaces/IActivityApi.ts +9 -1
- package/src/address/AddressApi.ts +6 -0
- package/src/address/interfaces/IAddressApi.ts +10 -1
- package/src/auth-business/AuthBusinessApi.ts +20 -0
- package/src/auth-business/index.ts +2 -0
- package/src/auth-business/interfaces/IAuthBusinessApi.ts +15 -0
- package/src/bankAccount/BankAccountApi.ts +5 -0
- package/src/bankAccount/interfaces/IBankAccountApi.ts +10 -0
- package/src/beneficiary/BeneficiaryApi.ts +20 -0
- package/src/beneficiary/index.ts +2 -0
- package/src/beneficiary/interfaces/IBeneficiaryApi.ts +15 -0
- package/src/contactInformation/ContactInformationApi.ts +6 -0
- package/src/contactInformation/interface/IContactInformationApi.ts +10 -1
- package/src/container.config.ts +14 -0
- package/src/directorySetting/DirectorySettingApi.ts +5 -0
- package/src/directorySetting/interfaces/IDirectorySettingApi.ts +8 -1
- package/src/group/GroupApi.ts +5 -0
- package/src/group/interfaces/IGroupApi.ts +8 -0
- package/src/index.ts +6 -0
- package/src/membership/MembershipApi.ts +20 -0
- package/src/membership/index.ts +2 -0
- package/src/membership/interfaces/IMembershipApi.ts +15 -0
- package/src/notificationWebsockets/NotificationWebsocketApi.ts +20 -0
- package/src/notificationWebsockets/index.ts +3 -1
- package/src/notificationWebsockets/interfaces/INotificationWebsocketApi.ts +15 -0
- package/src/performance-profile/PerformanceProfileApi.ts +20 -0
- package/src/performance-profile/index.ts +2 -0
- package/src/performance-profile/interfaces/IPerformanceProfileApi.ts +15 -0
- package/src/presence-websocket/PresenceWebsocketApi.ts +20 -0
- package/src/presence-websocket/index.ts +2 -0
- package/src/presence-websocket/interfaces/IPresenceWebsocketApi.ts +15 -0
- package/src/riskProfile/api/RiskProfileApi.ts +6 -0
- package/src/riskProfile/api/interfaces/IRiskProfileApi.ts +9 -0
- package/src/zendesk/ZendeskApi.ts +5 -0
- package/src/zendesk/interfaces/IZendeskApi.ts +8 -0
|
@@ -0,0 +1,32 @@
|
|
|
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 };
|
|
@@ -0,0 +1,15 @@
|
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,32 @@
|
|
|
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 };
|
|
@@ -0,0 +1,15 @@
|
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,6 +4,7 @@ import { CreatePrivateAlarm, CreateRiskProfileRequest } from "@fiado/type-kit/bi
|
|
|
4
4
|
type UpdateRiskProfileRequest = import("@fiado/type-kit/bin/riskProfile/dtos/UpdateRiskProfileRequest.js").default;
|
|
5
5
|
type UpdateAlarmProfileRequest = import("@fiado/type-kit/bin/riskProfile/dtos/UpdateAlarmProfileRequest.js").default;
|
|
6
6
|
import { ResponseOptions } from "@fiado/gateway-adapter";
|
|
7
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
7
8
|
import { SetCustomAlarmRequest, SetCustomAlarmResponse, SetDeclaredIncomeRequest, SetDeclaredIncomeResponse, SetManualRiskLevelRequest, SetManualRiskLevelResponse, CreateClientFinancialHistoryRequest, ClientFinancialHistoryResponse, ListClientFinancialHistoryResponse } from "@fiado/type-kit/bin/riskProfile/index.js";
|
|
8
9
|
export default class RiskProfileApi implements IRiskProfileApi {
|
|
9
10
|
private httpRequest;
|
|
@@ -30,5 +31,8 @@ export default class RiskProfileApi implements IRiskProfileApi {
|
|
|
30
31
|
limit?: number;
|
|
31
32
|
continuationToken?: string;
|
|
32
33
|
}): Promise<ResponseOptions<ListClientFinancialHistoryResponse>>;
|
|
34
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
35
|
+
deletedCount: number;
|
|
36
|
+
}>>;
|
|
33
37
|
}
|
|
34
38
|
export {};
|
|
@@ -71,6 +71,10 @@ let RiskProfileApi = class RiskProfileApi {
|
|
|
71
71
|
const url = `${this.baseUrl}/profiles/${directoryId}/financial-history${qs}`;
|
|
72
72
|
return await this.httpRequest.get(url);
|
|
73
73
|
}
|
|
74
|
+
async deleteByDirectoryId(directoryId) {
|
|
75
|
+
const url = `${this.baseUrl}/private/directory/${directoryId}`;
|
|
76
|
+
return await this.httpRequest.delete(url);
|
|
77
|
+
}
|
|
74
78
|
};
|
|
75
79
|
RiskProfileApi = __decorate([
|
|
76
80
|
injectable(),
|
|
@@ -2,6 +2,7 @@ import { CreatePrivateAlarm, CreateRiskProfileRequest } from "@fiado/type-kit/bi
|
|
|
2
2
|
type UpdateAlarmProfileRequest = import("@fiado/type-kit/bin/riskProfile/dtos/UpdateAlarmProfileRequest.js").default;
|
|
3
3
|
type UpdateRiskProfileRequest = import("@fiado/type-kit/bin/riskProfile/dtos/UpdateRiskProfileRequest.js").default;
|
|
4
4
|
import { ResponseOptions } from "@fiado/gateway-adapter";
|
|
5
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
5
6
|
import { SetCustomAlarmRequest, SetCustomAlarmResponse, SetDeclaredIncomeRequest, SetDeclaredIncomeResponse, SetManualRiskLevelRequest, SetManualRiskLevelResponse, CreateClientFinancialHistoryRequest, ClientFinancialHistoryResponse, ListClientFinancialHistoryResponse } from "@fiado/type-kit/bin/riskProfile/index.js";
|
|
6
7
|
export interface IRiskProfileApi {
|
|
7
8
|
createRiskProfile(request: CreateRiskProfileRequest): Promise<any>;
|
|
@@ -50,5 +51,13 @@ export interface IRiskProfileApi {
|
|
|
50
51
|
limit?: number;
|
|
51
52
|
continuationToken?: string;
|
|
52
53
|
}): Promise<ResponseOptions<ListClientFinancialHistoryResponse>>;
|
|
54
|
+
/**
|
|
55
|
+
* Borra en cascada el perfil de riesgo asociado a un directoryId.
|
|
56
|
+
* @param directoryId ID del directorio.
|
|
57
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
58
|
+
*/
|
|
59
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
60
|
+
deletedCount: number;
|
|
61
|
+
}>>;
|
|
53
62
|
}
|
|
54
63
|
export {};
|
|
@@ -8,5 +8,8 @@ export declare class ZendeskApi implements IZendeskApi {
|
|
|
8
8
|
constructor(httpRequest: IHttpRequest);
|
|
9
9
|
createUser(data: HelpdeskCreateUserRequest): Promise<FiadoApiResponse<any>>;
|
|
10
10
|
createTicket(data: HelpdeskCreateTicketRequest): Promise<FiadoApiResponse<any>>;
|
|
11
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
12
|
+
deletedCount: number;
|
|
13
|
+
}>>;
|
|
11
14
|
}
|
|
12
15
|
export {};
|
|
@@ -27,6 +27,10 @@ let ZendeskApi = class ZendeskApi {
|
|
|
27
27
|
const url = `${this.baseUrl}tickets/create`;
|
|
28
28
|
return await this.httpRequest.post(url, data);
|
|
29
29
|
}
|
|
30
|
+
async deleteByDirectoryId(directoryId) {
|
|
31
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
32
|
+
return await this.httpRequest.delete(url);
|
|
33
|
+
}
|
|
30
34
|
};
|
|
31
35
|
ZendeskApi = __decorate([
|
|
32
36
|
injectable(),
|
|
@@ -6,5 +6,13 @@ import { HelpdeskCreateTicketRequest, HelpdeskCreateUserRequest } from '@fiado/t
|
|
|
6
6
|
export interface IZendeskApi {
|
|
7
7
|
createUser(data: HelpdeskCreateUserRequest): Promise<FiadoApiResponse<any>>;
|
|
8
8
|
createTicket(data: HelpdeskCreateTicketRequest): Promise<FiadoApiResponse<any>>;
|
|
9
|
+
/**
|
|
10
|
+
* Borra en cascada los registros de Zendesk asociados a un directoryId.
|
|
11
|
+
* @param directoryId ID del directorio.
|
|
12
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
13
|
+
*/
|
|
14
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
15
|
+
deletedCount: number;
|
|
16
|
+
}>>;
|
|
9
17
|
}
|
|
10
18
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.71.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",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { inject, injectable } from "inversify";
|
|
3
3
|
import { IActivityApi } from "./interfaces/IActivityApi.js";
|
|
4
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
4
5
|
|
|
5
6
|
@injectable()
|
|
6
7
|
export default class ActivityApi implements IActivityApi {
|
|
@@ -33,4 +34,9 @@ export default class ActivityApi implements IActivityApi {
|
|
|
33
34
|
const url = `${this.baseUrl}activities/history?typeOfActivity=${typeOfActivity}&startDate=${startDate}&endDate=${endDate}`;
|
|
34
35
|
return await this.httpRequest.get(url);
|
|
35
36
|
}
|
|
37
|
+
|
|
38
|
+
async deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>> {
|
|
39
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
40
|
+
return await this.httpRequest.delete<FiadoApiResponse<{ deletedCount: number }>>(url);
|
|
41
|
+
}
|
|
36
42
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
2
2
|
|
|
3
3
|
export interface IActivityApi {
|
|
4
4
|
|
|
@@ -11,4 +11,12 @@ export interface IActivityApi {
|
|
|
11
11
|
findByDirectoriesList(directories: string[]): Promise<any>
|
|
12
12
|
|
|
13
13
|
correctCounters(): Promise<any>
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Borra en cascada las actividades asociadas a un directoryId.
|
|
17
|
+
* @param directoryId ID del directorio.
|
|
18
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
19
|
+
*/
|
|
20
|
+
// TODO(type-kit): swap a Directory.DeleteByDirectoryResponse cuando se publique
|
|
21
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>>
|
|
14
22
|
}
|
|
@@ -2,6 +2,7 @@ import { IHttpRequest } from "@fiado/http-client";
|
|
|
2
2
|
import { AddressCreateRequest, AddressShippingCardResponse } from "@fiado/type-kit/bin/address/index.js";
|
|
3
3
|
import { inject, injectable } from "inversify";
|
|
4
4
|
import { IAddressApi } from "./interfaces/IAddressApi.js";
|
|
5
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
@injectable()
|
|
@@ -33,6 +34,11 @@ export class AddressApi implements IAddressApi {
|
|
|
33
34
|
return await this.httpRequest.post<AddressShippingCardResponse>(url, { directoryId });
|
|
34
35
|
}
|
|
35
36
|
|
|
37
|
+
async deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>> {
|
|
38
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
39
|
+
return await this.httpRequest.delete<FiadoApiResponse<{ deletedCount: number }>>(url);
|
|
40
|
+
}
|
|
41
|
+
|
|
36
42
|
private validateBaseUrl() {
|
|
37
43
|
if (!this.baseUrl) {
|
|
38
44
|
throw new Error("Environment variable ADDRESS_LAMBDA_URL value not found");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AddressCreateRequest, AddressResponse, AddressShippingCardResponse } from "@fiado/type-kit/bin/address/index.js";
|
|
2
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
2
3
|
|
|
3
4
|
export interface IAddressApi {
|
|
4
5
|
|
|
@@ -26,6 +27,14 @@ export interface IAddressApi {
|
|
|
26
27
|
* @returns Una promesa que resuelve a un objeto de respuesta de dirección de envío.
|
|
27
28
|
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
28
29
|
*/
|
|
29
|
-
getAddressLocationShipping(directoryId: string): Promise<AddressShippingCardResponse>
|
|
30
|
+
getAddressLocationShipping(directoryId: string): Promise<AddressShippingCardResponse>
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Borra en cascada las direcciones asociadas a un directoryId.
|
|
34
|
+
* @param directoryId ID del directorio.
|
|
35
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
36
|
+
*/
|
|
37
|
+
// TODO(type-kit): swap a Directory.DeleteByDirectoryResponse cuando se publique
|
|
38
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>>;
|
|
30
39
|
|
|
31
40
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import dotenv from 'dotenv';
|
|
4
|
+
import { IAuthBusinessApi } from "./interfaces/IAuthBusinessApi.js";
|
|
5
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
6
|
+
|
|
7
|
+
dotenv.config();
|
|
8
|
+
|
|
9
|
+
@injectable()
|
|
10
|
+
export class AuthBusinessApi implements IAuthBusinessApi {
|
|
11
|
+
|
|
12
|
+
private readonly baseUrl = process.env.AUTH_BUSINESS_LAMBDA_URL || "";
|
|
13
|
+
|
|
14
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
15
|
+
|
|
16
|
+
async deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>> {
|
|
17
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
18
|
+
return await this.httpRequest.delete<FiadoApiResponse<{ deletedCount: number }>>(url);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Interfaz para el servicio Auth Business (auth-business).
|
|
5
|
+
*/
|
|
6
|
+
export interface IAuthBusinessApi {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Borra en cascada los registros de auth asociados a un directoryId.
|
|
10
|
+
* @param directoryId ID del directorio.
|
|
11
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
12
|
+
*/
|
|
13
|
+
// TODO(type-kit): swap a Directory.DeleteByDirectoryResponse cuando se publique
|
|
14
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>>;
|
|
15
|
+
}
|
|
@@ -32,4 +32,9 @@ export default class BankAccountApi implements IBankAccountApi {
|
|
|
32
32
|
};
|
|
33
33
|
return await this.httpRequest.get(url, { params });
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
async deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>> {
|
|
37
|
+
const url = `${this.baseUrl}/private/directory/${directoryId}`;
|
|
38
|
+
return await this.httpRequest.delete<FiadoApiResponse<{ deletedCount: number }>>(url);
|
|
39
|
+
}
|
|
35
40
|
}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
2
|
+
|
|
1
3
|
export interface IBankAccountApi {
|
|
2
4
|
getBankAccountById(bankAccountId: string): Promise<any>;
|
|
3
5
|
|
|
4
6
|
getBankById(bankId: string): Promise<any>;
|
|
5
7
|
|
|
6
8
|
getBankByCode(bankCode?: string, shortBankCode?: string): Promise<any>;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Borra en cascada las cuentas bancarias asociadas a un directoryId.
|
|
12
|
+
* @param directoryId ID del directorio.
|
|
13
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
14
|
+
*/
|
|
15
|
+
// TODO(type-kit): swap a Directory.DeleteByDirectoryResponse cuando se publique
|
|
16
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>>;
|
|
7
17
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import dotenv from 'dotenv';
|
|
4
|
+
import { IBeneficiaryApi } from "./interfaces/IBeneficiaryApi.js";
|
|
5
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
6
|
+
|
|
7
|
+
dotenv.config();
|
|
8
|
+
|
|
9
|
+
@injectable()
|
|
10
|
+
export class BeneficiaryApi implements IBeneficiaryApi {
|
|
11
|
+
|
|
12
|
+
private readonly baseUrl = process.env.BENEFICIARY_BUSINESS_LAMBDA_URL || "";
|
|
13
|
+
|
|
14
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
15
|
+
|
|
16
|
+
async deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>> {
|
|
17
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
18
|
+
return await this.httpRequest.delete<FiadoApiResponse<{ deletedCount: number }>>(url);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Interfaz para el servicio Beneficiary (beneficiary-business).
|
|
5
|
+
*/
|
|
6
|
+
export interface IBeneficiaryApi {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Borra en cascada los beneficiarios asociados a un directoryId.
|
|
10
|
+
* @param directoryId ID del directorio.
|
|
11
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
12
|
+
*/
|
|
13
|
+
// TODO(type-kit): swap a Directory.DeleteByDirectoryResponse cuando se publique
|
|
14
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>>;
|
|
15
|
+
}
|
|
@@ -2,6 +2,7 @@ import { ContactInfoCreateRequest } from "@fiado/type-kit/bin/contactInfo/index.
|
|
|
2
2
|
import { IContactInformationApi } from "./interface/IContactInformationApi.js";
|
|
3
3
|
import { IHttpRequest } from "@fiado/http-client";
|
|
4
4
|
import { inject } from "inversify";
|
|
5
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
|
|
@@ -18,4 +19,9 @@ export class ContactInformationApi implements IContactInformationApi {
|
|
|
18
19
|
return await this.httpRequest.post(`${url}`, input);
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
async deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>> {
|
|
23
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
24
|
+
return await this.httpRequest.delete<FiadoApiResponse<{ deletedCount: number }>>(url);
|
|
25
|
+
}
|
|
26
|
+
|
|
21
27
|
}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { ContactInfoCreateRequest } from "@fiado/type-kit/bin/contactInfo/index.js";
|
|
2
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
export interface IContactInformationApi {
|
|
6
7
|
|
|
7
|
-
create(input: ContactInfoCreateRequest): Promise<void>
|
|
8
|
+
create(input: ContactInfoCreateRequest): Promise<void>
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Borra en cascada los registros asociados a un directoryId.
|
|
12
|
+
* @param directoryId ID del directorio.
|
|
13
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
14
|
+
*/
|
|
15
|
+
// TODO(type-kit): swap a Directory.DeleteByDirectoryResponse cuando se publique
|
|
16
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>>;
|
|
8
17
|
|
|
9
18
|
}
|
package/src/container.config.ts
CHANGED
|
@@ -179,6 +179,12 @@ import { IWalletFundingRulesApi, WalletFundingRulesApi } from "./wallet-funding-
|
|
|
179
179
|
import { ISnsSesConnectorApi, SnsSesConnectorApi } from "./sns-ses-connector/index.js";
|
|
180
180
|
// Remittance business — pricingResolve (Dashboard Ops Fase B, puente de resolución de precio en send-time)
|
|
181
181
|
import { IRemittanceBusinessApi, RemittanceBusinessApi } from "./remittance-business/index.js";
|
|
182
|
+
import { IBeneficiaryApi, BeneficiaryApi } from "./beneficiary/index.js";
|
|
183
|
+
import { IMembershipApi, MembershipApi } from "./membership/index.js";
|
|
184
|
+
import { IPerformanceProfileApi, PerformanceProfileApi } from "./performance-profile/index.js";
|
|
185
|
+
import { IAuthBusinessApi, AuthBusinessApi } from "./auth-business/index.js";
|
|
186
|
+
import { IPresenceWebsocketApi, PresenceWebsocketApi } from "./presence-websocket/index.js";
|
|
187
|
+
import { INotificationWebsocketApi, NotificationWebsocketApi } from "./notificationWebsockets/index.js";
|
|
182
188
|
|
|
183
189
|
export const apiInvokerBindings = new ContainerModule(({ bind }) => {
|
|
184
190
|
// UTILS bindings
|
|
@@ -332,4 +338,12 @@ export const apiInvokerBindings = new ContainerModule(({ bind }) => {
|
|
|
332
338
|
|
|
333
339
|
// Remittance business — pricingResolve (Dashboard Ops Fase B, puente de resolución de precio en send-time)
|
|
334
340
|
bind<IRemittanceBusinessApi>("IRemittanceBusinessApi").to(RemittanceBusinessApi);
|
|
341
|
+
|
|
342
|
+
// Borrado en cascada del directorio — deleteByDirectoryId por dominio
|
|
343
|
+
bind<IBeneficiaryApi>("IBeneficiaryApi").to(BeneficiaryApi);
|
|
344
|
+
bind<IMembershipApi>("IMembershipApi").to(MembershipApi);
|
|
345
|
+
bind<IPerformanceProfileApi>("IPerformanceProfileApi").to(PerformanceProfileApi);
|
|
346
|
+
bind<IAuthBusinessApi>("IAuthBusinessApi").to(AuthBusinessApi);
|
|
347
|
+
bind<IPresenceWebsocketApi>("IPresenceWebsocketApi").to(PresenceWebsocketApi);
|
|
348
|
+
bind<INotificationWebsocketApi>("INotificationWebsocketApi").to(NotificationWebsocketApi);
|
|
335
349
|
});
|
|
@@ -39,4 +39,9 @@ export class DirectorySettingApi implements IDirectorySettingApi {
|
|
|
39
39
|
}
|
|
40
40
|
return await this.httpRequest.get(url);
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
async deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>> {
|
|
44
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
45
|
+
return await this.httpRequest.delete<FiadoApiResponse<{ deletedCount: number }>>(url);
|
|
46
|
+
}
|
|
42
47
|
}
|
|
@@ -52,5 +52,12 @@ export interface IDirectorySettingApi {
|
|
|
52
52
|
}
|
|
53
53
|
>>;
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Borra en cascada los settings asociados a un directoryId.
|
|
57
|
+
* @param directoryId ID del directorio.
|
|
58
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
59
|
+
*/
|
|
60
|
+
// TODO(type-kit): swap a Directory.DeleteByDirectoryResponse cuando se publique
|
|
61
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>>;
|
|
62
|
+
|
|
56
63
|
}
|
package/src/group/GroupApi.ts
CHANGED
|
@@ -72,4 +72,9 @@ export class GroupApi implements IGroupApi {
|
|
|
72
72
|
const url = `${this.baseUrl}groups/counts`;
|
|
73
73
|
return await this.httpRequest.get(`${url}`);
|
|
74
74
|
}
|
|
75
|
+
|
|
76
|
+
async deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>> {
|
|
77
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
78
|
+
return await this.httpRequest.delete<FiadoApiResponse<{ deletedCount: number }>>(url);
|
|
79
|
+
}
|
|
75
80
|
}
|
|
@@ -44,4 +44,12 @@ export interface IGroupApi {
|
|
|
44
44
|
* (GET groups/counts, privado en fiado-group-business).
|
|
45
45
|
*/
|
|
46
46
|
findAllWithCounts(): Promise<FiadoApiResponse<GroupCountsResponse>>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Borra en cascada los grupos/membresías asociados a un directoryId.
|
|
50
|
+
* @param directoryId ID del directorio.
|
|
51
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
52
|
+
*/
|
|
53
|
+
// TODO(type-kit): swap a Directory.DeleteByDirectoryResponse cuando se publique
|
|
54
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>>;
|
|
47
55
|
}
|
package/src/index.ts
CHANGED
|
@@ -87,9 +87,15 @@ export * from "./totp-security/index.js";
|
|
|
87
87
|
export * from "./equality-connector/index.js";
|
|
88
88
|
export * from "./synergypay-connector/index.js";
|
|
89
89
|
export * from "./contacts-business/index.js";
|
|
90
|
+
export * from "./contactInformation/index.js";
|
|
90
91
|
export * from "./uniteller-connector/index.js";
|
|
91
92
|
export * from "./walletFundingSettlement/index.js";
|
|
92
93
|
export * from "./wallet-funding-rules/index.js";
|
|
93
94
|
export * from "./sns-ses-connector/index.js";
|
|
94
95
|
export * from "./remittance-business/index.js";
|
|
95
96
|
export * from "./modelias-connector/index.js";
|
|
97
|
+
export * from "./beneficiary/index.js";
|
|
98
|
+
export * from "./membership/index.js";
|
|
99
|
+
export * from "./performance-profile/index.js";
|
|
100
|
+
export * from "./auth-business/index.js";
|
|
101
|
+
export * from "./presence-websocket/index.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import dotenv from 'dotenv';
|
|
4
|
+
import { IMembershipApi } from "./interfaces/IMembershipApi.js";
|
|
5
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
6
|
+
|
|
7
|
+
dotenv.config();
|
|
8
|
+
|
|
9
|
+
@injectable()
|
|
10
|
+
export class MembershipApi implements IMembershipApi {
|
|
11
|
+
|
|
12
|
+
private readonly baseUrl = process.env.MEMBERSHIP_BUSINESS_LAMBDA_URL || "";
|
|
13
|
+
|
|
14
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
15
|
+
|
|
16
|
+
async deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>> {
|
|
17
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
18
|
+
return await this.httpRequest.delete<FiadoApiResponse<{ deletedCount: number }>>(url);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Interfaz para el servicio Membership (membership-business).
|
|
5
|
+
*/
|
|
6
|
+
export interface IMembershipApi {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Borra en cascada las membresías asociadas a un directoryId.
|
|
10
|
+
* @param directoryId ID del directorio.
|
|
11
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
12
|
+
*/
|
|
13
|
+
// TODO(type-kit): swap a Directory.DeleteByDirectoryResponse cuando se publique
|
|
14
|
+
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import dotenv from 'dotenv';
|
|
4
|
+
import { INotificationWebsocketApi } from "./interfaces/INotificationWebsocketApi.js";
|
|
5
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
6
|
+
|
|
7
|
+
dotenv.config();
|
|
8
|
+
|
|
9
|
+
@injectable()
|
|
10
|
+
export class NotificationWebsocketApi implements INotificationWebsocketApi {
|
|
11
|
+
|
|
12
|
+
private readonly baseUrl = process.env.NOTIFICATIONS_WEBSOCKET_LAMBDA_URL || "";
|
|
13
|
+
|
|
14
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
15
|
+
|
|
16
|
+
async deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>> {
|
|
17
|
+
const url = `${this.baseUrl}private/directory/${directoryId}`;
|
|
18
|
+
return await this.httpRequest.delete<FiadoApiResponse<{ deletedCount: number }>>(url);
|
|
19
|
+
}
|
|
20
|
+
}
|