gtsoft-snail-job-admin/src/typings/api.d.ts

43 lines
729 B
TypeScript
Raw Normal View History

2024-03-08 17:59:45 +08:00
/**
* 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;
}
}
}