2021-05-04 17:58:18 +00:00
|
|
|
import type { TFunction } from "i18next";
|
2021-08-26 08:39:35 +00:00
|
|
|
import type { AccessType } from "@keycloak/keycloak-admin-client/lib/defs/whoAmIRepresentation";
|
2022-08-03 12:12:07 +00:00
|
|
|
import type { ComponentType, LazyExoticComponent } from "react";
|
2021-07-21 09:20:32 +00:00
|
|
|
import type { MatchOptions } from "use-react-router-breadcrumbs";
|
2021-07-22 10:17:53 +00:00
|
|
|
import authenticationRoutes from "./authentication/routes";
|
2021-07-22 11:17:00 +00:00
|
|
|
import clientScopesRoutes from "./client-scopes/routes";
|
2021-07-21 15:08:40 +00:00
|
|
|
import clientRoutes from "./clients/routes";
|
2021-07-26 13:36:18 +00:00
|
|
|
import dashboardRoutes from "./dashboard/routes";
|
2021-07-23 14:41:42 +00:00
|
|
|
import eventRoutes from "./events/routes";
|
2021-07-26 13:40:23 +00:00
|
|
|
import groupsRoutes from "./groups/routes";
|
2021-07-26 10:43:30 +00:00
|
|
|
import identityProviders from "./identity-providers/routes";
|
2020-10-01 14:25:29 +00:00
|
|
|
import { PageNotFoundSection } from "./PageNotFoundSection";
|
2021-07-22 14:18:59 +00:00
|
|
|
import realmRoleRoutes from "./realm-roles/routes";
|
2021-07-23 16:29:10 +00:00
|
|
|
import realmSettingRoutes from "./realm-settings/routes";
|
2021-07-22 07:13:35 +00:00
|
|
|
import realmRoutes from "./realm/routes";
|
2021-07-23 10:52:08 +00:00
|
|
|
import sessionRoutes from "./sessions/routes";
|
2021-07-26 13:29:26 +00:00
|
|
|
import userFederationRoutes from "./user-federation/routes";
|
2021-07-23 10:18:28 +00:00
|
|
|
import userRoutes from "./user/routes";
|
2020-10-21 11:31:41 +00:00
|
|
|
|
2021-07-21 09:20:32 +00:00
|
|
|
export type RouteDef = {
|
|
|
|
path: string;
|
2022-08-03 12:12:07 +00:00
|
|
|
component: ComponentType | LazyExoticComponent<() => JSX.Element>;
|
2021-07-22 14:48:00 +00:00
|
|
|
breadcrumb?: (t: TFunction) => string | ComponentType<any>;
|
2021-08-09 20:20:49 +00:00
|
|
|
access: AccessType | AccessType[];
|
2021-07-21 09:20:32 +00:00
|
|
|
matchOptions?: MatchOptions;
|
2020-10-21 11:31:41 +00:00
|
|
|
};
|
|
|
|
|
2021-07-26 13:40:23 +00:00
|
|
|
const NotFoundRoute: RouteDef = {
|
|
|
|
path: "*",
|
|
|
|
component: PageNotFoundSection,
|
|
|
|
access: "anyone",
|
|
|
|
};
|
|
|
|
|
2021-07-21 09:20:32 +00:00
|
|
|
export const routes: RouteDef[] = [
|
2021-07-22 10:17:53 +00:00
|
|
|
...authenticationRoutes,
|
2021-07-21 15:08:40 +00:00
|
|
|
...clientRoutes,
|
2021-07-22 11:17:00 +00:00
|
|
|
...clientScopesRoutes,
|
2021-07-23 14:41:42 +00:00
|
|
|
...eventRoutes,
|
2021-07-26 10:43:30 +00:00
|
|
|
...identityProviders,
|
2021-07-22 14:18:59 +00:00
|
|
|
...realmRoleRoutes,
|
2021-07-22 07:13:35 +00:00
|
|
|
...realmRoutes,
|
2021-07-23 16:29:10 +00:00
|
|
|
...realmSettingRoutes,
|
2021-07-23 10:52:08 +00:00
|
|
|
...sessionRoutes,
|
2021-07-26 13:29:26 +00:00
|
|
|
...userFederationRoutes,
|
2021-07-23 10:18:28 +00:00
|
|
|
...userRoutes,
|
2021-07-26 13:40:23 +00:00
|
|
|
...groupsRoutes,
|
2022-04-28 13:36:43 +00:00
|
|
|
...dashboardRoutes,
|
2021-07-26 13:40:23 +00:00
|
|
|
NotFoundRoute,
|
2020-10-01 14:25:29 +00:00
|
|
|
];
|