@fiado/api-invoker 4.68.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 +15 -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 +8 -0
- package/bin/index.js +8 -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/places-business/api/PlacesBusinessApi.d.ts +12 -0
- package/bin/places-business/api/PlacesBusinessApi.js +32 -0
- package/bin/places-business/api/interfaces/IPlacesBusinessApi.d.ts +9 -0
- package/bin/places-business/api/interfaces/IPlacesBusinessApi.js +1 -0
- package/bin/places-business/index.d.ts +2 -0
- package/bin/places-business/index.js +2 -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/retailCustomer/api/RetailCustomerBusinessApi.d.ts +27 -0
- package/bin/retailCustomer/api/RetailCustomerBusinessApi.js +56 -0
- package/bin/retailCustomer/api/interfaces/IRetailCustomerBusinessApi.d.ts +76 -0
- package/bin/retailCustomer/api/interfaces/IRetailCustomerBusinessApi.js +1 -0
- package/bin/retailCustomer/index.d.ts +2 -0
- package/bin/retailCustomer/index.js +2 -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 +2 -2
- 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 +17 -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 +8 -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/places-business/api/PlacesBusinessApi.ts +22 -0
- package/src/places-business/api/interfaces/IPlacesBusinessApi.ts +9 -0
- package/src/places-business/index.ts +2 -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/retailCustomer/api/RetailCustomerBusinessApi.ts +63 -0
- package/src/retailCustomer/api/interfaces/IRetailCustomerBusinessApi.ts +97 -0
- package/src/retailCustomer/index.ts +2 -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,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
|
@@ -99,6 +99,8 @@ import { INotificationWSMessagesPublisher } from "./notificationWebsockets/index
|
|
|
99
99
|
import NotificationWSMessagePublisher from "./notificationWebsockets/queue/NotificationWSMessagePublisher.js";
|
|
100
100
|
import PeopleBusinessApi from "./people-business/api/PeopleBusinessApi.js";
|
|
101
101
|
import { IPeopleBusinessApi } from "./people-business/index.js";
|
|
102
|
+
import PlacesBusinessApi from "./places-business/api/PlacesBusinessApi.js";
|
|
103
|
+
import { IPlacesBusinessApi } from "./places-business/index.js";
|
|
102
104
|
import STPBusinessApi from "./stp-business/api/STPBusinessApi.js";
|
|
103
105
|
import { ISTPBusinessApi } from "./stp-business/index.js";
|
|
104
106
|
import { IMulticommServicePaymentApi } from "./multicommServicePayment/index.js";
|
|
@@ -177,6 +179,12 @@ import { IWalletFundingRulesApi, WalletFundingRulesApi } from "./wallet-funding-
|
|
|
177
179
|
import { ISnsSesConnectorApi, SnsSesConnectorApi } from "./sns-ses-connector/index.js";
|
|
178
180
|
// Remittance business — pricingResolve (Dashboard Ops Fase B, puente de resolución de precio en send-time)
|
|
179
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";
|
|
180
188
|
|
|
181
189
|
export const apiInvokerBindings = new ContainerModule(({ bind }) => {
|
|
182
190
|
// UTILS bindings
|
|
@@ -252,6 +260,7 @@ export const apiInvokerBindings = new ContainerModule(({ bind }) => {
|
|
|
252
260
|
bind<IEventHistoryApi>("IEventHistoryApi").to(EventHistoryApi);
|
|
253
261
|
bind<IReportProcessorBusinessApi>("IReportProcessorBusinessApi").to(ReportProcessorBusinessApi);
|
|
254
262
|
bind<IPeopleBusinessApi>("IPeopleBusinessApi").to(PeopleBusinessApi);
|
|
263
|
+
bind<IPlacesBusinessApi>("IPlacesBusinessApi").to(PlacesBusinessApi);
|
|
255
264
|
bind<ISTPBusinessApi>("ISTPBusinessApi").to(STPBusinessApi);
|
|
256
265
|
bind<IProductPaymentApi>("IProductPaymentApi").to(ProductPaymentApi);
|
|
257
266
|
bind<ICommissionBusinessApi>("ICommissionBusinessApi").to(CommissionBusinessApi);
|
|
@@ -329,4 +338,12 @@ export const apiInvokerBindings = new ContainerModule(({ bind }) => {
|
|
|
329
338
|
|
|
330
339
|
// Remittance business — pricingResolve (Dashboard Ops Fase B, puente de resolución de precio en send-time)
|
|
331
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);
|
|
332
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
|
@@ -61,6 +61,7 @@ export * from "./event-history-business/index.js";
|
|
|
61
61
|
export * from "./report-processor-business/index.js";
|
|
62
62
|
export * from "./notificationWebsockets/index.js";
|
|
63
63
|
export * from "./people-business/index.js";
|
|
64
|
+
export * from "./places-business/index.js";
|
|
64
65
|
export * from "./stp-business/index.js";
|
|
65
66
|
export * from "./multicommServicePayment/index.js";
|
|
66
67
|
export * from "./product-payment/index.js";
|
|
@@ -77,6 +78,7 @@ export * from "./milestone-business/index.js";
|
|
|
77
78
|
export * from "./cognitoBackofficeConnector/index.js";
|
|
78
79
|
export * from "./platformRbac/index.js";
|
|
79
80
|
export * from "./retailOrg/index.js";
|
|
81
|
+
export * from "./retailCustomer/index.js";
|
|
80
82
|
export * from "./loanConfig/index.js";
|
|
81
83
|
export * from "./loanOfferings/index.js";
|
|
82
84
|
export * from "./loanCollectorAssignment/index.js";
|
|
@@ -85,9 +87,15 @@ export * from "./totp-security/index.js";
|
|
|
85
87
|
export * from "./equality-connector/index.js";
|
|
86
88
|
export * from "./synergypay-connector/index.js";
|
|
87
89
|
export * from "./contacts-business/index.js";
|
|
90
|
+
export * from "./contactInformation/index.js";
|
|
88
91
|
export * from "./uniteller-connector/index.js";
|
|
89
92
|
export * from "./walletFundingSettlement/index.js";
|
|
90
93
|
export * from "./wallet-funding-rules/index.js";
|
|
91
94
|
export * from "./sns-ses-connector/index.js";
|
|
92
95
|
export * from "./remittance-business/index.js";
|
|
93
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
|
+
}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export * from './queue/NotificationWSMessagePublisher.js';
|
|
2
|
-
export * from './queue/interfaces/INotificationWSMessagesPublisher.js';
|
|
2
|
+
export * from './queue/interfaces/INotificationWSMessagesPublisher.js';
|
|
3
|
+
export * from './interfaces/INotificationWebsocketApi.js';
|
|
4
|
+
export * from './NotificationWebsocketApi.js';
|
|
@@ -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 Notifications Websocket (notifications-websocket).
|
|
5
|
+
*/
|
|
6
|
+
export interface INotificationWebsocketApi {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Borra en cascada las conexiones/notificaciones WS 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 { IPerformanceProfileApi } from "./interfaces/IPerformanceProfileApi.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 PerformanceProfileApi implements IPerformanceProfileApi {
|
|
11
|
+
|
|
12
|
+
private readonly baseUrl = process.env.PERFORMANCE_PROFILE_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 Performance Profile (performance-profile-business).
|
|
5
|
+
*/
|
|
6
|
+
export interface IPerformanceProfileApi {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Borra en cascada los perfiles de desempeño 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
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import { SearchAddressRequest, SearchAddressResponse, ReverseGeocodeRequest, ReverseGeocodeResponse } from "@fiado/type-kit/bin/places/index.js";
|
|
4
|
+
import { IPlacesBusinessApi } from "./interfaces/IPlacesBusinessApi.js";
|
|
5
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
6
|
+
|
|
7
|
+
@injectable()
|
|
8
|
+
export default class PlacesBusinessApi implements IPlacesBusinessApi {
|
|
9
|
+
|
|
10
|
+
private readonly baseUrl = process.env.PLACES_BUSINESS_LAMBDA_URL || "";
|
|
11
|
+
|
|
12
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async searchAddress(request: SearchAddressRequest): Promise<FiadoApiResponse<SearchAddressResponse>> {
|
|
16
|
+
return await this.httpRequest.post(`${this.baseUrl}private/search-address`, request, { operationName: "privateSearchAddress" });
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async reverseGeocode(request: ReverseGeocodeRequest): Promise<FiadoApiResponse<ReverseGeocodeResponse>> {
|
|
20
|
+
return await this.httpRequest.post(`${this.baseUrl}private/reverse-geocode`, request, { operationName: "privateReverseGeocode" });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SearchAddressRequest, SearchAddressResponse, ReverseGeocodeRequest, ReverseGeocodeResponse } from "@fiado/type-kit/bin/places/index.js";
|
|
2
|
+
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
3
|
+
|
|
4
|
+
export interface IPlacesBusinessApi {
|
|
5
|
+
/** Geocoding por texto (POST /private/search-address, operationId privateSearchAddress). */
|
|
6
|
+
searchAddress(request: SearchAddressRequest): Promise<FiadoApiResponse<SearchAddressResponse>>;
|
|
7
|
+
/** Reverse geocoding (POST /private/reverse-geocode, operationId privateReverseGeocode). */
|
|
8
|
+
reverseGeocode(request: ReverseGeocodeRequest): Promise<FiadoApiResponse<ReverseGeocodeResponse>>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import dotenv from 'dotenv';
|
|
4
|
+
import { IPresenceWebsocketApi } from "./interfaces/IPresenceWebsocketApi.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 PresenceWebsocketApi implements IPresenceWebsocketApi {
|
|
11
|
+
|
|
12
|
+
private readonly baseUrl = process.env.PRESENCE_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
|
+
}
|
|
@@ -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 Presence Websocket (presence-websocket).
|
|
5
|
+
*/
|
|
6
|
+
export interface IPresenceWebsocketApi {
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Borra en cascada los registros de presencia 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
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
4
|
+
import {
|
|
5
|
+
UpsertCustomerFromKycRequest,
|
|
6
|
+
AccountResultRequest,
|
|
7
|
+
CustomerResponse,
|
|
8
|
+
} from "@fiado/type-kit/bin/retailCustomer/index.js";
|
|
9
|
+
import { IRetailCustomerBusinessApi } from "./interfaces/IRetailCustomerBusinessApi.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Publisher HTTP del lambda `retail-customer-business` (SureKeep Fase 2, pista Retail) para sus 4
|
|
13
|
+
* endpoints privados de cliente. Contrato y semántica completos → `IRetailCustomerBusinessApi`.
|
|
14
|
+
*
|
|
15
|
+
* Los paths y el `?tenantId=` matchean `openapi/private.yaml` del lambda destino (mismo patrón que
|
|
16
|
+
* `retail-org-business`: el silo se resuelve por el `tenantId` canónico que manda el caller).
|
|
17
|
+
*
|
|
18
|
+
* Env var requerida en el consumer: `RETAIL_CUSTOMER_BUSINESS_URL`.
|
|
19
|
+
* El template.yml del consumer la setea con:
|
|
20
|
+
*
|
|
21
|
+
* RETAIL_CUSTOMER_BUSINESS_URL: '{{resolve:ssm:retail-customer-business}}'
|
|
22
|
+
*
|
|
23
|
+
* Convención CLAUDE.md global: SSM key = nombre del lambda owner de la URL.
|
|
24
|
+
*/
|
|
25
|
+
@injectable()
|
|
26
|
+
export default class RetailCustomerBusinessApi implements IRetailCustomerBusinessApi {
|
|
27
|
+
private readonly baseUrl = process.env.RETAIL_CUSTOMER_BUSINESS_URL || "";
|
|
28
|
+
|
|
29
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
|
|
30
|
+
|
|
31
|
+
async upsertCustomerFromKyc(
|
|
32
|
+
payload: UpsertCustomerFromKycRequest,
|
|
33
|
+
tenantId: string,
|
|
34
|
+
): Promise<StandardResponse<CustomerResponse>> {
|
|
35
|
+
const url = `${this.baseUrl}/private/customers/upsert-from-kyc?tenantId=${encodeURIComponent(tenantId)}`;
|
|
36
|
+
return await this.httpRequest.post(url, payload);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async setAccountResult(
|
|
40
|
+
customerId: string,
|
|
41
|
+
payload: AccountResultRequest,
|
|
42
|
+
tenantId: string,
|
|
43
|
+
): Promise<StandardResponse<CustomerResponse>> {
|
|
44
|
+
const url = `${this.baseUrl}/private/customers/${encodeURIComponent(customerId)}/account-result?tenantId=${encodeURIComponent(tenantId)}`;
|
|
45
|
+
return await this.httpRequest.put(url, payload);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async getCustomerByPhone(
|
|
49
|
+
phone: string,
|
|
50
|
+
tenantId: string,
|
|
51
|
+
): Promise<StandardResponse<CustomerResponse>> {
|
|
52
|
+
const url = `${this.baseUrl}/private/customers/by-phone/${encodeURIComponent(phone)}?tenantId=${encodeURIComponent(tenantId)}`;
|
|
53
|
+
return await this.httpRequest.get(url);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async getCustomer(
|
|
57
|
+
customerId: string,
|
|
58
|
+
tenantId: string,
|
|
59
|
+
): Promise<StandardResponse<CustomerResponse>> {
|
|
60
|
+
const url = `${this.baseUrl}/private/customers/${encodeURIComponent(customerId)}?tenantId=${encodeURIComponent(tenantId)}`;
|
|
61
|
+
return await this.httpRequest.get(url);
|
|
62
|
+
}
|
|
63
|
+
}
|