@liujitcn/kratos-admin-core 0.0.31 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -4
- package/dist/package/declarations/src/api/base/{config.d.ts → v1/config.d.ts} +1 -1
- package/dist/package/declarations/src/api/base/{file.d.ts → v1/file.d.ts} +3 -1
- package/dist/package/declarations/src/api/base/{language.d.ts → v1/language.d.ts} +1 -1
- package/dist/package/declarations/src/api/base/{login.d.ts → v1/login.d.ts} +2 -2
- package/dist/package/declarations/src/api/base/{mfa.d.ts → v1/mfa.d.ts} +3 -3
- package/dist/package/declarations/src/api/base/{oauth.d.ts → v1/oauth.d.ts} +1 -1
- package/dist/package/declarations/src/api/system/{auth.d.ts → admin/v1/auth.d.ts} +2 -2
- package/dist/package/declarations/src/api/system/{base_dict.d.ts → admin/v1/base_dict.d.ts} +1 -1
- package/dist/package/declarations/src/api/system/{base_tenant.d.ts → admin/v1/base_tenant.d.ts} +2 -2
- package/dist/package/declarations/src/components/ProTable/index.vue.d.ts +114 -0
- package/dist/package/declarations/src/components/TreeFilter/index.vue.d.ts +84 -76
- package/dist/package/declarations/src/components/Upload/File.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Upload/Files.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Upload/Img.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/Upload/Imgs.vue.d.ts +1 -1
- package/dist/package/declarations/src/components/WangEditor/index.vue.d.ts +2 -0
- package/dist/package/declarations/src/documentTitle.d.ts +2 -0
- package/dist/package/declarations/src/format.d.ts +1 -1
- package/dist/package/declarations/src/index.d.ts +2 -1
- package/dist/package/declarations/src/locales/generated.d.ts +68 -0
- package/dist/package/declarations/src/modules/index.d.ts +1 -3
- package/dist/package/declarations/src/request.d.ts +1 -1
- package/dist/package/declarations/src/routers/index.d.ts +1 -1
- package/dist/package/declarations/src/rpc/base/v1/login.d.ts +5 -3
- package/dist/package/declarations/src/rpc/system/admin/v1/auth.d.ts +13 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +0 -101
- package/dist/package/declarations/src/rpc/system/common/v1/common.d.ts +26 -0
- package/dist/package/declarations/src/stores/interface/index.d.ts +6 -1
- package/dist/package/declarations/src/stores/modules/user.d.ts +2 -4
- package/dist/package/declarations/src/utils/passwordStrength.d.ts +1 -12
- package/dist/package/declarations/src/utils/request.d.ts +13 -2
- package/dist/package/declarations/src/utils/utils.d.ts +4 -0
- package/dist/package/src/api/base/{config.ts → v1/config.ts} +2 -2
- package/dist/package/src/api/base/{file.ts → v1/file.ts} +20 -24
- package/dist/package/src/api/base/{language.ts → v1/language.ts} +2 -2
- package/dist/package/src/api/base/{login.ts → v1/login.ts} +3 -3
- package/dist/package/src/api/base/{mfa.ts → v1/mfa.ts} +4 -4
- package/dist/package/src/api/base/{oauth.ts → v1/oauth.ts} +2 -2
- package/dist/package/src/api/system/{auth.ts → admin/v1/auth.ts} +3 -3
- package/dist/package/src/api/system/{base_dict.ts → admin/v1/base_dict.ts} +2 -2
- package/dist/package/src/api/system/{base_tenant.ts → admin/v1/base_tenant.ts} +3 -3
- package/dist/package/src/bootstrap.ts +6 -5
- package/dist/package/src/components/CronExpression/index.vue +4 -3
- package/dist/package/src/components/Dialog/ProDialog.vue +1 -0
- package/dist/package/src/components/ImportExcel/index.vue +4 -2
- package/dist/package/src/components/MarkdownPreview/index.vue +1 -1
- package/dist/package/src/components/PasswordStrength/index.vue +1 -1
- package/dist/package/src/components/ProTable/components/TableColumn.vue +14 -6
- package/dist/package/src/components/ProTable/index.vue +3 -3
- package/dist/package/src/components/RichTextPreview/index.vue +12 -1
- package/dist/package/src/components/SelectIcon/index.vue +3 -2
- package/dist/package/src/components/Upload/File.vue +2 -2
- package/dist/package/src/components/Upload/Files.vue +2 -2
- package/dist/package/src/components/Upload/Img.vue +7 -5
- package/dist/package/src/components/Upload/Imgs.vue +6 -5
- package/dist/package/src/components/WangEditor/index.vue +10 -7
- package/dist/package/src/documentTitle.ts +8 -0
- package/dist/package/src/format.ts +1 -1
- package/dist/package/src/index.ts +2 -1
- package/dist/package/src/layouts/components/Header/components/Avatar.vue +7 -6
- package/dist/package/src/layouts/components/Header/components/InfoDialog.vue +3 -2
- package/dist/package/src/layouts/components/Header/components/PasswordDialog.vue +3 -2
- package/dist/package/src/layouts/components/Header/components/SearchMenu.vue +16 -8
- package/dist/package/src/layouts/components/LockScreen.vue +175 -52
- package/dist/package/src/layouts/components/Tabs/index.vue +12 -3
- package/dist/package/src/layouts/components/ThemeDrawer/index.scss +4 -4
- package/dist/package/src/locales/en-US.json +15 -2
- package/dist/package/src/locales/ja-JP.json +15 -2
- package/dist/package/src/locales/zh-CN.json +15 -2
- package/dist/package/src/locales/zh-TW.json +15 -2
- package/dist/package/src/modules/index.ts +2 -4
- package/dist/package/src/request.ts +3 -0
- package/dist/package/src/routers/index.ts +15 -14
- package/dist/package/src/rpc/base/v1/config.ts +1 -1
- package/dist/package/src/rpc/base/v1/file.ts +1 -1
- package/dist/package/src/rpc/base/v1/language.ts +1 -1
- package/dist/package/src/rpc/base/v1/login.ts +5 -3
- package/dist/package/src/rpc/base/v1/mfa.ts +1 -1
- package/dist/package/src/rpc/base/v1/oauth.ts +1 -1
- package/dist/package/src/rpc/base/v1/oauth_client.ts +1 -1
- package/dist/package/src/rpc/common/v1/common.ts +1 -1
- package/dist/package/src/rpc/common/v1/enum.ts +1 -1
- package/dist/package/src/rpc/common/v1/types.ts +1 -1
- package/dist/package/src/rpc/google/protobuf/empty.ts +1 -1
- package/dist/package/src/rpc/google/protobuf/wrappers.ts +1 -1
- package/dist/package/src/rpc/system/admin/v1/auth.ts +14 -1
- package/dist/package/src/rpc/system/admin/v1/base_dict.ts +1 -113
- package/dist/package/src/rpc/system/admin/v1/base_i18n.ts +1 -1
- package/dist/package/src/rpc/system/admin/v1/base_tenant.ts +1 -1
- package/dist/package/src/rpc/system/admin/v1/common.ts +1 -1
- package/dist/package/src/rpc/system/common/v1/common.ts +35 -0
- package/dist/package/src/stores/interface/index.ts +6 -1
- package/dist/package/src/stores/modules/auth.ts +1 -1
- package/dist/package/src/stores/modules/config.ts +2 -2
- package/dist/package/src/stores/modules/dict.ts +1 -1
- package/dist/package/src/stores/modules/user.ts +21 -22
- package/dist/package/src/styles/element.scss +35 -4
- package/dist/package/src/typings/global.d.ts +6 -0
- package/dist/package/src/utils/passwordCrypto.ts +169 -12
- package/dist/package/src/utils/passwordStrength.ts +7 -24
- package/dist/package/src/utils/request.ts +155 -36
- package/dist/package/src/utils/tenant.ts +1 -1
- package/dist/package/src/utils/utils.ts +25 -6
- package/dist/package/src/views/login/components/LoginForm.vue +36 -21
- package/dist/package/src/views/login/index.scss +2 -2
- package/dist/package/types/generated/auto-imports.d.ts +2 -0
- package/package.json +2 -1
- package/types/generated/auto-imports.d.ts +2 -0
- package/vite.config.ts +24 -1
|
@@ -38,6 +38,7 @@ export declare const LOCALE_MESSAGES: {
|
|
|
38
38
|
"common.validation.phone_required": string;
|
|
39
39
|
"common.title.notice": string;
|
|
40
40
|
"common.title.warning": string;
|
|
41
|
+
"common.confirm.delete": string;
|
|
41
42
|
"common.placeholder.input": string;
|
|
42
43
|
"common.placeholder.input_content": string;
|
|
43
44
|
"common.placeholder.select": string;
|
|
@@ -148,6 +149,7 @@ export declare const LOCALE_MESSAGES: {
|
|
|
148
149
|
"core.layout.home": string;
|
|
149
150
|
"core.layout.info": string;
|
|
150
151
|
"core.layout.password_change": string;
|
|
152
|
+
"core.layout.password_change_required": string;
|
|
151
153
|
"core.layout.unnamed_menu": string;
|
|
152
154
|
"core.layout.lock_screen": string;
|
|
153
155
|
"core.layout.lock_screen_action": string;
|
|
@@ -204,6 +206,13 @@ export declare const LOCALE_MESSAGES: {
|
|
|
204
206
|
"core.oauth.unknown": string;
|
|
205
207
|
"core.password.error": string;
|
|
206
208
|
"core.password.crypto_unsupported": string;
|
|
209
|
+
"core.password.crypto_secure_context": string;
|
|
210
|
+
"core.password.base64_decode_unsupported": string;
|
|
211
|
+
"core.password.base64_encode_unsupported": string;
|
|
212
|
+
"core.password.encrypt_failed": string;
|
|
213
|
+
"core.password.password_too_long": string;
|
|
214
|
+
"core.password.public_key_invalid": string;
|
|
215
|
+
"core.password.random_failed": string;
|
|
207
216
|
"core.password.required": string;
|
|
208
217
|
"core.password.verify_title": string;
|
|
209
218
|
"core.password.verify_label": string;
|
|
@@ -296,11 +305,15 @@ export declare const LOCALE_MESSAGES: {
|
|
|
296
305
|
"common.dialog.resource_field": string;
|
|
297
306
|
"common.dialog.status_change": string;
|
|
298
307
|
"common.field.created_at": string;
|
|
308
|
+
"common.field.department": string;
|
|
309
|
+
"common.field.post": string;
|
|
299
310
|
"common.field.remark": string;
|
|
311
|
+
"common.field.role": string;
|
|
300
312
|
"common.field.sort": string;
|
|
301
313
|
"common.field.status": string;
|
|
302
314
|
"common.field.tenant": string;
|
|
303
315
|
"common.field.updated_at": string;
|
|
316
|
+
"common.field.user": string;
|
|
304
317
|
"common.message.create_success": string;
|
|
305
318
|
"common.message.delete_success": string;
|
|
306
319
|
"common.message.load_children_failed": string;
|
|
@@ -360,6 +373,7 @@ export declare const LOCALE_MESSAGES: {
|
|
|
360
373
|
"common.validation.phone_required": string;
|
|
361
374
|
"common.title.notice": string;
|
|
362
375
|
"common.title.warning": string;
|
|
376
|
+
"common.confirm.delete": string;
|
|
363
377
|
"common.placeholder.input": string;
|
|
364
378
|
"common.placeholder.input_content": string;
|
|
365
379
|
"common.placeholder.select": string;
|
|
@@ -470,6 +484,7 @@ export declare const LOCALE_MESSAGES: {
|
|
|
470
484
|
"core.layout.home": string;
|
|
471
485
|
"core.layout.info": string;
|
|
472
486
|
"core.layout.password_change": string;
|
|
487
|
+
"core.layout.password_change_required": string;
|
|
473
488
|
"core.layout.unnamed_menu": string;
|
|
474
489
|
"core.layout.lock_screen": string;
|
|
475
490
|
"core.layout.lock_screen_action": string;
|
|
@@ -526,6 +541,13 @@ export declare const LOCALE_MESSAGES: {
|
|
|
526
541
|
"core.oauth.unknown": string;
|
|
527
542
|
"core.password.error": string;
|
|
528
543
|
"core.password.crypto_unsupported": string;
|
|
544
|
+
"core.password.crypto_secure_context": string;
|
|
545
|
+
"core.password.base64_decode_unsupported": string;
|
|
546
|
+
"core.password.base64_encode_unsupported": string;
|
|
547
|
+
"core.password.encrypt_failed": string;
|
|
548
|
+
"core.password.password_too_long": string;
|
|
549
|
+
"core.password.public_key_invalid": string;
|
|
550
|
+
"core.password.random_failed": string;
|
|
529
551
|
"core.password.required": string;
|
|
530
552
|
"core.password.verify_title": string;
|
|
531
553
|
"core.password.verify_label": string;
|
|
@@ -618,11 +640,15 @@ export declare const LOCALE_MESSAGES: {
|
|
|
618
640
|
"common.dialog.resource_field": string;
|
|
619
641
|
"common.dialog.status_change": string;
|
|
620
642
|
"common.field.created_at": string;
|
|
643
|
+
"common.field.department": string;
|
|
644
|
+
"common.field.post": string;
|
|
621
645
|
"common.field.remark": string;
|
|
646
|
+
"common.field.role": string;
|
|
622
647
|
"common.field.sort": string;
|
|
623
648
|
"common.field.status": string;
|
|
624
649
|
"common.field.tenant": string;
|
|
625
650
|
"common.field.updated_at": string;
|
|
651
|
+
"common.field.user": string;
|
|
626
652
|
"common.message.create_success": string;
|
|
627
653
|
"common.message.delete_success": string;
|
|
628
654
|
"common.message.load_children_failed": string;
|
|
@@ -682,6 +708,7 @@ export declare const LOCALE_MESSAGES: {
|
|
|
682
708
|
"common.validation.phone_required": string;
|
|
683
709
|
"common.title.notice": string;
|
|
684
710
|
"common.title.warning": string;
|
|
711
|
+
"common.confirm.delete": string;
|
|
685
712
|
"common.placeholder.input": string;
|
|
686
713
|
"common.placeholder.input_content": string;
|
|
687
714
|
"common.placeholder.select": string;
|
|
@@ -811,6 +838,7 @@ export declare const LOCALE_MESSAGES: {
|
|
|
811
838
|
"core.layout.home": string;
|
|
812
839
|
"core.layout.info": string;
|
|
813
840
|
"core.layout.password_change": string;
|
|
841
|
+
"core.layout.password_change_required": string;
|
|
814
842
|
"core.layout.unnamed_menu": string;
|
|
815
843
|
"core.layout.lock_screen": string;
|
|
816
844
|
"core.layout.lock_screen_action": string;
|
|
@@ -848,6 +876,13 @@ export declare const LOCALE_MESSAGES: {
|
|
|
848
876
|
"core.oauth.unknown": string;
|
|
849
877
|
"core.password.error": string;
|
|
850
878
|
"core.password.crypto_unsupported": string;
|
|
879
|
+
"core.password.crypto_secure_context": string;
|
|
880
|
+
"core.password.base64_decode_unsupported": string;
|
|
881
|
+
"core.password.base64_encode_unsupported": string;
|
|
882
|
+
"core.password.encrypt_failed": string;
|
|
883
|
+
"core.password.password_too_long": string;
|
|
884
|
+
"core.password.public_key_invalid": string;
|
|
885
|
+
"core.password.random_failed": string;
|
|
851
886
|
"core.password.required": string;
|
|
852
887
|
"core.password.verify_title": string;
|
|
853
888
|
"core.password.verify_label": string;
|
|
@@ -940,11 +975,15 @@ export declare const LOCALE_MESSAGES: {
|
|
|
940
975
|
"common.dialog.resource_field": string;
|
|
941
976
|
"common.dialog.status_change": string;
|
|
942
977
|
"common.field.created_at": string;
|
|
978
|
+
"common.field.department": string;
|
|
979
|
+
"common.field.post": string;
|
|
943
980
|
"common.field.remark": string;
|
|
981
|
+
"common.field.role": string;
|
|
944
982
|
"common.field.sort": string;
|
|
945
983
|
"common.field.status": string;
|
|
946
984
|
"common.field.tenant": string;
|
|
947
985
|
"common.field.updated_at": string;
|
|
986
|
+
"common.field.user": string;
|
|
948
987
|
"common.message.create_success": string;
|
|
949
988
|
"common.message.delete_success": string;
|
|
950
989
|
"common.message.load_children_failed": string;
|
|
@@ -1004,6 +1043,7 @@ export declare const LOCALE_MESSAGES: {
|
|
|
1004
1043
|
"common.validation.phone_required": string;
|
|
1005
1044
|
"common.title.notice": string;
|
|
1006
1045
|
"common.title.warning": string;
|
|
1046
|
+
"common.confirm.delete": string;
|
|
1007
1047
|
"common.placeholder.input": string;
|
|
1008
1048
|
"common.placeholder.input_content": string;
|
|
1009
1049
|
"common.placeholder.select": string;
|
|
@@ -1133,6 +1173,7 @@ export declare const LOCALE_MESSAGES: {
|
|
|
1133
1173
|
"core.layout.home": string;
|
|
1134
1174
|
"core.layout.info": string;
|
|
1135
1175
|
"core.layout.password_change": string;
|
|
1176
|
+
"core.layout.password_change_required": string;
|
|
1136
1177
|
"core.layout.unnamed_menu": string;
|
|
1137
1178
|
"core.layout.lock_screen": string;
|
|
1138
1179
|
"core.layout.lock_screen_action": string;
|
|
@@ -1170,6 +1211,13 @@ export declare const LOCALE_MESSAGES: {
|
|
|
1170
1211
|
"core.oauth.unknown": string;
|
|
1171
1212
|
"core.password.error": string;
|
|
1172
1213
|
"core.password.crypto_unsupported": string;
|
|
1214
|
+
"core.password.crypto_secure_context": string;
|
|
1215
|
+
"core.password.base64_decode_unsupported": string;
|
|
1216
|
+
"core.password.base64_encode_unsupported": string;
|
|
1217
|
+
"core.password.encrypt_failed": string;
|
|
1218
|
+
"core.password.password_too_long": string;
|
|
1219
|
+
"core.password.public_key_invalid": string;
|
|
1220
|
+
"core.password.random_failed": string;
|
|
1173
1221
|
"core.password.required": string;
|
|
1174
1222
|
"core.password.verify_title": string;
|
|
1175
1223
|
"core.password.verify_label": string;
|
|
@@ -1262,11 +1310,15 @@ export declare const LOCALE_MESSAGES: {
|
|
|
1262
1310
|
"common.dialog.resource_field": string;
|
|
1263
1311
|
"common.dialog.status_change": string;
|
|
1264
1312
|
"common.field.created_at": string;
|
|
1313
|
+
"common.field.department": string;
|
|
1314
|
+
"common.field.post": string;
|
|
1265
1315
|
"common.field.remark": string;
|
|
1316
|
+
"common.field.role": string;
|
|
1266
1317
|
"common.field.sort": string;
|
|
1267
1318
|
"common.field.status": string;
|
|
1268
1319
|
"common.field.tenant": string;
|
|
1269
1320
|
"common.field.updated_at": string;
|
|
1321
|
+
"common.field.user": string;
|
|
1270
1322
|
"common.message.create_success": string;
|
|
1271
1323
|
"common.message.delete_success": string;
|
|
1272
1324
|
"common.message.load_children_failed": string;
|
|
@@ -1324,6 +1376,7 @@ export declare const ELEMENT_LOCALES: {
|
|
|
1324
1376
|
confirm: string;
|
|
1325
1377
|
dateTablePrompt: string;
|
|
1326
1378
|
monthTablePrompt: string;
|
|
1379
|
+
quarterTablePrompt: string;
|
|
1327
1380
|
yearTablePrompt: string;
|
|
1328
1381
|
selectedDate: string;
|
|
1329
1382
|
selectDate: string;
|
|
@@ -1382,6 +1435,9 @@ export declare const ELEMENT_LOCALES: {
|
|
|
1382
1435
|
dec: string;
|
|
1383
1436
|
};
|
|
1384
1437
|
};
|
|
1438
|
+
input: {
|
|
1439
|
+
characters: string;
|
|
1440
|
+
};
|
|
1385
1441
|
inputNumber: {
|
|
1386
1442
|
decrease: string;
|
|
1387
1443
|
increase: string;
|
|
@@ -1522,6 +1578,7 @@ export declare const ELEMENT_LOCALES: {
|
|
|
1522
1578
|
confirm: string;
|
|
1523
1579
|
dateTablePrompt: string;
|
|
1524
1580
|
monthTablePrompt: string;
|
|
1581
|
+
quarterTablePrompt: string;
|
|
1525
1582
|
yearTablePrompt: string;
|
|
1526
1583
|
selectedDate: string;
|
|
1527
1584
|
selectDate: string;
|
|
@@ -1580,6 +1637,9 @@ export declare const ELEMENT_LOCALES: {
|
|
|
1580
1637
|
dec: string;
|
|
1581
1638
|
};
|
|
1582
1639
|
};
|
|
1640
|
+
input: {
|
|
1641
|
+
characters: string;
|
|
1642
|
+
};
|
|
1583
1643
|
inputNumber: {
|
|
1584
1644
|
decrease: string;
|
|
1585
1645
|
increase: string;
|
|
@@ -1720,6 +1780,7 @@ export declare const ELEMENT_LOCALES: {
|
|
|
1720
1780
|
confirm: string;
|
|
1721
1781
|
dateTablePrompt: string;
|
|
1722
1782
|
monthTablePrompt: string;
|
|
1783
|
+
quarterTablePrompt: string;
|
|
1723
1784
|
yearTablePrompt: string;
|
|
1724
1785
|
selectedDate: string;
|
|
1725
1786
|
selectDate: string;
|
|
@@ -1778,6 +1839,9 @@ export declare const ELEMENT_LOCALES: {
|
|
|
1778
1839
|
dec: string;
|
|
1779
1840
|
};
|
|
1780
1841
|
};
|
|
1842
|
+
input: {
|
|
1843
|
+
characters: string;
|
|
1844
|
+
};
|
|
1781
1845
|
inputNumber: {
|
|
1782
1846
|
decrease: string;
|
|
1783
1847
|
increase: string;
|
|
@@ -1918,6 +1982,7 @@ export declare const ELEMENT_LOCALES: {
|
|
|
1918
1982
|
confirm: string;
|
|
1919
1983
|
dateTablePrompt: string;
|
|
1920
1984
|
monthTablePrompt: string;
|
|
1985
|
+
quarterTablePrompt: string;
|
|
1921
1986
|
yearTablePrompt: string;
|
|
1922
1987
|
selectedDate: string;
|
|
1923
1988
|
selectDate: string;
|
|
@@ -1976,6 +2041,9 @@ export declare const ELEMENT_LOCALES: {
|
|
|
1976
2041
|
dec: string;
|
|
1977
2042
|
};
|
|
1978
2043
|
};
|
|
2044
|
+
input: {
|
|
2045
|
+
characters: string;
|
|
2046
|
+
};
|
|
1979
2047
|
inputNumber: {
|
|
1980
2048
|
decrease: string;
|
|
1981
2049
|
increase: string;
|
|
@@ -37,9 +37,7 @@ export interface AdminUserMenuAction {
|
|
|
37
37
|
/** 操作唯一名称。 */
|
|
38
38
|
name: string;
|
|
39
39
|
/** 操作显示名称对应的稳定语言键。 */
|
|
40
|
-
labelKey
|
|
41
|
-
/** 兼容未迁移模块的静态显示名称。 */
|
|
42
|
-
label?: string;
|
|
40
|
+
labelKey: string;
|
|
43
41
|
/** 对应后端动态菜单名称,菜单不存在时不显示操作。 */
|
|
44
42
|
menuName: string;
|
|
45
43
|
/** 操作图标。 */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default } from "./utils/request";
|
|
2
|
-
export { ensureAccessToken, getRequestAccessToken, handleAuthExpired, hasValidAccessToken, requestBaseURL } from "./utils/request";
|
|
2
|
+
export { ensureAccessToken, getRequestAccessToken, handlePasswordChangeRequired, handleAuthExpired, hasValidAccessToken, clearPasswordChangeRequired, passwordChangeState, requestBaseURL } from "./utils/request";
|
|
3
3
|
export { getLocaleRequestHeaders } from "./locales";
|
|
@@ -13,7 +13,9 @@ export declare enum PasswordCryptoScene {
|
|
|
13
13
|
/** PASSWORD_CRYPTO_SCENE_UPDATE_USER_PASSWORD - 个人修改密码加密场景。 */
|
|
14
14
|
PASSWORD_CRYPTO_SCENE_UPDATE_USER_PASSWORD = 4,
|
|
15
15
|
/** PASSWORD_CRYPTO_SCENE_MFA - 多因素认证敏感操作场景。 */
|
|
16
|
-
PASSWORD_CRYPTO_SCENE_MFA = 5
|
|
16
|
+
PASSWORD_CRYPTO_SCENE_MFA = 5,
|
|
17
|
+
/** PASSWORD_CRYPTO_SCENE_CONFIGURE_PASSWORD_POLICY - 密码策略初始化密码配置场景。 */
|
|
18
|
+
PASSWORD_CRYPTO_SCENE_CONFIGURE_PASSWORD_POLICY = 6
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* LoginStatus 表示登录请求当前所处的认证阶段。
|
|
@@ -89,7 +91,7 @@ export interface RefreshTokenRequest {
|
|
|
89
91
|
export interface RefreshTokenResponse {
|
|
90
92
|
/** 访问令牌,必选项。 */
|
|
91
93
|
access_token: string;
|
|
92
|
-
/**
|
|
94
|
+
/** 更新令牌;管理端 Cookie-only 请求不在响应体返回,应用端请求可返回。 */
|
|
93
95
|
refresh_token: string;
|
|
94
96
|
/** 令牌类型,该值大小写不敏感,必选项,可以是bearer类型或mac类型。 */
|
|
95
97
|
token_type: string;
|
|
@@ -113,7 +115,7 @@ export interface LoginRequest {
|
|
|
113
115
|
export interface LoginResponse {
|
|
114
116
|
/** 访问令牌,必选项。 */
|
|
115
117
|
access_token: string;
|
|
116
|
-
/**
|
|
118
|
+
/** 更新令牌;管理端 Cookie-only 请求不在响应体返回,应用端请求可返回。 */
|
|
117
119
|
refresh_token: string;
|
|
118
120
|
/** 令牌类型,该值大小写不敏感,必选项,可以是bearer类型或mac类型。 */
|
|
119
121
|
token_type: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PasswordCrypto, StringValues } from "../../../common/v1/types";
|
|
2
2
|
import type { Empty } from "../../../google/protobuf/empty";
|
|
3
|
+
import type { BaseUserIDType } from "../../common/v1/common";
|
|
3
4
|
import type { BaseMenuType } from "./common";
|
|
4
5
|
/** 登录用户菜单树查询参数 */
|
|
5
6
|
export interface TreeUserMenuRequest {
|
|
@@ -23,6 +24,12 @@ export interface UserInfoForm {
|
|
|
23
24
|
nick_name: string;
|
|
24
25
|
/** 手机号 */
|
|
25
26
|
phone: string;
|
|
27
|
+
/** 邮箱 */
|
|
28
|
+
email: string;
|
|
29
|
+
/** 证件类型:枚举【BaseUserIDType】 */
|
|
30
|
+
id_type: BaseUserIDType;
|
|
31
|
+
/** 证件号 */
|
|
32
|
+
id_code: string;
|
|
26
33
|
/** 头像 */
|
|
27
34
|
avatar: string;
|
|
28
35
|
/** 角色编号 */
|
|
@@ -51,6 +58,12 @@ export interface UserProfileForm {
|
|
|
51
58
|
gender: number;
|
|
52
59
|
/** 手机号 */
|
|
53
60
|
phone: string;
|
|
61
|
+
/** 邮箱 */
|
|
62
|
+
email: string;
|
|
63
|
+
/** 证件类型:枚举【BaseUserIDType】 */
|
|
64
|
+
id_type: BaseUserIDType;
|
|
65
|
+
/** 证件号 */
|
|
66
|
+
id_code: string;
|
|
54
67
|
/** 角色名 */
|
|
55
68
|
role_name: string;
|
|
56
69
|
/** 部门名 */
|
|
@@ -47,26 +47,6 @@ export interface PageBaseDictResponse {
|
|
|
47
47
|
/** 总数 */
|
|
48
48
|
total: number;
|
|
49
49
|
}
|
|
50
|
-
/** 字典属性分页查询条件 */
|
|
51
|
-
export interface PageBaseDictItemRequest {
|
|
52
|
-
/** 字典ID */
|
|
53
|
-
dict_id: number;
|
|
54
|
-
/** 字典属性名称 */
|
|
55
|
-
label: string;
|
|
56
|
-
/** 状态 */
|
|
57
|
-
status?: Status | undefined;
|
|
58
|
-
/** 当前页码 */
|
|
59
|
-
page_num: number;
|
|
60
|
-
/** 每一页的行数 */
|
|
61
|
-
page_size: number;
|
|
62
|
-
}
|
|
63
|
-
/** 字典属性分页响应 */
|
|
64
|
-
export interface PageBaseDictItemResponse {
|
|
65
|
-
/** 分页数据 */
|
|
66
|
-
base_dict_items: BaseDictItem[];
|
|
67
|
-
/** 总数 */
|
|
68
|
-
total: number;
|
|
69
|
-
}
|
|
70
50
|
/** 查询字典请求参数 */
|
|
71
51
|
export interface GetBaseDictRequest {
|
|
72
52
|
/** 字典ID */
|
|
@@ -85,67 +65,21 @@ export interface BaseDictForm {
|
|
|
85
65
|
/** 状态 */
|
|
86
66
|
status: Status;
|
|
87
67
|
}
|
|
88
|
-
/** 查询字典属性请求参数 */
|
|
89
|
-
export interface GetBaseDictItemRequest {
|
|
90
|
-
/** 字典属性ID */
|
|
91
|
-
id: number;
|
|
92
|
-
}
|
|
93
|
-
/** 字典属性表单 */
|
|
94
|
-
export interface BaseDictItemForm {
|
|
95
|
-
/** 字典项ID */
|
|
96
|
-
id: number;
|
|
97
|
-
/** 字典ID */
|
|
98
|
-
dict_id: number;
|
|
99
|
-
/** 字典项值 */
|
|
100
|
-
value: string;
|
|
101
|
-
/** 字典项标签 */
|
|
102
|
-
label: string;
|
|
103
|
-
/** 标签类型,用于前端样式展示(如success、warning等) */
|
|
104
|
-
tag_type: string;
|
|
105
|
-
/** 排序 */
|
|
106
|
-
sort: number;
|
|
107
|
-
/** 非主语言翻译 */
|
|
108
|
-
i18ns: BaseI18n[];
|
|
109
|
-
/** 状态 */
|
|
110
|
-
status: Status;
|
|
111
|
-
}
|
|
112
68
|
/** 创建字典请求参数 */
|
|
113
69
|
export interface CreateBaseDictRequest {
|
|
114
70
|
/** 字典表单 */
|
|
115
71
|
base_dict: BaseDictForm | undefined;
|
|
116
72
|
}
|
|
117
|
-
/** 创建字典属性请求参数 */
|
|
118
|
-
export interface CreateBaseDictItemRequest {
|
|
119
|
-
/** 字典属性表单 */
|
|
120
|
-
base_dict_item: BaseDictItemForm | undefined;
|
|
121
|
-
}
|
|
122
73
|
/** 更新字典请求参数 */
|
|
123
74
|
export interface UpdateBaseDictRequest {
|
|
124
75
|
/** 字典表单 */
|
|
125
76
|
base_dict: BaseDictForm | undefined;
|
|
126
77
|
}
|
|
127
|
-
/** 更新字典属性请求参数 */
|
|
128
|
-
export interface UpdateBaseDictItemRequest {
|
|
129
|
-
/** 字典属性表单 */
|
|
130
|
-
base_dict_item: BaseDictItemForm | undefined;
|
|
131
|
-
}
|
|
132
78
|
/** 删除字典请求参数 */
|
|
133
79
|
export interface DeleteBaseDictRequest {
|
|
134
80
|
/** 字典ID列表 */
|
|
135
81
|
id: string;
|
|
136
82
|
}
|
|
137
|
-
/** 删除字典属性请求参数 */
|
|
138
|
-
export interface DeleteBaseDictItemRequest {
|
|
139
|
-
/** 字典属性ID列表 */
|
|
140
|
-
id: string;
|
|
141
|
-
}
|
|
142
|
-
/** 设置字典属性状态请求参数 */
|
|
143
|
-
export interface SetBaseDictItemStatusRequest {
|
|
144
|
-
/** 字典属性ID */
|
|
145
|
-
id: number;
|
|
146
|
-
/** 状态 */
|
|
147
|
-
status: number;
|
|
148
|
-
}
|
|
149
83
|
/** 设置字典状态请求参数 */
|
|
150
84
|
export interface SetBaseDictStatusRequest {
|
|
151
85
|
/** 字典ID */
|
|
@@ -170,55 +104,20 @@ export interface BaseDict {
|
|
|
170
104
|
/** 非主语言翻译 */
|
|
171
105
|
i18ns: BaseI18n[];
|
|
172
106
|
}
|
|
173
|
-
/** 字典项 */
|
|
174
|
-
export interface BaseDictItem {
|
|
175
|
-
/** 字典项ID */
|
|
176
|
-
id: number;
|
|
177
|
-
/** 字典ID */
|
|
178
|
-
dict_id: number;
|
|
179
|
-
/** 字典项值 */
|
|
180
|
-
value: string;
|
|
181
|
-
/** 字典项标签 */
|
|
182
|
-
label: string;
|
|
183
|
-
/** 标签类型,用于前端样式展示(如success、warning等) */
|
|
184
|
-
tag_type: string;
|
|
185
|
-
/** 排序 */
|
|
186
|
-
sort: number;
|
|
187
|
-
/** 状态 */
|
|
188
|
-
status: Status;
|
|
189
|
-
/** 创建时间 */
|
|
190
|
-
created_at: string;
|
|
191
|
-
/** 更新时间 */
|
|
192
|
-
updated_at: string;
|
|
193
|
-
/** 非主语言翻译 */
|
|
194
|
-
i18ns: BaseI18n[];
|
|
195
|
-
}
|
|
196
107
|
/** Admin字典服务 */
|
|
197
108
|
export interface BaseDictService {
|
|
198
109
|
/** 查询字典列表 */
|
|
199
110
|
OptionBaseDict(request: OptionBaseDictRequest): Promise<OptionBaseDictResponse>;
|
|
200
111
|
/** 查询字典分页列表 */
|
|
201
112
|
PageBaseDict(request: PageBaseDictRequest): Promise<PageBaseDictResponse>;
|
|
202
|
-
/** 查询字典属性分页列表 */
|
|
203
|
-
PageBaseDictItem(request: PageBaseDictItemRequest): Promise<PageBaseDictItemResponse>;
|
|
204
113
|
/** 查询字典 */
|
|
205
114
|
GetBaseDict(request: GetBaseDictRequest): Promise<BaseDictForm>;
|
|
206
|
-
/** 查询字典属性 */
|
|
207
|
-
GetBaseDictItem(request: GetBaseDictItemRequest): Promise<BaseDictItemForm>;
|
|
208
115
|
/** 创建字典 */
|
|
209
116
|
CreateBaseDict(request: CreateBaseDictRequest): Promise<Empty>;
|
|
210
|
-
/** 创建字典属性 */
|
|
211
|
-
CreateBaseDictItem(request: CreateBaseDictItemRequest): Promise<Empty>;
|
|
212
117
|
/** 更新字典 */
|
|
213
118
|
UpdateBaseDict(request: UpdateBaseDictRequest): Promise<Empty>;
|
|
214
|
-
/** 更新字典属性 */
|
|
215
|
-
UpdateBaseDictItem(request: UpdateBaseDictItemRequest): Promise<Empty>;
|
|
216
119
|
/** 删除字典 */
|
|
217
120
|
DeleteBaseDict(request: DeleteBaseDictRequest): Promise<Empty>;
|
|
218
|
-
/** 删除字典属性 */
|
|
219
|
-
DeleteBaseDictItem(request: DeleteBaseDictItemRequest): Promise<Empty>;
|
|
220
|
-
/** 设置状态 */
|
|
221
|
-
SetBaseDictItemStatus(request: SetBaseDictItemStatusRequest): Promise<Empty>;
|
|
222
121
|
/** 设置状态 */
|
|
223
122
|
SetBaseDictStatus(request: SetBaseDictStatusRequest): Promise<Empty>;
|
|
224
123
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** 系统公共用户相关枚举。 */
|
|
2
|
+
export declare enum BaseUserIDType {
|
|
3
|
+
/** BASE_USER_ID_TYPE_UNSPECIFIED - 未指定证件类型。 */
|
|
4
|
+
BASE_USER_ID_TYPE_UNSPECIFIED = 0,
|
|
5
|
+
/** BASE_USER_ID_TYPE_ID_CARD - 居民身份证。 */
|
|
6
|
+
BASE_USER_ID_TYPE_ID_CARD = 1,
|
|
7
|
+
/** BASE_USER_ID_TYPE_PASSPORT - 护照。 */
|
|
8
|
+
BASE_USER_ID_TYPE_PASSPORT = 2,
|
|
9
|
+
/** BASE_USER_ID_TYPE_HK_MACAO_PERMIT - 港澳居民来往内地通行证。 */
|
|
10
|
+
BASE_USER_ID_TYPE_HK_MACAO_PERMIT = 3,
|
|
11
|
+
/** BASE_USER_ID_TYPE_TAIWAN_PERMIT - 台湾居民来往大陆通行证。 */
|
|
12
|
+
BASE_USER_ID_TYPE_TAIWAN_PERMIT = 4,
|
|
13
|
+
/** BASE_USER_ID_TYPE_FOREIGN_PERMANENT_RESIDENCE - 外国人永久居留身份证。 */
|
|
14
|
+
BASE_USER_ID_TYPE_FOREIGN_PERMANENT_RESIDENCE = 5,
|
|
15
|
+
/** BASE_USER_ID_TYPE_OTHER - 其他证件。 */
|
|
16
|
+
BASE_USER_ID_TYPE_OTHER = 6
|
|
17
|
+
}
|
|
18
|
+
/** 用户密码修改状态。 */
|
|
19
|
+
export declare enum BaseUserPasswordChangeStatus {
|
|
20
|
+
/** BASE_USER_PASSWORD_CHANGE_STATUS_UNSPECIFIED - 未指定密码修改状态。 */
|
|
21
|
+
BASE_USER_PASSWORD_CHANGE_STATUS_UNSPECIFIED = 0,
|
|
22
|
+
/** BASE_USER_PASSWORD_CHANGE_STATUS_REQUIRED - 当前必须修改密码。 */
|
|
23
|
+
BASE_USER_PASSWORD_CHANGE_STATUS_REQUIRED = 1,
|
|
24
|
+
/** BASE_USER_PASSWORD_CHANGE_STATUS_NOT_REQUIRED - 当前无需修改密码。 */
|
|
25
|
+
BASE_USER_PASSWORD_CHANGE_STATUS_NOT_REQUIRED = 2
|
|
26
|
+
}
|
|
@@ -47,9 +47,14 @@ export interface GlobalState {
|
|
|
47
47
|
/** 当前登录用户认证状态。 */
|
|
48
48
|
export interface UserState {
|
|
49
49
|
token: string;
|
|
50
|
-
refreshToken: string;
|
|
51
50
|
tokenType: string;
|
|
52
51
|
tokenExpiresAt: number;
|
|
52
|
+
/** 是否正在执行退出登录,阻止后台请求刷新令牌。 */
|
|
53
|
+
isLoggingOut: boolean;
|
|
54
|
+
/** 认证状态版本,用于丢弃退出期间完成的旧刷新请求。 */
|
|
55
|
+
authVersion: number;
|
|
56
|
+
/** 当前认证是否已被本地显式清理。 */
|
|
57
|
+
authInvalidated: boolean;
|
|
53
58
|
userInfo: UserInfoForm;
|
|
54
59
|
}
|
|
55
60
|
/** 当前管理端锁屏状态。 */
|
|
@@ -5,8 +5,6 @@ import { UserState } from "../../stores/interface";
|
|
|
5
5
|
export declare const useUserStore: import("pinia").StoreDefinition<"admin-user", import("pinia").StateTree, {}, {
|
|
6
6
|
/** 设置访问令牌 */
|
|
7
7
|
setToken(token: string): void;
|
|
8
|
-
/** 设置刷新令牌 */
|
|
9
|
-
setRefreshToken(refreshToken: string): void;
|
|
10
8
|
/** 设置令牌类型 */
|
|
11
9
|
setTokenType(tokenType: string): void;
|
|
12
10
|
/** 设置令牌过期时间戳 */
|
|
@@ -14,14 +12,14 @@ export declare const useUserStore: import("pinia").StoreDefinition<"admin-user",
|
|
|
14
12
|
/** 设置用户信息 */
|
|
15
13
|
setUserInfo(userInfo: UserState["userInfo"]): void;
|
|
16
14
|
/** 根据接口返回统一更新令牌信息 */
|
|
17
|
-
updateTokenAuth(accessToken: string,
|
|
15
|
+
updateTokenAuth(accessToken: string, tokenType: string, expiresIn?: number): void;
|
|
18
16
|
/** 判断当前访问令牌是否仍然可用 */
|
|
19
17
|
isAuthenticated(): boolean;
|
|
20
18
|
/** 登录 */
|
|
21
19
|
login(loginRequest: LoginRequest): Promise<LoginResponse>;
|
|
22
20
|
/** 校验登录阶段的多因素认证并保存正式令牌。 */
|
|
23
21
|
verifyMfa(request: VerifyMfaRequest): Promise<LoginResponse>;
|
|
24
|
-
/**
|
|
22
|
+
/** 通过 HttpOnly Cookie 刷新认证令牌。 */
|
|
25
23
|
refreshAccessToken(): Promise<import("../../rpc/base/v1/login").RefreshTokenResponse>;
|
|
26
24
|
/** 获取用户信息 */
|
|
27
25
|
getUserInfo(): Promise<UserInfoForm>;
|
|
@@ -8,22 +8,11 @@ export interface PasswordStrengthResult {
|
|
|
8
8
|
strengthScore: number;
|
|
9
9
|
/** 强度等级。 */
|
|
10
10
|
level: PasswordStrengthLevel;
|
|
11
|
-
/** 是否达到允许提交的最高强度。 */
|
|
12
|
-
isValid: boolean;
|
|
13
11
|
}
|
|
14
12
|
/**
|
|
15
|
-
*
|
|
13
|
+
* 计算密码强度结果,供表单展示使用;最终规则由服务端密码策略校验。
|
|
16
14
|
*
|
|
17
15
|
* @param password 当前密码
|
|
18
16
|
* @returns 密码强度分析结果
|
|
19
17
|
*/
|
|
20
18
|
export declare function getPasswordStrength(password?: string): PasswordStrengthResult;
|
|
21
|
-
/**
|
|
22
|
-
* 校验密码是否达到最高强度,便于表单规则直接复用。
|
|
23
|
-
*
|
|
24
|
-
* @param password 当前密码
|
|
25
|
-
* @returns 校验结果
|
|
26
|
-
*/
|
|
27
|
-
export declare function validatePasswordStrengthValue(password?: string): {
|
|
28
|
-
valid: boolean;
|
|
29
|
-
};
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import { type AxiosRequestConfig } from "axios";
|
|
1
2
|
export declare const requestBaseURL: string;
|
|
2
|
-
|
|
3
|
+
/** 强制改密弹窗状态。 */
|
|
4
|
+
export declare const passwordChangeState: {
|
|
5
|
+
required: boolean;
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
/** 处理强制改密响应,避免并发请求重复提示并打开全局改密弹窗。 */
|
|
9
|
+
export declare function handlePasswordChangeRequired(message: string): void;
|
|
10
|
+
/** 清理强制改密弹窗状态。 */
|
|
11
|
+
export declare function clearPasswordChangeRequired(): void;
|
|
3
12
|
/** 判断当前访问令牌是否仍在有效期内。 */
|
|
4
13
|
export declare function hasValidAccessToken(): boolean;
|
|
5
14
|
/** 读取最新可用访问令牌,必要时先串行刷新,供 axios、fetch 与 SSE 共用。 */
|
|
@@ -8,4 +17,6 @@ export declare function getRequestAccessToken(): Promise<string>;
|
|
|
8
17
|
export declare function ensureAccessToken(): Promise<boolean>;
|
|
9
18
|
/** 统一处理认证失效 */
|
|
10
19
|
export declare function handleAuthExpired(): void;
|
|
11
|
-
|
|
20
|
+
/** 以请求体、响应体顺序提供带类型约束的 HTTP 请求函数。 */
|
|
21
|
+
declare function request<Request = unknown, Response = unknown>(config: AxiosRequestConfig<Request>): Promise<Response>;
|
|
22
|
+
export default request;
|
|
@@ -10,3 +10,7 @@ export declare function formatPrice(price?: number): string;
|
|
|
10
10
|
* 按静态资源域名补齐图片地址。
|
|
11
11
|
*/
|
|
12
12
|
export declare function formatSrc(src: string): string;
|
|
13
|
+
/** 将对象路径转换为统一的数据访问路径。 */
|
|
14
|
+
export declare function normalizeStaticAssetPath(src: string): string;
|
|
15
|
+
/** 将富文本中的媒体路径转换为统一的数据访问路径。 */
|
|
16
|
+
export declare function normalizeRichTextMediaPaths(html: string): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import service from "
|
|
2
|
-
import type { ConfigService, GetConfigRequest, GetConfigResponse } from "
|
|
1
|
+
import service from "../../../utils/request";
|
|
2
|
+
import type { ConfigService, GetConfigRequest, GetConfigResponse } from "../../../rpc/base/v1/config";
|
|
3
3
|
|
|
4
4
|
const CONFIG_URL = "/v1/base/config";
|
|
5
5
|
|