@keycloak/keycloak-admin-client 26.1.4 → 26.2.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/lib/defs/credentialRepresentation.d.ts +1 -0
- package/lib/defs/evaluationResultRepresentation.d.ts +1 -0
- package/lib/defs/memberRepresentation.d.ts +4 -0
- package/lib/defs/memberRepresentation.js +1 -0
- package/lib/defs/organizationRepresentation.d.ts +5 -0
- package/lib/defs/policyRepresentation.d.ts +1 -0
- package/lib/defs/realmRepresentation.d.ts +1 -0
- package/lib/defs/resourceEvaluation.d.ts +2 -1
- package/lib/defs/resourceServerRepresentation.d.ts +8 -0
- package/lib/resources/agent.js +3 -1
- package/lib/resources/cache.d.ts +3 -0
- package/lib/resources/cache.js +4 -0
- package/lib/resources/clients.d.ts +9 -0
- package/lib/resources/clients.js +6 -1
- package/package.json +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type OrganizationDomainRepresentation from "./organizationDomainRepresentation.js";
|
|
2
|
+
import type IdentityProviderRepresentation from "./identityProviderRepresentation.js";
|
|
3
|
+
import type MemberRepresentation from "./memberRepresentation.js";
|
|
2
4
|
export default interface OrganizationRepresentation {
|
|
3
5
|
id?: string;
|
|
4
6
|
name?: string;
|
|
7
|
+
alias?: string;
|
|
5
8
|
description?: string;
|
|
6
9
|
redirectUrl?: string;
|
|
7
10
|
enabled?: boolean;
|
|
8
11
|
attributes?: Record<string, string[]>;
|
|
9
12
|
domains?: OrganizationDomainRepresentation[];
|
|
13
|
+
members?: MemberRepresentation[];
|
|
14
|
+
identityProviders?: IdentityProviderRepresentation[];
|
|
10
15
|
}
|
|
@@ -22,6 +22,7 @@ export default interface RealmRepresentation {
|
|
|
22
22
|
actionTokenGeneratedByUserLifespan?: number;
|
|
23
23
|
adminEventsDetailsEnabled?: boolean;
|
|
24
24
|
adminEventsEnabled?: boolean;
|
|
25
|
+
adminPermissionsClient?: ClientRepresentation;
|
|
25
26
|
adminPermissionsEnabled?: boolean;
|
|
26
27
|
adminTheme?: string;
|
|
27
28
|
attributes?: Record<string, any>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type ResourceRepresentation from "./resourceRepresentation.js";
|
|
2
2
|
export default interface ResourceEvaluation {
|
|
3
3
|
roleIds?: string[];
|
|
4
|
-
clientId
|
|
4
|
+
clientId?: string;
|
|
5
5
|
userId: string;
|
|
6
6
|
resources?: ResourceRepresentation[];
|
|
7
|
+
resourceType?: string;
|
|
7
8
|
entitlements: boolean;
|
|
8
9
|
context: {
|
|
9
10
|
attributes: {
|
|
@@ -9,16 +9,24 @@ export default interface ResourceServerRepresentation {
|
|
|
9
9
|
clientId?: string;
|
|
10
10
|
name?: string;
|
|
11
11
|
allowRemoteResourceManagement?: boolean;
|
|
12
|
+
authorizationSchema?: AuthorizationSchemaRepresentation;
|
|
12
13
|
policyEnforcementMode?: PolicyEnforcementMode;
|
|
13
14
|
resources?: ResourceRepresentation[];
|
|
14
15
|
policies?: PolicyRepresentation[];
|
|
15
16
|
scopes?: ScopeRepresentation[];
|
|
16
17
|
decisionStrategy?: DecisionStrategy;
|
|
17
18
|
}
|
|
19
|
+
export interface AuthorizationSchemaRepresentation {
|
|
20
|
+
resourceTypes?: ResourceTypesRepresentation[];
|
|
21
|
+
}
|
|
18
22
|
export interface ResourceOwnerRepresentation {
|
|
19
23
|
id?: string;
|
|
20
24
|
name?: string;
|
|
21
25
|
}
|
|
26
|
+
export interface ResourceTypesRepresentation {
|
|
27
|
+
type?: string;
|
|
28
|
+
scopes?: string[];
|
|
29
|
+
}
|
|
22
30
|
export interface AbstractPolicyRepresentation {
|
|
23
31
|
id?: string;
|
|
24
32
|
name?: string;
|
package/lib/resources/agent.js
CHANGED
|
@@ -116,7 +116,9 @@ export class Agent {
|
|
|
116
116
|
? payload[payloadKey]
|
|
117
117
|
: JSON.stringify(payloadKey ? payload[payloadKey] : payload);
|
|
118
118
|
}
|
|
119
|
-
if (
|
|
119
|
+
if (requestOptions.body &&
|
|
120
|
+
!requestHeaders.has("content-type") &&
|
|
121
|
+
!(payload instanceof FormData)) {
|
|
120
122
|
requestHeaders.set("content-type", "application/json");
|
|
121
123
|
}
|
|
122
124
|
if (queryParams) {
|
package/lib/resources/cache.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ export declare class Cache extends Resource<{
|
|
|
9
9
|
clearKeysCache: (payload?: {
|
|
10
10
|
realm?: string;
|
|
11
11
|
} | undefined, options?: Pick<import("./agent.js").RequestArgs, "catchNotFound">) => Promise<void>;
|
|
12
|
+
clearCrlCache: (payload?: {
|
|
13
|
+
realm?: string;
|
|
14
|
+
} | undefined, options?: Pick<import("./agent.js").RequestArgs, "catchNotFound">) => Promise<void>;
|
|
12
15
|
clearRealmCache: (payload?: {
|
|
13
16
|
realm?: string;
|
|
14
17
|
} | undefined, options?: Pick<import("./agent.js").RequestArgs, "catchNotFound">) => Promise<void>;
|
package/lib/resources/cache.js
CHANGED
|
@@ -8,6 +8,10 @@ export class Cache extends Resource {
|
|
|
8
8
|
method: "POST",
|
|
9
9
|
path: "/clear-keys-cache",
|
|
10
10
|
});
|
|
11
|
+
clearCrlCache = this.makeRequest({
|
|
12
|
+
method: "POST",
|
|
13
|
+
path: "/clear-crl-cache",
|
|
14
|
+
});
|
|
11
15
|
clearRealmCache = this.makeRequest({
|
|
12
16
|
method: "POST",
|
|
13
17
|
path: "/clear-realm-cache",
|
|
@@ -284,6 +284,7 @@ export declare class Clients extends Resource<{
|
|
|
284
284
|
id: string;
|
|
285
285
|
scope: string;
|
|
286
286
|
userId: string;
|
|
287
|
+
audience: string;
|
|
287
288
|
} & {
|
|
288
289
|
realm?: string;
|
|
289
290
|
}) | undefined, options?: Pick<import("./agent.js").RequestArgs, "catchNotFound">) => Promise<Record<string, unknown>>;
|
|
@@ -495,6 +496,14 @@ export declare class Clients extends Resource<{
|
|
|
495
496
|
id: string;
|
|
496
497
|
name: string;
|
|
497
498
|
}[]>;
|
|
499
|
+
listPermissionScope: (payload?: ({
|
|
500
|
+
id: string;
|
|
501
|
+
policyId?: string;
|
|
502
|
+
name?: string;
|
|
503
|
+
resource?: string;
|
|
504
|
+
} & PaginatedQuery & {
|
|
505
|
+
realm?: string;
|
|
506
|
+
}) | undefined, options?: Pick<import("./agent.js").RequestArgs, "catchNotFound">) => Promise<PolicyRepresentation[]>;
|
|
498
507
|
createAuthorizationScope: (query: {
|
|
499
508
|
id: string;
|
|
500
509
|
} & {
|
package/lib/resources/clients.js
CHANGED
|
@@ -214,7 +214,7 @@ export class Clients extends Resource {
|
|
|
214
214
|
method: "GET",
|
|
215
215
|
path: "/{id}/evaluate-scopes/generate-example-access-token",
|
|
216
216
|
urlParamKeys: ["id"],
|
|
217
|
-
queryParamKeys: ["scope", "userId"],
|
|
217
|
+
queryParamKeys: ["scope", "userId", "audience"],
|
|
218
218
|
});
|
|
219
219
|
evaluateGenerateUserInfo = this.makeRequest({
|
|
220
220
|
method: "GET",
|
|
@@ -416,6 +416,11 @@ export class Clients extends Resource {
|
|
|
416
416
|
path: "/{id}/authz/resource-server/resource/{resourceName}/scopes",
|
|
417
417
|
urlParamKeys: ["id", "resourceName"],
|
|
418
418
|
});
|
|
419
|
+
listPermissionScope = this.makeRequest({
|
|
420
|
+
method: "GET",
|
|
421
|
+
path: "/{id}/authz/resource-server/permission/scope",
|
|
422
|
+
urlParamKeys: ["id"],
|
|
423
|
+
});
|
|
419
424
|
createAuthorizationScope = this.makeUpdateRequest({
|
|
420
425
|
method: "POST",
|
|
421
426
|
path: "{id}/authz/resource-server/scope",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keycloak/keycloak-admin-client",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.2.0",
|
|
4
4
|
"description": "A client to interact with Keycloak's Administration API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"url-template": "^3.1.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@faker-js/faker": "^9.
|
|
42
|
-
"@types/chai": "^5.
|
|
41
|
+
"@faker-js/faker": "^9.6.0",
|
|
42
|
+
"@types/chai": "^5.2.1",
|
|
43
43
|
"@types/lodash-es": "^4.17.12",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|
|
45
|
-
"@types/node": "^22.
|
|
46
|
-
"chai": "^5.
|
|
45
|
+
"@types/node": "^22.14.0",
|
|
46
|
+
"chai": "^5.2.0",
|
|
47
47
|
"lodash-es": "^4.17.21",
|
|
48
|
-
"mocha": "^11.0
|
|
48
|
+
"mocha": "^11.1.0",
|
|
49
49
|
"ts-node": "^10.9.2"
|
|
50
50
|
},
|
|
51
51
|
"author": {
|