@fiado/api-invoker 5.105.0 → 5.106.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/address/AddressApi.d.ts +3 -1
- package/bin/address/AddressApi.js +7 -0
- package/bin/address/interfaces/IAddressApi.d.ts +2 -0
- package/bin/authentication/AuthenticationApi.d.ts +2 -0
- package/bin/authentication/AuthenticationApi.js +7 -0
- package/bin/authentication/interfaces/IAuthenticationApi.d.ts +2 -0
- package/bin/onboarding/api/OnboardingApi.d.ts +2 -0
- package/bin/onboarding/api/OnboardingApi.js +7 -0
- package/bin/onboarding/api/interfaces/IOnboardingApi.d.ts +2 -0
- package/bin/riskProfile/api/RiskProfileApi.d.ts +3 -1
- package/bin/riskProfile/api/RiskProfileApi.js +7 -0
- package/bin/riskProfile/api/interfaces/IRiskProfileApi.d.ts +2 -0
- package/package.json +1 -1
- package/src/address/AddressApi.ts +9 -2
- package/src/address/interfaces/IAddressApi.ts +3 -0
- package/src/authentication/AuthenticationApi.ts +7 -0
- package/src/authentication/interfaces/IAuthenticationApi.ts +4 -0
- package/src/onboarding/api/OnboardingApi.ts +7 -0
- package/src/onboarding/api/interfaces/IOnboardingApi.ts +4 -0
- package/src/riskProfile/api/RiskProfileApi.ts +8 -2
- package/src/riskProfile/api/interfaces/IRiskProfileApi.ts +4 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
1
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { AddressCreateRequest, AddressShippingCardResponse } from "@fiado/type-kit/bin/address/index.js";
|
|
3
3
|
import { IAddressApi } from "./interfaces/IAddressApi.js";
|
|
4
4
|
type FiadoApiResponse<T> = import("@fiado/type-kit/bin/apiResponse/dtos/FiadoApiResponse.js").default<T>;
|
|
@@ -14,5 +14,7 @@ export declare class AddressApi implements IAddressApi {
|
|
|
14
14
|
}>>;
|
|
15
15
|
private validateBaseUrl;
|
|
16
16
|
private validateDirectoryId;
|
|
17
|
+
/** Direcciones por lote (GET users?directoryId=...). Lo usa la actividad diaria del backoffice (helpNeeded). */
|
|
18
|
+
getByDirectoryIds(directoryIds: string[]): Promise<any>;
|
|
17
19
|
}
|
|
18
20
|
export {};
|
|
@@ -48,6 +48,13 @@ let AddressApi = class AddressApi {
|
|
|
48
48
|
throw new Error("Directory ID is required.");
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
/** Direcciones por lote (GET users?directoryId=...). Lo usa la actividad diaria del backoffice (helpNeeded). */
|
|
52
|
+
async getByDirectoryIds(directoryIds) {
|
|
53
|
+
if (directoryIds.length === 0)
|
|
54
|
+
return Promise.resolve({ code: "PROCESS_OK", data: [] });
|
|
55
|
+
const query = directoryIds.map((id) => `directoryId=${encodeURIComponent(id)}`).join("&");
|
|
56
|
+
return await this.httpRequest.get(`${this.baseUrl}users?${query}`);
|
|
57
|
+
}
|
|
51
58
|
};
|
|
52
59
|
AddressApi = __decorate([
|
|
53
60
|
injectable(),
|
|
@@ -32,5 +32,7 @@ export interface IAddressApi {
|
|
|
32
32
|
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
33
33
|
deletedCount: number;
|
|
34
34
|
}>>;
|
|
35
|
+
/** Direcciones por lote (envelope con data: dirección[] con directoryId y helpNeeded). */
|
|
36
|
+
getByDirectoryIds(directoryIds: string[]): Promise<any>;
|
|
35
37
|
}
|
|
36
38
|
export {};
|
|
@@ -11,4 +11,6 @@ export declare class AuthenticationApi implements IAuthenticationApi {
|
|
|
11
11
|
agentSignInStatus(input: AgentSignInStatusInput, actorEmail: string): Promise<LegacyApiResponse<unknown>>;
|
|
12
12
|
agentSignUpProspect(input: AgentSignUpProspectInput, actorEmail: string): Promise<LegacyApiResponse<unknown>>;
|
|
13
13
|
agentGetSignUpByPhone(phoneNumber: string): Promise<LegacyApiResponse<unknown>>;
|
|
14
|
+
/** Sesiones de autenticación por lote (op getSessionsByDirectoryIds). Lo usa la actividad diaria del backoffice. */
|
|
15
|
+
getSessionsByDirectoryIds(directoryIds: string[]): Promise<any>;
|
|
14
16
|
}
|
|
@@ -49,6 +49,13 @@ let AuthenticationApi = class AuthenticationApi {
|
|
|
49
49
|
const operation = "agentGetSignUpByPhoneNumber";
|
|
50
50
|
return await this.httpRequest.post(url, { pathParameters: { phoneNumber } }, { 'operationName': operation });
|
|
51
51
|
}
|
|
52
|
+
/** Sesiones de autenticación por lote (op getSessionsByDirectoryIds). Lo usa la actividad diaria del backoffice. */
|
|
53
|
+
async getSessionsByDirectoryIds(directoryIds) {
|
|
54
|
+
if (directoryIds.length === 0)
|
|
55
|
+
return Promise.resolve({ code: "PROCESS_OK", data: [] });
|
|
56
|
+
const url = `${process.env.AUTH_LAMBDA_URL}`;
|
|
57
|
+
return await this.httpRequest.post(url, { directoryIds }, { 'operationName': 'getSessionsByDirectoryIds' });
|
|
58
|
+
}
|
|
52
59
|
};
|
|
53
60
|
AuthenticationApi = __decorate([
|
|
54
61
|
injectable(),
|
|
@@ -27,4 +27,6 @@ export interface IAuthenticationApi {
|
|
|
27
27
|
agentSignInStatus(input: AgentSignInStatusInput, actorEmail: string): Promise<LegacyApiResponse<unknown>>;
|
|
28
28
|
agentSignUpProspect(input: AgentSignUpProspectInput, actorEmail: string): Promise<LegacyApiResponse<unknown>>;
|
|
29
29
|
agentGetSignUpByPhone(phoneNumber: string): Promise<LegacyApiResponse<unknown>>;
|
|
30
|
+
/** Sesiones por lote (envelope con data: sesión[] con directoryId). */
|
|
31
|
+
getSessionsByDirectoryIds(directoryIds: string[]): Promise<any>;
|
|
30
32
|
}
|
|
@@ -7,4 +7,6 @@ export default class OnboardingApi implements IOnboardingApi {
|
|
|
7
7
|
getByReferralDirectoryId(referralDirectoryId: string): Promise<any>;
|
|
8
8
|
delete(id: string): Promise<any>;
|
|
9
9
|
getOnboardingSteps(directoryId: string, countryId: string): Promise<OnboardingStepsEnvelope>;
|
|
10
|
+
/** Onboardings por lote de fiado-onboarding-lambda (GET ids?directoryId=...). Lo usa la actividad diaria del backoffice. */
|
|
11
|
+
getByIds(directoryIds: string[]): Promise<any>;
|
|
10
12
|
}
|
|
@@ -30,6 +30,13 @@ let OnboardingApi = class OnboardingApi {
|
|
|
30
30
|
directoryId, countryId, typeOfDirectoryId: "USER",
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
+
/** Onboardings por lote de fiado-onboarding-lambda (GET ids?directoryId=...). Lo usa la actividad diaria del backoffice. */
|
|
34
|
+
async getByIds(directoryIds) {
|
|
35
|
+
if (directoryIds.length === 0)
|
|
36
|
+
return Promise.resolve({ code: "PROCESS_OK", data: [] });
|
|
37
|
+
const query = directoryIds.map((id) => `directoryId=${encodeURIComponent(id)}`).join("&");
|
|
38
|
+
return await this.httpRequest.get(`${this.baseUrl}ids?${query}`);
|
|
39
|
+
}
|
|
33
40
|
};
|
|
34
41
|
OnboardingApi = __decorate([
|
|
35
42
|
injectable(),
|
|
@@ -10,4 +10,6 @@ export interface IOnboardingApi {
|
|
|
10
10
|
delete(id: string): Promise<any>;
|
|
11
11
|
getByReferralDirectoryId(referralDirectoryId: string): Promise<any>;
|
|
12
12
|
getOnboardingSteps(directoryId: string, countryId: string): Promise<OnboardingStepsEnvelope>;
|
|
13
|
+
/** Onboardings por lote (envelope con data: onboarding[] con id = directoryId y referralCode). */
|
|
14
|
+
getByIds(directoryIds: string[]): Promise<any>;
|
|
13
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IRiskProfileApi } from "./interfaces/IRiskProfileApi.js";
|
|
2
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
2
|
+
import type { IHttpRequest } from "@fiado/http-client";
|
|
3
3
|
import { CreatePrivateAlarm, CreateRiskProfileRequest } from "@fiado/type-kit/bin/riskProfile/index.js";
|
|
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;
|
|
@@ -34,5 +34,7 @@ export default class RiskProfileApi implements IRiskProfileApi {
|
|
|
34
34
|
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
35
35
|
deletedCount: number;
|
|
36
36
|
}>>;
|
|
37
|
+
/** Score y nivel de riesgo por lote (GET profiles/directories/scores). Lo usa la actividad diaria del backoffice. */
|
|
38
|
+
getScoreAndLevelByDirectoryIds(directoryIds: string[]): Promise<any>;
|
|
37
39
|
}
|
|
38
40
|
export {};
|
|
@@ -75,6 +75,13 @@ let RiskProfileApi = class RiskProfileApi {
|
|
|
75
75
|
const url = `${this.baseUrl}/private/directory/${directoryId}`;
|
|
76
76
|
return await this.httpRequest.delete(url);
|
|
77
77
|
}
|
|
78
|
+
/** Score y nivel de riesgo por lote (GET profiles/directories/scores). Lo usa la actividad diaria del backoffice. */
|
|
79
|
+
async getScoreAndLevelByDirectoryIds(directoryIds) {
|
|
80
|
+
if (directoryIds.length === 0)
|
|
81
|
+
return Promise.resolve({ code: "PROCESS_OK", data: [] });
|
|
82
|
+
const query = directoryIds.map((id) => `directoryId=${encodeURIComponent(id)}`).join("&");
|
|
83
|
+
return await this.httpRequest.get(`${this.baseUrl}/profiles/directories/scores?${query}`);
|
|
84
|
+
}
|
|
78
85
|
};
|
|
79
86
|
RiskProfileApi = __decorate([
|
|
80
87
|
injectable(),
|
|
@@ -59,5 +59,7 @@ export interface IRiskProfileApi {
|
|
|
59
59
|
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{
|
|
60
60
|
deletedCount: number;
|
|
61
61
|
}>>;
|
|
62
|
+
/** Score y nivel por lote (envelope con data: { directoryId, score, riskLevel, manualRiskLevel }[]). */
|
|
63
|
+
getScoreAndLevelByDirectoryIds(directoryIds: string[]): Promise<any>;
|
|
62
64
|
}
|
|
63
65
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.106.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,4 +1,4 @@
|
|
|
1
|
-
import { IHttpRequest } from "@fiado/http-client";
|
|
1
|
+
import type { 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";
|
|
@@ -50,4 +50,11 @@ export class AddressApi implements IAddressApi {
|
|
|
50
50
|
throw new Error("Directory ID is required.");
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
|
|
54
|
+
/** Direcciones por lote (GET users?directoryId=...). Lo usa la actividad diaria del backoffice (helpNeeded). */
|
|
55
|
+
async getByDirectoryIds(directoryIds: string[]): Promise<any> {
|
|
56
|
+
if (directoryIds.length === 0) return Promise.resolve({ code: "PROCESS_OK", data: [] } as never);
|
|
57
|
+
const query = directoryIds.map((id) => `directoryId=${encodeURIComponent(id)}`).join("&");
|
|
58
|
+
return await this.httpRequest.get(`${this.baseUrl}users?${query}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -37,4 +37,7 @@ export interface IAddressApi {
|
|
|
37
37
|
// TODO(type-kit): swap a Directory.DeleteByDirectoryResponse cuando se publique
|
|
38
38
|
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>>;
|
|
39
39
|
|
|
40
|
+
/** Direcciones por lote (envelope con data: dirección[] con directoryId y helpNeeded). */
|
|
41
|
+
getByDirectoryIds(directoryIds: string[]): Promise<any>;
|
|
42
|
+
|
|
40
43
|
}
|
|
@@ -53,4 +53,11 @@ export class AuthenticationApi implements IAuthenticationApi {
|
|
|
53
53
|
|
|
54
54
|
return await this.httpRequest.post<LegacyApiResponse<unknown>>(url, { pathParameters: { phoneNumber } }, { 'operationName': operation });
|
|
55
55
|
}
|
|
56
|
+
|
|
57
|
+
/** Sesiones de autenticación por lote (op getSessionsByDirectoryIds). Lo usa la actividad diaria del backoffice. */
|
|
58
|
+
async getSessionsByDirectoryIds(directoryIds: string[]): Promise<any> {
|
|
59
|
+
if (directoryIds.length === 0) return Promise.resolve({ code: "PROCESS_OK", data: [] } as never);
|
|
60
|
+
const url = `${process.env.AUTH_LAMBDA_URL}`;
|
|
61
|
+
return await this.httpRequest.post(url, { directoryIds }, { 'operationName': 'getSessionsByDirectoryIds' });
|
|
62
|
+
}
|
|
56
63
|
}
|
|
@@ -46,4 +46,8 @@ export interface IAuthenticationApi {
|
|
|
46
46
|
|
|
47
47
|
// operationName: agentGetSignUpByPhoneNumber — body { pathParameters: { phoneNumber } }
|
|
48
48
|
agentGetSignUpByPhone(phoneNumber: string): Promise<LegacyApiResponse<unknown>>;
|
|
49
|
+
|
|
50
|
+
/** Sesiones por lote (envelope con data: sesión[] con directoryId). */
|
|
51
|
+
getSessionsByDirectoryIds(directoryIds: string[]): Promise<any>;
|
|
52
|
+
|
|
49
53
|
}
|
|
@@ -26,4 +26,11 @@ export default class OnboardingApi implements IOnboardingApi {
|
|
|
26
26
|
directoryId, countryId, typeOfDirectoryId: "USER",
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
/** Onboardings por lote de fiado-onboarding-lambda (GET ids?directoryId=...). Lo usa la actividad diaria del backoffice. */
|
|
31
|
+
async getByIds(directoryIds: string[]): Promise<any> {
|
|
32
|
+
if (directoryIds.length === 0) return Promise.resolve({ code: "PROCESS_OK", data: [] } as never);
|
|
33
|
+
const query = directoryIds.map((id) => `directoryId=${encodeURIComponent(id)}`).join("&");
|
|
34
|
+
return await this.httpRequest.get(`${this.baseUrl}ids?${query}`);
|
|
35
|
+
}
|
|
29
36
|
}
|
|
@@ -11,4 +11,8 @@ export interface IOnboardingApi {
|
|
|
11
11
|
delete(id: string): Promise<any>
|
|
12
12
|
getByReferralDirectoryId(referralDirectoryId: string): Promise<any>
|
|
13
13
|
getOnboardingSteps(directoryId: string, countryId: string): Promise<OnboardingStepsEnvelope>
|
|
14
|
+
|
|
15
|
+
/** Onboardings por lote (envelope con data: onboarding[] con id = directoryId y referralCode). */
|
|
16
|
+
getByIds(directoryIds: string[]): Promise<any>;
|
|
17
|
+
|
|
14
18
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {IRiskProfileApi} from "./interfaces/IRiskProfileApi.js";
|
|
2
2
|
import {inject, injectable} from "inversify";
|
|
3
|
-
import {IHttpRequest} from "@fiado/http-client";
|
|
3
|
+
import type {IHttpRequest} from "@fiado/http-client";
|
|
4
4
|
import {CreatePrivateAlarm, CreateRiskProfileRequest} from "@fiado/type-kit/bin/riskProfile/index.js";
|
|
5
5
|
type UpdateRiskProfileRequest = import("@fiado/type-kit/bin/riskProfile/dtos/UpdateRiskProfileRequest.js").default;
|
|
6
6
|
type UpdateAlarmProfileRequest = import("@fiado/type-kit/bin/riskProfile/dtos/UpdateAlarmProfileRequest.js").default;
|
|
@@ -92,4 +92,10 @@ export default class RiskProfileApi implements IRiskProfileApi {
|
|
|
92
92
|
return await this.httpRequest.delete<FiadoApiResponse<{ deletedCount: number }>>(url);
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
/** Score y nivel de riesgo por lote (GET profiles/directories/scores). Lo usa la actividad diaria del backoffice. */
|
|
96
|
+
async getScoreAndLevelByDirectoryIds(directoryIds: string[]): Promise<any> {
|
|
97
|
+
if (directoryIds.length === 0) return Promise.resolve({ code: "PROCESS_OK", data: [] } as never);
|
|
98
|
+
const query = directoryIds.map((id) => `directoryId=${encodeURIComponent(id)}`).join("&");
|
|
99
|
+
return await this.httpRequest.get(`${this.baseUrl}/profiles/directories/scores?${query}`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -76,4 +76,8 @@ export interface IRiskProfileApi {
|
|
|
76
76
|
*/
|
|
77
77
|
// TODO(type-kit): swap a Directory.DeleteByDirectoryResponse cuando se publique
|
|
78
78
|
deleteByDirectoryId(directoryId: string): Promise<FiadoApiResponse<{ deletedCount: number }>>;
|
|
79
|
+
|
|
80
|
+
/** Score y nivel por lote (envelope con data: { directoryId, score, riskLevel, manualRiskLevel }[]). */
|
|
81
|
+
getScoreAndLevelByDirectoryIds(directoryIds: string[]): Promise<any>
|
|
82
|
+
|
|
79
83
|
}
|