@fiado/api-invoker 4.70.0 → 4.72.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 +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/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/retailCards/api/RetailCardsBusinessApi.d.ts +24 -0
- package/bin/retailCards/api/RetailCardsBusinessApi.js +51 -0
- package/bin/retailCards/api/interfaces/IRetailCardsBusinessApi.d.ts +41 -0
- package/bin/retailCards/api/interfaces/IRetailCardsBusinessApi.js +1 -0
- package/bin/retailCards/index.d.ts +2 -0
- package/bin/retailCards/index.js +2 -0
- package/bin/retailCatalog/api/RetailCatalogBusinessApi.d.ts +27 -0
- package/bin/retailCatalog/api/RetailCatalogBusinessApi.js +65 -0
- package/bin/retailCatalog/api/interfaces/IRetailCatalogBusinessApi.d.ts +64 -0
- package/bin/retailCatalog/api/interfaces/IRetailCatalogBusinessApi.js +1 -0
- package/bin/retailCatalog/index.d.ts +2 -0
- package/bin/retailCatalog/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/docs/TECH_DEBT.md +7 -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 +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/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/retailCards/api/RetailCardsBusinessApi.ts +44 -0
- package/src/retailCards/api/interfaces/IRetailCardsBusinessApi.ts +47 -0
- package/src/retailCards/index.ts +2 -0
- package/src/retailCatalog/api/RetailCatalogBusinessApi.ts +68 -0
- package/src/retailCatalog/api/interfaces/IRetailCatalogBusinessApi.ts +75 -0
- package/src/retailCatalog/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
|
@@ -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
|
@@ -79,6 +79,8 @@ export * from "./cognitoBackofficeConnector/index.js";
|
|
|
79
79
|
export * from "./platformRbac/index.js";
|
|
80
80
|
export * from "./retailOrg/index.js";
|
|
81
81
|
export * from "./retailCustomer/index.js";
|
|
82
|
+
export * from "./retailCatalog/index.js";
|
|
83
|
+
export * from "./retailCards/index.js";
|
|
82
84
|
export * from "./loanConfig/index.js";
|
|
83
85
|
export * from "./loanOfferings/index.js";
|
|
84
86
|
export * from "./loanCollectorAssignment/index.js";
|
|
@@ -87,9 +89,15 @@ export * from "./totp-security/index.js";
|
|
|
87
89
|
export * from "./equality-connector/index.js";
|
|
88
90
|
export * from "./synergypay-connector/index.js";
|
|
89
91
|
export * from "./contacts-business/index.js";
|
|
92
|
+
export * from "./contactInformation/index.js";
|
|
90
93
|
export * from "./uniteller-connector/index.js";
|
|
91
94
|
export * from "./walletFundingSettlement/index.js";
|
|
92
95
|
export * from "./wallet-funding-rules/index.js";
|
|
93
96
|
export * from "./sns-ses-connector/index.js";
|
|
94
97
|
export * from "./remittance-business/index.js";
|
|
95
98
|
export * from "./modelias-connector/index.js";
|
|
99
|
+
export * from "./beneficiary/index.js";
|
|
100
|
+
export * from "./membership/index.js";
|
|
101
|
+
export * from "./performance-profile/index.js";
|
|
102
|
+
export * from "./auth-business/index.js";
|
|
103
|
+
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,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,44 @@
|
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
4
|
+
import { AssignCardRequest } from "@fiado/type-kit/bin/retailCards/index.js";
|
|
5
|
+
import {
|
|
6
|
+
IRetailCardsBusinessApi,
|
|
7
|
+
MarkDeliveredBody,
|
|
8
|
+
ReleaseCardBody,
|
|
9
|
+
} from "./interfaces/IRetailCardsBusinessApi.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Publisher HTTP del lambda `retail-cards-business` (SureKeep Fase 1, pista Retail) para sus endpoints
|
|
13
|
+
* privados de la tarjeta física PCF. Contrato y semántica completos → `IRetailCardsBusinessApi`
|
|
14
|
+
* (tenant por `?tenantId=` canónico, `StandardResponse` → leer `result.data`).
|
|
15
|
+
*
|
|
16
|
+
* Env var requerida en el consumer: `RETAIL_CARDS_BUSINESS_URL`.
|
|
17
|
+
* El template.yml del consumer la setea con:
|
|
18
|
+
*
|
|
19
|
+
* RETAIL_CARDS_BUSINESS_URL: '{{resolve:ssm:retail-cards-business}}'
|
|
20
|
+
*
|
|
21
|
+
* Convención CLAUDE.md global: SSM key = nombre del lambda owner de la URL.
|
|
22
|
+
*/
|
|
23
|
+
@injectable()
|
|
24
|
+
export default class RetailCardsBusinessApi implements IRetailCardsBusinessApi {
|
|
25
|
+
// El buildspec publica la URL en SSM con "/" final — se normaliza para no armar "//private".
|
|
26
|
+
private readonly baseUrl = (process.env.RETAIL_CARDS_BUSINESS_URL || "").replace(/\/+$/, "");
|
|
27
|
+
|
|
28
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
|
|
29
|
+
|
|
30
|
+
async assign(cardNumber: string, body: AssignCardRequest, tenantId: string): Promise<StandardResponse<void>> {
|
|
31
|
+
const url = `${this.baseUrl}/private/cards/${encodeURIComponent(cardNumber)}/assign?tenantId=${encodeURIComponent(tenantId)}`;
|
|
32
|
+
return await this.httpRequest.post(url, body);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async markDelivered(cardNumber: string, body: MarkDeliveredBody, tenantId: string): Promise<StandardResponse<void>> {
|
|
36
|
+
const url = `${this.baseUrl}/private/cards/${encodeURIComponent(cardNumber)}/deliver?tenantId=${encodeURIComponent(tenantId)}`;
|
|
37
|
+
return await this.httpRequest.post(url, body);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async release(cardNumber: string, body: ReleaseCardBody, tenantId: string): Promise<StandardResponse<void>> {
|
|
41
|
+
const url = `${this.baseUrl}/private/cards/${encodeURIComponent(cardNumber)}/release?tenantId=${encodeURIComponent(tenantId)}`;
|
|
42
|
+
return await this.httpRequest.post(url, body);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
2
|
+
import { AssignCardRequest } from "@fiado/type-kit/bin/retailCards/index.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Contrato del publisher HTTP del lambda `retail-cards-business` (SureKeep Fase 1, pista Retail) para
|
|
6
|
+
* sus endpoints privados de la tarjeta física PCF, consumidos por el wizard F2 (paso 09, spike S7).
|
|
7
|
+
*
|
|
8
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
9
|
+
* TENANT — `?tenantId=` CANÓNICO (query), NO header `x-tenant-issuer`.
|
|
10
|
+
* ─────────────────────────────────────────────────────────────────────────────
|
|
11
|
+
* El silo se resuelve por el `tenantId` canónico que manda el caller (`?tenantId=` →
|
|
12
|
+
* `withContextByTenantId`). Los privados son `Feature.ANONIMUS` (sin RBAC; protección VPC). Sin
|
|
13
|
+
* `tenantId` → `UnknownTenantError` (fail-closed).
|
|
14
|
+
*
|
|
15
|
+
* ⚠️ Retorno `StandardResponse<T>` — el consumer lee `result.data`, NO `result.body`.
|
|
16
|
+
* Errores: el destino lanza `DomainError` tipado → el publisher RECHAZA (no devuelve null).
|
|
17
|
+
*
|
|
18
|
+
* `deliver`/`release` reciben un body ligero (`{ deliveredByUserId? }` / `{ releasedByUserId? }`) que el
|
|
19
|
+
* destino no publica como DTO en `@fiado/type-kit` → se declara INLINE aquí. `assign` sí usa el DTO
|
|
20
|
+
* `AssignCardRequest` del type-kit (`{ assignedToCustomerId, assignedByUserId, creditId? }`).
|
|
21
|
+
*
|
|
22
|
+
* Env var requerida en el consumer: `RETAIL_CARDS_BUSINESS_URL`.
|
|
23
|
+
* El template.yml del consumer la setea con:
|
|
24
|
+
*
|
|
25
|
+
* RETAIL_CARDS_BUSINESS_URL: '{{resolve:ssm:retail-cards-business}}'
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/** Body de POST `/private/cards/{cardNumber}/deliver`. */
|
|
29
|
+
export interface MarkDeliveredBody {
|
|
30
|
+
deliveredByUserId?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Body de POST `/private/cards/{cardNumber}/release`. */
|
|
34
|
+
export interface ReleaseCardBody {
|
|
35
|
+
releasedByUserId?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface IRetailCardsBusinessApi {
|
|
39
|
+
/** POST `/private/cards/{cardNumber}/assign` — asigna la tarjeta física a un cliente (paso 09). */
|
|
40
|
+
assign(cardNumber: string, body: AssignCardRequest, tenantId: string): Promise<StandardResponse<void>>;
|
|
41
|
+
|
|
42
|
+
/** POST `/private/cards/{cardNumber}/deliver` — marca la tarjeta como entregada al cliente (D8). */
|
|
43
|
+
markDelivered(cardNumber: string, body: MarkDeliveredBody, tenantId: string): Promise<StandardResponse<void>>;
|
|
44
|
+
|
|
45
|
+
/** POST `/private/cards/{cardNumber}/release` — revierte la asignación si la venta se cancela (DEC-007 destino). */
|
|
46
|
+
release(cardNumber: string, body: ReleaseCardBody, tenantId: string): Promise<StandardResponse<void>>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { inject, injectable } from "inversify";
|
|
2
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
3
|
+
import { StandardResponse } from "@fiado/gateway-adapter";
|
|
4
|
+
import {
|
|
5
|
+
IRetailCatalogBusinessApi,
|
|
6
|
+
ReleaseReservationBody,
|
|
7
|
+
ReserveInventoryBody,
|
|
8
|
+
ReserveInventoryResult,
|
|
9
|
+
SellInventoryBody,
|
|
10
|
+
StoreCatalogItem,
|
|
11
|
+
} from "./interfaces/IRetailCatalogBusinessApi.js";
|
|
12
|
+
|
|
13
|
+
/** Header por el que el destino resuelve el silo (issuer Cognito forwardeado por el caller). */
|
|
14
|
+
const TENANT_ISSUER_HEADER = "x-tenant-issuer";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Publisher HTTP del lambda `retail-catalog-business` (SureKeep Fase 1, pista Retail) para sus
|
|
18
|
+
* endpoints privados del ciclo de venta del IMEI. Contrato y semántica completos →
|
|
19
|
+
* `IRetailCatalogBusinessApi` (tenant por header `x-tenant-issuer`, `StandardResponse` → leer
|
|
20
|
+
* `result.data`).
|
|
21
|
+
*
|
|
22
|
+
* Env var requerida en el consumer: `RETAIL_CATALOG_BUSINESS_URL`.
|
|
23
|
+
* El template.yml del consumer la setea con:
|
|
24
|
+
*
|
|
25
|
+
* RETAIL_CATALOG_BUSINESS_URL: '{{resolve:ssm:retail-catalog-business}}'
|
|
26
|
+
*
|
|
27
|
+
* Convención CLAUDE.md global: SSM key = nombre del lambda owner de la URL.
|
|
28
|
+
*/
|
|
29
|
+
@injectable()
|
|
30
|
+
export default class RetailCatalogBusinessApi implements IRetailCatalogBusinessApi {
|
|
31
|
+
// El buildspec publica la URL en SSM con "/" final — se normaliza para no armar "//private".
|
|
32
|
+
private readonly baseUrl = (process.env.RETAIL_CATALOG_BUSINESS_URL || "").replace(/\/+$/, "");
|
|
33
|
+
|
|
34
|
+
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
|
|
35
|
+
|
|
36
|
+
private tenantHeader(issuer: string): Record<string, string> {
|
|
37
|
+
return { [TENANT_ISSUER_HEADER]: issuer };
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async getStoreCatalog(storeId: string, issuer: string): Promise<StandardResponse<StoreCatalogItem[]>> {
|
|
41
|
+
const url = `${this.baseUrl}/private/stores/${encodeURIComponent(storeId)}/catalog`;
|
|
42
|
+
return await this.httpRequest.get(url, undefined, this.tenantHeader(issuer));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async reserveInventory(
|
|
46
|
+
imei: string,
|
|
47
|
+
body: ReserveInventoryBody,
|
|
48
|
+
issuer: string,
|
|
49
|
+
): Promise<StandardResponse<ReserveInventoryResult>> {
|
|
50
|
+
const url = `${this.baseUrl}/private/inventory/${encodeURIComponent(imei)}/reserve`;
|
|
51
|
+
return await this.httpRequest.put(url, body, this.tenantHeader(issuer));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async sellInventory(imei: string, body: SellInventoryBody, issuer: string): Promise<StandardResponse<void>> {
|
|
55
|
+
const url = `${this.baseUrl}/private/inventory/${encodeURIComponent(imei)}/sell`;
|
|
56
|
+
return await this.httpRequest.put(url, body, this.tenantHeader(issuer));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async releaseInventory(imei: string, body: ReleaseReservationBody, issuer: string): Promise<StandardResponse<void>> {
|
|
60
|
+
const url = `${this.baseUrl}/private/inventory/${encodeURIComponent(imei)}/release`;
|
|
61
|
+
return await this.httpRequest.put(url, body, this.tenantHeader(issuer));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async returnInventory(imei: string, issuer: string): Promise<StandardResponse<void>> {
|
|
65
|
+
const url = `${this.baseUrl}/private/inventory/${encodeURIComponent(imei)}/return`;
|
|
66
|
+
return await this.httpRequest.put(url, undefined, this.tenantHeader(issuer));
|
|
67
|
+
}
|
|
68
|
+
}
|