@keycloak/keycloak-admin-client 26.0.8 → 26.1.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.
@@ -16,4 +16,5 @@ export interface ConfigPropertyRepresentation {
16
16
  options?: string[];
17
17
  secret?: boolean;
18
18
  required?: boolean;
19
+ placeholder?: string;
19
20
  }
@@ -22,6 +22,7 @@ export default interface RealmRepresentation {
22
22
  actionTokenGeneratedByUserLifespan?: number;
23
23
  adminEventsDetailsEnabled?: boolean;
24
24
  adminEventsEnabled?: boolean;
25
+ adminPermissionsEnabled?: boolean;
25
26
  adminTheme?: string;
26
27
  attributes?: Record<string, any>;
27
28
  authenticationFlows?: any[];
@@ -79,6 +80,7 @@ export default interface RealmRepresentation {
79
80
  offlineSessionMaxLifespan?: number;
80
81
  offlineSessionMaxLifespanEnabled?: boolean;
81
82
  organizationsEnabled?: boolean;
83
+ verifiableCredentialsEnabled?: boolean;
82
84
  otpPolicyAlgorithm?: string;
83
85
  otpPolicyDigits?: number;
84
86
  otpPolicyInitialCounter?: number;
@@ -15,7 +15,7 @@ export interface RequestArgs {
15
15
  * Keys to be ignored, meaning that they will not be filtered out of the request payload even if they are a part of `urlParamKeys` or `queryParamKeys`,
16
16
  */
17
17
  ignoredKeys?: string[];
18
- headers?: HeadersInit;
18
+ headers?: [string, string][] | Record<string, string> | Headers;
19
19
  }
20
20
  export declare class Agent {
21
21
  #private;
@@ -6,5 +6,11 @@ export declare class Cache extends Resource<{
6
6
  clearUserCache: (payload?: {
7
7
  realm?: string;
8
8
  } | undefined, options?: Pick<import("./agent.js").RequestArgs, "catchNotFound">) => Promise<void>;
9
+ clearKeysCache: (payload?: {
10
+ realm?: string;
11
+ } | undefined, options?: Pick<import("./agent.js").RequestArgs, "catchNotFound">) => Promise<void>;
12
+ clearRealmCache: (payload?: {
13
+ realm?: string;
14
+ } | undefined, options?: Pick<import("./agent.js").RequestArgs, "catchNotFound">) => Promise<void>;
9
15
  constructor(client: KeycloakAdminClient);
10
16
  }
@@ -4,6 +4,14 @@ export class Cache extends Resource {
4
4
  method: "POST",
5
5
  path: "/clear-user-cache",
6
6
  });
7
+ clearKeysCache = this.makeRequest({
8
+ method: "POST",
9
+ path: "/clear-keys-cache",
10
+ });
11
+ clearRealmCache = this.makeRequest({
12
+ method: "POST",
13
+ path: "/clear-realm-cache",
14
+ });
7
15
  constructor(client) {
8
16
  super(client, {
9
17
  path: "/admin/realms/{realm}",
package/lib/utils/auth.js CHANGED
@@ -49,6 +49,6 @@ export const getToken = async (settings) => {
49
49
  headers,
50
50
  body: payload,
51
51
  });
52
- const data = await response.json();
52
+ const data = (await response.json());
53
53
  return camelize(data);
54
54
  };
@@ -7,5 +7,5 @@ export declare class NetworkError extends Error {
7
7
  responseData: unknown;
8
8
  constructor(message: string, options: NetworkErrorOptions);
9
9
  }
10
- export declare function fetchWithError(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
10
+ export declare function fetchWithError(input: Request | string | URL, init?: RequestInit): Promise<Response>;
11
11
  export declare function parseResponse(response: Response): Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keycloak/keycloak-admin-client",
3
- "version": "26.0.8",
3
+ "version": "26.1.0",
4
4
  "description": "A client to interact with Keycloak's Administration API",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -18,12 +18,11 @@
18
18
  "build": {
19
19
  "command": "tsc --pretty",
20
20
  "files": [
21
- "src/**",
22
- "package.json",
21
+ "src",
23
22
  "tsconfig.json"
24
23
  ],
25
24
  "output": [
26
- "lib/**"
25
+ "lib"
27
26
  ]
28
27
  },
29
28
  "lint": {
@@ -39,14 +38,14 @@
39
38
  "url-template": "^3.1.1"
40
39
  },
41
40
  "devDependencies": {
42
- "@faker-js/faker": "^9.0.3",
43
- "@types/chai": "^5.0.0",
41
+ "@faker-js/faker": "^9.3.0",
42
+ "@types/chai": "^5.0.1",
44
43
  "@types/lodash-es": "^4.17.12",
45
- "@types/mocha": "^10.0.8",
46
- "@types/node": "^22.7.2",
47
- "chai": "^5.1.1",
44
+ "@types/mocha": "^10.0.10",
45
+ "@types/node": "^22.10.6",
46
+ "chai": "^5.1.2",
48
47
  "lodash-es": "^4.17.21",
49
- "mocha": "^10.7.3",
48
+ "mocha": "^11.0.1",
50
49
  "ts-node": "^10.9.2"
51
50
  },
52
51
  "author": {