@fiado/api-invoker 5.13.0 → 5.14.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/biometrics-business/BiometricsBusinessApi.d.ts +10 -1
- package/bin/biometrics-business/BiometricsBusinessApi.js +9 -0
- package/bin/container.config.js +1 -1
- package/bin/platformRbac/api/PlatformRbacBusinessApi.d.ts +2 -1
- package/bin/platformRbac/api/PlatformRbacBusinessApi.js +4 -0
- package/bin/platformRbac/api/interfaces/IPlatformRbacBusinessApi.d.ts +3 -1
- package/package.json +2 -2
- package/src/biometrics-business/BiometricsBusinessApi.ts +11 -1
- package/src/container.config.ts +1 -1
- package/src/platformRbac/api/PlatformRbacBusinessApi.ts +9 -0
- package/src/platformRbac/api/interfaces/IPlatformRbacBusinessApi.ts +7 -0
|
@@ -8,7 +8,7 @@ import type { IHttpRequest } from "@fiado/http-client";
|
|
|
8
8
|
*
|
|
9
9
|
* El `/private` NO va en el path: lo aporta el `baseUrl` que se resuelve del SSM.
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export declare class BiometricsBusinessApi implements IBiometricsBusinessApi {
|
|
12
12
|
private httpRequest;
|
|
13
13
|
/**
|
|
14
14
|
* ⚠️ Se le quita el slash final y los paths lo ponen explícito.
|
|
@@ -25,3 +25,12 @@ export default class BiometricsBusinessApi implements IBiometricsBusinessApi {
|
|
|
25
25
|
getBiometricVerification(biometricVerificationId: string): Promise<ApiGatewayResponse<BiometricVerificationResponse>>;
|
|
26
26
|
applyBiometricEvent(biometricVerificationId: string, data: BiometricVerificationChangedV1): Promise<ApiGatewayResponse<void>>;
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* También como default, por simetría con el resto de los clients del paquete.
|
|
30
|
+
*
|
|
31
|
+
* ⚠️ El export NOMBRADO de arriba no es decorativo: `index.ts` reexporta con `export *`, y
|
|
32
|
+
* `export *` **NO incluye el default**. Con solo el default, un lambda que no cargue
|
|
33
|
+
* `apiInvokerResolverBindings` —como `kyc-metamap-webhook`, que bindea las clases a mano— no puede
|
|
34
|
+
* importar esta clase y falla al arrancar con "does not provide an export named".
|
|
35
|
+
*/
|
|
36
|
+
export default BiometricsBusinessApi;
|
|
@@ -52,4 +52,13 @@ BiometricsBusinessApi = __decorate([
|
|
|
52
52
|
__param(0, inject("IHttpRequest")),
|
|
53
53
|
__metadata("design:paramtypes", [Object])
|
|
54
54
|
], BiometricsBusinessApi);
|
|
55
|
+
export { BiometricsBusinessApi };
|
|
56
|
+
/**
|
|
57
|
+
* También como default, por simetría con el resto de los clients del paquete.
|
|
58
|
+
*
|
|
59
|
+
* ⚠️ El export NOMBRADO de arriba no es decorativo: `index.ts` reexporta con `export *`, y
|
|
60
|
+
* `export *` **NO incluye el default**. Con solo el default, un lambda que no cargue
|
|
61
|
+
* `apiInvokerResolverBindings` —como `kyc-metamap-webhook`, que bindea las clases a mano— no puede
|
|
62
|
+
* importar esta clase y falla al arrancar con "does not provide an export named".
|
|
63
|
+
*/
|
|
55
64
|
export default BiometricsBusinessApi;
|
package/bin/container.config.js
CHANGED
|
@@ -9,7 +9,7 @@ import { Publisher } from "./account-fiadoinc/index.js";
|
|
|
9
9
|
import AccountFiadoIncApi from "./account-fiadoinc/AccountFiadoIncApi.js";
|
|
10
10
|
import AccountPagoConfiadoApi from "./account-pagoconfiado/AccountPagoConfiadoApi.js";
|
|
11
11
|
import MetamapConnectorApi from "./metamap-connector/MetamapConnectorApi.js";
|
|
12
|
-
import BiometricsBusinessApi from "./biometrics-business/BiometricsBusinessApi.js";
|
|
12
|
+
import { BiometricsBusinessApi } from "./biometrics-business/BiometricsBusinessApi.js";
|
|
13
13
|
import AccountFiadoSAApi from "./account-fiadosa/AccountFiadoSAApi.js";
|
|
14
14
|
import STPAccountApi from "./stpAccount/api/STPAccountApi.js";
|
|
15
15
|
import { SessionActivityPublisher } from "./sessionActivity/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { ApiGatewayResponse, ResolvedPermissions, ResolveInput } from "@fiado/gateway-adapter";
|
|
3
|
-
import { DefineNextChallengeRequest, DefineNextChallengeResponse, PrepareChallengeRequest, PrepareChallengeResponse, VerifyChallengeRequest, VerifyChallengeResponse, AuthorizeRequest, AuthorizeResponse, EffectivePermissionsResponse, InjectableUserAttributesResponse, PermissionScope, CreateLevelEntityRequest, CreateLevelEntityResponse, CreateTenantUserRequest, CreateTenantUserResponse } from "@fiado/type-kit/bin/platformRbac/index.js";
|
|
3
|
+
import { DefineNextChallengeRequest, DefineNextChallengeResponse, PrepareChallengeRequest, PrepareChallengeResponse, VerifyChallengeRequest, VerifyChallengeResponse, AuthorizeRequest, AuthorizeResponse, EffectivePermissionsResponse, InjectableUserAttributesResponse, PermissionScope, CreateLevelEntityRequest, CreateLevelEntityResponse, CreateTenantUserRequest, CreateTenantUserResponse, UserProfileResponse } from "@fiado/type-kit/bin/platformRbac/index.js";
|
|
4
4
|
import { IPlatformRbacBusinessApi } from "./interfaces/IPlatformRbacBusinessApi.js";
|
|
5
5
|
/**
|
|
6
6
|
* Publisher HTTP del lambda `platform-rbac-business` (componente 06 SureKeep Fase 0)
|
|
@@ -28,4 +28,5 @@ export default class PlatformRbacBusinessApi implements IPlatformRbacBusinessApi
|
|
|
28
28
|
resolvePermissions(input: ResolveInput): Promise<ApiGatewayResponse<ResolvedPermissions>>;
|
|
29
29
|
createLevelEntity(tenantId: string, level: PermissionScope, input: CreateLevelEntityRequest): Promise<ApiGatewayResponse<CreateLevelEntityResponse>>;
|
|
30
30
|
createTenantUser(tenantId: string, input: CreateTenantUserRequest): Promise<ApiGatewayResponse<CreateTenantUserResponse>>;
|
|
31
|
+
getUserProfile(cognitoSub: string, tenantId: string): Promise<ApiGatewayResponse<UserProfileResponse>>;
|
|
31
32
|
}
|
|
@@ -76,6 +76,10 @@ let PlatformRbacBusinessApi = class PlatformRbacBusinessApi {
|
|
|
76
76
|
const url = `${this.baseUrl}/internal/tenants/${encodeURIComponent(tenantId)}/users`;
|
|
77
77
|
return await this.httpRequest.post(url, input);
|
|
78
78
|
}
|
|
79
|
+
async getUserProfile(cognitoSub, tenantId) {
|
|
80
|
+
const url = `${this.baseUrl}/internal/users/${encodeURIComponent(cognitoSub)}/profile?tenantId=${encodeURIComponent(tenantId)}`;
|
|
81
|
+
return await this.httpRequest.get(url);
|
|
82
|
+
}
|
|
79
83
|
};
|
|
80
84
|
PlatformRbacBusinessApi = __decorate([
|
|
81
85
|
injectable(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiGatewayResponse, ResolvedPermissions, ResolveInput } from "@fiado/gateway-adapter";
|
|
2
|
-
import { DefineNextChallengeRequest, DefineNextChallengeResponse, PrepareChallengeRequest, PrepareChallengeResponse, VerifyChallengeRequest, VerifyChallengeResponse, AuthorizeRequest, AuthorizeResponse, EffectivePermissionsResponse, InjectableUserAttributesResponse, PermissionScope, CreateLevelEntityRequest, CreateLevelEntityResponse, CreateTenantUserRequest, CreateTenantUserResponse } from "@fiado/type-kit/bin/platformRbac/index.js";
|
|
2
|
+
import { DefineNextChallengeRequest, DefineNextChallengeResponse, PrepareChallengeRequest, PrepareChallengeResponse, VerifyChallengeRequest, VerifyChallengeResponse, AuthorizeRequest, AuthorizeResponse, EffectivePermissionsResponse, InjectableUserAttributesResponse, PermissionScope, CreateLevelEntityRequest, CreateLevelEntityResponse, CreateTenantUserRequest, CreateTenantUserResponse, UserProfileResponse } from "@fiado/type-kit/bin/platformRbac/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* Contrato del publisher HTTP del lambda `platform-rbac-business` (componente 06 SureKeep Fase 0)
|
|
5
5
|
* para los 3 endpoints internos del Custom Auth Challenge flow (MFA).
|
|
@@ -75,4 +75,6 @@ export interface IPlatformRbacBusinessApi {
|
|
|
75
75
|
* queda INVITED (mitiga orphan) y retail-org guarda el `cognitoSub` retornado. Idempotente por identidad Cognito.
|
|
76
76
|
*/
|
|
77
77
|
createTenantUser(tenantId: string, input: CreateTenantUserRequest): Promise<ApiGatewayResponse<CreateTenantUserResponse>>;
|
|
78
|
+
/** GET /internal/users/{cognitoSub}/profile?tenantId= — perfil básico del SharedUser (displayName, email, phone, status). */
|
|
79
|
+
getUserProfile(cognitoSub: string, tenantId: string): Promise<ApiGatewayResponse<UserProfileResponse>>;
|
|
78
80
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.14.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",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@fiado/gateway-adapter": "^3.9.0",
|
|
35
35
|
"@fiado/http-client": "^2.0.1",
|
|
36
36
|
"@fiado/logger": "^1.1.3",
|
|
37
|
-
"@fiado/type-kit": "^3.
|
|
37
|
+
"@fiado/type-kit": "^3.258.0",
|
|
38
38
|
"dotenv": "^16.4.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -19,7 +19,7 @@ import type { IHttpRequest } from "@fiado/http-client";
|
|
|
19
19
|
* El `/private` NO va en el path: lo aporta el `baseUrl` que se resuelve del SSM.
|
|
20
20
|
*/
|
|
21
21
|
@injectable()
|
|
22
|
-
export
|
|
22
|
+
export class BiometricsBusinessApi implements IBiometricsBusinessApi {
|
|
23
23
|
/**
|
|
24
24
|
* ⚠️ Se le quita el slash final y los paths lo ponen explícito.
|
|
25
25
|
*
|
|
@@ -57,3 +57,13 @@ export default class BiometricsBusinessApi implements IBiometricsBusinessApi {
|
|
|
57
57
|
return await this.httpRequest.post(url, data);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* También como default, por simetría con el resto de los clients del paquete.
|
|
63
|
+
*
|
|
64
|
+
* ⚠️ El export NOMBRADO de arriba no es decorativo: `index.ts` reexporta con `export *`, y
|
|
65
|
+
* `export *` **NO incluye el default**. Con solo el default, un lambda que no cargue
|
|
66
|
+
* `apiInvokerResolverBindings` —como `kyc-metamap-webhook`, que bindea las clases a mano— no puede
|
|
67
|
+
* importar esta clase y falla al arrancar con "does not provide an export named".
|
|
68
|
+
*/
|
|
69
|
+
export default BiometricsBusinessApi;
|
package/src/container.config.ts
CHANGED
|
@@ -15,7 +15,7 @@ import AccountPagoConfiadoApi from "./account-pagoconfiado/AccountPagoConfiadoAp
|
|
|
15
15
|
import { IMetamapConnectorApi } from "./metamap-connector/index.js";
|
|
16
16
|
import MetamapConnectorApi from "./metamap-connector/MetamapConnectorApi.js";
|
|
17
17
|
import { IBiometricsBusinessApi } from "./biometrics-business/index.js";
|
|
18
|
-
import BiometricsBusinessApi from "./biometrics-business/BiometricsBusinessApi.js";
|
|
18
|
+
import { BiometricsBusinessApi } from "./biometrics-business/BiometricsBusinessApi.js";
|
|
19
19
|
import { IAccountFiadoSAApi } from "./account-fiadosa/index.js";
|
|
20
20
|
import AccountFiadoSAApi from "./account-fiadosa/AccountFiadoSAApi.js";
|
|
21
21
|
import { ISTPAccountApi } from "./stpAccount/index.js";
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
CreateLevelEntityResponse,
|
|
19
19
|
CreateTenantUserRequest,
|
|
20
20
|
CreateTenantUserResponse,
|
|
21
|
+
UserProfileResponse,
|
|
21
22
|
} from "@fiado/type-kit/bin/platformRbac/index.js";
|
|
22
23
|
import { IPlatformRbacBusinessApi } from "./interfaces/IPlatformRbacBusinessApi.js";
|
|
23
24
|
|
|
@@ -117,4 +118,12 @@ export default class PlatformRbacBusinessApi implements IPlatformRbacBusinessApi
|
|
|
117
118
|
const url = `${this.baseUrl}/internal/tenants/${encodeURIComponent(tenantId)}/users`;
|
|
118
119
|
return await this.httpRequest.post(url, input);
|
|
119
120
|
}
|
|
121
|
+
|
|
122
|
+
async getUserProfile(
|
|
123
|
+
cognitoSub: string,
|
|
124
|
+
tenantId: string,
|
|
125
|
+
): Promise<ApiGatewayResponse<UserProfileResponse>> {
|
|
126
|
+
const url = `${this.baseUrl}/internal/users/${encodeURIComponent(cognitoSub)}/profile?tenantId=${encodeURIComponent(tenantId)}`;
|
|
127
|
+
return await this.httpRequest.get(url);
|
|
128
|
+
}
|
|
120
129
|
}
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
CreateLevelEntityResponse,
|
|
16
16
|
CreateTenantUserRequest,
|
|
17
17
|
CreateTenantUserResponse,
|
|
18
|
+
UserProfileResponse,
|
|
18
19
|
} from "@fiado/type-kit/bin/platformRbac/index.js";
|
|
19
20
|
|
|
20
21
|
/**
|
|
@@ -121,4 +122,10 @@ export interface IPlatformRbacBusinessApi {
|
|
|
121
122
|
tenantId: string,
|
|
122
123
|
input: CreateTenantUserRequest,
|
|
123
124
|
): Promise<ApiGatewayResponse<CreateTenantUserResponse>>;
|
|
125
|
+
|
|
126
|
+
/** GET /internal/users/{cognitoSub}/profile?tenantId= — perfil básico del SharedUser (displayName, email, phone, status). */
|
|
127
|
+
getUserProfile(
|
|
128
|
+
cognitoSub: string,
|
|
129
|
+
tenantId: string,
|
|
130
|
+
): Promise<ApiGatewayResponse<UserProfileResponse>>;
|
|
124
131
|
}
|