@fiado/api-invoker 4.26.0 → 4.27.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/platformRbac/api/PlatformRbacBusinessApi.d.ts +2 -1
- package/bin/platformRbac/api/PlatformRbacBusinessApi.js +4 -0
- package/bin/platformRbac/api/interfaces/IPlatformRbacBusinessApi.d.ts +7 -1
- package/package.json +2 -2
- package/src/platformRbac/api/PlatformRbacBusinessApi.ts +9 -0
- package/src/platformRbac/api/interfaces/IPlatformRbacBusinessApi.ts +11 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IHttpRequest } from "@fiado/http-client";
|
|
2
2
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
3
|
-
import { DefineNextChallengeRequest, DefineNextChallengeResponse, PrepareChallengeRequest, PrepareChallengeResponse, VerifyChallengeRequest, VerifyChallengeResponse, AuthorizeRequest, AuthorizeResponse, EffectivePermissionsResponse } from "@fiado/type-kit/bin/platformRbac/index.js";
|
|
3
|
+
import { DefineNextChallengeRequest, DefineNextChallengeResponse, PrepareChallengeRequest, PrepareChallengeResponse, VerifyChallengeRequest, VerifyChallengeResponse, AuthorizeRequest, AuthorizeResponse, EffectivePermissionsResponse, InjectableUserAttributesResponse } 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)
|
|
@@ -25,4 +25,5 @@ export default class PlatformRbacBusinessApi implements IPlatformRbacBusinessApi
|
|
|
25
25
|
verifyChallenge(input: VerifyChallengeRequest): Promise<ApiGatewayResponse<VerifyChallengeResponse>>;
|
|
26
26
|
authorize(input: AuthorizeRequest): Promise<ApiGatewayResponse<AuthorizeResponse>>;
|
|
27
27
|
effectivePermissions(cognitoSub: string, tenantId?: string): Promise<ApiGatewayResponse<EffectivePermissionsResponse>>;
|
|
28
|
+
getInjectableUserAttributes(cognitoSub: string, tenantId: string): Promise<ApiGatewayResponse<InjectableUserAttributesResponse>>;
|
|
28
29
|
}
|
|
@@ -58,6 +58,10 @@ let PlatformRbacBusinessApi = class PlatformRbacBusinessApi {
|
|
|
58
58
|
: base;
|
|
59
59
|
return await this.httpRequest.get(url);
|
|
60
60
|
}
|
|
61
|
+
async getInjectableUserAttributes(cognitoSub, tenantId) {
|
|
62
|
+
const url = `${this.baseUrl}/internal/users/${encodeURIComponent(cognitoSub)}/injectable-attributes?tenantId=${encodeURIComponent(tenantId)}`;
|
|
63
|
+
return await this.httpRequest.get(url);
|
|
64
|
+
}
|
|
61
65
|
};
|
|
62
66
|
PlatformRbacBusinessApi = __decorate([
|
|
63
67
|
injectable(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiGatewayResponse } from "@fiado/gateway-adapter";
|
|
2
|
-
import { DefineNextChallengeRequest, DefineNextChallengeResponse, PrepareChallengeRequest, PrepareChallengeResponse, VerifyChallengeRequest, VerifyChallengeResponse, AuthorizeRequest, AuthorizeResponse, EffectivePermissionsResponse } from "@fiado/type-kit/bin/platformRbac/index.js";
|
|
2
|
+
import { DefineNextChallengeRequest, DefineNextChallengeResponse, PrepareChallengeRequest, PrepareChallengeResponse, VerifyChallengeRequest, VerifyChallengeResponse, AuthorizeRequest, AuthorizeResponse, EffectivePermissionsResponse, InjectableUserAttributesResponse } 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).
|
|
@@ -55,4 +55,10 @@ export interface IPlatformRbacBusinessApi {
|
|
|
55
55
|
* rbac identifique el silo (sin él, el resolve cae a la rama platform → 404).
|
|
56
56
|
*/
|
|
57
57
|
effectivePermissions(cognitoSub: string, tenantId?: string): Promise<ApiGatewayResponse<EffectivePermissionsResponse>>;
|
|
58
|
+
/**
|
|
59
|
+
* GET /internal/users/{cognitoSub}/injectable-attributes?tenantId= — devuelve los campos
|
|
60
|
+
* personalizados del usuario marcados injectToToken (ya filtrados y con valor). Invocado por
|
|
61
|
+
* jwt-inyector-trigger para estampar el claim `customAttributes`. DEC-RBAC-022.
|
|
62
|
+
*/
|
|
63
|
+
getInjectableUserAttributes(cognitoSub: string, tenantId: string): Promise<ApiGatewayResponse<InjectableUserAttributesResponse>>;
|
|
58
64
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiado/api-invoker",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.27.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": "^2.0.2",
|
|
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.89.0",
|
|
38
38
|
"dotenv": "^16.4.7"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
AuthorizeRequest,
|
|
13
13
|
AuthorizeResponse,
|
|
14
14
|
EffectivePermissionsResponse,
|
|
15
|
+
InjectableUserAttributesResponse,
|
|
15
16
|
} from "@fiado/type-kit/bin/platformRbac/index.js";
|
|
16
17
|
import { IPlatformRbacBusinessApi } from "./interfaces/IPlatformRbacBusinessApi.js";
|
|
17
18
|
|
|
@@ -77,4 +78,12 @@ export default class PlatformRbacBusinessApi implements IPlatformRbacBusinessApi
|
|
|
77
78
|
: base;
|
|
78
79
|
return await this.httpRequest.get(url);
|
|
79
80
|
}
|
|
81
|
+
|
|
82
|
+
async getInjectableUserAttributes(
|
|
83
|
+
cognitoSub: string,
|
|
84
|
+
tenantId: string,
|
|
85
|
+
): Promise<ApiGatewayResponse<InjectableUserAttributesResponse>> {
|
|
86
|
+
const url = `${this.baseUrl}/internal/users/${encodeURIComponent(cognitoSub)}/injectable-attributes?tenantId=${encodeURIComponent(tenantId)}`;
|
|
87
|
+
return await this.httpRequest.get(url);
|
|
88
|
+
}
|
|
80
89
|
}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
AuthorizeRequest,
|
|
10
10
|
AuthorizeResponse,
|
|
11
11
|
EffectivePermissionsResponse,
|
|
12
|
+
InjectableUserAttributesResponse,
|
|
12
13
|
} from "@fiado/type-kit/bin/platformRbac/index.js";
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -81,4 +82,14 @@ export interface IPlatformRbacBusinessApi {
|
|
|
81
82
|
cognitoSub: string,
|
|
82
83
|
tenantId?: string,
|
|
83
84
|
): Promise<ApiGatewayResponse<EffectivePermissionsResponse>>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* GET /internal/users/{cognitoSub}/injectable-attributes?tenantId= — devuelve los campos
|
|
88
|
+
* personalizados del usuario marcados injectToToken (ya filtrados y con valor). Invocado por
|
|
89
|
+
* jwt-inyector-trigger para estampar el claim `customAttributes`. DEC-RBAC-022.
|
|
90
|
+
*/
|
|
91
|
+
getInjectableUserAttributes(
|
|
92
|
+
cognitoSub: string,
|
|
93
|
+
tenantId: string,
|
|
94
|
+
): Promise<ApiGatewayResponse<InjectableUserAttributesResponse>>;
|
|
84
95
|
}
|