@oj-module/cli 0.1.21 → 0.2.2

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.
Files changed (109) hide show
  1. package/devkit/README.md +1 -1
  2. package/devkit/SKILL.md +17 -3
  3. package/devkit/manual.md +77 -0
  4. package/package.json +2 -2
  5. package/shell-dist/assets/{index-BUyoDvUl.js → index-CLdhl3Qd.js} +61 -12
  6. package/shell-dist/assets/runtime.js +226 -89
  7. package/shell-dist/index.html +3 -3
  8. package/shell-dist/versions.json +3 -3
  9. package/src/build.ts +25 -0
  10. package/src/init.ts +3 -0
  11. package/templates/README.md +54 -0
  12. package/templates/api/config.yaml +14 -0
  13. package/templates/api/seed.mysql.sql +5 -0
  14. package/templates/api/seed.pg.sql +5 -0
  15. package/templates/api/src/_platform/_shared/respond.ts +18 -0
  16. package/templates/api/src/_platform/_shared/service/access.ts +99 -0
  17. package/templates/api/src/_platform/_shared/service/audit.ts +90 -0
  18. package/templates/api/src/_platform/_shared/service/contacts.ts +36 -0
  19. package/templates/api/src/_platform/_shared/service/guard.ts +30 -0
  20. package/templates/api/src/_platform/_shared/service/oplog.ts +47 -0
  21. package/templates/api/src/_platform/_shared/service/query.ts +53 -0
  22. package/templates/api/src/_platform/_shared/service/rate.ts +79 -0
  23. package/templates/api/src/_platform/_shared/service/roles.ts +137 -0
  24. package/templates/api/src/_platform/_shared/service/settings.ts +67 -0
  25. package/templates/api/src/_platform/_shared/service/solution-perms.ts +94 -0
  26. package/templates/api/src/_platform/_shared/service/users.ts +163 -0
  27. package/templates/api/src/_platform/contacts/api.ts +22 -0
  28. package/templates/api/src/_platform/contacts/detail/api.ts +18 -0
  29. package/templates/api/src/_platform/manifest.yaml +9 -1
  30. package/templates/api/src/_platform/migrations/0001__create_users.mysql.sql +9 -0
  31. package/templates/api/src/_platform/migrations/0001__create_users.pg.sql +9 -0
  32. package/templates/api/src/_platform/migrations/0002__add_users_avatar_base64.mysql.sql +3 -0
  33. package/templates/api/src/_platform/migrations/0003__users_source_display_name.mysql.sql +5 -0
  34. package/templates/api/src/_platform/migrations/0003__users_source_display_name.sql +5 -0
  35. package/templates/api/src/_platform/migrations/0004__sys_rbac.mysql.sql +70 -0
  36. package/templates/api/src/_platform/migrations/0004__sys_rbac.pg.sql +67 -0
  37. package/templates/api/src/_platform/migrations/0004__sys_rbac.sql +67 -0
  38. package/templates/api/src/_platform/migrations/0005__users_must_change.mysql.sql +3 -0
  39. package/templates/api/src/_platform/migrations/0005__users_must_change.sql +2 -0
  40. package/templates/api/src/_platform/migrations/0006__users_is_forbidden.mysql.sql +3 -0
  41. package/templates/api/src/_platform/migrations/0006__users_is_forbidden.sql +3 -0
  42. package/templates/api/src/_platform/migrations/0007__users_email.sql +3 -0
  43. package/templates/api/src/_platform/migrations/0008__sys_refresh_token.mysql.sql +10 -0
  44. package/templates/api/src/_platform/migrations/0008__sys_refresh_token.pg.sql +10 -0
  45. package/templates/api/src/_platform/migrations/0008__sys_refresh_token.sql +11 -0
  46. package/templates/api/src/_platform/migrations/0009__sys_throttle.mysql.sql +12 -0
  47. package/templates/api/src/_platform/migrations/0009__sys_throttle.pg.sql +12 -0
  48. package/templates/api/src/_platform/migrations/0009__sys_throttle.sql +13 -0
  49. package/templates/api/src/_platform/schema.yaml +76 -1
  50. package/templates/api/src/_platform/seed.mysql.sql +8 -0
  51. package/templates/api/src/_platform/seed.pg.sql +8 -0
  52. package/templates/api/src/_platform/seed.sql +19 -2
  53. package/templates/api/src/auth/_shared/ldap-login.ts +86 -0
  54. package/templates/api/src/auth/_shared/ldap.ts +14 -0
  55. package/templates/api/src/auth/_shared/login-throttle.ts +29 -0
  56. package/templates/api/src/auth/_shared/session.ts +163 -18
  57. package/templates/api/src/auth/api.ts +54 -44
  58. package/templates/api/src/auth/ldap-login/api.ts +29 -0
  59. package/templates/api/src/system/login-methods/api.ts +19 -0
  60. package/templates/api/src/system/manifest.yaml +5 -0
  61. package/templates/api/src/system/oplog/api.ts +53 -0
  62. package/templates/api/src/system/permissions/api.ts +26 -0
  63. package/templates/api/src/system/roles/api.ts +75 -0
  64. package/templates/api/src/system/roles/bindings/api.ts +29 -0
  65. package/templates/api/src/system/settings/api.ts +60 -0
  66. package/templates/api/src/system/users/api.ts +58 -0
  67. package/templates/api/src/system/users/forbidden/api.ts +26 -0
  68. package/templates/api/src/system/users/password/api.ts +26 -0
  69. package/templates/api/src/system/users/roles/api.ts +27 -0
  70. package/templates/api/src/web/user-info/api.ts +9 -18
  71. package/templates/api/tests/auth-ldap.spec.ts +173 -0
  72. package/templates/api/tests/auth-session.spec.ts +194 -0
  73. package/templates/api/tests/auth-throttle.spec.ts +74 -0
  74. package/templates/api/tests/fixture.ts +50 -0
  75. package/templates/api/tests/guard.spec.ts +62 -0
  76. package/templates/api/tests/query-utils.spec.ts +68 -0
  77. package/templates/api/tests/rbac-audit.spec.ts +105 -0
  78. package/templates/api/tests/rbac-contacts.spec.ts +85 -0
  79. package/templates/api/tests/rbac-guard.spec.ts +192 -0
  80. package/templates/api/tests/rbac-roles.spec.ts +159 -0
  81. package/templates/api/tests/rbac-seed.spec.ts +54 -0
  82. package/templates/api/tests/rbac-settings.spec.ts +79 -0
  83. package/templates/api/tests/rbac-solution-perms.spec.ts +168 -0
  84. package/templates/api/tests/rbac-tables.spec.ts +63 -0
  85. package/templates/api/tests/rbac-users.spec.ts +164 -0
  86. package/templates/api/vitest.config.ts +12 -0
  87. package/templates/openapi.json +1060 -31
  88. package/templates/pnpm-workspace.yaml +9 -0
  89. package/templates/web/src/auth/__client/api.schemas.ts +6 -1
  90. package/templates/web/src/auth/__client/api.ts +33 -1
  91. package/templates/web/src/login/entry.ts +17 -0
  92. package/templates/web/src/login/locales/en-US.json +12 -2
  93. package/templates/web/src/login/locales/zh-CN.json +12 -2
  94. package/templates/web/src/login/pages/change-password.tsx +74 -0
  95. package/templates/web/src/system/__client/api.schemas.ts +150 -0
  96. package/templates/web/src/system/__client/api.ts +358 -0
  97. package/templates/web/src/system/entry.ts +90 -0
  98. package/templates/web/src/system/locales/en-US.json +98 -0
  99. package/templates/web/src/system/locales/zh-CN.json +98 -0
  100. package/templates/web/src/system/pages/errors.ts +51 -0
  101. package/templates/web/src/system/pages/forbidden.tsx +35 -0
  102. package/templates/web/src/system/pages/login-methods/index.tsx +29 -0
  103. package/templates/web/src/system/pages/oplog/index.tsx +91 -0
  104. package/templates/web/src/system/pages/roles/index.tsx +91 -0
  105. package/templates/web/src/system/pages/settings/index.tsx +106 -0
  106. package/templates/web/src/system/pages/users/index.tsx +168 -0
  107. package/templates/web/src/system/pages/users/roles.tsx +68 -0
  108. package/templates/web.config.ts +8 -0
  109. package/vendor/host-versions.json +3 -3
@@ -5,6 +5,36 @@
5
5
  "version": "0.1.0"
6
6
  },
7
7
  "paths": {
8
+ "/api/_platform/contacts": {
9
+ "get": {
10
+ "operationId": "_platform_contacts_get",
11
+ "summary": "GET api/_platform/contacts",
12
+ "x-oj-file": "_platform/contacts/api.ts",
13
+ "tags": [
14
+ "_platform"
15
+ ],
16
+ "responses": {
17
+ "200": {
18
+ "description": "OK"
19
+ }
20
+ }
21
+ }
22
+ },
23
+ "/api/_platform/contacts/detail": {
24
+ "get": {
25
+ "operationId": "_platform_contacts_detail_get",
26
+ "summary": "GET api/_platform/contacts/detail",
27
+ "x-oj-file": "_platform/contacts/detail/api.ts",
28
+ "tags": [
29
+ "_platform"
30
+ ],
31
+ "responses": {
32
+ "200": {
33
+ "description": "OK"
34
+ }
35
+ }
36
+ }
37
+ },
8
38
  "/api/auth/login": {
9
39
  "post": {
10
40
  "operationId": "auth_login_post",
@@ -50,6 +80,60 @@
50
80
  }
51
81
  }
52
82
  },
83
+ "/api/auth/password": {
84
+ "put": {
85
+ "operationId": "auth_password_put",
86
+ "summary": "PUT api/auth/password",
87
+ "x-oj-file": "auth/api.ts",
88
+ "tags": [
89
+ "auth"
90
+ ],
91
+ "requestBody": {
92
+ "required": true,
93
+ "content": {
94
+ "application/json": {
95
+ "schema": {
96
+ "type": "object",
97
+ "required": [
98
+ "old_password",
99
+ "new_password"
100
+ ],
101
+ "properties": {
102
+ "old_password": {
103
+ "type": "string",
104
+ "minLength": 1
105
+ },
106
+ "new_password": {
107
+ "type": "string",
108
+ "minLength": 6
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ },
115
+ "responses": {
116
+ "200": {
117
+ "description": "OK"
118
+ }
119
+ }
120
+ }
121
+ },
122
+ "/api/auth/ldap-login": {
123
+ "post": {
124
+ "operationId": "auth_ldap_login_post",
125
+ "summary": "POST api/auth/ldap-login",
126
+ "x-oj-file": "auth/ldap-login/api.ts",
127
+ "tags": [
128
+ "auth"
129
+ ],
130
+ "responses": {
131
+ "200": {
132
+ "description": "OK"
133
+ }
134
+ }
135
+ }
136
+ },
53
137
  "/api/notification/notifications": {
54
138
  "get": {
55
139
  "operationId": "notification_notifications_get",
@@ -405,64 +489,1009 @@
405
489
  }
406
490
  }
407
491
  },
408
- "/api/web/get-async-routes": {
492
+ "/api/system/login-methods": {
409
493
  "get": {
410
- "operationId": "web_get_async_routes_get",
411
- "summary": "GET api/web/get-async-routes",
412
- "x-oj-file": "web/get-async-routes/api.ts",
494
+ "operationId": "system_login_methods_get",
495
+ "summary": "GET api/system/login-methods",
496
+ "x-oj-file": "system/login-methods/api.ts",
413
497
  "tags": [
414
- "web"
498
+ "system"
415
499
  ],
416
500
  "responses": {
417
501
  "200": {
418
- "description": "OK"
502
+ "description": "OK",
503
+ "x-oj-response-enforced": false,
504
+ "content": {
505
+ "application/json": {
506
+ "schema": {
507
+ "type": "object",
508
+ "required": [
509
+ "code",
510
+ "msg",
511
+ "data"
512
+ ],
513
+ "properties": {
514
+ "code": {
515
+ "type": "integer"
516
+ },
517
+ "msg": {
518
+ "type": "string"
519
+ },
520
+ "data": {
521
+ "type": "object",
522
+ "required": [
523
+ "methods"
524
+ ],
525
+ "properties": {
526
+ "methods": {
527
+ "type": "array",
528
+ "items": {
529
+ "type": "string"
530
+ }
531
+ }
532
+ }
533
+ }
534
+ }
535
+ }
536
+ }
537
+ }
419
538
  }
420
539
  }
421
540
  }
422
541
  },
423
- "/api/web/hello": {
542
+ "/api/system/oplog": {
424
543
  "get": {
425
- "operationId": "web_hello_get",
426
- "summary": "GET api/web/hello",
427
- "x-oj-file": "web/hello/api.ts",
544
+ "operationId": "system_oplog_get",
545
+ "summary": "GET api/system/oplog",
546
+ "x-oj-file": "system/oplog/api.ts",
428
547
  "tags": [
429
- "web"
548
+ "system"
549
+ ],
550
+ "parameters": [
551
+ {
552
+ "name": "action",
553
+ "in": "query",
554
+ "required": false,
555
+ "schema": {
556
+ "type": "string"
557
+ }
558
+ },
559
+ {
560
+ "name": "username",
561
+ "in": "query",
562
+ "required": false,
563
+ "schema": {
564
+ "type": "string"
565
+ }
566
+ },
567
+ {
568
+ "name": "module",
569
+ "in": "query",
570
+ "required": false,
571
+ "schema": {
572
+ "type": "string"
573
+ }
574
+ },
575
+ {
576
+ "name": "limit",
577
+ "in": "query",
578
+ "required": false,
579
+ "schema": {
580
+ "type": "number",
581
+ "minimum": 1,
582
+ "maximum": 200
583
+ }
584
+ }
430
585
  ],
431
586
  "responses": {
432
587
  "200": {
433
- "description": "OK"
588
+ "description": "OK",
589
+ "x-oj-response-enforced": false,
590
+ "content": {
591
+ "application/json": {
592
+ "schema": {
593
+ "type": "object",
594
+ "required": [
595
+ "code",
596
+ "msg",
597
+ "data"
598
+ ],
599
+ "properties": {
600
+ "code": {
601
+ "type": "integer"
602
+ },
603
+ "msg": {
604
+ "type": "string"
605
+ },
606
+ "data": {
607
+ "type": "object",
608
+ "required": [
609
+ "list",
610
+ "total",
611
+ "truncated"
612
+ ],
613
+ "properties": {
614
+ "list": {
615
+ "type": "array",
616
+ "items": {
617
+ "type": "object",
618
+ "required": [
619
+ "id",
620
+ "create_time",
621
+ "user_id",
622
+ "username",
623
+ "action",
624
+ "module",
625
+ "version",
626
+ "target",
627
+ "detail",
628
+ "level"
629
+ ],
630
+ "properties": {
631
+ "id": {
632
+ "type": "number"
633
+ },
634
+ "create_time": {
635
+ "type": "number"
636
+ },
637
+ "user_id": {
638
+ "type": "number"
639
+ },
640
+ "username": {
641
+ "type": "string"
642
+ },
643
+ "action": {
644
+ "type": "string"
645
+ },
646
+ "module": {
647
+ "type": "string"
648
+ },
649
+ "version": {
650
+ "type": [
651
+ "string",
652
+ "null"
653
+ ]
654
+ },
655
+ "target": {
656
+ "type": [
657
+ "string",
658
+ "null"
659
+ ]
660
+ },
661
+ "detail": {
662
+ "type": [
663
+ "string",
664
+ "null"
665
+ ]
666
+ },
667
+ "level": {
668
+ "type": "number"
669
+ }
670
+ }
671
+ }
672
+ },
673
+ "total": {
674
+ "type": "number"
675
+ },
676
+ "truncated": {
677
+ "type": "boolean"
678
+ }
679
+ }
680
+ }
681
+ }
682
+ }
683
+ }
684
+ }
434
685
  }
435
686
  }
436
687
  }
437
688
  },
438
- "/api/web/user-info": {
689
+ "/api/system/permissions": {
439
690
  "get": {
440
- "operationId": "web_user_info_get",
441
- "summary": "GET api/web/user-info",
442
- "x-oj-file": "web/user-info/api.ts",
691
+ "operationId": "system_permissions_get",
692
+ "summary": "GET api/system/permissions",
693
+ "x-oj-file": "system/permissions/api.ts",
443
694
  "tags": [
444
- "web"
695
+ "system"
445
696
  ],
446
697
  "responses": {
447
698
  "200": {
448
- "description": "OK"
699
+ "description": "OK",
700
+ "x-oj-response-enforced": false,
701
+ "content": {
702
+ "application/json": {
703
+ "schema": {
704
+ "type": "object",
705
+ "required": [
706
+ "code",
707
+ "msg",
708
+ "data"
709
+ ],
710
+ "properties": {
711
+ "code": {
712
+ "type": "integer"
713
+ },
714
+ "msg": {
715
+ "type": "string"
716
+ },
717
+ "data": {
718
+ "type": "array",
719
+ "items": {
720
+ "type": "object",
721
+ "required": [
722
+ "code",
723
+ "module",
724
+ "title_key",
725
+ "deprecated"
726
+ ],
727
+ "properties": {
728
+ "code": {
729
+ "type": "string"
730
+ },
731
+ "module": {
732
+ "type": "string"
733
+ },
734
+ "title_key": {
735
+ "type": [
736
+ "string",
737
+ "null"
738
+ ]
739
+ },
740
+ "deprecated": {
741
+ "type": "boolean"
742
+ }
743
+ }
744
+ }
745
+ }
746
+ }
747
+ }
748
+ }
749
+ }
449
750
  }
450
751
  }
451
752
  }
452
- }
453
- },
454
- "tags": [
455
- {
456
- "name": "auth"
457
- },
458
- {
459
- "name": "notification"
460
- },
461
- {
462
- "name": "notifications"
463
753
  },
464
- {
465
- "name": "personal-center"
754
+ "/api/system/roles": {
755
+ "get": {
756
+ "operationId": "system_roles_get",
757
+ "summary": "GET api/system/roles",
758
+ "x-oj-file": "system/roles/api.ts",
759
+ "tags": [
760
+ "system"
761
+ ],
762
+ "responses": {
763
+ "200": {
764
+ "description": "OK",
765
+ "x-oj-response-enforced": false,
766
+ "content": {
767
+ "application/json": {
768
+ "schema": {
769
+ "type": "object",
770
+ "required": [
771
+ "code",
772
+ "msg",
773
+ "data"
774
+ ],
775
+ "properties": {
776
+ "code": {
777
+ "type": "integer"
778
+ },
779
+ "msg": {
780
+ "type": "string"
781
+ },
782
+ "data": {
783
+ "type": "array",
784
+ "items": {
785
+ "type": "object",
786
+ "required": [
787
+ "name",
788
+ "module",
789
+ "title",
790
+ "description",
791
+ "builtin",
792
+ "deprecated",
793
+ "holders",
794
+ "permissions"
795
+ ],
796
+ "properties": {
797
+ "name": {
798
+ "type": "string"
799
+ },
800
+ "module": {
801
+ "type": "string"
802
+ },
803
+ "title": {
804
+ "type": [
805
+ "string",
806
+ "null"
807
+ ]
808
+ },
809
+ "description": {
810
+ "type": [
811
+ "string",
812
+ "null"
813
+ ]
814
+ },
815
+ "builtin": {
816
+ "type": "boolean"
817
+ },
818
+ "deprecated": {
819
+ "type": "boolean"
820
+ },
821
+ "holders": {
822
+ "type": "number"
823
+ },
824
+ "permissions": {
825
+ "type": "array",
826
+ "items": {
827
+ "type": "string"
828
+ }
829
+ }
830
+ }
831
+ }
832
+ }
833
+ }
834
+ }
835
+ }
836
+ }
837
+ }
838
+ }
839
+ },
840
+ "post": {
841
+ "operationId": "system_roles_post",
842
+ "summary": "POST api/system/roles",
843
+ "x-oj-file": "system/roles/api.ts",
844
+ "tags": [
845
+ "system"
846
+ ],
847
+ "requestBody": {
848
+ "required": true,
849
+ "content": {
850
+ "application/json": {
851
+ "schema": {
852
+ "type": "object",
853
+ "required": [
854
+ "name",
855
+ "title"
856
+ ],
857
+ "properties": {
858
+ "name": {
859
+ "type": "string",
860
+ "pattern": "^custom\\.[a-z0-9][a-z0-9-]*$"
861
+ },
862
+ "title": {
863
+ "type": "string",
864
+ "minLength": 1
865
+ },
866
+ "permissions": {
867
+ "type": "array",
868
+ "items": {
869
+ "type": "string"
870
+ }
871
+ }
872
+ }
873
+ }
874
+ }
875
+ }
876
+ },
877
+ "responses": {
878
+ "200": {
879
+ "description": "OK",
880
+ "x-oj-response-enforced": false,
881
+ "content": {
882
+ "application/json": {
883
+ "schema": {
884
+ "type": "object",
885
+ "required": [
886
+ "code",
887
+ "msg",
888
+ "data"
889
+ ],
890
+ "properties": {
891
+ "code": {
892
+ "type": "integer"
893
+ },
894
+ "msg": {
895
+ "type": "string"
896
+ },
897
+ "data": {
898
+ "type": "object",
899
+ "required": [
900
+ "name",
901
+ "module"
902
+ ],
903
+ "properties": {
904
+ "name": {
905
+ "type": "string"
906
+ },
907
+ "module": {
908
+ "type": "string"
909
+ }
910
+ }
911
+ }
912
+ }
913
+ }
914
+ }
915
+ }
916
+ }
917
+ }
918
+ },
919
+ "delete": {
920
+ "operationId": "system_roles_delete",
921
+ "summary": "DELETE api/system/roles",
922
+ "x-oj-file": "system/roles/api.ts",
923
+ "tags": [
924
+ "system"
925
+ ],
926
+ "parameters": [
927
+ {
928
+ "name": "name",
929
+ "in": "query",
930
+ "required": true,
931
+ "schema": {
932
+ "type": "string",
933
+ "minLength": 1
934
+ }
935
+ }
936
+ ],
937
+ "responses": {
938
+ "200": {
939
+ "description": "OK"
940
+ }
941
+ }
942
+ }
943
+ },
944
+ "/api/system/roles/bindings": {
945
+ "put": {
946
+ "operationId": "system_roles_bindings_put",
947
+ "summary": "PUT api/system/roles/bindings",
948
+ "x-oj-file": "system/roles/bindings/api.ts",
949
+ "tags": [
950
+ "system"
951
+ ],
952
+ "parameters": [
953
+ {
954
+ "name": "name",
955
+ "in": "query",
956
+ "required": true,
957
+ "schema": {
958
+ "type": "string",
959
+ "minLength": 1
960
+ }
961
+ }
962
+ ],
963
+ "requestBody": {
964
+ "required": true,
965
+ "content": {
966
+ "application/json": {
967
+ "schema": {
968
+ "type": "object",
969
+ "required": [
970
+ "permissions"
971
+ ],
972
+ "properties": {
973
+ "permissions": {
974
+ "type": "array",
975
+ "items": {
976
+ "type": "string"
977
+ }
978
+ }
979
+ }
980
+ }
981
+ }
982
+ }
983
+ },
984
+ "responses": {
985
+ "200": {
986
+ "description": "OK"
987
+ }
988
+ }
989
+ }
990
+ },
991
+ "/api/system/settings": {
992
+ "get": {
993
+ "operationId": "system_settings_get",
994
+ "summary": "GET api/system/settings",
995
+ "x-oj-file": "system/settings/api.ts",
996
+ "tags": [
997
+ "system"
998
+ ],
999
+ "responses": {
1000
+ "200": {
1001
+ "description": "OK",
1002
+ "x-oj-response-enforced": false,
1003
+ "content": {
1004
+ "application/json": {
1005
+ "schema": {
1006
+ "type": "object",
1007
+ "required": [
1008
+ "code",
1009
+ "msg",
1010
+ "data"
1011
+ ],
1012
+ "properties": {
1013
+ "code": {
1014
+ "type": "integer"
1015
+ },
1016
+ "msg": {
1017
+ "type": "string"
1018
+ },
1019
+ "data": {
1020
+ "type": "array",
1021
+ "items": {
1022
+ "type": "object",
1023
+ "required": [
1024
+ "group",
1025
+ "items"
1026
+ ],
1027
+ "properties": {
1028
+ "group": {
1029
+ "type": "string"
1030
+ },
1031
+ "items": {
1032
+ "type": "array",
1033
+ "items": {
1034
+ "type": "object",
1035
+ "required": [
1036
+ "key",
1037
+ "module",
1038
+ "group",
1039
+ "type",
1040
+ "value",
1041
+ "default_value",
1042
+ "label_key",
1043
+ "options",
1044
+ "secret",
1045
+ "update_time"
1046
+ ],
1047
+ "properties": {
1048
+ "key": {
1049
+ "type": "string"
1050
+ },
1051
+ "module": {
1052
+ "type": "string"
1053
+ },
1054
+ "group": {
1055
+ "type": "string"
1056
+ },
1057
+ "type": {
1058
+ "type": "string"
1059
+ },
1060
+ "value": {
1061
+ "type": [
1062
+ "string",
1063
+ "null"
1064
+ ]
1065
+ },
1066
+ "default_value": {
1067
+ "type": [
1068
+ "string",
1069
+ "null"
1070
+ ]
1071
+ },
1072
+ "label_key": {
1073
+ "type": [
1074
+ "string",
1075
+ "null"
1076
+ ]
1077
+ },
1078
+ "options": {
1079
+ "type": [
1080
+ "string",
1081
+ "null"
1082
+ ]
1083
+ },
1084
+ "secret": {
1085
+ "type": "boolean"
1086
+ },
1087
+ "update_time": {
1088
+ "type": "number"
1089
+ }
1090
+ }
1091
+ }
1092
+ }
1093
+ }
1094
+ }
1095
+ }
1096
+ }
1097
+ }
1098
+ }
1099
+ }
1100
+ }
1101
+ }
1102
+ },
1103
+ "put": {
1104
+ "operationId": "system_settings_put",
1105
+ "summary": "PUT api/system/settings",
1106
+ "x-oj-file": "system/settings/api.ts",
1107
+ "tags": [
1108
+ "system"
1109
+ ],
1110
+ "requestBody": {
1111
+ "required": true,
1112
+ "content": {
1113
+ "application/json": {
1114
+ "schema": {
1115
+ "type": "object",
1116
+ "required": [
1117
+ "key",
1118
+ "value"
1119
+ ],
1120
+ "properties": {
1121
+ "key": {
1122
+ "type": "string",
1123
+ "minLength": 1
1124
+ },
1125
+ "value": {
1126
+ "type": "string"
1127
+ }
1128
+ }
1129
+ }
1130
+ }
1131
+ }
1132
+ },
1133
+ "responses": {
1134
+ "200": {
1135
+ "description": "OK"
1136
+ }
1137
+ }
1138
+ }
1139
+ },
1140
+ "/api/system/users": {
1141
+ "get": {
1142
+ "operationId": "system_users_get",
1143
+ "summary": "GET api/system/users",
1144
+ "x-oj-file": "system/users/api.ts",
1145
+ "tags": [
1146
+ "system"
1147
+ ],
1148
+ "responses": {
1149
+ "200": {
1150
+ "description": "OK",
1151
+ "x-oj-response-enforced": false,
1152
+ "content": {
1153
+ "application/json": {
1154
+ "schema": {
1155
+ "type": "object",
1156
+ "required": [
1157
+ "code",
1158
+ "msg",
1159
+ "data"
1160
+ ],
1161
+ "properties": {
1162
+ "code": {
1163
+ "type": "integer"
1164
+ },
1165
+ "msg": {
1166
+ "type": "string"
1167
+ },
1168
+ "data": {
1169
+ "type": "array",
1170
+ "items": {
1171
+ "type": "object",
1172
+ "required": [
1173
+ "id",
1174
+ "username",
1175
+ "display_name",
1176
+ "email",
1177
+ "is_forbidden",
1178
+ "must_change",
1179
+ "roles"
1180
+ ],
1181
+ "properties": {
1182
+ "id": {
1183
+ "type": "number"
1184
+ },
1185
+ "username": {
1186
+ "type": "string"
1187
+ },
1188
+ "display_name": {
1189
+ "type": [
1190
+ "string",
1191
+ "null"
1192
+ ]
1193
+ },
1194
+ "email": {
1195
+ "type": [
1196
+ "string",
1197
+ "null"
1198
+ ]
1199
+ },
1200
+ "is_forbidden": {
1201
+ "type": "boolean"
1202
+ },
1203
+ "must_change": {
1204
+ "type": "boolean"
1205
+ },
1206
+ "roles": {
1207
+ "type": "array",
1208
+ "items": {
1209
+ "type": "string"
1210
+ }
1211
+ }
1212
+ }
1213
+ }
1214
+ }
1215
+ }
1216
+ }
1217
+ }
1218
+ }
1219
+ }
1220
+ }
1221
+ },
1222
+ "post": {
1223
+ "operationId": "system_users_post",
1224
+ "summary": "POST api/system/users",
1225
+ "x-oj-file": "system/users/api.ts",
1226
+ "tags": [
1227
+ "system"
1228
+ ],
1229
+ "requestBody": {
1230
+ "required": true,
1231
+ "content": {
1232
+ "application/json": {
1233
+ "schema": {
1234
+ "type": "object",
1235
+ "required": [
1236
+ "username",
1237
+ "password"
1238
+ ],
1239
+ "properties": {
1240
+ "username": {
1241
+ "type": "string",
1242
+ "minLength": 1
1243
+ },
1244
+ "password": {
1245
+ "type": "string",
1246
+ "minLength": 6
1247
+ },
1248
+ "displayName": {
1249
+ "type": "string"
1250
+ },
1251
+ "email": {
1252
+ "type": "string"
1253
+ }
1254
+ }
1255
+ }
1256
+ }
1257
+ }
1258
+ },
1259
+ "responses": {
1260
+ "200": {
1261
+ "description": "OK",
1262
+ "x-oj-response-enforced": false,
1263
+ "content": {
1264
+ "application/json": {
1265
+ "schema": {
1266
+ "type": "object",
1267
+ "required": [
1268
+ "code",
1269
+ "msg",
1270
+ "data"
1271
+ ],
1272
+ "properties": {
1273
+ "code": {
1274
+ "type": "integer"
1275
+ },
1276
+ "msg": {
1277
+ "type": "string"
1278
+ },
1279
+ "data": {
1280
+ "type": "object",
1281
+ "required": [
1282
+ "id"
1283
+ ],
1284
+ "properties": {
1285
+ "id": {
1286
+ "type": "number"
1287
+ }
1288
+ }
1289
+ }
1290
+ }
1291
+ }
1292
+ }
1293
+ }
1294
+ }
1295
+ }
1296
+ }
1297
+ },
1298
+ "/api/system/users/forbidden": {
1299
+ "put": {
1300
+ "operationId": "system_users_forbidden_put",
1301
+ "summary": "PUT api/system/users/forbidden",
1302
+ "x-oj-file": "system/users/forbidden/api.ts",
1303
+ "tags": [
1304
+ "system"
1305
+ ],
1306
+ "parameters": [
1307
+ {
1308
+ "name": "uid",
1309
+ "in": "query",
1310
+ "required": true,
1311
+ "schema": {
1312
+ "type": "number"
1313
+ }
1314
+ }
1315
+ ],
1316
+ "requestBody": {
1317
+ "required": true,
1318
+ "content": {
1319
+ "application/json": {
1320
+ "schema": {
1321
+ "type": "object",
1322
+ "required": [
1323
+ "forbidden"
1324
+ ],
1325
+ "properties": {
1326
+ "forbidden": {
1327
+ "type": "boolean"
1328
+ }
1329
+ }
1330
+ }
1331
+ }
1332
+ }
1333
+ },
1334
+ "responses": {
1335
+ "200": {
1336
+ "description": "OK"
1337
+ }
1338
+ }
1339
+ }
1340
+ },
1341
+ "/api/system/users/password": {
1342
+ "put": {
1343
+ "operationId": "system_users_password_put",
1344
+ "summary": "PUT api/system/users/password",
1345
+ "x-oj-file": "system/users/password/api.ts",
1346
+ "tags": [
1347
+ "system"
1348
+ ],
1349
+ "parameters": [
1350
+ {
1351
+ "name": "uid",
1352
+ "in": "query",
1353
+ "required": true,
1354
+ "schema": {
1355
+ "type": "number"
1356
+ }
1357
+ }
1358
+ ],
1359
+ "requestBody": {
1360
+ "required": true,
1361
+ "content": {
1362
+ "application/json": {
1363
+ "schema": {
1364
+ "type": "object",
1365
+ "required": [
1366
+ "password"
1367
+ ],
1368
+ "properties": {
1369
+ "password": {
1370
+ "type": "string",
1371
+ "minLength": 6
1372
+ }
1373
+ }
1374
+ }
1375
+ }
1376
+ }
1377
+ },
1378
+ "responses": {
1379
+ "200": {
1380
+ "description": "OK"
1381
+ }
1382
+ }
1383
+ }
1384
+ },
1385
+ "/api/system/users/roles": {
1386
+ "put": {
1387
+ "operationId": "system_users_roles_put",
1388
+ "summary": "PUT api/system/users/roles",
1389
+ "x-oj-file": "system/users/roles/api.ts",
1390
+ "tags": [
1391
+ "system"
1392
+ ],
1393
+ "parameters": [
1394
+ {
1395
+ "name": "uid",
1396
+ "in": "query",
1397
+ "required": true,
1398
+ "schema": {
1399
+ "type": "number"
1400
+ }
1401
+ }
1402
+ ],
1403
+ "requestBody": {
1404
+ "required": true,
1405
+ "content": {
1406
+ "application/json": {
1407
+ "schema": {
1408
+ "type": "object",
1409
+ "required": [
1410
+ "roles"
1411
+ ],
1412
+ "properties": {
1413
+ "roles": {
1414
+ "type": "array",
1415
+ "items": {
1416
+ "type": "string"
1417
+ }
1418
+ }
1419
+ }
1420
+ }
1421
+ }
1422
+ }
1423
+ },
1424
+ "responses": {
1425
+ "200": {
1426
+ "description": "OK"
1427
+ }
1428
+ }
1429
+ }
1430
+ },
1431
+ "/api/web/get-async-routes": {
1432
+ "get": {
1433
+ "operationId": "web_get_async_routes_get",
1434
+ "summary": "GET api/web/get-async-routes",
1435
+ "x-oj-file": "web/get-async-routes/api.ts",
1436
+ "tags": [
1437
+ "web"
1438
+ ],
1439
+ "responses": {
1440
+ "200": {
1441
+ "description": "OK"
1442
+ }
1443
+ }
1444
+ }
1445
+ },
1446
+ "/api/web/hello": {
1447
+ "get": {
1448
+ "operationId": "web_hello_get",
1449
+ "summary": "GET api/web/hello",
1450
+ "x-oj-file": "web/hello/api.ts",
1451
+ "tags": [
1452
+ "web"
1453
+ ],
1454
+ "responses": {
1455
+ "200": {
1456
+ "description": "OK"
1457
+ }
1458
+ }
1459
+ }
1460
+ },
1461
+ "/api/web/user-info": {
1462
+ "get": {
1463
+ "operationId": "web_user_info_get",
1464
+ "summary": "GET api/web/user-info",
1465
+ "x-oj-file": "web/user-info/api.ts",
1466
+ "tags": [
1467
+ "web"
1468
+ ],
1469
+ "responses": {
1470
+ "200": {
1471
+ "description": "OK"
1472
+ }
1473
+ }
1474
+ }
1475
+ }
1476
+ },
1477
+ "tags": [
1478
+ {
1479
+ "name": "_platform"
1480
+ },
1481
+ {
1482
+ "name": "auth"
1483
+ },
1484
+ {
1485
+ "name": "notification"
1486
+ },
1487
+ {
1488
+ "name": "notifications"
1489
+ },
1490
+ {
1491
+ "name": "personal-center"
1492
+ },
1493
+ {
1494
+ "name": "system"
466
1495
  },
467
1496
  {
468
1497
  "name": "web"