diff --git a/cypress/support/pages/admin_console/manage/users/UserDetailsPage.ts b/cypress/support/pages/admin_console/manage/users/UserDetailsPage.ts
index 613a2d0590..13ea4b3616 100644
--- a/cypress/support/pages/admin_console/manage/users/UserDetailsPage.ts
+++ b/cypress/support/pages/admin_console/manage/users/UserDetailsPage.ts
@@ -1,4 +1,4 @@
-import { RequiredActionAlias } from "keycloak-admin/lib/defs/requiredActionProviderRepresentation";
+import { RequiredActionAlias } from "@keycloak/keycloak-admin-client/lib/defs/requiredActionProviderRepresentation";
export default class UserDetailsPage {
saveBtn: string;
diff --git a/cypress/support/util/AdminClient.ts b/cypress/support/util/AdminClient.ts
index 8c6a0a8ca5..1a15556f53 100644
--- a/cypress/support/util/AdminClient.ts
+++ b/cypress/support/util/AdminClient.ts
@@ -1,6 +1,6 @@
-import KeycloakAdminClient from "keycloak-admin";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
+import KeycloakAdminClient from "@keycloak/keycloak-admin-client";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
export default class AdminClient {
private client: KeycloakAdminClient;
diff --git a/import.mjs b/import.mjs
index 60ce409aad..b47debb0e0 100755
--- a/import.mjs
+++ b/import.mjs
@@ -1,6 +1,6 @@
#!/usr/bin/env node
import { readFile } from "node:fs/promises";
-import KcAdminClient from "keycloak-admin";
+import KcAdminClient from "@keycloak/keycloak-admin-client";
const consoleClientConfig = JSON.parse(
await readFile(new URL("./security-admin-console-v2.json", import.meta.url))
diff --git a/package-lock.json b/package-lock.json
index 9f2c85f180..9bfdd847ae 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5,9 +5,11 @@
"requires": true,
"packages": {
"": {
+ "name": "keycloak-admin-ui",
"version": "0.0.1",
"license": "Apache",
"dependencies": {
+ "@keycloak/keycloak-admin-client": "^16.0.0-dev.0",
"@patternfly/patternfly": "^4.132.2",
"@patternfly/react-core": "4.152.4",
"@patternfly/react-icons": "4.11.14",
@@ -15,7 +17,6 @@
"dagre": "^0.8.5",
"file-saver": "^2.0.5",
"i18next": "^20.4.0",
- "keycloak-admin": "^1.14.22",
"lodash": "^4.17.20",
"moment": "^2.29.1",
"react": "^17.0.2",
@@ -2537,6 +2538,20 @@
"node": ">=8"
}
},
+ "node_modules/@keycloak/keycloak-admin-client": {
+ "version": "16.0.0-dev.0",
+ "resolved": "https://registry.npmjs.org/@keycloak/keycloak-admin-client/-/keycloak-admin-client-16.0.0-dev.0.tgz",
+ "integrity": "sha512-o1gUKPn6Zeqe//1v2TF5VVvwDeeXktUFf/L70rQ8KJC/PudGPnV6luDu6Pyj/G32Yoc5iigSMWFly5Qlsd0bgw==",
+ "dependencies": {
+ "axios": "^0.21.0",
+ "camelize": "^1.0.0",
+ "keycloak-js": "^15.0.2",
+ "lodash": "^4.17.21",
+ "query-string": "^7.0.1",
+ "url-join": "^4.0.0",
+ "url-template": "^2.0.8"
+ }
+ },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
@@ -4555,6 +4570,7 @@
},
"node_modules/axios": {
"version": "0.21.1",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"dependencies": {
"follow-redirects": "^1.10.0"
@@ -5413,6 +5429,7 @@
},
"node_modules/camelize": {
"version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz",
"integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs="
},
"node_modules/caniuse-lite": {
@@ -8106,6 +8123,7 @@
},
"node_modules/filter-obj": {
"version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz",
"integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs=",
"engines": {
"node": ">=0.10.0"
@@ -8151,8 +8169,9 @@
}
},
"node_modules/follow-redirects": {
- "version": "1.14.1",
- "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==",
+ "version": "1.14.2",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.2.tgz",
+ "integrity": "sha512-yLR6WaE2lbF0x4K2qE2p9PEXKLDjUjnR/xmjS3wHAYxtlsI9MLLBJUZirAHKzUZDGLxje7w/cXR49WOUo4rbsA==",
"funding": [
{
"type": "individual",
@@ -11847,6 +11866,7 @@
},
"node_modules/js-sha256": {
"version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz",
"integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA=="
},
"node_modules/js-tokens": {
@@ -12080,23 +12100,10 @@
"integrity": "sha512-K2MLc+ZC2DVxX4V61bIKPeMUUfj1YYZ3h0myhchDXOW1cKoPZMnjIoNCqv9bF2n5Oob1PFxuR2gVJxkxz4e58w==",
"dev": true
},
- "node_modules/keycloak-admin": {
- "version": "1.14.22",
- "resolved": "https://registry.npmjs.org/keycloak-admin/-/keycloak-admin-1.14.22.tgz",
- "integrity": "sha512-5OHoNKy0w2Z2ek6mZvSpWoJtKW78Tr2fC4VdkOMcj1QmlXqPhZ6Ltl8ar3Wl2JYecS72hMT0Qd4yrILRuDwW2Q==",
- "dependencies": {
- "axios": "^0.21.0",
- "camelize": "^1.0.0",
- "keycloak-js": "^11.0.3",
- "lodash": "^4.17.21",
- "query-string": "^6.13.7",
- "url-join": "^4.0.0",
- "url-template": "^2.0.8"
- }
- },
"node_modules/keycloak-js": {
- "version": "11.0.3",
- "integrity": "sha512-e2OVyCiru25UhJz3aPj5irf//+vJzvAhHdcsCIWAcvF8Te22iUoZqEdNFji8D3zNzDehX4VpuIJwQOYCj6rqTA==",
+ "version": "15.0.2",
+ "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-15.0.2.tgz",
+ "integrity": "sha512-dv2a4NcPSH3AzGWG3ZtB+VrHpuQLdFBYXtQBj/+oBzm6XNwnVAMdL6LIC0OzCLQpn3rKTQJtNSATAGhbKJgewQ==",
"dependencies": {
"base64-js": "1.3.1",
"js-sha256": "0.9.0"
@@ -14152,8 +14159,9 @@
}
},
"node_modules/query-string": {
- "version": "6.14.1",
- "integrity": "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.0.1.tgz",
+ "integrity": "sha512-uIw3iRvHnk9to1blJCG3BTc+Ro56CBowJXKmNNAm3RulvPBzWLRqKSiiDk+IplJhsydwtuNMHi8UGQFcCLVfkA==",
"dependencies": {
"decode-uri-component": "^0.2.0",
"filter-obj": "^1.1.0",
@@ -15995,6 +16003,7 @@
},
"node_modules/split-on-first": {
"version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
"integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==",
"engines": {
"node": ">=6"
@@ -16165,6 +16174,7 @@
},
"node_modules/strict-uri-encode": {
"version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
"integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=",
"engines": {
"node": ">=4"
@@ -17057,10 +17067,12 @@
},
"node_modules/url-join": {
"version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz",
"integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA=="
},
"node_modules/url-template": {
"version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz",
"integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE="
},
"node_modules/url/node_modules/punycode": {
@@ -19321,6 +19333,20 @@
}
}
},
+ "@keycloak/keycloak-admin-client": {
+ "version": "16.0.0-dev.0",
+ "resolved": "https://registry.npmjs.org/@keycloak/keycloak-admin-client/-/keycloak-admin-client-16.0.0-dev.0.tgz",
+ "integrity": "sha512-o1gUKPn6Zeqe//1v2TF5VVvwDeeXktUFf/L70rQ8KJC/PudGPnV6luDu6Pyj/G32Yoc5iigSMWFly5Qlsd0bgw==",
+ "requires": {
+ "axios": "^0.21.0",
+ "camelize": "^1.0.0",
+ "keycloak-js": "^15.0.2",
+ "lodash": "^4.17.21",
+ "query-string": "^7.0.1",
+ "url-join": "^4.0.0",
+ "url-template": "^2.0.8"
+ }
+ },
"@nodelib/fs.scandir": {
"version": "2.1.5",
"integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
@@ -20952,6 +20978,7 @@
},
"axios": {
"version": "0.21.1",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"requires": {
"follow-redirects": "^1.10.0"
@@ -21641,6 +21668,7 @@
},
"camelize": {
"version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz",
"integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs="
},
"caniuse-lite": {
@@ -23681,6 +23709,7 @@
},
"filter-obj": {
"version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz",
"integrity": "sha1-mzERErxsYSehbgFsbF1/GeCAXFs="
},
"find-up": {
@@ -23714,8 +23743,9 @@
}
},
"follow-redirects": {
- "version": "1.14.1",
- "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg=="
+ "version": "1.14.2",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.2.tgz",
+ "integrity": "sha512-yLR6WaE2lbF0x4K2qE2p9PEXKLDjUjnR/xmjS3wHAYxtlsI9MLLBJUZirAHKzUZDGLxje7w/cXR49WOUo4rbsA=="
},
"for-in": {
"version": "1.0.2",
@@ -26438,6 +26468,7 @@
},
"js-sha256": {
"version": "0.9.0",
+ "resolved": "https://registry.npmjs.org/js-sha256/-/js-sha256-0.9.0.tgz",
"integrity": "sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA=="
},
"js-tokens": {
@@ -26618,23 +26649,10 @@
"integrity": "sha512-K2MLc+ZC2DVxX4V61bIKPeMUUfj1YYZ3h0myhchDXOW1cKoPZMnjIoNCqv9bF2n5Oob1PFxuR2gVJxkxz4e58w==",
"dev": true
},
- "keycloak-admin": {
- "version": "1.14.22",
- "resolved": "https://registry.npmjs.org/keycloak-admin/-/keycloak-admin-1.14.22.tgz",
- "integrity": "sha512-5OHoNKy0w2Z2ek6mZvSpWoJtKW78Tr2fC4VdkOMcj1QmlXqPhZ6Ltl8ar3Wl2JYecS72hMT0Qd4yrILRuDwW2Q==",
- "requires": {
- "axios": "^0.21.0",
- "camelize": "^1.0.0",
- "keycloak-js": "^11.0.3",
- "lodash": "^4.17.21",
- "query-string": "^6.13.7",
- "url-join": "^4.0.0",
- "url-template": "^2.0.8"
- }
- },
"keycloak-js": {
- "version": "11.0.3",
- "integrity": "sha512-e2OVyCiru25UhJz3aPj5irf//+vJzvAhHdcsCIWAcvF8Te22iUoZqEdNFji8D3zNzDehX4VpuIJwQOYCj6rqTA==",
+ "version": "15.0.2",
+ "resolved": "https://registry.npmjs.org/keycloak-js/-/keycloak-js-15.0.2.tgz",
+ "integrity": "sha512-dv2a4NcPSH3AzGWG3ZtB+VrHpuQLdFBYXtQBj/+oBzm6XNwnVAMdL6LIC0OzCLQpn3rKTQJtNSATAGhbKJgewQ==",
"requires": {
"base64-js": "1.3.1",
"js-sha256": "0.9.0"
@@ -28142,8 +28160,9 @@
"dev": true
},
"query-string": {
- "version": "6.14.1",
- "integrity": "sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.0.1.tgz",
+ "integrity": "sha512-uIw3iRvHnk9to1blJCG3BTc+Ro56CBowJXKmNNAm3RulvPBzWLRqKSiiDk+IplJhsydwtuNMHi8UGQFcCLVfkA==",
"requires": {
"decode-uri-component": "^0.2.0",
"filter-obj": "^1.1.0",
@@ -29583,6 +29602,7 @@
},
"split-on-first": {
"version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
"integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw=="
},
"split-string": {
@@ -29714,6 +29734,7 @@
},
"strict-uri-encode": {
"version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
"integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY="
},
"string_decoder": {
@@ -30397,10 +30418,12 @@
},
"url-join": {
"version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz",
"integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA=="
},
"url-template": {
"version": "2.0.8",
+ "resolved": "https://registry.npmjs.org/url-template/-/url-template-2.0.8.tgz",
"integrity": "sha1-/FZaPMy/93MMd19WQflVV5FDnyE="
},
"use": {
diff --git a/package.json b/package.json
index 39ec1fb3b8..1b0257b0a2 100644
--- a/package.json
+++ b/package.json
@@ -24,6 +24,7 @@
"prepare": "husky install"
},
"dependencies": {
+ "@keycloak/keycloak-admin-client": "^16.0.0-dev.0",
"@patternfly/patternfly": "^4.132.2",
"@patternfly/react-core": "4.152.4",
"@patternfly/react-icons": "4.11.14",
@@ -31,7 +32,6 @@
"dagre": "^0.8.5",
"file-saver": "^2.0.5",
"i18next": "^20.4.0",
- "keycloak-admin": "^1.14.22",
"lodash": "^4.17.20",
"moment": "^2.29.1",
"react": "^17.0.2",
diff --git a/src/App.tsx b/src/App.tsx
index fb019da6d7..20d870e59d 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -19,7 +19,7 @@ import { RealmContextProvider } from "./context/realm-context/RealmContext";
import { ErrorRenderer } from "./components/error/ErrorRenderer";
import { AdminClient } from "./context/auth/AdminClient";
import { WhoAmIContextProvider } from "./context/whoami/WhoAmI";
-import type KeycloakAdminClient from "keycloak-admin";
+import type KeycloakAdminClient from "@keycloak/keycloak-admin-client";
export const mainPageContentId = "kc-main-content-page-container";
diff --git a/src/PageHeader.tsx b/src/PageHeader.tsx
index 001e1235ce..a235d816d9 100644
--- a/src/PageHeader.tsx
+++ b/src/PageHeader.tsx
@@ -34,7 +34,7 @@ export const Header = () => {
adminClient.keycloak.accountManagement()}
+ onClick={() => adminClient.keycloak?.accountManagement()}
>
{t("manageAccount")}
@@ -50,7 +50,7 @@ export const Header = () => {
adminClient.keycloak.logout({ redirectUri: "" })}
+ onClick={() => adminClient.keycloak?.logout({ redirectUri: "" })}
>
{t("signOut")}
diff --git a/src/authentication/AuthenticationSection.tsx b/src/authentication/AuthenticationSection.tsx
index 463096cb5f..1c4ac422ef 100644
--- a/src/authentication/AuthenticationSection.tsx
+++ b/src/authentication/AuthenticationSection.tsx
@@ -14,7 +14,7 @@ import {
} from "@patternfly/react-core";
import { CheckCircleIcon } from "@patternfly/react-icons";
-import type AuthenticationFlowRepresentation from "keycloak-admin/lib/defs/authenticationFlowRepresentation";
+import type AuthenticationFlowRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation";
import { useAdminClient } from "../context/auth/AdminClient";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { KeycloakTabs } from "../components/keycloak-tabs/KeycloakTabs";
diff --git a/src/authentication/FlowDetails.tsx b/src/authentication/FlowDetails.tsx
index becd040e87..76ba4c238b 100644
--- a/src/authentication/FlowDetails.tsx
+++ b/src/authentication/FlowDetails.tsx
@@ -13,8 +13,8 @@ import {
} from "@patternfly/react-core";
import { CheckCircleIcon, TableIcon } from "@patternfly/react-icons";
-import type AuthenticationExecutionInfoRepresentation from "keycloak-admin/lib/defs/authenticationExecutionInfoRepresentation";
-import type AuthenticationFlowRepresentation from "keycloak-admin/lib/defs/authenticationFlowRepresentation";
+import type AuthenticationExecutionInfoRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationExecutionInfoRepresentation";
+import type AuthenticationFlowRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation";
import type { FlowParams } from "./routes/Flow";
import { ViewHeader } from "../components/view-header/ViewHeader";
import { useAdminClient, useFetch } from "../context/auth/AdminClient";
diff --git a/src/authentication/components/ExecutionConfigModal.tsx b/src/authentication/components/ExecutionConfigModal.tsx
index a326425485..1b4f61e8a0 100644
--- a/src/authentication/components/ExecutionConfigModal.tsx
+++ b/src/authentication/components/ExecutionConfigModal.tsx
@@ -15,9 +15,9 @@ import {
} from "@patternfly/react-core";
import { CogIcon, TrashIcon } from "@patternfly/react-icons";
-import type AuthenticatorConfigRepresentation from "keycloak-admin/lib/defs/authenticatorConfigRepresentation";
-import type AuthenticatorConfigInfoRepresentation from "keycloak-admin/lib/defs/authenticatorConfigInfoRepresentation";
-import type { ConfigPropertyRepresentation } from "keycloak-admin/lib/defs/authenticatorConfigInfoRepresentation";
+import type AuthenticatorConfigRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation";
+import type AuthenticatorConfigInfoRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigInfoRepresentation";
+import type { ConfigPropertyRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigInfoRepresentation";
import type { ExpandableExecution } from "../execution-model";
import { useAdminClient, useFetch } from "../../context/auth/AdminClient";
import { useAlerts } from "../../components/alert/Alerts";
diff --git a/src/authentication/components/FlowDiagram.tsx b/src/authentication/components/FlowDiagram.tsx
index 4efc2efcfc..706e42d235 100644
--- a/src/authentication/components/FlowDiagram.tsx
+++ b/src/authentication/components/FlowDiagram.tsx
@@ -20,7 +20,7 @@ import ReactFlow, {
isNode,
} from "react-flow-renderer";
-import type AuthenticationExecutionInfoRepresentation from "keycloak-admin/lib/defs/authenticationExecutionInfoRepresentation";
+import type AuthenticationExecutionInfoRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationExecutionInfoRepresentation";
import type { ExecutionList, ExpandableExecution } from "../execution-model";
import { EndSubFlowNode, StartSubFlowNode } from "./diagram/SubFlowNode";
import { ConditionalNode } from "./diagram/ConditionalNode";
diff --git a/src/authentication/components/FlowRequirementDropdown.tsx b/src/authentication/components/FlowRequirementDropdown.tsx
index 27e615c5c7..7d739a63f1 100644
--- a/src/authentication/components/FlowRequirementDropdown.tsx
+++ b/src/authentication/components/FlowRequirementDropdown.tsx
@@ -2,7 +2,7 @@ import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { Select, SelectOption, SelectVariant } from "@patternfly/react-core";
-import type AuthenticationExecutionInfoRepresentation from "keycloak-admin/lib/defs/authenticationExecutionInfoRepresentation";
+import type AuthenticationExecutionInfoRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationExecutionInfoRepresentation";
type FlowRequirementDropdownProps = {
flow: AuthenticationExecutionInfoRepresentation;
diff --git a/src/authentication/components/FlowRow.tsx b/src/authentication/components/FlowRow.tsx
index f288d09c5b..29998f4e0c 100644
--- a/src/authentication/components/FlowRow.tsx
+++ b/src/authentication/components/FlowRow.tsx
@@ -12,7 +12,7 @@ import {
TextVariants,
} from "@patternfly/react-core";
-import type AuthenticationExecutionInfoRepresentation from "keycloak-admin/lib/defs/authenticationExecutionInfoRepresentation";
+import type AuthenticationExecutionInfoRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationExecutionInfoRepresentation";
import type { ExpandableExecution } from "../execution-model";
import { FlowTitle } from "./FlowTitle";
import { FlowRequirementDropdown } from "./FlowRequirementDropdown";
diff --git a/src/authentication/execution-model.ts b/src/authentication/execution-model.ts
index 8e1a8bf231..17a2969e30 100644
--- a/src/authentication/execution-model.ts
+++ b/src/authentication/execution-model.ts
@@ -1,4 +1,4 @@
-import type AuthenticationExecutionInfoRepresentation from "keycloak-admin/lib/defs/authenticationExecutionInfoRepresentation";
+import type AuthenticationExecutionInfoRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationExecutionInfoRepresentation";
export type ExpandableExecution = AuthenticationExecutionInfoRepresentation & {
executionList: ExpandableExecution[];
diff --git a/src/authentication/form/CreateFlow.tsx b/src/authentication/form/CreateFlow.tsx
index 11cb78bf72..1d10c94d46 100644
--- a/src/authentication/form/CreateFlow.tsx
+++ b/src/authentication/form/CreateFlow.tsx
@@ -9,7 +9,7 @@ import {
PageSection,
} from "@patternfly/react-core";
-import type AuthenticationFlowRepresentation from "keycloak-admin/lib/defs/authenticationFlowRepresentation";
+import type AuthenticationFlowRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation";
import { ViewHeader } from "../../components/view-header/ViewHeader";
import { FormAccess } from "../../components/form-access/FormAccess";
import { useRealm } from "../../context/realm-context/RealmContext";
diff --git a/src/client-scopes/add/MapperDialog.test.tsx b/src/client-scopes/add/MapperDialog.test.tsx
index 31ea66d1d2..3ebc79eceb 100644
--- a/src/client-scopes/add/MapperDialog.test.tsx
+++ b/src/client-scopes/add/MapperDialog.test.tsx
@@ -1,6 +1,6 @@
import { Button } from "@patternfly/react-core";
import { fireEvent, render, screen } from "@testing-library/react";
-import type { ServerInfoRepresentation } from "keycloak-admin/lib/defs/serverInfoRepesentation";
+import type { ServerInfoRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import React, { useState } from "react";
import { ServerInfoContext } from "../../context/server-info/ServerInfoProvider";
import serverInfo from "../../context/server-info/__tests__/mock.json";
diff --git a/src/client-scopes/add/MapperDialog.tsx b/src/client-scopes/add/MapperDialog.tsx
index f3fdb8264e..f0e8b4dbd6 100644
--- a/src/client-scopes/add/MapperDialog.tsx
+++ b/src/client-scopes/add/MapperDialog.tsx
@@ -19,8 +19,8 @@ import {
TableVariant,
} from "@patternfly/react-table";
import { useTranslation } from "react-i18next";
-import type ProtocolMapperRepresentation from "keycloak-admin/lib/defs/protocolMapperRepresentation";
-import type { ProtocolMapperTypeRepresentation } from "keycloak-admin/lib/defs/serverInfoRepesentation";
+import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation";
+import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
diff --git a/src/client-scopes/add/RoleMappingForm.tsx b/src/client-scopes/add/RoleMappingForm.tsx
index 33d2ed3e9e..bd724411d5 100644
--- a/src/client-scopes/add/RoleMappingForm.tsx
+++ b/src/client-scopes/add/RoleMappingForm.tsx
@@ -13,9 +13,9 @@ import {
TextInput,
ValidatedOptions,
} from "@patternfly/react-core";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
-import type ProtocolMapperRepresentation from "keycloak-admin/lib/defs/protocolMapperRepresentation";
-import type RoleRepresentation from "keycloak-admin/lib/defs/roleRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
+import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation";
+import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import React, { useState } from "react";
import { Controller, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
diff --git a/src/client-scopes/details/MapperList.tsx b/src/client-scopes/details/MapperList.tsx
index 0c4379c0af..e7141ee709 100644
--- a/src/client-scopes/details/MapperList.tsx
+++ b/src/client-scopes/details/MapperList.tsx
@@ -9,9 +9,9 @@ import {
} from "@patternfly/react-core";
import { CaretDownIcon } from "@patternfly/react-icons";
-import type ClientScopeRepresentation from "keycloak-admin/lib/defs/clientScopeRepresentation";
-import type ProtocolMapperRepresentation from "keycloak-admin/lib/defs/protocolMapperRepresentation";
-import type { ProtocolMapperTypeRepresentation } from "keycloak-admin/lib/defs/serverInfoRepesentation";
+import type ClientScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation";
+import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation";
+import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import { useServerInfo } from "../../context/server-info/ServerInfoProvider";
import { ListEmptyState } from "../../components/list-empty-state/ListEmptyState";
diff --git a/src/client-scopes/details/MappingDetails.tsx b/src/client-scopes/details/MappingDetails.tsx
index cc1f867a2b..eeebda7958 100644
--- a/src/client-scopes/details/MappingDetails.tsx
+++ b/src/client-scopes/details/MappingDetails.tsx
@@ -19,8 +19,8 @@ import {
TextInput,
ValidatedOptions,
} from "@patternfly/react-core";
-import type { ConfigPropertyRepresentation } from "keycloak-admin/lib/defs/configPropertyRepresentation";
-import type ProtocolMapperRepresentation from "keycloak-admin/lib/defs/protocolMapperRepresentation";
+import type { ConfigPropertyRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/configPropertyRepresentation";
+import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation";
import { ViewHeader } from "../../components/view-header/ViewHeader";
import { useAdminClient, useFetch } from "../../context/auth/AdminClient";
diff --git a/src/client-scopes/details/ScopeForm.tsx b/src/client-scopes/details/ScopeForm.tsx
index 68d9092213..203f778680 100644
--- a/src/client-scopes/details/ScopeForm.tsx
+++ b/src/client-scopes/details/ScopeForm.tsx
@@ -17,7 +17,7 @@ import {
NumberInput,
} from "@patternfly/react-core";
-import type ClientScopeRepresentation from "keycloak-admin/lib/defs/clientScopeRepresentation";
+import type ClientScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation";
import {
clientScopeTypesSelectOptions,
allClientScopeTypes,
diff --git a/src/client-scopes/form/ClientScopeForm.tsx b/src/client-scopes/form/ClientScopeForm.tsx
index e6baceab49..f299f52017 100644
--- a/src/client-scopes/form/ClientScopeForm.tsx
+++ b/src/client-scopes/form/ClientScopeForm.tsx
@@ -24,7 +24,7 @@ import {
RoleMapping,
Row,
} from "../../components/role-mapping/RoleMapping";
-import type { RoleMappingPayload } from "keycloak-admin/lib/defs/roleRepresentation";
+import type { RoleMappingPayload } from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import {
AllClientScopes,
changeScope,
diff --git a/src/clients/AdvancedTab.tsx b/src/clients/AdvancedTab.tsx
index 4b9071cae3..631f5b0417 100644
--- a/src/clients/AdvancedTab.tsx
+++ b/src/clients/AdvancedTab.tsx
@@ -12,8 +12,8 @@ import {
TextInput,
ToolbarItem,
} from "@patternfly/react-core";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
-import type GlobalRequestResult from "keycloak-admin/lib/defs/globalRequestResult";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
+import type GlobalRequestResult from "@keycloak/keycloak-admin-client/lib/defs/globalRequestResult";
import moment from "moment";
import React, { useEffect, useState } from "react";
import { Controller, useFormContext } from "react-hook-form";
diff --git a/src/clients/ClientDetails.tsx b/src/clients/ClientDetails.tsx
index 612ca20e29..274905ee18 100644
--- a/src/clients/ClientDetails.tsx
+++ b/src/clients/ClientDetails.tsx
@@ -10,7 +10,7 @@ import {
Tabs,
TabTitleText,
} from "@patternfly/react-core";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import _ from "lodash";
import React, { useState } from "react";
import { Controller, FormProvider, useForm, useWatch } from "react-hook-form";
diff --git a/src/clients/ClientsSection.tsx b/src/clients/ClientsSection.tsx
index e390fc6c94..ee0cedd159 100644
--- a/src/clients/ClientsSection.tsx
+++ b/src/clients/ClientsSection.tsx
@@ -9,7 +9,7 @@ import {
ToolbarItem,
} from "@patternfly/react-core";
import { cellWidth, TableText } from "@patternfly/react-table";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
diff --git a/src/clients/add/NewClientForm.tsx b/src/clients/add/NewClientForm.tsx
index 09f454f33d..39dd3ad5bf 100644
--- a/src/clients/add/NewClientForm.tsx
+++ b/src/clients/add/NewClientForm.tsx
@@ -6,7 +6,7 @@ import {
WizardContextConsumer,
WizardFooter,
} from "@patternfly/react-core";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import React, { useState } from "react";
import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
diff --git a/src/clients/credentials/Credentials.tsx b/src/clients/credentials/Credentials.tsx
index 1de22c4da5..f0c48f7076 100644
--- a/src/clients/credentials/Credentials.tsx
+++ b/src/clients/credentials/Credentials.tsx
@@ -17,7 +17,7 @@ import {
Split,
SplitItem,
} from "@patternfly/react-core";
-import type CredentialRepresentation from "keycloak-admin/lib/defs/credentialRepresentation";
+import type CredentialRepresentation from "@keycloak/keycloak-admin-client/lib/defs/credentialRepresentation";
import { useAlerts } from "../../components/alert/Alerts";
import { useConfirmDialog } from "../../components/confirm-dialog/ConfirmDialog";
diff --git a/src/clients/import/ImportForm.tsx b/src/clients/import/ImportForm.tsx
index 68768c1373..c76aa1df3f 100644
--- a/src/clients/import/ImportForm.tsx
+++ b/src/clients/import/ImportForm.tsx
@@ -6,7 +6,7 @@ import {
PageSection,
TextInput,
} from "@patternfly/react-core";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import React, { useState } from "react";
import { FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
diff --git a/src/clients/initial-access/CreateInitialAccessToken.tsx b/src/clients/initial-access/CreateInitialAccessToken.tsx
index cff20d5ace..7b2f836f21 100644
--- a/src/clients/initial-access/CreateInitialAccessToken.tsx
+++ b/src/clients/initial-access/CreateInitialAccessToken.tsx
@@ -10,7 +10,7 @@ import {
PageSection,
} from "@patternfly/react-core";
-import type ClientInitialAccessPresentation from "keycloak-admin/lib/defs/clientInitialAccessPresentation";
+import type ClientInitialAccessPresentation from "@keycloak/keycloak-admin-client/lib/defs/clientInitialAccessPresentation";
import { FormAccess } from "../../components/form-access/FormAccess";
import { ViewHeader } from "../../components/view-header/ViewHeader";
import { HelpItem } from "../../components/help-enabler/HelpItem";
diff --git a/src/clients/initial-access/InitialAccessTokenList.tsx b/src/clients/initial-access/InitialAccessTokenList.tsx
index 34ce31ae1e..2ac72d4d71 100644
--- a/src/clients/initial-access/InitialAccessTokenList.tsx
+++ b/src/clients/initial-access/InitialAccessTokenList.tsx
@@ -1,6 +1,6 @@
import { AlertVariant, Button, ButtonVariant } from "@patternfly/react-core";
import { wrappable } from "@patternfly/react-table";
-import type ClientInitialAccessPresentation from "keycloak-admin/lib/defs/clientInitialAccessPresentation";
+import type ClientInitialAccessPresentation from "@keycloak/keycloak-admin-client/lib/defs/clientInitialAccessPresentation";
import moment from "moment";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
diff --git a/src/clients/keys/GenerateKeyDialog.tsx b/src/clients/keys/GenerateKeyDialog.tsx
index dce7cd0685..dcdc01fd7c 100644
--- a/src/clients/keys/GenerateKeyDialog.tsx
+++ b/src/clients/keys/GenerateKeyDialog.tsx
@@ -15,7 +15,7 @@ import {
TextContent,
} from "@patternfly/react-core";
-import type KeyStoreConfig from "keycloak-admin/lib/defs/keystoreConfig";
+import type KeyStoreConfig from "@keycloak/keycloak-admin-client/lib/defs/keystoreConfig";
import { HelpItem } from "../../components/help-enabler/HelpItem";
import { StoreSettings } from "./StoreSettings";
diff --git a/src/clients/keys/Keys.tsx b/src/clients/keys/Keys.tsx
index 9573849876..e1bdfc4c88 100644
--- a/src/clients/keys/Keys.tsx
+++ b/src/clients/keys/Keys.tsx
@@ -18,8 +18,8 @@ import {
TextInput,
} from "@patternfly/react-core";
-import type CertificateRepresentation from "keycloak-admin/lib/defs/certificateRepresentation";
-import type KeyStoreConfig from "keycloak-admin/lib/defs/keystoreConfig";
+import type CertificateRepresentation from "@keycloak/keycloak-admin-client/lib/defs/certificateRepresentation";
+import type KeyStoreConfig from "@keycloak/keycloak-admin-client/lib/defs/keystoreConfig";
import { HelpItem } from "../../components/help-enabler/HelpItem";
import { FormAccess } from "../../components/form-access/FormAccess";
import { Controller, useFormContext, useWatch } from "react-hook-form";
diff --git a/src/clients/scopes/AddScopeDialog.tsx b/src/clients/scopes/AddScopeDialog.tsx
index 3a75598802..8c8025806c 100644
--- a/src/clients/scopes/AddScopeDialog.tsx
+++ b/src/clients/scopes/AddScopeDialog.tsx
@@ -10,7 +10,7 @@ import {
DropdownDirection,
} from "@patternfly/react-core";
import { CaretUpIcon } from "@patternfly/react-icons";
-import type ClientScopeRepresentation from "keycloak-admin/lib/defs/clientScopeRepresentation";
+import type ClientScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation";
import {
ClientScopeType,
diff --git a/src/clients/scopes/ClientScopes.tsx b/src/clients/scopes/ClientScopes.tsx
index 153f0f7d83..c39eba25bf 100644
--- a/src/clients/scopes/ClientScopes.tsx
+++ b/src/clients/scopes/ClientScopes.tsx
@@ -11,8 +11,8 @@ import {
ToolbarItem,
} from "@patternfly/react-core";
import { FilterIcon } from "@patternfly/react-icons";
-import type ClientScopeRepresentation from "keycloak-admin/lib/defs/clientScopeRepresentation";
-import type KeycloakAdminClient from "keycloak-admin";
+import type ClientScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation";
+import type KeycloakAdminClient from "@keycloak/keycloak-admin-client";
import { useAdminClient } from "../../context/auth/AdminClient";
import { toUpperCase } from "../../util";
diff --git a/src/clients/scopes/EvaluateScopes.tsx b/src/clients/scopes/EvaluateScopes.tsx
index 02ffe207b2..0054e44cf3 100644
--- a/src/clients/scopes/EvaluateScopes.tsx
+++ b/src/clients/scopes/EvaluateScopes.tsx
@@ -22,11 +22,11 @@ import {
Title,
} from "@patternfly/react-core";
import { QuestionCircleIcon } from "@patternfly/react-icons";
-import type ClientScopeRepresentation from "keycloak-admin/lib/defs/clientScopeRepresentation";
-import type ProtocolMapperRepresentation from "keycloak-admin/lib/defs/protocolMapperRepresentation";
-import type RoleRepresentation from "keycloak-admin/lib/defs/roleRepresentation";
-import type { ProtocolMapperTypeRepresentation } from "keycloak-admin/lib/defs/serverInfoRepesentation";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
+import type ClientScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation";
+import type ProtocolMapperRepresentation from "@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation";
+import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
+import type { ProtocolMapperTypeRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import React, { useEffect, useRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { useHelp } from "../../components/help-enabler/HelpHeader";
diff --git a/src/clients/service-account/ServiceAccount.tsx b/src/clients/service-account/ServiceAccount.tsx
index 8751671c86..46073a02d4 100644
--- a/src/clients/service-account/ServiceAccount.tsx
+++ b/src/clients/service-account/ServiceAccount.tsx
@@ -2,9 +2,9 @@ import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { AlertVariant } from "@patternfly/react-core";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
-import type { RoleMappingPayload } from "keycloak-admin/lib/defs/roleRepresentation";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
+import type { RoleMappingPayload } from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import { useAdminClient, useFetch } from "../../context/auth/AdminClient";
import { useAlerts } from "../../components/alert/Alerts";
import {
diff --git a/src/components/client-scope/ClientScopeTypes.tsx b/src/components/client-scope/ClientScopeTypes.tsx
index 43375eacc0..c4d62bf47d 100644
--- a/src/components/client-scope/ClientScopeTypes.tsx
+++ b/src/components/client-scope/ClientScopeTypes.tsx
@@ -4,8 +4,8 @@ import type { TFunction } from "i18next";
import { useTranslation } from "react-i18next";
import { DropdownItem, Select, SelectOption } from "@patternfly/react-core";
-import type ClientScopeRepresentation from "keycloak-admin/lib/defs/clientScopeRepresentation";
-import type KeycloakAdminClient from "keycloak-admin";
+import type ClientScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation";
+import type KeycloakAdminClient from "@keycloak/keycloak-admin-client";
export enum ClientScope {
default = "default",
diff --git a/src/components/data-loader/DataLoader.test.tsx b/src/components/data-loader/DataLoader.test.tsx
index b0e7cd83a8..fe36c1ae39 100644
--- a/src/components/data-loader/DataLoader.test.tsx
+++ b/src/components/data-loader/DataLoader.test.tsx
@@ -1,6 +1,6 @@
import { render, waitFor } from "@testing-library/react";
-import type KeycloakAdminClient from "keycloak-admin";
-import type { ServerInfoRepresentation } from "keycloak-admin/lib/defs/serverInfoRepesentation";
+import type KeycloakAdminClient from "@keycloak/keycloak-admin-client";
+import type { ServerInfoRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import React, { FunctionComponent } from "react";
import { HashRouter } from "react-router-dom";
import { AccessContextProvider } from "../../context/access/Access";
diff --git a/src/components/form-access/FormAccess.test.tsx b/src/components/form-access/FormAccess.test.tsx
index 4ccc4be701..74d0376c75 100644
--- a/src/components/form-access/FormAccess.test.tsx
+++ b/src/components/form-access/FormAccess.test.tsx
@@ -1,6 +1,6 @@
import { FormGroup, Switch, TextInput } from "@patternfly/react-core";
import { render, screen } from "@testing-library/react";
-import type WhoAmIRepresentation from "keycloak-admin/lib/defs/whoAmIRepresentation";
+import type WhoAmIRepresentation from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation";
import React from "react";
import { Controller, useForm } from "react-hook-form";
import { AccessContextProvider } from "../../context/access/Access";
diff --git a/src/components/form-access/FormAccess.tsx b/src/components/form-access/FormAccess.tsx
index fed61917ae..bca014f8cf 100644
--- a/src/components/form-access/FormAccess.tsx
+++ b/src/components/form-access/FormAccess.tsx
@@ -19,7 +19,7 @@ import {
StackItem,
TextArea,
} from "@patternfly/react-core";
-import type { AccessType } from "keycloak-admin/lib/defs/whoAmIRepresentation";
+import type { AccessType } from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation";
import { useAccess } from "../../context/access/Access";
diff --git a/src/components/group/GroupPath.tsx b/src/components/group/GroupPath.tsx
index 44e950ae2e..6dd7e96e92 100644
--- a/src/components/group/GroupPath.tsx
+++ b/src/components/group/GroupPath.tsx
@@ -2,7 +2,7 @@ import React from "react";
import { Tooltip } from "@patternfly/react-core";
import type { TableTextProps } from "@patternfly/react-table";
-import type GroupRepresentation from "keycloak-admin/lib/defs/groupRepresentation";
+import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
type GroupPathProps = TableTextProps & {
group: GroupRepresentation;
diff --git a/src/components/group/GroupPickerDialog.tsx b/src/components/group/GroupPickerDialog.tsx
index 4f3b92dc50..de15a82e1f 100644
--- a/src/components/group/GroupPickerDialog.tsx
+++ b/src/components/group/GroupPickerDialog.tsx
@@ -16,7 +16,7 @@ import {
} from "@patternfly/react-core";
import { AngleRightIcon } from "@patternfly/react-icons";
-import type GroupRepresentation from "keycloak-admin/lib/defs/groupRepresentation";
+import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
import { useAdminClient, useFetch } from "../../context/auth/AdminClient";
import { ListEmptyState } from "../list-empty-state/ListEmptyState";
import { PaginatingTableToolbar } from "../table-toolbar/PaginatingTableToolbar";
diff --git a/src/components/role-mapping/AddRoleMappingModal.tsx b/src/components/role-mapping/AddRoleMappingModal.tsx
index b302d6b4ad..b51ebf1c83 100644
--- a/src/components/role-mapping/AddRoleMappingModal.tsx
+++ b/src/components/role-mapping/AddRoleMappingModal.tsx
@@ -18,10 +18,10 @@ import {
import { KeycloakDataTable } from "../table-toolbar/KeycloakDataTable";
import { useFetch, useAdminClient } from "../../context/auth/AdminClient";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import { FilterIcon } from "@patternfly/react-icons";
import { Row, ServiceRole } from "./RoleMapping";
-import type RoleRepresentation from "keycloak-admin/lib/defs/roleRepresentation";
+import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
export type MappingType = "service-account" | "client-scope" | "user-fed";
diff --git a/src/components/role-mapping/RoleMapping.tsx b/src/components/role-mapping/RoleMapping.tsx
index 1a32a6acd8..d293ca0530 100644
--- a/src/components/role-mapping/RoleMapping.tsx
+++ b/src/components/role-mapping/RoleMapping.tsx
@@ -9,8 +9,8 @@ import {
ToolbarItem,
} from "@patternfly/react-core";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
-import type RoleRepresentation from "keycloak-admin/lib/defs/roleRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
+import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import { AddRoleMappingModal, MappingType } from "./AddRoleMappingModal";
import { KeycloakDataTable } from "../table-toolbar/KeycloakDataTable";
import { emptyFormatter } from "../../util";
diff --git a/src/context/access/Access.tsx b/src/context/access/Access.tsx
index 2e4393b781..cde1ff1f0d 100644
--- a/src/context/access/Access.tsx
+++ b/src/context/access/Access.tsx
@@ -1,4 +1,4 @@
-import type { AccessType } from "keycloak-admin/lib/defs/whoAmIRepresentation";
+import type { AccessType } from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation";
import React, {
createContext,
FunctionComponent,
diff --git a/src/context/auth/AdminClient.tsx b/src/context/auth/AdminClient.tsx
index a29f8d1776..a2e8ad4291 100644
--- a/src/context/auth/AdminClient.tsx
+++ b/src/context/auth/AdminClient.tsx
@@ -1,5 +1,5 @@
import axios from "axios";
-import type KeycloakAdminClient from "keycloak-admin";
+import type KeycloakAdminClient from "@keycloak/keycloak-admin-client";
import { createContext, DependencyList, useEffect } from "react";
import { useErrorHandler } from "react-error-boundary";
import useRequiredContext from "../../utils/useRequiredContext";
diff --git a/src/context/auth/keycloak.ts b/src/context/auth/keycloak.ts
index 546ab17a1b..7d27bb41ae 100644
--- a/src/context/auth/keycloak.ts
+++ b/src/context/auth/keycloak.ts
@@ -1,4 +1,4 @@
-import KcAdminClient from "keycloak-admin";
+import KcAdminClient from "@keycloak/keycloak-admin-client";
import environment from "../../environment";
export default async function (): Promise {
diff --git a/src/context/realm-context/RealmContext.tsx b/src/context/realm-context/RealmContext.tsx
index 65104e0c82..99737311e3 100644
--- a/src/context/realm-context/RealmContext.tsx
+++ b/src/context/realm-context/RealmContext.tsx
@@ -1,4 +1,4 @@
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import _ from "lodash";
import React, { FunctionComponent, useEffect, useState } from "react";
import { useRouteMatch } from "react-router-dom";
diff --git a/src/context/server-info/ServerInfoProvider.tsx b/src/context/server-info/ServerInfoProvider.tsx
index 6eefc36f97..420de5599d 100644
--- a/src/context/server-info/ServerInfoProvider.tsx
+++ b/src/context/server-info/ServerInfoProvider.tsx
@@ -1,4 +1,4 @@
-import type { ServerInfoRepresentation } from "keycloak-admin/lib/defs/serverInfoRepesentation";
+import type { ServerInfoRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
import React, { createContext, FunctionComponent } from "react";
import { DataLoader } from "../../components/data-loader/DataLoader";
import { sortProviders } from "../../util";
diff --git a/src/context/whoami/WhoAmI.tsx b/src/context/whoami/WhoAmI.tsx
index 41fe5470e0..00fe80ee3c 100644
--- a/src/context/whoami/WhoAmI.tsx
+++ b/src/context/whoami/WhoAmI.tsx
@@ -1,5 +1,5 @@
-import type WhoAmIRepresentation from "keycloak-admin/lib/defs/whoAmIRepresentation";
-import type { AccessType } from "keycloak-admin/lib/defs/whoAmIRepresentation";
+import type WhoAmIRepresentation from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation";
+import type { AccessType } from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation";
import React, { FunctionComponent, useState } from "react";
import environment from "../../environment";
import i18n, { DEFAULT_LOCALE } from "../../i18n";
diff --git a/src/context/whoami/__tests__/WhoAmI.test.tsx b/src/context/whoami/__tests__/WhoAmI.test.tsx
index 3c9298f7bd..c99e8612d9 100644
--- a/src/context/whoami/__tests__/WhoAmI.test.tsx
+++ b/src/context/whoami/__tests__/WhoAmI.test.tsx
@@ -1,6 +1,6 @@
import whoamiMock from "./mock-whoami.json";
import { WhoAmI } from "../WhoAmI";
-import type WhoAmIRepresentation from "keycloak-admin/lib/defs/whoAmIRepresentation";
+import type WhoAmIRepresentation from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation";
test("returns display name", () => {
const whoami = new WhoAmI(whoamiMock as WhoAmIRepresentation);
diff --git a/src/events/AdminEvents.tsx b/src/events/AdminEvents.tsx
index a285ab1e81..7f4a4ec54d 100644
--- a/src/events/AdminEvents.tsx
+++ b/src/events/AdminEvents.tsx
@@ -21,7 +21,7 @@ import {
TableHeader,
TableVariant,
} from "@patternfly/react-table";
-import type AdminEventRepresentation from "keycloak-admin/lib/defs/adminEventRepresentation";
+import type AdminEventRepresentation from "@keycloak/keycloak-admin-client/lib/defs/adminEventRepresentation";
import moment from "moment";
import React, { FunctionComponent, useState } from "react";
import { useForm } from "react-hook-form";
diff --git a/src/events/EventsSection.tsx b/src/events/EventsSection.tsx
index ce0eb698fb..50efa909ea 100644
--- a/src/events/EventsSection.tsx
+++ b/src/events/EventsSection.tsx
@@ -24,9 +24,9 @@ import {
} from "@patternfly/react-core";
import { CheckCircleIcon, WarningTriangleIcon } from "@patternfly/react-icons";
import { cellWidth, expandable } from "@patternfly/react-table";
-import type EventRepresentation from "keycloak-admin/lib/defs/eventRepresentation";
-import type EventType from "keycloak-admin/lib/defs/eventTypes";
-import type { RealmEventsConfigRepresentation } from "keycloak-admin/lib/defs/realmEventsConfigRepresentation";
+import type EventRepresentation from "@keycloak/keycloak-admin-client/lib/defs/eventRepresentation";
+import type EventType from "@keycloak/keycloak-admin-client/lib/defs/eventTypes";
+import type { RealmEventsConfigRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/realmEventsConfigRepresentation";
import { pickBy } from "lodash";
import moment from "moment";
import React, { useState } from "react";
diff --git a/src/groups/GroupTable.tsx b/src/groups/GroupTable.tsx
index 6cd1a55283..ce46ff5237 100644
--- a/src/groups/GroupTable.tsx
+++ b/src/groups/GroupTable.tsx
@@ -12,7 +12,7 @@ import {
} from "@patternfly/react-core";
import { cellWidth } from "@patternfly/react-table";
-import type GroupRepresentation from "keycloak-admin/lib/defs/groupRepresentation";
+import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
import { useAdminClient } from "../context/auth/AdminClient";
import { useAlerts } from "../components/alert/Alerts";
import { useRealm } from "../context/realm-context/RealmContext";
diff --git a/src/groups/GroupsModal.tsx b/src/groups/GroupsModal.tsx
index c16cc8ce35..233930d73b 100644
--- a/src/groups/GroupsModal.tsx
+++ b/src/groups/GroupsModal.tsx
@@ -13,7 +13,7 @@ import {
import { useTranslation } from "react-i18next";
import { useForm } from "react-hook-form";
-import type GroupRepresentation from "keycloak-admin/lib/defs/groupRepresentation";
+import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
import { useAdminClient } from "../context/auth/AdminClient";
import { useAlerts } from "../components/alert/Alerts";
diff --git a/src/groups/GroupsSection.tsx b/src/groups/GroupsSection.tsx
index 70c09f4ca4..d37f914f54 100644
--- a/src/groups/GroupsSection.tsx
+++ b/src/groups/GroupsSection.tsx
@@ -10,7 +10,7 @@ import {
TabTitleText,
Tabs,
} from "@patternfly/react-core";
-import type GroupRepresentation from "keycloak-admin/lib/defs/groupRepresentation";
+import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
import { ViewHeader } from "../components/view-header/ViewHeader";
import { useFetch, useAdminClient } from "../context/auth/AdminClient";
diff --git a/src/groups/Members.tsx b/src/groups/Members.tsx
index 4595c9222a..e9c69c1ff7 100644
--- a/src/groups/Members.tsx
+++ b/src/groups/Members.tsx
@@ -12,8 +12,8 @@ import {
ToolbarItem,
} from "@patternfly/react-core";
-import type GroupRepresentation from "keycloak-admin/lib/defs/groupRepresentation";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
+import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { useAdminClient } from "../context/auth/AdminClient";
import { useRealm } from "../context/realm-context/RealmContext";
diff --git a/src/groups/MembersModal.tsx b/src/groups/MembersModal.tsx
index 4460e91e52..4a5b73a662 100644
--- a/src/groups/MembersModal.tsx
+++ b/src/groups/MembersModal.tsx
@@ -8,7 +8,7 @@ import {
ModalVariant,
} from "@patternfly/react-core";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import { useAdminClient } from "../context/auth/AdminClient";
import { useRealm } from "../context/realm-context/RealmContext";
import { useAlerts } from "../components/alert/Alerts";
diff --git a/src/groups/SearchGroups.tsx b/src/groups/SearchGroups.tsx
index 1216ba7ccd..a16a8251e6 100644
--- a/src/groups/SearchGroups.tsx
+++ b/src/groups/SearchGroups.tsx
@@ -16,7 +16,7 @@ import {
} from "@patternfly/react-core";
import { SearchIcon } from "@patternfly/react-icons";
-import type GroupRepresentation from "keycloak-admin/lib/defs/groupRepresentation";
+import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { useAdminClient } from "../context/auth/AdminClient";
import { useRealm } from "../context/realm-context/RealmContext";
diff --git a/src/groups/SubGroupsContext.tsx b/src/groups/SubGroupsContext.tsx
index f60f3637aa..657ecf686e 100644
--- a/src/groups/SubGroupsContext.tsx
+++ b/src/groups/SubGroupsContext.tsx
@@ -1,4 +1,4 @@
-import type GroupRepresentation from "keycloak-admin/lib/defs/groupRepresentation";
+import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
import React, { createContext, FunctionComponent, useState } from "react";
import useRequiredContext from "../utils/useRequiredContext";
diff --git a/src/identity-providers/IdentityProvidersSection.tsx b/src/identity-providers/IdentityProvidersSection.tsx
index d42c015ac5..d8b864e774 100644
--- a/src/identity-providers/IdentityProvidersSection.tsx
+++ b/src/identity-providers/IdentityProvidersSection.tsx
@@ -23,7 +23,7 @@ import {
ToolbarItem,
} from "@patternfly/react-core";
-import type IdentityProviderRepresentation from "keycloak-admin/lib/defs/identityProviderRepresentation";
+import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation";
import { ViewHeader } from "../components/view-header/ViewHeader";
import { useFetch, useAdminClient } from "../context/auth/AdminClient";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
diff --git a/src/identity-providers/ManageOrderDialog.tsx b/src/identity-providers/ManageOrderDialog.tsx
index a43fe1b59c..bbdda1a9d9 100644
--- a/src/identity-providers/ManageOrderDialog.tsx
+++ b/src/identity-providers/ManageOrderDialog.tsx
@@ -17,7 +17,7 @@ import {
TextContent,
Text,
} from "@patternfly/react-core";
-import type IdentityProviderRepresentation from "keycloak-admin/lib/defs/identityProviderRepresentation";
+import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation";
import { useAdminClient } from "../context/auth/AdminClient";
import { useAlerts } from "../components/alert/Alerts";
diff --git a/src/identity-providers/add/AddIdentityProvider.tsx b/src/identity-providers/add/AddIdentityProvider.tsx
index d70251ddc2..ba45530a48 100644
--- a/src/identity-providers/add/AddIdentityProvider.tsx
+++ b/src/identity-providers/add/AddIdentityProvider.tsx
@@ -10,7 +10,7 @@ import {
} from "@patternfly/react-core";
import type { BreadcrumbData } from "use-react-router-breadcrumbs";
-import type IdentityProviderRepresentation from "keycloak-admin/lib/defs/identityProviderRepresentation";
+import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation";
import { ViewHeader } from "../../components/view-header/ViewHeader";
import { toUpperCase } from "../../util";
import { FormAccess } from "../../components/form-access/FormAccess";
diff --git a/src/identity-providers/add/AddOpenIdConnect.tsx b/src/identity-providers/add/AddOpenIdConnect.tsx
index e637813435..6c47df4f04 100644
--- a/src/identity-providers/add/AddOpenIdConnect.tsx
+++ b/src/identity-providers/add/AddOpenIdConnect.tsx
@@ -9,7 +9,7 @@ import {
PageSection,
} from "@patternfly/react-core";
-import type IdentityProviderRepresentation from "keycloak-admin/lib/defs/identityProviderRepresentation";
+import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation";
import { FormAccess } from "../../components/form-access/FormAccess";
import { ViewHeader } from "../../components/view-header/ViewHeader";
import { useAdminClient } from "../../context/auth/AdminClient";
diff --git a/src/identity-providers/add/AddSamlConnect.tsx b/src/identity-providers/add/AddSamlConnect.tsx
index 4016cda2c7..d901156b9f 100644
--- a/src/identity-providers/add/AddSamlConnect.tsx
+++ b/src/identity-providers/add/AddSamlConnect.tsx
@@ -9,7 +9,7 @@ import {
PageSection,
} from "@patternfly/react-core";
-import type IdentityProviderRepresentation from "keycloak-admin/lib/defs/identityProviderRepresentation";
+import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation";
import { FormAccess } from "../../components/form-access/FormAccess";
import { ViewHeader } from "../../components/view-header/ViewHeader";
import { useAdminClient } from "../../context/auth/AdminClient";
diff --git a/src/identity-providers/add/AdvancedSettings.tsx b/src/identity-providers/add/AdvancedSettings.tsx
index d8367335dd..4f43393845 100644
--- a/src/identity-providers/add/AdvancedSettings.tsx
+++ b/src/identity-providers/add/AdvancedSettings.tsx
@@ -8,7 +8,7 @@ import {
SelectVariant,
} from "@patternfly/react-core";
-import type AuthenticationFlowRepresentation from "keycloak-admin/lib/defs/authenticationFlowRepresentation";
+import type AuthenticationFlowRepresentation from "@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation";
import { useFetch, useAdminClient } from "../../context/auth/AdminClient";
import { SwitchField } from "../component/SwitchField";
import { TextField } from "../component/TextField";
diff --git a/src/identity-providers/add/DetailSettings.tsx b/src/identity-providers/add/DetailSettings.tsx
index 008b0b744d..81d04b952f 100644
--- a/src/identity-providers/add/DetailSettings.tsx
+++ b/src/identity-providers/add/DetailSettings.tsx
@@ -15,7 +15,7 @@ import {
TabTitleText,
} from "@patternfly/react-core";
-import type IdentityProviderRepresentation from "keycloak-admin/lib/defs/identityProviderRepresentation";
+import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation";
import { FormAccess } from "../../components/form-access/FormAccess";
import { ScrollForm } from "../../components/scroll-form/ScrollForm";
import { ViewHeader } from "../../components/view-header/ViewHeader";
diff --git a/src/identity-providers/add/SamlConnectSettings.tsx b/src/identity-providers/add/SamlConnectSettings.tsx
index 174f8ec569..0823427477 100644
--- a/src/identity-providers/add/SamlConnectSettings.tsx
+++ b/src/identity-providers/add/SamlConnectSettings.tsx
@@ -11,7 +11,7 @@ import {
import { HelpItem } from "../../components/help-enabler/HelpItem";
import { useTranslation } from "react-i18next";
import { useAdminClient } from "../../context/auth/AdminClient";
-import type IdentityProviderRepresentation from "keycloak-admin/lib/defs/identityProviderRepresentation";
+import type IdentityProviderRepresentation from "@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation";
import { JsonFileUpload } from "../../components/json-file-upload/JsonFileUpload";
import { useRealm } from "../../context/realm-context/RealmContext";
diff --git a/src/realm-roles/AliasRendererComponent.tsx b/src/realm-roles/AliasRendererComponent.tsx
index fce97a4539..fbe56cd5a1 100644
--- a/src/realm-roles/AliasRendererComponent.tsx
+++ b/src/realm-roles/AliasRendererComponent.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from "react";
-import type KeycloakAdminClient from "keycloak-admin";
+import type KeycloakAdminClient from "@keycloak/keycloak-admin-client";
import { Label } from "@patternfly/react-core";
export type AliasRendererComponentProps = {
diff --git a/src/realm-roles/AssociatedRolesModal.tsx b/src/realm-roles/AssociatedRolesModal.tsx
index 2d2474874a..be7f6ce2aa 100644
--- a/src/realm-roles/AssociatedRolesModal.tsx
+++ b/src/realm-roles/AssociatedRolesModal.tsx
@@ -11,7 +11,7 @@ import {
} from "@patternfly/react-core";
import { useTranslation } from "react-i18next";
import { useFetch, useAdminClient } from "../context/auth/AdminClient";
-import type RoleRepresentation from "keycloak-admin/lib/defs/roleRepresentation";
+import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
import { CaretDownIcon, FilterIcon } from "@patternfly/react-icons";
diff --git a/src/realm-roles/AssociatedRolesTab.tsx b/src/realm-roles/AssociatedRolesTab.tsx
index 39b14df6e0..d8236f432f 100644
--- a/src/realm-roles/AssociatedRolesTab.tsx
+++ b/src/realm-roles/AssociatedRolesTab.tsx
@@ -10,7 +10,7 @@ import {
PageSection,
ToolbarItem,
} from "@patternfly/react-core";
-import type RoleRepresentation from "keycloak-admin/lib/defs/roleRepresentation";
+import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { useAlerts } from "../components/alert/Alerts";
@@ -19,7 +19,7 @@ import { emptyFormatter } from "../util";
import { AssociatedRolesModal } from "./AssociatedRolesModal";
import { useAdminClient } from "../context/auth/AdminClient";
import type { RoleFormType } from "./RealmRoleTabs";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import _ from "lodash";
type AssociatedRolesTabProps = {
diff --git a/src/realm-roles/RealmRoleTabs.tsx b/src/realm-roles/RealmRoleTabs.tsx
index 79bfe33e28..576763d598 100644
--- a/src/realm-roles/RealmRoleTabs.tsx
+++ b/src/realm-roles/RealmRoleTabs.tsx
@@ -13,8 +13,8 @@ import { useFieldArray, useForm } from "react-hook-form";
import { useAlerts } from "../components/alert/Alerts";
import { useAdminClient, useFetch } from "../context/auth/AdminClient";
-import type RoleRepresentation from "keycloak-admin/lib/defs/roleRepresentation";
-import type Composites from "keycloak-admin/lib/defs/roleRepresentation";
+import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
+import type Composites from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import {
KeyValueType,
AttributesForm,
@@ -29,7 +29,7 @@ import { AssociatedRolesModal } from "./AssociatedRolesModal";
import { KeycloakTabs } from "../components/keycloak-tabs/KeycloakTabs";
import { AssociatedRolesTab } from "./AssociatedRolesTab";
import { UsersInRoleTab } from "./UsersInRoleTab";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
export type RoleFormType = Omit & {
attributes: KeyValueType[];
diff --git a/src/realm-roles/RolesList.tsx b/src/realm-roles/RolesList.tsx
index 86af146057..7206992739 100644
--- a/src/realm-roles/RolesList.tsx
+++ b/src/realm-roles/RolesList.tsx
@@ -4,14 +4,14 @@ import { useTranslation } from "react-i18next";
import { AlertVariant, Button, ButtonVariant } from "@patternfly/react-core";
import { useAdminClient, useFetch } from "../context/auth/AdminClient";
-import type RoleRepresentation from "keycloak-admin/lib/defs/roleRepresentation";
+import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { useAlerts } from "../components/alert/Alerts";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
import { emptyFormatter, upperCaseFormatter } from "../util";
import { useRealm } from "../context/realm-context/RealmContext";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import { HelpItem } from "../components/help-enabler/HelpItem";
import { toRealmRole } from "./routes/RealmRole";
diff --git a/src/realm-settings/AddUserEmailModal.tsx b/src/realm-settings/AddUserEmailModal.tsx
index 0b87a7b190..9ddcb814a5 100644
--- a/src/realm-settings/AddUserEmailModal.tsx
+++ b/src/realm-settings/AddUserEmailModal.tsx
@@ -13,7 +13,7 @@ import {
import { useTranslation } from "react-i18next";
import { useForm, UseFormMethods } from "react-hook-form";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import { emailRegexPattern } from "../util";
type AddUserEmailModalProps = {
diff --git a/src/realm-settings/EmailTab.tsx b/src/realm-settings/EmailTab.tsx
index f7a161b446..3c72f8fbdd 100644
--- a/src/realm-settings/EmailTab.tsx
+++ b/src/realm-settings/EmailTab.tsx
@@ -8,8 +8,8 @@ import {
Switch,
TextInput,
} from "@patternfly/react-core";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import React, { useEffect, useState } from "react";
import { Controller, useForm, useWatch } from "react-hook-form";
import { useTranslation } from "react-i18next";
diff --git a/src/realm-settings/GeneralTab.tsx b/src/realm-settings/GeneralTab.tsx
index 039adf6078..85dff589cc 100644
--- a/src/realm-settings/GeneralTab.tsx
+++ b/src/realm-settings/GeneralTab.tsx
@@ -16,7 +16,7 @@ import {
TextInput,
} from "@patternfly/react-core";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import { getBaseUrl } from "../util";
import { useAdminClient } from "../context/auth/AdminClient";
import { useRealm } from "../context/realm-context/RealmContext";
diff --git a/src/realm-settings/JavaKeystoreModal.tsx b/src/realm-settings/JavaKeystoreModal.tsx
index b9b0f6eeff..f4891152cd 100644
--- a/src/realm-settings/JavaKeystoreModal.tsx
+++ b/src/realm-settings/JavaKeystoreModal.tsx
@@ -18,7 +18,7 @@ import { Controller, useForm } from "react-hook-form";
import { useAdminClient } from "../context/auth/AdminClient";
import { useAlerts } from "../components/alert/Alerts";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { HelpItem } from "../components/help-enabler/HelpItem";
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
import { KEY_PROVIDER_TYPE } from "../util";
diff --git a/src/realm-settings/KeysListTab.tsx b/src/realm-settings/KeysListTab.tsx
index 15a6031cdd..d9e44d8409 100644
--- a/src/realm-settings/KeysListTab.tsx
+++ b/src/realm-settings/KeysListTab.tsx
@@ -11,8 +11,8 @@ import {
} from "@patternfly/react-core";
import { cellWidth } from "@patternfly/react-table";
-import type { KeyMetadataRepresentation } from "keycloak-admin/lib/defs/keyMetadataRepresentation";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type { KeyMetadataRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/keyMetadataRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
diff --git a/src/realm-settings/KeysProvidersTab.tsx b/src/realm-settings/KeysProvidersTab.tsx
index ac65b144d7..d1887c2bcc 100644
--- a/src/realm-settings/KeysProvidersTab.tsx
+++ b/src/realm-settings/KeysProvidersTab.tsx
@@ -27,9 +27,9 @@ import {
} from "@patternfly/react-core";
import { SearchIcon } from "@patternfly/react-icons";
-import type { KeyMetadataRepresentation } from "keycloak-admin/lib/defs/keyMetadataRepresentation";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
-import type ComponentTypeRepresentation from "keycloak-admin/lib/defs/componentTypeRepresentation";
+import type { KeyMetadataRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/keyMetadataRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
+import type ComponentTypeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentTypeRepresentation";
import "./RealmSettingsSection.css";
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
diff --git a/src/realm-settings/LocalizationTab.tsx b/src/realm-settings/LocalizationTab.tsx
index f70816216d..108fa644c0 100644
--- a/src/realm-settings/LocalizationTab.tsx
+++ b/src/realm-settings/LocalizationTab.tsx
@@ -17,7 +17,7 @@ import {
ToolbarItem,
} from "@patternfly/react-core";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import { FormAccess } from "../components/form-access/FormAccess";
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
import { FormPanel } from "../components/scroll-form/FormPanel";
diff --git a/src/realm-settings/LoginTab.tsx b/src/realm-settings/LoginTab.tsx
index f7845b215f..aafe26b45e 100644
--- a/src/realm-settings/LoginTab.tsx
+++ b/src/realm-settings/LoginTab.tsx
@@ -4,7 +4,7 @@ import { FormGroup, PageSection, Switch } from "@patternfly/react-core";
import { FormAccess } from "../components/form-access/FormAccess";
import { HelpItem } from "../components/help-enabler/HelpItem";
import { FormPanel } from "../components/scroll-form/FormPanel";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
type RealmSettingsLoginTabProps = {
save: (realm: RealmRepresentation) => void;
diff --git a/src/realm-settings/RSAGeneratedModal.tsx b/src/realm-settings/RSAGeneratedModal.tsx
index df772f5d74..73752c533d 100644
--- a/src/realm-settings/RSAGeneratedModal.tsx
+++ b/src/realm-settings/RSAGeneratedModal.tsx
@@ -18,7 +18,7 @@ import { Controller, useForm } from "react-hook-form";
import { useAdminClient } from "../context/auth/AdminClient";
import { useAlerts } from "../components/alert/Alerts";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { HelpItem } from "../components/help-enabler/HelpItem";
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
import { KEY_PROVIDER_TYPE } from "../util";
diff --git a/src/realm-settings/RSAModal.tsx b/src/realm-settings/RSAModal.tsx
index e0d16c50fd..e609441e95 100644
--- a/src/realm-settings/RSAModal.tsx
+++ b/src/realm-settings/RSAModal.tsx
@@ -19,7 +19,7 @@ import { Controller, useForm } from "react-hook-form";
import { useAdminClient } from "../context/auth/AdminClient";
import { useAlerts } from "../components/alert/Alerts";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { HelpItem } from "../components/help-enabler/HelpItem";
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
import { useParams } from "react-router-dom";
diff --git a/src/realm-settings/RealmSettingsSection.tsx b/src/realm-settings/RealmSettingsSection.tsx
index 1b1b6c42b5..b03d5e0021 100644
--- a/src/realm-settings/RealmSettingsSection.tsx
+++ b/src/realm-settings/RealmSettingsSection.tsx
@@ -11,9 +11,9 @@ import {
Tabs,
TabTitleText,
} from "@patternfly/react-core";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import React, { useEffect, useState } from "react";
import { Controller, FormProvider, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
diff --git a/src/realm-settings/SessionsTab.tsx b/src/realm-settings/SessionsTab.tsx
index 80666ea273..ed1f730afc 100644
--- a/src/realm-settings/SessionsTab.tsx
+++ b/src/realm-settings/SessionsTab.tsx
@@ -10,7 +10,7 @@ import {
Switch,
} from "@patternfly/react-core";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import { FormAccess } from "../components/form-access/FormAccess";
import { HelpItem } from "../components/help-enabler/HelpItem";
import { FormPanel } from "../components/scroll-form/FormPanel";
@@ -19,7 +19,7 @@ import { useAlerts } from "../components/alert/Alerts";
import { useRealm } from "../context/realm-context/RealmContext";
import "./RealmSettingsSection.css";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import { TimeSelector } from "../components/time-selector/TimeSelector";
type RealmSettingsSessionsTabProps = {
diff --git a/src/realm-settings/ThemesTab.tsx b/src/realm-settings/ThemesTab.tsx
index e9abcf214b..55a67988ee 100644
--- a/src/realm-settings/ThemesTab.tsx
+++ b/src/realm-settings/ThemesTab.tsx
@@ -12,7 +12,7 @@ import {
Switch,
} from "@patternfly/react-core";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import { FormAccess } from "../components/form-access/FormAccess";
import { HelpItem } from "../components/help-enabler/HelpItem";
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
diff --git a/src/realm-settings/TokensTab.tsx b/src/realm-settings/TokensTab.tsx
index aef868a740..5901719492 100644
--- a/src/realm-settings/TokensTab.tsx
+++ b/src/realm-settings/TokensTab.tsx
@@ -16,7 +16,7 @@ import {
TextVariants,
} from "@patternfly/react-core";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import { FormAccess } from "../components/form-access/FormAccess";
import { HelpItem } from "../components/help-enabler/HelpItem";
import { FormPanel } from "../components/scroll-form/FormPanel";
@@ -25,7 +25,7 @@ import { useAlerts } from "../components/alert/Alerts";
import { useRealm } from "../context/realm-context/RealmContext";
import "./RealmSettingsSection.css";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import { TimeSelector } from "../components/time-selector/TimeSelector";
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
import {
diff --git a/src/realm-settings/event-config/EventsTab.tsx b/src/realm-settings/event-config/EventsTab.tsx
index 81cb13d45e..06de6050e7 100644
--- a/src/realm-settings/event-config/EventsTab.tsx
+++ b/src/realm-settings/event-config/EventsTab.tsx
@@ -11,7 +11,7 @@ import {
Title,
} from "@patternfly/react-core";
-import type { RealmEventsConfigRepresentation } from "keycloak-admin/lib/defs/realmEventsConfigRepresentation";
+import type { RealmEventsConfigRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/realmEventsConfigRepresentation";
import { FormAccess } from "../../components/form-access/FormAccess";
import { useRealm } from "../../context/realm-context/RealmContext";
import { useAlerts } from "../../components/alert/Alerts";
diff --git a/src/realm-settings/key-providers/aes-generated/AESGeneratedForm.tsx b/src/realm-settings/key-providers/aes-generated/AESGeneratedForm.tsx
index c155a7d9a9..d998ab1d11 100644
--- a/src/realm-settings/key-providers/aes-generated/AESGeneratedForm.tsx
+++ b/src/realm-settings/key-providers/aes-generated/AESGeneratedForm.tsx
@@ -15,7 +15,7 @@ import {
import { useTranslation } from "react-i18next";
import { Controller, useForm } from "react-hook-form";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { HelpItem } from "../../../components/help-enabler/HelpItem";
import { useServerInfo } from "../../../context/server-info/ServerInfoProvider";
import { useAdminClient, useFetch } from "../../../context/auth/AdminClient";
diff --git a/src/realm-settings/key-providers/ecdsa-generated/ECDSAGeneratedForm.tsx b/src/realm-settings/key-providers/ecdsa-generated/ECDSAGeneratedForm.tsx
index aa7365ea7c..547b65279e 100644
--- a/src/realm-settings/key-providers/ecdsa-generated/ECDSAGeneratedForm.tsx
+++ b/src/realm-settings/key-providers/ecdsa-generated/ECDSAGeneratedForm.tsx
@@ -15,7 +15,7 @@ import {
import { useTranslation } from "react-i18next";
import { Controller, useForm } from "react-hook-form";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { HelpItem } from "../../../components/help-enabler/HelpItem";
import { useServerInfo } from "../../../context/server-info/ServerInfoProvider";
import { useAdminClient, useFetch } from "../../../context/auth/AdminClient";
diff --git a/src/realm-settings/key-providers/hmac-generated/HMACGeneratedForm.tsx b/src/realm-settings/key-providers/hmac-generated/HMACGeneratedForm.tsx
index bf7fa13819..de17e9594c 100644
--- a/src/realm-settings/key-providers/hmac-generated/HMACGeneratedForm.tsx
+++ b/src/realm-settings/key-providers/hmac-generated/HMACGeneratedForm.tsx
@@ -15,7 +15,7 @@ import {
import { useTranslation } from "react-i18next";
import { Controller, useForm } from "react-hook-form";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { HelpItem } from "../../../components/help-enabler/HelpItem";
import { useServerInfo } from "../../../context/server-info/ServerInfoProvider";
import { useAdminClient, useFetch } from "../../../context/auth/AdminClient";
diff --git a/src/realm-settings/key-providers/java-keystore/JavaKeystoreForm.tsx b/src/realm-settings/key-providers/java-keystore/JavaKeystoreForm.tsx
index cc2f8a4da3..9f6a619a61 100644
--- a/src/realm-settings/key-providers/java-keystore/JavaKeystoreForm.tsx
+++ b/src/realm-settings/key-providers/java-keystore/JavaKeystoreForm.tsx
@@ -15,7 +15,7 @@ import {
import { useTranslation } from "react-i18next";
import { Controller, useForm } from "react-hook-form";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { HelpItem } from "../../../components/help-enabler/HelpItem";
import { useServerInfo } from "../../../context/server-info/ServerInfoProvider";
import { useAdminClient, useFetch } from "../../../context/auth/AdminClient";
diff --git a/src/realm-settings/key-providers/rsa-generated/RSAGeneratedForm.tsx b/src/realm-settings/key-providers/rsa-generated/RSAGeneratedForm.tsx
index f9c822bb21..73a24d7805 100644
--- a/src/realm-settings/key-providers/rsa-generated/RSAGeneratedForm.tsx
+++ b/src/realm-settings/key-providers/rsa-generated/RSAGeneratedForm.tsx
@@ -15,7 +15,7 @@ import {
import { useTranslation } from "react-i18next";
import { Controller, useForm } from "react-hook-form";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { HelpItem } from "../../../components/help-enabler/HelpItem";
import { useServerInfo } from "../../../context/server-info/ServerInfoProvider";
import { useAdminClient, useFetch } from "../../../context/auth/AdminClient";
diff --git a/src/realm-settings/key-providers/rsa/RSAForm.tsx b/src/realm-settings/key-providers/rsa/RSAForm.tsx
index f5438a3c71..22510cd6e6 100644
--- a/src/realm-settings/key-providers/rsa/RSAForm.tsx
+++ b/src/realm-settings/key-providers/rsa/RSAForm.tsx
@@ -16,7 +16,7 @@ import {
import { useTranslation } from "react-i18next";
import { Controller, useForm } from "react-hook-form";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { HelpItem } from "../../../components/help-enabler/HelpItem";
import { useServerInfo } from "../../../context/server-info/ServerInfoProvider";
import { useAdminClient, useFetch } from "../../../context/auth/AdminClient";
diff --git a/src/realm-settings/security-defences/BruteForceDetection.tsx b/src/realm-settings/security-defences/BruteForceDetection.tsx
index 3244240d7d..e4a37e8290 100644
--- a/src/realm-settings/security-defences/BruteForceDetection.tsx
+++ b/src/realm-settings/security-defences/BruteForceDetection.tsx
@@ -9,7 +9,7 @@ import {
Switch,
} from "@patternfly/react-core";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import { FormAccess } from "../../components/form-access/FormAccess";
import { HelpItem } from "../../components/help-enabler/HelpItem";
import { Time } from "./Time";
diff --git a/src/realm-settings/security-defences/HeadersForm.tsx b/src/realm-settings/security-defences/HeadersForm.tsx
index 569b505db3..0c53b4b600 100644
--- a/src/realm-settings/security-defences/HeadersForm.tsx
+++ b/src/realm-settings/security-defences/HeadersForm.tsx
@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
import { useFormContext } from "react-hook-form";
import { ActionGroup, Button } from "@patternfly/react-core";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import { FormAccess } from "../../components/form-access/FormAccess";
import { HelpLinkTextInput } from "./HelpLinkTextInput";
diff --git a/src/realm-settings/security-defences/SecurityDefences.tsx b/src/realm-settings/security-defences/SecurityDefences.tsx
index d007208532..aff910b1b1 100644
--- a/src/realm-settings/security-defences/SecurityDefences.tsx
+++ b/src/realm-settings/security-defences/SecurityDefences.tsx
@@ -2,7 +2,7 @@ import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { PageSection, Tab, Tabs, TabTitleText } from "@patternfly/react-core";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import { HeadersForm } from "./HeadersForm";
import { BruteForceDetection } from "./BruteForceDetection";
diff --git a/src/realm/add/NewRealmForm.tsx b/src/realm/add/NewRealmForm.tsx
index 14699fca61..a690db8aef 100644
--- a/src/realm/add/NewRealmForm.tsx
+++ b/src/realm/add/NewRealmForm.tsx
@@ -7,7 +7,7 @@ import {
Switch,
TextInput,
} from "@patternfly/react-core";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import React from "react";
import { Controller, useForm } from "react-hook-form";
import { useTranslation } from "react-i18next";
diff --git a/src/route-config.ts b/src/route-config.ts
index c9e65f1087..3e1dd67f6e 100644
--- a/src/route-config.ts
+++ b/src/route-config.ts
@@ -1,5 +1,5 @@
import type { TFunction } from "i18next";
-import type { AccessType } from "keycloak-admin/lib/defs/whoAmIRepresentation";
+import type { AccessType } from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation";
import type { ComponentType } from "react";
import type { MatchOptions } from "use-react-router-breadcrumbs";
import authenticationRoutes from "./authentication/routes";
diff --git a/src/sessions/LogoutAllSessionsModal.tsx b/src/sessions/LogoutAllSessionsModal.tsx
index ef6090dc6c..46340a9773 100644
--- a/src/sessions/LogoutAllSessionsModal.tsx
+++ b/src/sessions/LogoutAllSessionsModal.tsx
@@ -28,7 +28,7 @@ export const LogoutAllSessionsModal = ({
const logoutAllSessions = async () => {
try {
await adminClient.realms.logoutAll({ realm: realmName });
- adminClient.keycloak.logout({ redirectUri: "" });
+ adminClient.keycloak?.logout({ redirectUri: "" });
} catch (error) {
addAlert(t("logoutAllSessionsError", { error }), AlertVariant.danger);
}
diff --git a/src/sessions/RevocationModal.tsx b/src/sessions/RevocationModal.tsx
index 955d0f9058..e22cb43403 100644
--- a/src/sessions/RevocationModal.tsx
+++ b/src/sessions/RevocationModal.tsx
@@ -15,12 +15,12 @@ import { useTranslation } from "react-i18next";
import { useForm } from "react-hook-form";
import { emailRegexPattern } from "../util";
-import type RealmRepresentation from "keycloak-admin/lib/defs/realmRepresentation";
+import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
import { useAdminClient, useFetch } from "../context/auth/AdminClient";
import { useRealm } from "../context/realm-context/RealmContext";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import { useAlerts } from "../components/alert/Alerts";
-import type GlobalRequestResult from "keycloak-admin/lib/defs/globalRequestResult";
+import type GlobalRequestResult from "@keycloak/keycloak-admin-client/lib/defs/globalRequestResult";
type RevocationModalProps = {
handleModalToggle: () => void;
diff --git a/src/sessions/SessionsSection.tsx b/src/sessions/SessionsSection.tsx
index 9fbcd1856a..1e6a5ec79a 100644
--- a/src/sessions/SessionsSection.tsx
+++ b/src/sessions/SessionsSection.tsx
@@ -11,7 +11,7 @@ import {
} from "@patternfly/react-core";
import { FilterIcon } from "@patternfly/react-icons";
-import type UserSessionRepresentation from "keycloak-admin/lib/defs/userSessionRepresentation";
+import type UserSessionRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userSessionRepresentation";
import { ListEmptyState } from "../components/list-empty-state/ListEmptyState";
import { ViewHeader } from "../components/view-header/ViewHeader";
import { KeycloakDataTable } from "../components/table-toolbar/KeycloakDataTable";
@@ -20,7 +20,7 @@ import { useAdminClient } from "../context/auth/AdminClient";
import { CubesIcon } from "@patternfly/react-icons";
import "./SessionsSection.css";
import { RevocationModal } from "./RevocationModal";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
import { LogoutAllSessionsModal } from "./LogoutAllSessionsModal";
const Clients = (row: UserSessionRepresentation) => {
diff --git a/src/user-federation/UserFederationKerberosSettings.tsx b/src/user-federation/UserFederationKerberosSettings.tsx
index 7f6ebe8d6f..5a9cd4c4c7 100644
--- a/src/user-federation/UserFederationKerberosSettings.tsx
+++ b/src/user-federation/UserFederationKerberosSettings.tsx
@@ -13,7 +13,7 @@ import { KerberosSettingsRequired } from "./kerberos/KerberosSettingsRequired";
import { SettingsCache } from "./shared/SettingsCache";
import { useRealm } from "../context/realm-context/RealmContext";
import { convertToFormValues } from "../util";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { Controller, useForm } from "react-hook-form";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
diff --git a/src/user-federation/UserFederationKerberosWizard.tsx b/src/user-federation/UserFederationKerberosWizard.tsx
index ff9c0f66e9..d7de5294cf 100644
--- a/src/user-federation/UserFederationKerberosWizard.tsx
+++ b/src/user-federation/UserFederationKerberosWizard.tsx
@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next";
import React from "react";
import { KerberosSettingsRequired } from "./kerberos/KerberosSettingsRequired";
import { SettingsCache } from "./shared/SettingsCache";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { useForm } from "react-hook-form";
export const UserFederationKerberosWizard = () => {
diff --git a/src/user-federation/UserFederationLdapSettings.tsx b/src/user-federation/UserFederationLdapSettings.tsx
index 0bb31e6e45..53e5e2105f 100644
--- a/src/user-federation/UserFederationLdapSettings.tsx
+++ b/src/user-federation/UserFederationLdapSettings.tsx
@@ -22,7 +22,7 @@ import { LdapSettingsSearching } from "./ldap/LdapSettingsSearching";
import { useRealm } from "../context/realm-context/RealmContext";
import { convertToFormValues } from "../util";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { Controller, useForm } from "react-hook-form";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
diff --git a/src/user-federation/UserFederationLdapWizard.tsx b/src/user-federation/UserFederationLdapWizard.tsx
index b9e16f48b0..0290eb9f09 100644
--- a/src/user-federation/UserFederationLdapWizard.tsx
+++ b/src/user-federation/UserFederationLdapWizard.tsx
@@ -13,7 +13,7 @@ import { LdapSettingsKerberosIntegration } from "./ldap/LdapSettingsKerberosInte
import { SettingsCache } from "./shared/SettingsCache";
import { LdapSettingsAdvanced } from "./ldap/LdapSettingsAdvanced";
import { useTranslation } from "react-i18next";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { useForm } from "react-hook-form";
diff --git a/src/user-federation/UserFederationSection.tsx b/src/user-federation/UserFederationSection.tsx
index 755cd46e35..eba844cb28 100644
--- a/src/user-federation/UserFederationSection.tsx
+++ b/src/user-federation/UserFederationSection.tsx
@@ -14,7 +14,7 @@ import {
TextVariants,
} from "@patternfly/react-core";
import { DatabaseIcon } from "@patternfly/react-icons";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { useHistory, useRouteMatch } from "react-router-dom";
diff --git a/src/user-federation/ldap/LdapSettingsConnection.tsx b/src/user-federation/ldap/LdapSettingsConnection.tsx
index 0c99ca15c3..630d961858 100644
--- a/src/user-federation/ldap/LdapSettingsConnection.tsx
+++ b/src/user-federation/ldap/LdapSettingsConnection.tsx
@@ -13,7 +13,7 @@ import { useTranslation } from "react-i18next";
import React, { useState } from "react";
import _ from "lodash";
-import type TestLdapConnectionRepresentation from "keycloak-admin/lib/defs/testLdapConnection";
+import type TestLdapConnectionRepresentation from "@keycloak/keycloak-admin-client/lib/defs/testLdapConnection";
import { HelpItem } from "../../components/help-enabler/HelpItem";
import { Controller, UseFormMethods, useWatch } from "react-hook-form";
import { FormAccess } from "../../components/form-access/FormAccess";
diff --git a/src/user-federation/ldap/mappers/LdapMapperDetails.tsx b/src/user-federation/ldap/mappers/LdapMapperDetails.tsx
index 85a545c2a2..7a96843b01 100644
--- a/src/user-federation/ldap/mappers/LdapMapperDetails.tsx
+++ b/src/user-federation/ldap/mappers/LdapMapperDetails.tsx
@@ -13,7 +13,7 @@ import {
ValidatedOptions,
} from "@patternfly/react-core";
import { convertFormValuesToObject, convertToFormValues } from "../../../util";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { useAdminClient } from "../../../context/auth/AdminClient";
import { ViewHeader } from "../../../components/view-header/ViewHeader";
import { useHistory, useParams } from "react-router-dom";
diff --git a/src/user-federation/ldap/mappers/LdapMapperHardcodedLdapRole.tsx b/src/user-federation/ldap/mappers/LdapMapperHardcodedLdapRole.tsx
index adb6e93731..210d4d18f0 100644
--- a/src/user-federation/ldap/mappers/LdapMapperHardcodedLdapRole.tsx
+++ b/src/user-federation/ldap/mappers/LdapMapperHardcodedLdapRole.tsx
@@ -9,8 +9,8 @@ import { HelpItem } from "../../../components/help-enabler/HelpItem";
import type { UseFormMethods } from "react-hook-form";
import { useTranslation } from "react-i18next";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
-import type RoleRepresentation from "keycloak-admin/lib/defs/roleRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
+import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import { AddRoleMappingModal } from "../../../components/role-mapping/AddRoleMappingModal";
import "../../user-federation.css";
diff --git a/src/user-federation/ldap/mappers/LdapMapperList.tsx b/src/user-federation/ldap/mappers/LdapMapperList.tsx
index f1d580b905..ce497e88df 100644
--- a/src/user-federation/ldap/mappers/LdapMapperList.tsx
+++ b/src/user-federation/ldap/mappers/LdapMapperList.tsx
@@ -8,7 +8,7 @@ import {
ToolbarItem,
} from "@patternfly/react-core";
-import type ComponentRepresentation from "keycloak-admin/lib/defs/componentRepresentation";
+import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
import { KeycloakDataTable } from "../../../components/table-toolbar/KeycloakDataTable";
import { ListEmptyState } from "../../../components/list-empty-state/ListEmptyState";
import { useAlerts } from "../../../components/alert/Alerts";
diff --git a/src/user-federation/ldap/mappers/LdapMapperRoleGroup.tsx b/src/user-federation/ldap/mappers/LdapMapperRoleGroup.tsx
index c1fac5d3f2..a692eee616 100644
--- a/src/user-federation/ldap/mappers/LdapMapperRoleGroup.tsx
+++ b/src/user-federation/ldap/mappers/LdapMapperRoleGroup.tsx
@@ -12,7 +12,7 @@ import { HelpItem } from "../../../components/help-enabler/HelpItem";
import { Controller, UseFormMethods } from "react-hook-form";
import { useTranslation } from "react-i18next";
import { useAdminClient, useFetch } from "../../../context/auth/AdminClient";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
export type LdapMapperRoleGroupProps = {
form: UseFormMethods;
diff --git a/src/user/UserConsents.tsx b/src/user/UserConsents.tsx
index a0fb467cf6..02359f335c 100644
--- a/src/user/UserConsents.tsx
+++ b/src/user/UserConsents.tsx
@@ -13,7 +13,7 @@ import { emptyFormatter } from "../util";
import { useAdminClient } from "../context/auth/AdminClient";
import { cellWidth } from "@patternfly/react-table";
import _ from "lodash";
-import type UserConsentRepresentation from "keycloak-admin/lib/defs/userConsentRepresentation";
+import type UserConsentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userConsentRepresentation";
import { CubesIcon } from "@patternfly/react-icons";
import moment from "moment";
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
diff --git a/src/user/UserForm.tsx b/src/user/UserForm.tsx
index 122500eb4e..e3db3bbfeb 100644
--- a/src/user/UserForm.tsx
+++ b/src/user/UserForm.tsx
@@ -16,12 +16,12 @@ import { useTranslation } from "react-i18next";
import { Controller, UseFormMethods } from "react-hook-form";
import { useHistory, useParams } from "react-router-dom";
import { FormAccess } from "../components/form-access/FormAccess";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import { HelpItem } from "../components/help-enabler/HelpItem";
import { useRealm } from "../context/realm-context/RealmContext";
import { useFetch, useAdminClient } from "../context/auth/AdminClient";
import moment from "moment";
-import type GroupRepresentation from "keycloak-admin/lib/defs/groupRepresentation";
+import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
import { useAlerts } from "../components/alert/Alerts";
import { emailRegexPattern } from "../util";
import { GroupPickerDialog } from "../components/group/GroupPickerDialog";
diff --git a/src/user/UserGroups.tsx b/src/user/UserGroups.tsx
index 0d86e44abd..147afab0a4 100644
--- a/src/user/UserGroups.tsx
+++ b/src/user/UserGroups.tsx
@@ -7,8 +7,8 @@ import {
} from "@patternfly/react-core";
import { QuestionCircleIcon } from "@patternfly/react-icons";
import { cellWidth } from "@patternfly/react-table";
-import type GroupRepresentation from "keycloak-admin/lib/defs/groupRepresentation";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
+import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import _ from "lodash";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
diff --git a/src/user/UsersSection.tsx b/src/user/UsersSection.tsx
index 1f975b6b42..d8676e94d5 100644
--- a/src/user/UsersSection.tsx
+++ b/src/user/UsersSection.tsx
@@ -14,7 +14,7 @@ import {
InfoCircleIcon,
WarningTriangleIcon,
} from "@patternfly/react-icons";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { Link, useHistory, useRouteMatch } from "react-router-dom";
diff --git a/src/user/UsersTabs.tsx b/src/user/UsersTabs.tsx
index 1439e6f70d..97a83b5eec 100644
--- a/src/user/UsersTabs.tsx
+++ b/src/user/UsersTabs.tsx
@@ -9,7 +9,7 @@ import { useTranslation } from "react-i18next";
import { useForm } from "react-hook-form";
import { ViewHeader } from "../components/view-header/ViewHeader";
-import type UserRepresentation from "keycloak-admin/lib/defs/userRepresentation";
+import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import { UserForm } from "./UserForm";
import { useAlerts } from "../components/alert/Alerts";
import { useAdminClient } from "../context/auth/AdminClient";
@@ -17,7 +17,7 @@ import { useHistory, useParams } from "react-router-dom";
import { KeycloakTabs } from "../components/keycloak-tabs/KeycloakTabs";
import { UserGroups } from "./UserGroups";
import { UserConsents } from "./UserConsents";
-import type GroupRepresentation from "keycloak-admin/lib/defs/groupRepresentation";
+import type GroupRepresentation from "@keycloak/keycloak-admin-client/lib/defs/groupRepresentation";
import { useRealm } from "../context/realm-context/RealmContext";
export const UsersTabs = () => {
diff --git a/src/util.ts b/src/util.ts
index ad2e9a658d..a72703647d 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -1,9 +1,9 @@
import type { IFormatter, IFormatterValueType } from "@patternfly/react-table";
import FileSaver from "file-saver";
import _ from "lodash";
-import type ClientRepresentation from "keycloak-admin/lib/defs/clientRepresentation";
-import type { ProviderRepresentation } from "keycloak-admin/lib/defs/serverInfoRepesentation";
-import type KeycloakAdminClient from "keycloak-admin";
+import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
+import type { ProviderRepresentation } from "@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation";
+import type KeycloakAdminClient from "@keycloak/keycloak-admin-client";
import { useTranslation } from "react-i18next";
export const sortProviders = (providers: {