/* eslint-disable */ /* prettier-ignore */ // Generated by elegant-router // Read more: https://github.com/soybeanjs/elegant-router declare module "@elegant-router/types" { type ElegantConstRoute = import('@elegant-router/vue').ElegantConstRoute; /** * route layout */ export type RouteLayout = "base" | "blank"; /** * route map */ export type RouteMap = { "root": "/"; "not-found": "/:pathMatch(.*)*"; "exception": "/exception"; "exception_403": "/exception/403"; "exception_404": "/exception/404"; "exception_500": "/exception/500"; "403": "/403"; "404": "/404"; "500": "/500"; "demo": "/demo"; "demo_demo": "/demo/demo"; "demo_tree": "/demo/tree"; "home": "/home"; "iframe-page": "/iframe-page/:url"; "login": "/login/:module(pwd-login|code-login|register|reset-pwd|bind-wechat)?"; "monitor": "/monitor"; "monitor_cache": "/monitor/cache"; "monitor_logininfor": "/monitor/logininfor"; "monitor_online": "/monitor/online"; "monitor_operlog": "/monitor/operlog"; "social-callback": "/social-callback"; "system": "/system"; "system_client": "/system/client"; "system_config": "/system/config"; "system_dept": "/system/dept"; "system_dict": "/system/dict"; "system_menu": "/system/menu"; "system_notice": "/system/notice"; "system_oss": "/system/oss"; "system_oss-config": "/system/oss-config"; "system_post": "/system/post"; "system_role": "/system/role"; "system_tenant": "/system/tenant"; "system_tenant-package": "/system/tenant-package"; "system_user": "/system/user"; "tool": "/tool"; "tool_gen": "/tool/gen"; "user-center": "/user-center"; "workflow": "/workflow"; "workflow_category": "/workflow/category"; "workflow_design": "/workflow/design"; "workflow_leave": "/workflow/leave"; "workflow_process-definition": "/workflow/process-definition"; "workflow_process-instance": "/workflow/process-instance"; "workflow_spel": "/workflow/spel"; "workflow_task": "/workflow/task"; "workflow_task_all-task-waiting": "/workflow/task/all-task-waiting"; "workflow_task_my-document": "/workflow/task/my-document"; "workflow_task_task-copy": "/workflow/task/task-copy"; "workflow_task_task-finish": "/workflow/task/task-finish"; "workflow_task_task-waiting": "/workflow/task/task-waiting"; }; /** * route key */ export type RouteKey = keyof RouteMap; /** * route path */ export type RoutePath = RouteMap[RouteKey]; /** * custom route key */ export type CustomRouteKey = Extract< RouteKey, | "root" | "not-found" | "exception" | "exception_403" | "exception_404" | "exception_500" >; /** * the generated route key */ export type GeneratedRouteKey = Exclude; /** * the first level route key, which contain the layout of the route */ export type FirstLevelRouteKey = Extract< RouteKey, | "403" | "404" | "500" | "demo" | "home" | "iframe-page" | "login" | "monitor" | "social-callback" | "system" | "tool" | "user-center" | "workflow" >; /** * the custom first level route key */ export type CustomFirstLevelRouteKey = Extract< CustomRouteKey, | "root" | "not-found" | "exception" >; /** * the last level route key, which has the page file */ export type LastLevelRouteKey = Extract< RouteKey, | "403" | "404" | "500" | "iframe-page" | "login" | "social-callback" | "user-center" | "demo_demo" | "demo_tree" | "home" | "monitor_cache" | "monitor_logininfor" | "monitor_online" | "monitor_operlog" | "system_client" | "system_config" | "system_dept" | "system_dict" | "system_menu" | "system_notice" | "system_oss-config" | "system_oss" | "system_post" | "system_role" | "system_tenant-package" | "system_tenant" | "system_user" | "tool_gen" | "workflow_category" | "workflow_design" | "workflow_leave" | "workflow_process-definition" | "workflow_process-instance" | "workflow_spel" | "workflow_task_all-task-waiting" | "workflow_task_my-document" | "workflow_task_task-copy" | "workflow_task_task-finish" | "workflow_task_task-waiting" >; /** * the custom last level route key */ export type CustomLastLevelRouteKey = Extract< CustomRouteKey, | "root" | "not-found" | "exception_403" | "exception_404" | "exception_500" >; /** * the single level route key */ export type SingleLevelRouteKey = FirstLevelRouteKey & LastLevelRouteKey; /** * the custom single level route key */ export type CustomSingleLevelRouteKey = CustomFirstLevelRouteKey & CustomLastLevelRouteKey; /** * the first level route key, but not the single level */ export type FirstLevelRouteNotSingleKey = Exclude; /** * the custom first level route key, but not the single level */ export type CustomFirstLevelRouteNotSingleKey = Exclude; /** * the center level route key */ export type CenterLevelRouteKey = Exclude; /** * the custom center level route key */ export type CustomCenterLevelRouteKey = Exclude; /** * the center level route key */ type GetChildRouteKey = T extends `${K}_${infer R}` ? R extends `${string}_${string}` ? never : T : never; /** * the single level route */ type SingleLevelRoute = K extends string ? Omit & { name: K; path: RouteMap[K]; component: `layout.${RouteLayout}$view.${K}`; } : never; /** * the last level route */ type LastLevelRoute = K extends LastLevelRouteKey ? Omit & { name: K; path: RouteMap[K]; component: `view.${K}`; } : never; /** * the center level route */ type CenterLevelRoute = K extends CenterLevelRouteKey ? Omit & { name: K; path: RouteMap[K]; children: (CenterLevelRoute> | LastLevelRoute>)[]; } : never; /** * the multi level route */ type MultiLevelRoute = K extends string ? ElegantConstRoute & { name: K; path: RouteMap[K]; component: `layout.${RouteLayout}`; children: (CenterLevelRoute> | LastLevelRoute>)[]; } : never; /** * the custom first level route */ type CustomSingleLevelRoute = K extends string ? Omit & { name: K; path: RouteMap[K]; component?: `layout.${RouteLayout}$view.${LastLevelRouteKey}`; } : never; /** * the custom last level route */ type CustomLastLevelRoute = K extends CustomLastLevelRouteKey ? Omit & { name: K; path: RouteMap[K]; component?: `view.${LastLevelRouteKey}`; } : never; /** * the custom center level route */ type CustomCenterLevelRoute = K extends CustomCenterLevelRouteKey ? Omit & { name: K; path: RouteMap[K]; children: (CustomCenterLevelRoute> | CustomLastLevelRoute>)[]; } : never; /** * the custom multi level route */ type CustomMultiLevelRoute = K extends string ? ElegantConstRoute & { name: K; path: RouteMap[K]; component: `layout.${RouteLayout}`; children: (CustomCenterLevelRoute> | CustomLastLevelRoute>)[]; } : never; /** * the custom route */ type CustomRoute = CustomSingleLevelRoute | CustomMultiLevelRoute; /** * the generated route */ type GeneratedRoute = SingleLevelRoute | MultiLevelRoute; /** * the elegant route */ type ElegantRoute = GeneratedRoute | CustomRoute; }