@keycloak/keycloak-admin-client 26.3.4 → 26.4.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/client.d.ts +2 -0
- package/lib/client.js +3 -0
- package/lib/defs/componentTypeRepresentation.d.ts +1 -0
- package/lib/defs/userProfileMetadata.d.ts +2 -0
- package/lib/defs/workflowRepresentation.d.ts +5 -0
- package/lib/defs/workflowRepresentation.js +1 -0
- package/lib/resources/workflows.d.ts +19 -0
- package/lib/resources/workflows.js +25 -0
- package/package.json +5 -5
package/lib/client.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { Groups } from "./resources/groups.js";
|
|
|
10
10
|
import { IdentityProviders } from "./resources/identityProviders.js";
|
|
11
11
|
import { Realms } from "./resources/realms.js";
|
|
12
12
|
import { Organizations } from "./resources/organizations.js";
|
|
13
|
+
import { Workflows } from "./resources/workflows.js";
|
|
13
14
|
import { Roles } from "./resources/roles.js";
|
|
14
15
|
import { ServerInfo } from "./resources/serverInfo.js";
|
|
15
16
|
import { Users } from "./resources/users.js";
|
|
@@ -32,6 +33,7 @@ export declare class KeycloakAdminClient {
|
|
|
32
33
|
groups: Groups;
|
|
33
34
|
roles: Roles;
|
|
34
35
|
organizations: Organizations;
|
|
36
|
+
workflows: Workflows;
|
|
35
37
|
clients: Clients;
|
|
36
38
|
realms: Realms;
|
|
37
39
|
clientScopes: ClientScopes;
|
package/lib/client.js
CHANGED
|
@@ -9,6 +9,7 @@ import { Groups } from "./resources/groups.js";
|
|
|
9
9
|
import { IdentityProviders } from "./resources/identityProviders.js";
|
|
10
10
|
import { Realms } from "./resources/realms.js";
|
|
11
11
|
import { Organizations } from "./resources/organizations.js";
|
|
12
|
+
import { Workflows } from "./resources/workflows.js";
|
|
12
13
|
import { Roles } from "./resources/roles.js";
|
|
13
14
|
import { ServerInfo } from "./resources/serverInfo.js";
|
|
14
15
|
import { Users } from "./resources/users.js";
|
|
@@ -23,6 +24,7 @@ export class KeycloakAdminClient {
|
|
|
23
24
|
groups;
|
|
24
25
|
roles;
|
|
25
26
|
organizations;
|
|
27
|
+
workflows;
|
|
26
28
|
clients;
|
|
27
29
|
realms;
|
|
28
30
|
clientScopes;
|
|
@@ -54,6 +56,7 @@ export class KeycloakAdminClient {
|
|
|
54
56
|
this.groups = new Groups(this);
|
|
55
57
|
this.roles = new Roles(this);
|
|
56
58
|
this.organizations = new Organizations(this);
|
|
59
|
+
this.workflows = new Workflows(this);
|
|
57
60
|
this.clients = new Clients(this);
|
|
58
61
|
this.realms = new Realms(this);
|
|
59
62
|
this.clientScopes = new ClientScopes(this);
|
|
@@ -15,6 +15,7 @@ export interface UserProfileAttribute {
|
|
|
15
15
|
displayName?: string;
|
|
16
16
|
group?: string;
|
|
17
17
|
multivalued?: boolean;
|
|
18
|
+
defaultValue?: string;
|
|
18
19
|
}
|
|
19
20
|
export interface UserProfileAttributeRequired {
|
|
20
21
|
roles?: string[];
|
|
@@ -42,6 +43,7 @@ export interface UserProfileAttributeMetadata {
|
|
|
42
43
|
annotations?: Record<string, unknown>;
|
|
43
44
|
validators?: Record<string, Record<string, unknown>>;
|
|
44
45
|
multivalued?: boolean;
|
|
46
|
+
defaultValue?: string;
|
|
45
47
|
}
|
|
46
48
|
export interface UserProfileAttributeGroupMetadata {
|
|
47
49
|
name?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Resource from "./resource.js";
|
|
2
|
+
import type { KeycloakAdminClient } from "../client.js";
|
|
3
|
+
import WorkflowRepresentation from "../defs/workflowRepresentation.js";
|
|
4
|
+
export declare class Workflows extends Resource<{
|
|
5
|
+
realm?: string;
|
|
6
|
+
}> {
|
|
7
|
+
constructor(client: KeycloakAdminClient);
|
|
8
|
+
find: (payload?: any, options?: Pick<import("./agent.js").RequestArgs, "catchNotFound">) => Promise<any>;
|
|
9
|
+
create: (payload?: (WorkflowRepresentation & {
|
|
10
|
+
realm?: string;
|
|
11
|
+
}) | undefined, options?: Pick<import("./agent.js").RequestArgs, "catchNotFound">) => Promise<{
|
|
12
|
+
id: string;
|
|
13
|
+
}>;
|
|
14
|
+
delById: (payload?: ({
|
|
15
|
+
id: string;
|
|
16
|
+
} & {
|
|
17
|
+
realm?: string;
|
|
18
|
+
}) | undefined, options?: Pick<import("./agent.js").RequestArgs, "catchNotFound">) => Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import Resource from "./resource.js";
|
|
2
|
+
export class Workflows extends Resource {
|
|
3
|
+
constructor(client) {
|
|
4
|
+
super(client, {
|
|
5
|
+
path: "/admin/realms/{realm}/workflows",
|
|
6
|
+
getUrlParams: () => ({
|
|
7
|
+
realm: client.realmName,
|
|
8
|
+
}),
|
|
9
|
+
getBaseUrl: () => client.baseUrl,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
find = this.makeRequest({
|
|
13
|
+
method: "GET",
|
|
14
|
+
path: "/",
|
|
15
|
+
});
|
|
16
|
+
create = this.makeRequest({
|
|
17
|
+
method: "POST",
|
|
18
|
+
returnResourceIdInLocationHeader: { field: "id" },
|
|
19
|
+
});
|
|
20
|
+
delById = this.makeRequest({
|
|
21
|
+
method: "DELETE",
|
|
22
|
+
path: "/{id}",
|
|
23
|
+
urlParamKeys: ["id"],
|
|
24
|
+
});
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keycloak/keycloak-admin-client",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.4.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": "^
|
|
41
|
+
"@faker-js/faker": "^10.0.0",
|
|
42
42
|
"@types/chai": "^5.2.2",
|
|
43
43
|
"@types/lodash-es": "^4.17.12",
|
|
44
44
|
"@types/mocha": "^10.0.10",
|
|
45
|
-
"@types/node": "^24.
|
|
46
|
-
"chai": "^
|
|
45
|
+
"@types/node": "^24.5.2",
|
|
46
|
+
"chai": "^6.0.1",
|
|
47
47
|
"lodash-es": "^4.17.21",
|
|
48
|
-
"mocha": "^11.7.
|
|
48
|
+
"mocha": "^11.7.2",
|
|
49
49
|
"ts-node": "^10.9.2"
|
|
50
50
|
},
|
|
51
51
|
"author": {
|