@fiado/api-invoker 1.5.13 → 1.5.16
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/onboarding-business/api/OnboardingBusinessApi.js +1 -1
- package/bin/referral-business/ReferralBusinessApi.d.ts +1 -0
- package/bin/referral-business/ReferralBusinessApi.js +4 -0
- package/bin/referral-business/interfaces/IReferralBusinessApi.d.ts +6 -0
- package/package.json +1 -1
- package/src/onboarding-business/api/OnboardingBusinessApi.ts +1 -1
- package/src/referral-business/ReferralBusinessApi.ts +8 -1
- package/src/referral-business/interfaces/IReferralBusinessApi.ts +7 -0
|
@@ -92,7 +92,7 @@ let OnboardingBusinessApi = class OnboardingBusinessApi {
|
|
|
92
92
|
}
|
|
93
93
|
async getBatchByIds(ids) {
|
|
94
94
|
const url = `${this.baseUrl}private/getBatchByIds`;
|
|
95
|
-
return await this.httpRequest.
|
|
95
|
+
return await this.httpRequest.get(`${url}`, { ids });
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
OnboardingBusinessApi = __decorate([
|
|
@@ -13,4 +13,5 @@ export declare class ReferralBusinessApi implements IReferralBusinessApi {
|
|
|
13
13
|
groupId?: string;
|
|
14
14
|
}): Promise<FiadoApiResponse<any>>;
|
|
15
15
|
getByDirectoryId(directoryId: string): Promise<FiadoApiResponse<any>>;
|
|
16
|
+
accountOpeningsBySponsor(newDirectoryId: string): Promise<FiadoApiResponse<any>>;
|
|
16
17
|
}
|
|
@@ -32,6 +32,10 @@ let ReferralBusinessApi = class ReferralBusinessApi {
|
|
|
32
32
|
const url = `${this.baseUrl}private/agents/directoryId/${directoryId}`;
|
|
33
33
|
return await this.httpRequest.get(url);
|
|
34
34
|
}
|
|
35
|
+
async accountOpeningsBySponsor(newDirectoryId) {
|
|
36
|
+
const url = `${this.baseUrl}private/account-openings-by-sponsor/${newDirectoryId}`;
|
|
37
|
+
return await this.httpRequest.post(url, { directoryId: newDirectoryId });
|
|
38
|
+
}
|
|
35
39
|
};
|
|
36
40
|
exports.ReferralBusinessApi = ReferralBusinessApi;
|
|
37
41
|
exports.ReferralBusinessApi = ReferralBusinessApi = __decorate([
|
|
@@ -21,4 +21,10 @@ export interface IReferralBusinessApi {
|
|
|
21
21
|
category?: string;
|
|
22
22
|
groupId?: string;
|
|
23
23
|
}): Promise<FiadoApiResponse<any>>;
|
|
24
|
+
/**
|
|
25
|
+
* Registra aperturas de cuenta por patrocinador.
|
|
26
|
+
* @param newDirectoryId ID del nuevo directorio.
|
|
27
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
28
|
+
*/
|
|
29
|
+
accountOpeningsBySponsor(newDirectoryId: string): Promise<FiadoApiResponse<void>>;
|
|
24
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.16",
|
|
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",
|
|
@@ -88,7 +88,7 @@ export default class OnboardingBusinessApi implements IOnboardingBusinessApi {
|
|
|
88
88
|
|
|
89
89
|
async getBatchByIds(ids: string[]): Promise<any> {
|
|
90
90
|
const url = `${this.baseUrl}private/getBatchByIds`;
|
|
91
|
-
return await this.httpRequest.
|
|
91
|
+
return await this.httpRequest.get(`${url}`, { ids });
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
}
|
|
@@ -12,7 +12,7 @@ export class ReferralBusinessApi implements IReferralBusinessApi {
|
|
|
12
12
|
private readonly baseUrl = process.env.REFERRAL_BUSINESS_LAMBDA_URL || "";
|
|
13
13
|
|
|
14
14
|
constructor(@inject("IHttpRequest") private httpRequest: IHttpRequest) { }
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
async createAgent(params: { directoryId: string; notes?: string; type?: string; category?: string; groupId?: string; }): Promise<FiadoApiResponse<any>> {
|
|
17
17
|
const url = `${this.baseUrl}private/agents`;
|
|
18
18
|
return await this.httpRequest.post(url, params);
|
|
@@ -22,4 +22,11 @@ export class ReferralBusinessApi implements IReferralBusinessApi {
|
|
|
22
22
|
const url = `${this.baseUrl}private/agents/directoryId/${directoryId}`;
|
|
23
23
|
return await this.httpRequest.get(url);
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
async accountOpeningsBySponsor(newDirectoryId: string): Promise<FiadoApiResponse<any>> {
|
|
27
|
+
|
|
28
|
+
const url = `${this.baseUrl}private/account-openings-by-sponsor/${newDirectoryId}`;
|
|
29
|
+
|
|
30
|
+
return await this.httpRequest.post(url, { directoryId: newDirectoryId });
|
|
31
|
+
}
|
|
25
32
|
}
|
|
@@ -19,4 +19,11 @@ export interface IReferralBusinessApi {
|
|
|
19
19
|
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
20
20
|
*/
|
|
21
21
|
createAgent(params:{directoryId: string; notes?: string; type?: string; category?: string; groupId?: string}): Promise<FiadoApiResponse<any>>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Registra aperturas de cuenta por patrocinador.
|
|
25
|
+
* @param newDirectoryId ID del nuevo directorio.
|
|
26
|
+
* @throws {Error} Lanza un error si los parámetros de entrada son inválidos.
|
|
27
|
+
*/
|
|
28
|
+
accountOpeningsBySponsor(newDirectoryId: string): Promise<FiadoApiResponse<void>>;
|
|
22
29
|
}
|