11/**
2- * Namespace Api
2+ * Namespace Api.SystemManage
33 *
4- * All backend api type
4+ * Backend api module: "systemManage"
55 */
66declare namespace Api {
7- namespace Common {
8- /** common params of paginating */
9- interface PaginatingCommonParams {
10- /** current page number */
11- current : number ;
12- /** page size */
13- size : number ;
14- /** total count */
15- total : number ;
16- }
17-
18- /** common params of paginating query list data */
19- interface PaginatingQueryRecord < T = any > extends PaginatingCommonParams {
20- records : T [ ] ;
21- }
22-
23- type CommonSearchParams = Pick < Common . PaginatingCommonParams , 'current' | 'size' > ;
24-
25- /**
26- * enable status
27- *
28- * - "1": enabled
29- * - "2": disabled
30- */
31- type EnableStatus = '1' | '2' ;
32-
33- /** common record */
34- type CommonRecord < T = any > = {
35- /** record creator */
36- createBy : string ;
37- /** record create time */
38- createTime : string ;
39- /** record id */
40- id : number ;
41- /** record status */
42- status : EnableStatus | null ;
43- /** record updater */
44- updateBy : string ;
45- /** record update time */
46- updateTime : string ;
47- } & T ;
48- }
49-
50- /**
51- * namespace Auth
52- *
53- * backend api module: "auth"
54- */
55- namespace Auth {
56- interface LoginToken {
57- refreshToken : string ;
58- token : string ;
59- }
60-
61- interface UserInfo {
62- buttons : string [ ] ;
63- roles : string [ ] ;
64- userId : string ;
65- userName : string ;
66- }
67-
68- type Info = {
69- token : LoginToken [ 'token' ] ;
70- userInfo : UserInfo ;
71- } ;
72- }
73-
74- /**
75- * namespace Route
76- *
77- * backend api module: "route"
78- */
79- namespace Route {
80- type ElegantConstRoute = import ( '@soybean-react/vite-plugin-react-router' ) . ElegantConstRoute ;
81-
82- interface MenuRoute extends ElegantConstRoute {
83- id : string ;
84- }
85-
86- interface UserRoute {
87- home : import ( '@soybean-react/vite-plugin-react-router' ) . LastLevelRouteKey ;
88- routes : string [ ] ;
89- }
90- }
91-
92- /**
93- * namespace SystemManage
94- *
95- * backend api module: "systemManage"
96- */
977 namespace SystemManage {
988 type CommonSearchParams = Pick < Common . PaginatingCommonParams , 'current' | 'size' > ;
999
@@ -121,10 +31,10 @@ declare namespace Api {
12131 /**
12232 * user gender
12333 *
124- * - "1": " male"
125- * - "2": " female"
34+ * - "1": male
35+ * - "2": female
12636 */
127- type UserGender = '1' | '2' ;
37+ type UserGender = import ( '../enums' ) . UserGenderValue ;
12838
12939 /** user */
13040 type User = Common . CommonRecord < {
@@ -157,7 +67,7 @@ declare namespace Api {
15767 * - "1": directory
15868 * - "2": menu
15969 */
160- type MenuType = '1' | '2' ;
70+ type MenuType = import ( '../enums' ) . MenuTypeValue ;
16171
16272 type MenuButton = {
16373 /**
@@ -176,7 +86,7 @@ declare namespace Api {
17686 * - "1": iconify icon
17787 * - "2": local icon
17888 */
179- type IconType = '1' | '2' ;
89+ type IconType = import ( '../enums' ) . IconTypeValue ;
18090
18191 type MenuPropsOfRoute = Pick <
18292 import ( '@soybean-react/vite-plugin-react-router' ) . RouteMeta ,
0 commit comments