@fiado/api-invoker 1.5.36 → 1.5.37
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.
|
@@ -6,6 +6,7 @@ export declare class DirectoriesApi implements IDirectoriesApi {
|
|
|
6
6
|
private httpRequest;
|
|
7
7
|
private readonly baseUrl;
|
|
8
8
|
constructor(httpRequest: IHttpRequest);
|
|
9
|
+
getDirectoryBySponsorDirectoryId(sponsorDirectoryId: string, typeOfDirectoryId: TypeOfDirectoryId): Promise<FiadoApiResponse<DirectoryBackofficeResponse>>;
|
|
9
10
|
getBackofficeDirectoryById(id: string, typeOfDirectoryId?: TypeOfDirectoryId): Promise<FiadoApiResponse<DirectoryBackofficeResponse>>;
|
|
10
11
|
createBackofficeDirectory(directory: DirectoryBackofficeCreateRequest & {
|
|
11
12
|
typeOfDirectoryId?: TypeOfDirectoryId;
|
|
@@ -24,6 +24,10 @@ let DirectoriesApi = class DirectoriesApi {
|
|
|
24
24
|
this.httpRequest = httpRequest;
|
|
25
25
|
this.baseUrl = process.env.DIRECTORIES_LAMBDA_URL || "";
|
|
26
26
|
}
|
|
27
|
+
async getDirectoryBySponsorDirectoryId(sponsorDirectoryId, typeOfDirectoryId) {
|
|
28
|
+
const url = `${this.baseUrl}/directories/search/sponsorDirectoryId/${sponsorDirectoryId}?typeOfDirectoryId=${typeOfDirectoryId}`;
|
|
29
|
+
return await this.httpRequest.get(url);
|
|
30
|
+
}
|
|
27
31
|
async getBackofficeDirectoryById(id, typeOfDirectoryId) {
|
|
28
32
|
const queryParam = typeOfDirectoryId ? `?typeOfDirectoryId=${typeOfDirectoryId}` : '';
|
|
29
33
|
const url = `${this.baseUrl}directories/backoffice/${id}${queryParam}`;
|
|
@@ -23,4 +23,5 @@ export interface IDirectoriesApi {
|
|
|
23
23
|
updateBackofficeDirectory(directoryId: string, params: DirectoryBackofficeUpdateRequest & {
|
|
24
24
|
typeOfDirectoryId?: TypeOfDirectoryId;
|
|
25
25
|
}): Promise<FiadoApiResponse<DirectoryBackofficeResponse>>;
|
|
26
|
+
getDirectoryBySponsorDirectoryId(sponsorDirectoryId: string, typeOfDirectoryId: TypeOfDirectoryId): Promise<FiadoApiResponse<DirectoryBackofficeResponse>>;
|
|
26
27
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.37",
|
|
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
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -12,6 +12,10 @@ export class DirectoriesApi implements IDirectoriesApi {
|
|
|
12
12
|
private readonly baseUrl = process.env.DIRECTORIES_LAMBDA_URL || "";
|
|
13
13
|
|
|
14
14
|
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) {}
|
|
15
|
+
async getDirectoryBySponsorDirectoryId(sponsorDirectoryId: string, typeOfDirectoryId: TypeOfDirectoryId): Promise<FiadoApiResponse<DirectoryBackofficeResponse>> {
|
|
16
|
+
const url: string = `${this.baseUrl}/directories/search/sponsorDirectoryId/${sponsorDirectoryId}?typeOfDirectoryId=${typeOfDirectoryId}`;
|
|
17
|
+
return await this.httpRequest.get(url);
|
|
18
|
+
}
|
|
15
19
|
|
|
16
20
|
async getBackofficeDirectoryById(id: string, typeOfDirectoryId?: TypeOfDirectoryId): Promise<FiadoApiResponse<DirectoryBackofficeResponse>> {
|
|
17
21
|
const queryParam = typeOfDirectoryId ? `?typeOfDirectoryId=${typeOfDirectoryId}` : '';
|
|
@@ -13,4 +13,5 @@ export interface IDirectoriesApi {
|
|
|
13
13
|
getBackofficeDirectoryByEmail(email:string, typeOfDirectoryId?: TypeOfDirectoryId): Promise<FiadoApiResponse<DirectoryBackofficeResponse>>;
|
|
14
14
|
getBackofficeDirectoryList(params:{pageSize?:number, index?:string, typeOfDirectoryId?: TypeOfDirectoryId}): Promise<FiadoApiResponse<{index:string|null, items: DirectoryBackofficeResponse[]}>>;
|
|
15
15
|
updateBackofficeDirectory(directoryId:string, params:DirectoryBackofficeUpdateRequest & { typeOfDirectoryId?: TypeOfDirectoryId }): Promise<FiadoApiResponse<DirectoryBackofficeResponse>>;
|
|
16
|
+
getDirectoryBySponsorDirectoryId(sponsorDirectoryId:string, typeOfDirectoryId: TypeOfDirectoryId): Promise<FiadoApiResponse<DirectoryBackofficeResponse>>;
|
|
16
17
|
}
|