Files
soybean-admin/src/typings/api.d.ts
2023-11-17 10:25:32 +08:00

40 lines
755 B
TypeScript

/**
* 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;
}
interface UserInfo {
userId: string;
userName: string;
roles: string[];
}
}
/**
* namespace Route
* @description 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;
}
}
}