2023-11-17 08:45:00 +08:00
|
|
|
/**
|
|
|
|
* namespace Api
|
|
|
|
* @description all backend api type
|
|
|
|
*/
|
|
|
|
declare namespace Api {
|
|
|
|
/**
|
|
|
|
* namespace Auth
|
|
|
|
* @description backend api module: "auth"
|
|
|
|
*/
|
|
|
|
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
|
|
|
/**
|
|
|
|
* namespace Route
|
|
|
|
* @description backend api module: "route"
|
|
|
|
*/
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|