2023-11-17 08:45:00 +08:00
|
|
|
/**
|
2023-12-14 21:45:29 +08:00
|
|
|
* Namespace Api
|
|
|
|
*
|
|
|
|
* All backend api type
|
2023-11-17 08:45:00 +08:00
|
|
|
*/
|
|
|
|
declare namespace Api {
|
|
|
|
/**
|
2023-12-14 21:45:29 +08:00
|
|
|
* Namespace Auth
|
|
|
|
*
|
|
|
|
* Backend api module: "auth"
|
2023-11-17 08:45:00 +08:00
|
|
|
*/
|
|
|
|
namespace Auth {
|
|
|
|
interface LoginToken {
|
|
|
|
token: string;
|
|
|
|
refreshToken: string;
|
|
|
|
}
|
2022-03-12 17:45:37 +08:00
|
|
|
|
2023-11-17 08:45:00 +08:00
|
|
|
interface UserInfo {
|
|
|
|
userId: string;
|
|
|
|
userName: string;
|
|
|
|
roles: string[];
|
|
|
|
}
|
2022-03-12 17:45:37 +08:00
|
|
|
}
|
|
|
|
|
2023-11-17 08:45:00 +08:00
|
|
|
/**
|
2023-12-14 21:45:29 +08:00
|
|
|
* Namespace Route
|
|
|
|
*
|
|
|
|
* Backend api module: "route"
|
2023-11-17 08:45:00 +08:00
|
|
|
*/
|
|
|
|
namespace Route {
|
|
|
|
type ElegantConstRoute = import('@elegant-router/types').ElegantConstRoute;
|
|
|
|
|
|
|
|
interface MenuRoute extends ElegantConstRoute {
|
|
|
|
id: string;
|
|
|
|
}
|
2022-04-04 19:13:15 +08:00
|
|
|
|
2023-11-17 08:45:00 +08:00
|
|
|
interface UserRoute {
|
|
|
|
routes: MenuRoute[];
|
|
|
|
home: import('@elegant-router/types').LastLevelRouteKey;
|
|
|
|
}
|
2022-07-30 22:16:42 +08:00
|
|
|
}
|
|
|
|
}
|