43 lines
729 B
TypeScript
43 lines
729 B
TypeScript
![]() |
/**
|
||
|
* Namespace Api
|
||
|
*
|
||
|
* All backend api type
|
||
|
*/
|
||
|
declare namespace Api {
|
||
|
/**
|
||
|
* Namespace Auth
|
||
|
*
|
||
|
* Backend api module: "auth"
|
||
|
*/
|
||
|
namespace Auth {
|
||
|
interface LoginToken {
|
||
|
token: string;
|
||
|
refreshToken: string;
|
||
|
}
|
||
|
|
||
|
interface UserInfo {
|
||
|
userId: string;
|
||
|
userName: string;
|
||
|
roles: string[];
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Namespace Route
|
||
|
*
|
||
|
* Backend api module: "route"
|
||
|
*/
|
||
|
namespace Route {
|
||
|
type ElegantConstRoute = import('@elegant-router/types').ElegantConstRoute;
|
||
|
|
||
|
interface MenuRoute extends ElegantConstRoute {
|
||
|
id: string;
|
||
|
}
|
||
|
|
||
|
interface UserRoute {
|
||
|
routes: MenuRoute[];
|
||
|
home: import('@elegant-router/types').LastLevelRouteKey;
|
||
|
}
|
||
|
}
|
||
|
}
|