ruoyi-plus-soybean/src/typings/api.d.ts

43 lines
729 B
TypeScript
Raw Normal View History

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;
}
2023-11-17 08:45:00 +08:00
interface UserInfo {
userId: string;
userName: string;
roles: string[];
}
}
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;
}
2023-11-17 08:45:00 +08:00
interface UserRoute {
routes: MenuRoute[];
home: import('@elegant-router/types').LastLevelRouteKey;
}
}
}