mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-17 17:26:38 +08:00
refactor(types): move Auth and Route namespaces to separate files and clean up api.d.ts
This commit is contained in:
parent
bbadd41e0e
commit
bf9baf0d14
20
src/typings/api/auth.d.ts
vendored
Normal file
20
src/typings/api/auth.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
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[];
|
||||||
|
buttons: string[];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
19
src/typings/api/route.d.ts
vendored
Normal file
19
src/typings/api/route.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
declare namespace Api {
|
||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user