diff --git a/src/typings/api.d.ts b/src/typings/api.d.ts index 5a8e2552..6b6633df 100644 --- a/src/typings/api.d.ts +++ b/src/typings/api.d.ts @@ -47,41 +47,4 @@ declare namespace Api { status: EnableStatus | null; } & T; } - - /** - * namespace Auth - * - * backend api module: "auth" - */ - namespace Auth { - interface LoginToken { - token: string; - refreshToken: string; - } - - interface UserInfo { - userId: string; - userName: string; - roles: string[]; - buttons: 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; - } - } } diff --git a/src/typings/api/auth.d.ts b/src/typings/api/auth.d.ts new file mode 100644 index 00000000..1ff174b0 --- /dev/null +++ b/src/typings/api/auth.d.ts @@ -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[]; + } + } +} diff --git a/src/typings/api/route.d.ts b/src/typings/api/route.d.ts new file mode 100644 index 00000000..edb755eb --- /dev/null +++ b/src/typings/api/route.d.ts @@ -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; + } + } +}