keycloak-scim/src/route-config.ts
Erik Jan de Wit 9c48bb4d90
refactor + use new composite role api (#1399)
* refactor + use new composite role api

* fixed types

* Update src/realm-roles/AssociatedRolesModal.tsx

Co-authored-by: Jon Koops <jonkoops@gmail.com>

* Update src/realm-roles/AssociatedRolesModal.tsx

Co-authored-by: Jon Koops <jonkoops@gmail.com>

* Update src/realm-roles/RealmRoleTabs.tsx

Co-authored-by: Jon Koops <jonkoops@gmail.com>

* code review comments

* removed duplicate type

* route

* Update src/realm-roles/AssociatedRolesModal.tsx

Co-authored-by: Jon Koops <jonkoops@gmail.com>

* Update src/realm-roles/routes/RealmRole.ts

Co-authored-by: Jon Koops <jonkoops@gmail.com>

* Update src/realm-roles/AssociatedRolesModal.tsx

Co-authored-by: Jon Koops <jonkoops@gmail.com>

* fix unused import

* fixed test

* fixed merge errors

Co-authored-by: Jon Koops <jonkoops@gmail.com>
2021-11-01 13:29:52 +01:00

49 lines
1.6 KiB
TypeScript

import type { TFunction } from "i18next";
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";
import clientScopesRoutes from "./client-scopes/routes";
import clientRoutes from "./clients/routes";
import dashboardRoutes from "./dashboard/routes";
import eventRoutes from "./events/routes";
import groupsRoutes from "./groups/routes";
import identityProviders from "./identity-providers/routes";
import { PageNotFoundSection } from "./PageNotFoundSection";
import realmRoleRoutes from "./realm-roles/routes";
import realmSettingRoutes from "./realm-settings/routes";
import realmRoutes from "./realm/routes";
import sessionRoutes from "./sessions/routes";
import userFederationRoutes from "./user-federation/routes";
import userRoutes from "./user/routes";
export type RouteDef = {
path: string;
component: ComponentType | React.LazyExoticComponent<() => JSX.Element>;
breadcrumb?: (t: TFunction) => string | ComponentType<any>;
access: AccessType | AccessType[];
matchOptions?: MatchOptions;
};
const NotFoundRoute: RouteDef = {
path: "*",
component: PageNotFoundSection,
access: "anyone",
};
export const routes: RouteDef[] = [
...authenticationRoutes,
...clientRoutes,
...clientScopesRoutes,
...eventRoutes,
...identityProviders,
...realmRoleRoutes,
...realmRoutes,
...realmSettingRoutes,
...sessionRoutes,
...userFederationRoutes,
...userRoutes,
...dashboardRoutes,
...groupsRoutes,
NotFoundRoute,
];