@oj-module/cli 0.2.46 → 0.2.48

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 (97) hide show
  1. package/devkit/SKILL.md +1 -1
  2. package/devkit/framework-dev.md +2 -2
  3. package/devkit/manual.md +24 -14
  4. package/devkit/module-dev-and-cdn-playground.md +2 -2
  5. package/devkit/wecom-daikaifa.md +282 -27
  6. package/package.json +2 -2
  7. package/shell-dist/assets/runtime.js +2 -2
  8. package/shell-dist/index.html +2 -2
  9. package/shell-dist/versions.json +3 -3
  10. package/src/__tests__/templates-tenant-scope.test.ts +7 -2
  11. package/src/init.ts +1 -1
  12. package/src/market/__tests__/bootstrap.test.ts +1 -1
  13. package/src/market/__tests__/setup.test.ts +7 -7
  14. package/src/market/bootstrap.ts +1 -1
  15. package/templates/README.md +1 -1
  16. package/templates/config.yaml +26 -7
  17. package/templates/init.include.yaml +12 -0
  18. package/templates/openapi.json +2863 -549
  19. package/templates/src/_platform/api/_shared/service/domain/contacts.ts +7 -0
  20. package/templates/src/_platform/api/_shared/service/domain/org-read.ts +451 -0
  21. package/templates/src/_platform/api/_shared/service/domain/org.ts +566 -0
  22. package/templates/src/_platform/api/_shared/service/domain/users.ts +140 -2
  23. package/templates/src/_platform/api/_shared/service/infra/query.ts +2 -1
  24. package/templates/src/_platform/api/fixtures/l1-test-user.sql +1 -1
  25. package/templates/src/_platform/api/manifest.yaml +3 -0
  26. package/templates/src/_platform/api/migrations/0016__org.mysql.sql +41 -0
  27. package/templates/src/_platform/api/migrations/0016__org.pg.sql +40 -0
  28. package/templates/src/_platform/api/migrations/0016__org.sql +62 -0
  29. package/templates/src/_platform/api/org/departments/api.ts +51 -0
  30. package/templates/src/_platform/api/org/is-member/api.ts +33 -0
  31. package/templates/src/_platform/api/org/members/api.ts +55 -0
  32. package/templates/src/_platform/api/org/picker/api.ts +59 -0
  33. package/templates/src/_platform/api/org/resolve/api.ts +38 -0
  34. package/templates/src/_platform/api/org/tree/api.ts +37 -0
  35. package/templates/src/_platform/api/org/user/api.ts +46 -0
  36. package/templates/src/_platform/api/schema.yaml +48 -0
  37. package/templates/src/_platform/api/seed.mysql.sql +10 -5
  38. package/templates/src/_platform/api/seed.pg.sql +10 -5
  39. package/templates/src/_platform/api/seed.sql +13 -5
  40. package/templates/src/_platform/web/__client/api.schemas.ts +126 -0
  41. package/templates/src/_platform/web/__client/api.ts +170 -1
  42. package/templates/src/auth/api/_shared/ldap-login.ts +2 -0
  43. package/templates/src/auth/api/_shared/session.ts +5 -1
  44. package/templates/src/auth/api/_shared/wecom/admin.ts +17 -10
  45. package/templates/src/auth/api/_shared/wecom/client.ts +311 -40
  46. package/templates/src/auth/api/_shared/wecom/config.ts +40 -17
  47. package/templates/src/auth/api/_shared/wecom/contacts.ts +263 -0
  48. package/templates/src/auth/api/_shared/wecom/crypt.ts +17 -7
  49. package/templates/src/auth/api/_shared/wecom/events.ts +111 -26
  50. package/templates/src/auth/api/_shared/wecom/login.ts +152 -1
  51. package/templates/src/auth/api/_shared/wecom/payload.ts +116 -0
  52. package/templates/src/auth/api/_shared/wecom/store.ts +65 -0
  53. package/templates/src/auth/api/_shared/wecom/sync.ts +487 -0
  54. package/templates/src/auth/api/manifest.yaml +3 -0
  55. package/templates/src/auth/api/migrations/0002__org_sync.mysql.sql +28 -0
  56. package/templates/src/auth/api/migrations/0002__org_sync.pg.sql +27 -0
  57. package/templates/src/auth/api/migrations/0002__org_sync.sql +41 -0
  58. package/templates/src/auth/api/schema.yaml +31 -0
  59. package/templates/src/auth/api/wecom/admin/api.ts +7 -5
  60. package/templates/src/auth/api/wecom/api.ts +100 -18
  61. package/templates/src/auth/api/wecom/sync/api.ts +199 -0
  62. package/templates/src/auth/web/__client/api.schemas.ts +97 -0
  63. package/templates/src/auth/web/__client/api.ts +73 -1
  64. package/templates/src/login/web/auth-provider.ts +9 -1
  65. package/templates/src/notification/api/seed.sql +1 -1
  66. package/templates/src/system/api/departments/api.ts +142 -0
  67. package/templates/src/system/api/departments/detach/api.ts +34 -0
  68. package/templates/src/system/api/departments/members/api.ts +142 -0
  69. package/templates/src/system/api/departments/move/api.ts +39 -0
  70. package/templates/src/system/api/users/api.ts +45 -5
  71. package/templates/src/system/api/users/profile/api.ts +44 -0
  72. package/templates/src/system/web/__client/api.schemas.ts +143 -0
  73. package/templates/src/system/web/__client/api.ts +293 -1
  74. package/templates/src/system/web/entry.ts +6 -0
  75. package/templates/src/system/web/locales/en-US.json +113 -7
  76. package/templates/src/system/web/locales/zh-CN.json +113 -7
  77. package/templates/src/system/web/pages/departments/index.tsx +346 -0
  78. package/templates/src/system/web/pages/departments/sync-bar.tsx +257 -0
  79. package/templates/src/system/web/pages/departments/tree.ts +66 -0
  80. package/templates/src/system/web/pages/errors.ts +1 -1
  81. package/templates/src/system/web/pages/users/index.tsx +49 -7
  82. package/templates/src/system/web/pages/wecom/index.tsx +16 -1
  83. package/templates/tests/l1-builder.test.ts +1 -1
  84. package/templates/tests/org-departments.spec.ts +311 -0
  85. package/templates/tests/org-read.spec.ts +469 -0
  86. package/templates/tests/rbac-contacts.spec.ts +13 -3
  87. package/templates/tests/rbac-seed.spec.ts +11 -0
  88. package/templates/tests/seed-role-accounts.spec.ts +6 -2
  89. package/templates/tests/wecom-admin.spec.ts +64 -42
  90. package/templates/tests/wecom-client-timeout.spec.ts +99 -0
  91. package/templates/tests/wecom-connector.spec.ts +115 -11
  92. package/templates/tests/wecom-crypt.spec.ts +12 -3
  93. package/templates/tests/wecom-endpoints.spec.ts +182 -14
  94. package/templates/tests/wecom-org-sync.spec.ts +598 -0
  95. package/templates/tests/wecom-sync.spec.ts +286 -0
  96. package/vendor/host-versions.json +3 -3
  97. package/templates/src/auth/api/_shared/wecom/xml.ts +0 -36
@@ -783,14 +783,1600 @@
783
783
  }
784
784
  }
785
785
  },
786
+ "/api/_platform/org/tree": {
787
+ "get": {
788
+ "operationId": "_platform_org_tree_get",
789
+ "summary": "GET api/_platform/org/tree",
790
+ "x-oj-file": "_platform/org/tree/api.ts",
791
+ "tags": [
792
+ "_platform"
793
+ ],
794
+ "parameters": [
795
+ {
796
+ "name": "scope",
797
+ "in": "query",
798
+ "required": false,
799
+ "schema": {
800
+ "type": "string",
801
+ "enum": [
802
+ "self",
803
+ "all"
804
+ ]
805
+ }
806
+ }
807
+ ],
808
+ "responses": {
809
+ "200": {
810
+ "description": "OK",
811
+ "x-oj-response-enforced": false,
812
+ "content": {
813
+ "application/json": {
814
+ "schema": {
815
+ "type": "object",
816
+ "required": [
817
+ "code",
818
+ "msg",
819
+ "data"
820
+ ],
821
+ "properties": {
822
+ "code": {
823
+ "type": "integer"
824
+ },
825
+ "msg": {
826
+ "type": "string"
827
+ },
828
+ "data": {
829
+ "type": "array",
830
+ "items": {
831
+ "type": "object",
832
+ "required": [
833
+ "id",
834
+ "parentId",
835
+ "name",
836
+ "orderNo",
837
+ "memberCount"
838
+ ],
839
+ "properties": {
840
+ "id": {
841
+ "type": "number"
842
+ },
843
+ "parentId": {
844
+ "type": [
845
+ "number",
846
+ "null"
847
+ ]
848
+ },
849
+ "name": {
850
+ "type": [
851
+ "string",
852
+ "null"
853
+ ]
854
+ },
855
+ "nameEn": {
856
+ "type": [
857
+ "string",
858
+ "null"
859
+ ]
860
+ },
861
+ "orderNo": {
862
+ "type": "number"
863
+ },
864
+ "memberCount": {
865
+ "type": "number"
866
+ }
867
+ }
868
+ }
869
+ }
870
+ }
871
+ }
872
+ }
873
+ }
874
+ }
875
+ }
876
+ }
877
+ },
878
+ "/api/_platform/org/departments": {
879
+ "get": {
880
+ "operationId": "_platform_org_departments_get",
881
+ "summary": "GET api/_platform/org/departments",
882
+ "x-oj-file": "_platform/org/departments/api.ts",
883
+ "tags": [
884
+ "_platform"
885
+ ],
886
+ "parameters": [
887
+ {
888
+ "name": "scope",
889
+ "in": "query",
890
+ "required": false,
891
+ "schema": {
892
+ "type": "string",
893
+ "enum": [
894
+ "self",
895
+ "all"
896
+ ]
897
+ }
898
+ },
899
+ {
900
+ "name": "parent",
901
+ "in": "query",
902
+ "required": false,
903
+ "schema": {
904
+ "type": "number"
905
+ }
906
+ },
907
+ {
908
+ "name": "keyword",
909
+ "in": "query",
910
+ "required": false,
911
+ "schema": {
912
+ "type": "string"
913
+ }
914
+ },
915
+ {
916
+ "name": "page",
917
+ "in": "query",
918
+ "required": false,
919
+ "schema": {
920
+ "type": "number",
921
+ "minimum": 1
922
+ }
923
+ },
924
+ {
925
+ "name": "size",
926
+ "in": "query",
927
+ "required": false,
928
+ "schema": {
929
+ "type": "number",
930
+ "minimum": 1,
931
+ "maximum": 200
932
+ }
933
+ }
934
+ ],
935
+ "responses": {
936
+ "200": {
937
+ "description": "OK",
938
+ "x-oj-response-enforced": false,
939
+ "content": {
940
+ "application/json": {
941
+ "schema": {
942
+ "type": "object",
943
+ "required": [
944
+ "code",
945
+ "msg",
946
+ "data"
947
+ ],
948
+ "properties": {
949
+ "code": {
950
+ "type": "integer"
951
+ },
952
+ "msg": {
953
+ "type": "string"
954
+ },
955
+ "data": {
956
+ "type": "object",
957
+ "required": [
958
+ "list",
959
+ "total",
960
+ "page",
961
+ "size",
962
+ "truncated"
963
+ ],
964
+ "properties": {
965
+ "list": {
966
+ "type": "array",
967
+ "items": {
968
+ "type": "object",
969
+ "required": [
970
+ "id",
971
+ "parentId",
972
+ "name",
973
+ "orderNo",
974
+ "memberCount"
975
+ ],
976
+ "properties": {
977
+ "id": {
978
+ "type": "number"
979
+ },
980
+ "parentId": {
981
+ "type": [
982
+ "number",
983
+ "null"
984
+ ]
985
+ },
986
+ "name": {
987
+ "type": [
988
+ "string",
989
+ "null"
990
+ ]
991
+ },
992
+ "nameEn": {
993
+ "type": [
994
+ "string",
995
+ "null"
996
+ ]
997
+ },
998
+ "orderNo": {
999
+ "type": "number"
1000
+ },
1001
+ "memberCount": {
1002
+ "type": "number"
1003
+ }
1004
+ }
1005
+ }
1006
+ },
1007
+ "total": {
1008
+ "type": "number"
1009
+ },
1010
+ "page": {
1011
+ "type": "number"
1012
+ },
1013
+ "size": {
1014
+ "type": "number"
1015
+ },
1016
+ "truncated": {
1017
+ "type": "boolean"
1018
+ }
1019
+ }
1020
+ }
1021
+ }
1022
+ }
1023
+ }
1024
+ }
1025
+ }
1026
+ }
1027
+ }
1028
+ },
1029
+ "/api/_platform/org/members": {
1030
+ "get": {
1031
+ "operationId": "_platform_org_members_get",
1032
+ "summary": "GET api/_platform/org/members",
1033
+ "x-oj-file": "_platform/org/members/api.ts",
1034
+ "tags": [
1035
+ "_platform"
1036
+ ],
1037
+ "parameters": [
1038
+ {
1039
+ "name": "scope",
1040
+ "in": "query",
1041
+ "required": false,
1042
+ "schema": {
1043
+ "type": "string",
1044
+ "enum": [
1045
+ "self",
1046
+ "all"
1047
+ ]
1048
+ }
1049
+ },
1050
+ {
1051
+ "name": "dept",
1052
+ "in": "query",
1053
+ "required": false,
1054
+ "schema": {
1055
+ "type": "number"
1056
+ }
1057
+ },
1058
+ {
1059
+ "name": "includeSub",
1060
+ "in": "query",
1061
+ "required": false,
1062
+ "schema": {
1063
+ "type": "string"
1064
+ }
1065
+ },
1066
+ {
1067
+ "name": "keyword",
1068
+ "in": "query",
1069
+ "required": false,
1070
+ "schema": {
1071
+ "type": "string"
1072
+ }
1073
+ },
1074
+ {
1075
+ "name": "page",
1076
+ "in": "query",
1077
+ "required": false,
1078
+ "schema": {
1079
+ "type": "number",
1080
+ "minimum": 1
1081
+ }
1082
+ },
1083
+ {
1084
+ "name": "size",
1085
+ "in": "query",
1086
+ "required": false,
1087
+ "schema": {
1088
+ "type": "number",
1089
+ "minimum": 1,
1090
+ "maximum": 200
1091
+ }
1092
+ }
1093
+ ],
1094
+ "responses": {
1095
+ "200": {
1096
+ "description": "OK",
1097
+ "x-oj-response-enforced": false,
1098
+ "content": {
1099
+ "application/json": {
1100
+ "schema": {
1101
+ "type": "object",
1102
+ "required": [
1103
+ "code",
1104
+ "msg",
1105
+ "data"
1106
+ ],
1107
+ "properties": {
1108
+ "code": {
1109
+ "type": "integer"
1110
+ },
1111
+ "msg": {
1112
+ "type": "string"
1113
+ },
1114
+ "data": {
1115
+ "type": "object",
1116
+ "required": [
1117
+ "list",
1118
+ "total",
1119
+ "page",
1120
+ "size",
1121
+ "truncated"
1122
+ ],
1123
+ "properties": {
1124
+ "list": {
1125
+ "type": "array",
1126
+ "items": {
1127
+ "type": "object",
1128
+ "required": [
1129
+ "userId",
1130
+ "username",
1131
+ "deptId",
1132
+ "deptPath",
1133
+ "isMain"
1134
+ ],
1135
+ "properties": {
1136
+ "userId": {
1137
+ "type": "number"
1138
+ },
1139
+ "username": {
1140
+ "type": "string"
1141
+ },
1142
+ "displayName": {
1143
+ "type": [
1144
+ "string",
1145
+ "null"
1146
+ ]
1147
+ },
1148
+ "deptId": {
1149
+ "type": "number"
1150
+ },
1151
+ "deptPath": {
1152
+ "type": "array",
1153
+ "items": {
1154
+ "type": "string"
1155
+ }
1156
+ },
1157
+ "isMain": {
1158
+ "type": "boolean"
1159
+ }
1160
+ }
1161
+ }
1162
+ },
1163
+ "total": {
1164
+ "type": "number"
1165
+ },
1166
+ "page": {
1167
+ "type": "number"
1168
+ },
1169
+ "size": {
1170
+ "type": "number"
1171
+ },
1172
+ "truncated": {
1173
+ "type": "boolean"
1174
+ }
1175
+ }
1176
+ }
1177
+ }
1178
+ }
1179
+ }
1180
+ }
1181
+ }
1182
+ }
1183
+ }
1184
+ },
1185
+ "/api/_platform/org/user": {
1186
+ "get": {
1187
+ "operationId": "_platform_org_user_get",
1188
+ "summary": "GET api/_platform/org/user",
1189
+ "x-oj-file": "_platform/org/user/api.ts",
1190
+ "tags": [
1191
+ "_platform"
1192
+ ],
1193
+ "parameters": [
1194
+ {
1195
+ "name": "scope",
1196
+ "in": "query",
1197
+ "required": false,
1198
+ "schema": {
1199
+ "type": "string",
1200
+ "enum": [
1201
+ "self",
1202
+ "all"
1203
+ ]
1204
+ }
1205
+ },
1206
+ {
1207
+ "name": "uid",
1208
+ "in": "query",
1209
+ "required": false,
1210
+ "schema": {
1211
+ "type": "number"
1212
+ }
1213
+ }
1214
+ ],
1215
+ "responses": {
1216
+ "200": {
1217
+ "description": "OK",
1218
+ "x-oj-response-enforced": false,
1219
+ "content": {
1220
+ "application/json": {
1221
+ "schema": {
1222
+ "type": "object",
1223
+ "required": [
1224
+ "code",
1225
+ "msg",
1226
+ "data"
1227
+ ],
1228
+ "properties": {
1229
+ "code": {
1230
+ "type": "integer"
1231
+ },
1232
+ "msg": {
1233
+ "type": "string"
1234
+ },
1235
+ "data": {
1236
+ "type": "object",
1237
+ "required": [
1238
+ "userId",
1239
+ "username",
1240
+ "position",
1241
+ "mainDeptId",
1242
+ "mainDeptPath",
1243
+ "departments"
1244
+ ],
1245
+ "properties": {
1246
+ "userId": {
1247
+ "type": "number"
1248
+ },
1249
+ "username": {
1250
+ "type": "string"
1251
+ },
1252
+ "displayName": {
1253
+ "type": [
1254
+ "string",
1255
+ "null"
1256
+ ]
1257
+ },
1258
+ "position": {
1259
+ "type": [
1260
+ "string",
1261
+ "null"
1262
+ ]
1263
+ },
1264
+ "mainDeptId": {
1265
+ "type": [
1266
+ "number",
1267
+ "null"
1268
+ ]
1269
+ },
1270
+ "mainDeptPath": {
1271
+ "type": "array",
1272
+ "items": {
1273
+ "type": "string"
1274
+ }
1275
+ },
1276
+ "departments": {
1277
+ "type": "array",
1278
+ "items": {
1279
+ "type": "object",
1280
+ "required": [
1281
+ "deptId",
1282
+ "deptPath"
1283
+ ],
1284
+ "properties": {
1285
+ "deptId": {
1286
+ "type": "number"
1287
+ },
1288
+ "deptPath": {
1289
+ "type": "array",
1290
+ "items": {
1291
+ "type": "string"
1292
+ }
1293
+ }
1294
+ }
1295
+ }
1296
+ }
1297
+ }
1298
+ }
1299
+ }
1300
+ }
1301
+ }
1302
+ }
1303
+ }
1304
+ }
1305
+ }
1306
+ },
1307
+ "/api/_platform/org/picker": {
1308
+ "get": {
1309
+ "operationId": "_platform_org_picker_get",
1310
+ "summary": "GET api/_platform/org/picker",
1311
+ "x-oj-file": "_platform/org/picker/api.ts",
1312
+ "tags": [
1313
+ "_platform"
1314
+ ],
1315
+ "parameters": [
1316
+ {
1317
+ "name": "scope",
1318
+ "in": "query",
1319
+ "required": false,
1320
+ "schema": {
1321
+ "type": "string",
1322
+ "enum": [
1323
+ "self",
1324
+ "all"
1325
+ ]
1326
+ }
1327
+ },
1328
+ {
1329
+ "name": "keyword",
1330
+ "in": "query",
1331
+ "required": true,
1332
+ "schema": {
1333
+ "type": "string",
1334
+ "minLength": 2
1335
+ }
1336
+ },
1337
+ {
1338
+ "name": "limit",
1339
+ "in": "query",
1340
+ "required": false,
1341
+ "schema": {
1342
+ "type": "number",
1343
+ "minimum": 1,
1344
+ "maximum": 50
1345
+ }
1346
+ }
1347
+ ],
1348
+ "responses": {
1349
+ "200": {
1350
+ "description": "OK",
1351
+ "x-oj-response-enforced": false,
1352
+ "content": {
1353
+ "application/json": {
1354
+ "schema": {
1355
+ "type": "object",
1356
+ "required": [
1357
+ "code",
1358
+ "msg",
1359
+ "data"
1360
+ ],
1361
+ "properties": {
1362
+ "code": {
1363
+ "type": "integer"
1364
+ },
1365
+ "msg": {
1366
+ "type": "string"
1367
+ },
1368
+ "data": {
1369
+ "type": "object",
1370
+ "required": [
1371
+ "departments",
1372
+ "users"
1373
+ ],
1374
+ "properties": {
1375
+ "departments": {
1376
+ "type": "array",
1377
+ "items": {
1378
+ "type": "object",
1379
+ "required": [
1380
+ "id",
1381
+ "parentId",
1382
+ "name",
1383
+ "orderNo",
1384
+ "memberCount"
1385
+ ],
1386
+ "properties": {
1387
+ "id": {
1388
+ "type": "number"
1389
+ },
1390
+ "parentId": {
1391
+ "type": [
1392
+ "number",
1393
+ "null"
1394
+ ]
1395
+ },
1396
+ "name": {
1397
+ "type": [
1398
+ "string",
1399
+ "null"
1400
+ ]
1401
+ },
1402
+ "nameEn": {
1403
+ "type": [
1404
+ "string",
1405
+ "null"
1406
+ ]
1407
+ },
1408
+ "orderNo": {
1409
+ "type": "number"
1410
+ },
1411
+ "memberCount": {
1412
+ "type": "number"
1413
+ }
1414
+ }
1415
+ }
1416
+ },
1417
+ "users": {
1418
+ "type": "array",
1419
+ "items": {
1420
+ "type": "object",
1421
+ "required": [
1422
+ "userId",
1423
+ "username",
1424
+ "deptId",
1425
+ "deptPath",
1426
+ "isMain"
1427
+ ],
1428
+ "properties": {
1429
+ "userId": {
1430
+ "type": "number"
1431
+ },
1432
+ "username": {
1433
+ "type": "string"
1434
+ },
1435
+ "displayName": {
1436
+ "type": [
1437
+ "string",
1438
+ "null"
1439
+ ]
1440
+ },
1441
+ "deptId": {
1442
+ "type": "number"
1443
+ },
1444
+ "deptPath": {
1445
+ "type": "array",
1446
+ "items": {
1447
+ "type": "string"
1448
+ }
1449
+ },
1450
+ "isMain": {
1451
+ "type": "boolean"
1452
+ }
1453
+ }
1454
+ }
1455
+ }
1456
+ }
1457
+ }
1458
+ }
1459
+ }
1460
+ }
1461
+ }
1462
+ }
1463
+ }
1464
+ }
1465
+ },
1466
+ "/api/_platform/org/resolve": {
1467
+ "post": {
1468
+ "operationId": "_platform_org_resolve_post",
1469
+ "summary": "POST api/_platform/org/resolve",
1470
+ "x-oj-file": "_platform/org/resolve/api.ts",
1471
+ "tags": [
1472
+ "_platform"
1473
+ ],
1474
+ "parameters": [
1475
+ {
1476
+ "name": "scope",
1477
+ "in": "query",
1478
+ "required": false,
1479
+ "schema": {
1480
+ "type": "string",
1481
+ "enum": [
1482
+ "self",
1483
+ "all"
1484
+ ]
1485
+ }
1486
+ }
1487
+ ],
1488
+ "requestBody": {
1489
+ "required": false,
1490
+ "content": {
1491
+ "application/json": {
1492
+ "schema": {
1493
+ "type": "object",
1494
+ "properties": {
1495
+ "deptIds": {
1496
+ "type": "array",
1497
+ "items": {
1498
+ "type": "number"
1499
+ }
1500
+ },
1501
+ "userIds": {
1502
+ "type": "array",
1503
+ "items": {
1504
+ "type": "number"
1505
+ }
1506
+ },
1507
+ "includeSub": {
1508
+ "type": "boolean"
1509
+ }
1510
+ }
1511
+ }
1512
+ }
1513
+ }
1514
+ },
1515
+ "responses": {
1516
+ "200": {
1517
+ "description": "OK",
1518
+ "x-oj-response-enforced": false,
1519
+ "content": {
1520
+ "application/json": {
1521
+ "schema": {
1522
+ "type": "object",
1523
+ "required": [
1524
+ "code",
1525
+ "msg",
1526
+ "data"
1527
+ ],
1528
+ "properties": {
1529
+ "code": {
1530
+ "type": "integer"
1531
+ },
1532
+ "msg": {
1533
+ "type": "string"
1534
+ },
1535
+ "data": {
1536
+ "type": "object",
1537
+ "required": [
1538
+ "userIds"
1539
+ ],
1540
+ "properties": {
1541
+ "userIds": {
1542
+ "type": "array",
1543
+ "items": {
1544
+ "type": "number"
1545
+ }
1546
+ }
1547
+ }
1548
+ }
1549
+ }
1550
+ }
1551
+ }
1552
+ }
1553
+ }
1554
+ }
1555
+ }
1556
+ },
1557
+ "/api/_platform/org/is-member": {
1558
+ "get": {
1559
+ "operationId": "_platform_org_is_member_get",
1560
+ "summary": "GET api/_platform/org/is-member",
1561
+ "x-oj-file": "_platform/org/is-member/api.ts",
1562
+ "tags": [
1563
+ "_platform"
1564
+ ],
1565
+ "parameters": [
1566
+ {
1567
+ "name": "scope",
1568
+ "in": "query",
1569
+ "required": false,
1570
+ "schema": {
1571
+ "type": "string",
1572
+ "enum": [
1573
+ "self",
1574
+ "all"
1575
+ ]
1576
+ }
1577
+ },
1578
+ {
1579
+ "name": "uid",
1580
+ "in": "query",
1581
+ "required": false,
1582
+ "schema": {
1583
+ "type": "number"
1584
+ }
1585
+ },
1586
+ {
1587
+ "name": "dept",
1588
+ "in": "query",
1589
+ "required": true,
1590
+ "schema": {
1591
+ "type": "number"
1592
+ }
1593
+ }
1594
+ ],
1595
+ "responses": {
1596
+ "200": {
1597
+ "description": "OK",
1598
+ "x-oj-response-enforced": false,
1599
+ "content": {
1600
+ "application/json": {
1601
+ "schema": {
1602
+ "type": "object",
1603
+ "required": [
1604
+ "code",
1605
+ "msg",
1606
+ "data"
1607
+ ],
1608
+ "properties": {
1609
+ "code": {
1610
+ "type": "integer"
1611
+ },
1612
+ "msg": {
1613
+ "type": "string"
1614
+ },
1615
+ "data": {
1616
+ "type": "object",
1617
+ "required": [
1618
+ "isMember"
1619
+ ],
1620
+ "properties": {
1621
+ "isMember": {
1622
+ "type": "boolean"
1623
+ }
1624
+ }
1625
+ }
1626
+ }
1627
+ }
1628
+ }
1629
+ }
1630
+ }
1631
+ }
1632
+ }
1633
+ },
786
1634
  "/api/auth/login": {
787
1635
  "post": {
788
- "operationId": "auth_login_post",
789
- "summary": "POST api/auth/login",
790
- "x-oj-file": "auth/api.ts",
1636
+ "operationId": "auth_login_post",
1637
+ "summary": "POST api/auth/login",
1638
+ "x-oj-file": "auth/api.ts",
1639
+ "tags": [
1640
+ "auth"
1641
+ ],
1642
+ "responses": {
1643
+ "200": {
1644
+ "description": "OK"
1645
+ }
1646
+ }
1647
+ }
1648
+ },
1649
+ "/api/auth/logout": {
1650
+ "post": {
1651
+ "operationId": "auth_logout_post",
1652
+ "summary": "POST api/auth/logout",
1653
+ "x-oj-file": "auth/api.ts",
1654
+ "tags": [
1655
+ "auth"
1656
+ ],
1657
+ "responses": {
1658
+ "200": {
1659
+ "description": "OK"
1660
+ }
1661
+ }
1662
+ }
1663
+ },
1664
+ "/api/auth/refresh": {
1665
+ "post": {
1666
+ "operationId": "auth_refresh_post",
1667
+ "summary": "POST api/auth/refresh",
1668
+ "x-oj-file": "auth/api.ts",
1669
+ "tags": [
1670
+ "auth"
1671
+ ],
1672
+ "responses": {
1673
+ "200": {
1674
+ "description": "OK"
1675
+ }
1676
+ }
1677
+ }
1678
+ },
1679
+ "/api/auth/password": {
1680
+ "put": {
1681
+ "operationId": "auth_password_put",
1682
+ "summary": "PUT api/auth/password",
1683
+ "x-oj-file": "auth/api.ts",
1684
+ "tags": [
1685
+ "auth"
1686
+ ],
1687
+ "requestBody": {
1688
+ "required": true,
1689
+ "content": {
1690
+ "application/json": {
1691
+ "schema": {
1692
+ "type": "object",
1693
+ "required": [
1694
+ "old_password",
1695
+ "new_password"
1696
+ ],
1697
+ "properties": {
1698
+ "old_password": {
1699
+ "type": "string",
1700
+ "minLength": 1
1701
+ },
1702
+ "new_password": {
1703
+ "type": "string",
1704
+ "minLength": 6
1705
+ }
1706
+ }
1707
+ }
1708
+ }
1709
+ }
1710
+ },
1711
+ "responses": {
1712
+ "200": {
1713
+ "description": "OK"
1714
+ }
1715
+ }
1716
+ }
1717
+ },
1718
+ "/api/auth/ldap-login": {
1719
+ "post": {
1720
+ "operationId": "auth_ldap_login_post",
1721
+ "summary": "POST api/auth/ldap-login",
1722
+ "x-oj-file": "auth/ldap-login/api.ts",
1723
+ "tags": [
1724
+ "auth"
1725
+ ],
1726
+ "responses": {
1727
+ "200": {
1728
+ "description": "OK"
1729
+ }
1730
+ }
1731
+ }
1732
+ },
1733
+ "/api/auth/wecom/admin/apps": {
1734
+ "get": {
1735
+ "operationId": "auth_wecom_admin_apps_get",
1736
+ "summary": "GET api/auth/wecom/admin/apps",
1737
+ "x-oj-file": "auth/wecom/admin/api.ts",
1738
+ "tags": [
1739
+ "auth"
1740
+ ],
1741
+ "responses": {
1742
+ "200": {
1743
+ "description": "OK",
1744
+ "x-oj-response-enforced": false,
1745
+ "content": {
1746
+ "application/json": {
1747
+ "schema": {
1748
+ "type": "object",
1749
+ "required": [
1750
+ "code",
1751
+ "msg",
1752
+ "data"
1753
+ ],
1754
+ "properties": {
1755
+ "code": {
1756
+ "type": "integer"
1757
+ },
1758
+ "msg": {
1759
+ "type": "string"
1760
+ },
1761
+ "data": {
1762
+ "type": "array",
1763
+ "items": {
1764
+ "type": "object",
1765
+ "required": [
1766
+ "suite_id",
1767
+ "corp_id",
1768
+ "agent_id",
1769
+ "auth_corp_id",
1770
+ "env",
1771
+ "status",
1772
+ "auth_mode",
1773
+ "installed_at",
1774
+ "update_time"
1775
+ ],
1776
+ "properties": {
1777
+ "suite_id": {
1778
+ "type": "string"
1779
+ },
1780
+ "corp_id": {
1781
+ "type": "string"
1782
+ },
1783
+ "agent_id": {
1784
+ "type": "string"
1785
+ },
1786
+ "auth_corp_id": {
1787
+ "type": "string"
1788
+ },
1789
+ "env": {
1790
+ "type": "string"
1791
+ },
1792
+ "corp_name": {
1793
+ "type": [
1794
+ "string",
1795
+ "null"
1796
+ ]
1797
+ },
1798
+ "status": {
1799
+ "type": "string",
1800
+ "enum": [
1801
+ "active",
1802
+ "disabled"
1803
+ ]
1804
+ },
1805
+ "auth_mode": {
1806
+ "type": "number"
1807
+ },
1808
+ "installed_at": {
1809
+ "type": "number"
1810
+ },
1811
+ "update_time": {
1812
+ "type": "number"
1813
+ }
1814
+ }
1815
+ }
1816
+ }
1817
+ }
1818
+ }
1819
+ }
1820
+ }
1821
+ }
1822
+ }
1823
+ }
1824
+ },
1825
+ "/api/auth/wecom/admin/status": {
1826
+ "post": {
1827
+ "operationId": "auth_wecom_admin_status_post",
1828
+ "summary": "POST api/auth/wecom/admin/status",
1829
+ "x-oj-file": "auth/wecom/admin/api.ts",
1830
+ "tags": [
1831
+ "auth"
1832
+ ],
1833
+ "requestBody": {
1834
+ "required": true,
1835
+ "content": {
1836
+ "application/json": {
1837
+ "schema": {
1838
+ "type": "object",
1839
+ "required": [
1840
+ "corpId",
1841
+ "agentId",
1842
+ "status"
1843
+ ],
1844
+ "properties": {
1845
+ "corpId": {
1846
+ "type": "string",
1847
+ "minLength": 1
1848
+ },
1849
+ "agentId": {
1850
+ "type": "string",
1851
+ "minLength": 1
1852
+ },
1853
+ "status": {
1854
+ "type": "string",
1855
+ "enum": [
1856
+ "active",
1857
+ "disabled"
1858
+ ]
1859
+ }
1860
+ }
1861
+ }
1862
+ }
1863
+ }
1864
+ },
1865
+ "responses": {
1866
+ "200": {
1867
+ "description": "OK",
1868
+ "x-oj-response-enforced": false,
1869
+ "content": {
1870
+ "application/json": {
1871
+ "schema": {
1872
+ "type": "object",
1873
+ "required": [
1874
+ "code",
1875
+ "msg",
1876
+ "data"
1877
+ ],
1878
+ "properties": {
1879
+ "code": {
1880
+ "type": "integer"
1881
+ },
1882
+ "msg": {
1883
+ "type": "string"
1884
+ },
1885
+ "data": {
1886
+ "type": "object",
1887
+ "required": [
1888
+ "updated",
1889
+ "revokedSessions"
1890
+ ],
1891
+ "properties": {
1892
+ "updated": {
1893
+ "type": "number"
1894
+ },
1895
+ "revokedSessions": {
1896
+ "type": "number"
1897
+ }
1898
+ }
1899
+ }
1900
+ }
1901
+ }
1902
+ }
1903
+ }
1904
+ }
1905
+ }
1906
+ }
1907
+ },
1908
+ "/api/auth/wecom/admin/install": {
1909
+ "get": {
1910
+ "operationId": "auth_wecom_admin_install_get",
1911
+ "summary": "GET api/auth/wecom/admin/install",
1912
+ "x-oj-file": "auth/wecom/admin/api.ts",
1913
+ "tags": [
1914
+ "auth"
1915
+ ],
1916
+ "responses": {
1917
+ "200": {
1918
+ "description": "OK",
1919
+ "x-oj-response-enforced": false,
1920
+ "content": {
1921
+ "application/json": {
1922
+ "schema": {
1923
+ "type": "object",
1924
+ "required": [
1925
+ "code",
1926
+ "msg",
1927
+ "data"
1928
+ ],
1929
+ "properties": {
1930
+ "code": {
1931
+ "type": "integer"
1932
+ },
1933
+ "msg": {
1934
+ "type": "string"
1935
+ },
1936
+ "data": {
1937
+ "type": "object",
1938
+ "required": [
1939
+ "installUrl",
1940
+ "callbackUrl",
1941
+ "expiresIn"
1942
+ ],
1943
+ "properties": {
1944
+ "installUrl": {
1945
+ "type": "string"
1946
+ },
1947
+ "callbackUrl": {
1948
+ "type": "string"
1949
+ },
1950
+ "expiresIn": {
1951
+ "type": "number"
1952
+ }
1953
+ }
1954
+ }
1955
+ }
1956
+ }
1957
+ }
1958
+ }
1959
+ }
1960
+ }
1961
+ }
1962
+ },
1963
+ "/api/auth/wecom/login": {
1964
+ "get": {
1965
+ "operationId": "auth_wecom_login_get",
1966
+ "summary": "GET api/auth/wecom/login",
1967
+ "x-oj-file": "auth/wecom/api.ts",
1968
+ "tags": [
1969
+ "auth"
1970
+ ],
1971
+ "responses": {
1972
+ "200": {
1973
+ "description": "OK"
1974
+ }
1975
+ }
1976
+ }
1977
+ },
1978
+ "/api/auth/wecom/callback": {
1979
+ "get": {
1980
+ "operationId": "auth_wecom_callback_get",
1981
+ "summary": "GET api/auth/wecom/callback",
1982
+ "x-oj-file": "auth/wecom/api.ts",
1983
+ "tags": [
1984
+ "auth"
1985
+ ],
1986
+ "responses": {
1987
+ "200": {
1988
+ "description": "OK"
1989
+ }
1990
+ }
1991
+ }
1992
+ },
1993
+ "/api/auth/wecom/ticket": {
1994
+ "post": {
1995
+ "operationId": "auth_wecom_ticket_post",
1996
+ "summary": "POST api/auth/wecom/ticket",
1997
+ "x-oj-file": "auth/wecom/api.ts",
1998
+ "tags": [
1999
+ "auth"
2000
+ ],
2001
+ "requestBody": {
2002
+ "required": true,
2003
+ "content": {
2004
+ "application/json": {
2005
+ "schema": {
2006
+ "type": "object",
2007
+ "required": [
2008
+ "ticket"
2009
+ ],
2010
+ "properties": {
2011
+ "ticket": {
2012
+ "type": "string",
2013
+ "minLength": 32,
2014
+ "maxLength": 128
2015
+ }
2016
+ }
2017
+ }
2018
+ }
2019
+ }
2020
+ },
2021
+ "responses": {
2022
+ "200": {
2023
+ "description": "OK"
2024
+ }
2025
+ }
2026
+ }
2027
+ },
2028
+ "/api/auth/wecom/event": {
2029
+ "get": {
2030
+ "operationId": "auth_wecom_event_get",
2031
+ "summary": "GET api/auth/wecom/event",
2032
+ "x-oj-file": "auth/wecom/api.ts",
2033
+ "tags": [
2034
+ "auth"
2035
+ ],
2036
+ "responses": {
2037
+ "200": {
2038
+ "description": "OK"
2039
+ }
2040
+ }
2041
+ },
2042
+ "post": {
2043
+ "operationId": "auth_wecom_event_post",
2044
+ "summary": "POST api/auth/wecom/event",
2045
+ "x-oj-file": "auth/wecom/api.ts",
2046
+ "tags": [
2047
+ "auth"
2048
+ ],
2049
+ "responses": {
2050
+ "200": {
2051
+ "description": "OK"
2052
+ }
2053
+ }
2054
+ }
2055
+ },
2056
+ "/api/demo/todos": {
2057
+ "get": {
2058
+ "operationId": "demo_todos_get",
2059
+ "summary": "GET api/demo/todos",
2060
+ "x-oj-file": "demo/todos/api.ts",
2061
+ "tags": [
2062
+ "demo"
2063
+ ],
2064
+ "parameters": [
2065
+ {
2066
+ "name": "keyword",
2067
+ "in": "query",
2068
+ "required": false,
2069
+ "schema": {
2070
+ "type": "string"
2071
+ }
2072
+ }
2073
+ ],
2074
+ "responses": {
2075
+ "200": {
2076
+ "description": "OK",
2077
+ "x-oj-response-enforced": false,
2078
+ "content": {
2079
+ "application/json": {
2080
+ "schema": {
2081
+ "type": "object",
2082
+ "required": [
2083
+ "code",
2084
+ "msg",
2085
+ "data"
2086
+ ],
2087
+ "properties": {
2088
+ "code": {
2089
+ "type": "integer"
2090
+ },
2091
+ "msg": {
2092
+ "type": "string"
2093
+ },
2094
+ "data": {
2095
+ "type": "object",
2096
+ "required": [
2097
+ "list",
2098
+ "total"
2099
+ ],
2100
+ "properties": {
2101
+ "list": {
2102
+ "type": "array",
2103
+ "items": {
2104
+ "type": "object",
2105
+ "required": [
2106
+ "id",
2107
+ "title",
2108
+ "done"
2109
+ ],
2110
+ "properties": {
2111
+ "id": {
2112
+ "type": "number"
2113
+ },
2114
+ "title": {
2115
+ "type": "string"
2116
+ },
2117
+ "done": {
2118
+ "type": "boolean"
2119
+ }
2120
+ }
2121
+ }
2122
+ },
2123
+ "total": {
2124
+ "type": "number"
2125
+ }
2126
+ }
2127
+ }
2128
+ }
2129
+ }
2130
+ }
2131
+ }
2132
+ }
2133
+ }
2134
+ }
2135
+ },
2136
+ "/api/home/line": {
2137
+ "post": {
2138
+ "operationId": "home_line_post",
2139
+ "summary": "POST api/home/line",
2140
+ "x-oj-file": "home/line/api.ts",
2141
+ "tags": [
2142
+ "home"
2143
+ ],
2144
+ "requestBody": {
2145
+ "required": true,
2146
+ "content": {
2147
+ "application/json": {
2148
+ "schema": {
2149
+ "type": "object",
2150
+ "required": [
2151
+ "range"
2152
+ ],
2153
+ "properties": {
2154
+ "range": {
2155
+ "type": "string"
2156
+ }
2157
+ }
2158
+ }
2159
+ }
2160
+ }
2161
+ },
2162
+ "responses": {
2163
+ "200": {
2164
+ "description": "OK",
2165
+ "x-oj-response-enforced": false,
2166
+ "content": {
2167
+ "application/json": {
2168
+ "schema": {
2169
+ "type": "object",
2170
+ "required": [
2171
+ "code",
2172
+ "msg",
2173
+ "data"
2174
+ ],
2175
+ "properties": {
2176
+ "code": {
2177
+ "type": "integer"
2178
+ },
2179
+ "msg": {
2180
+ "type": "string"
2181
+ },
2182
+ "data": {
2183
+ "type": "array",
2184
+ "items": {
2185
+ "type": "number"
2186
+ }
2187
+ }
2188
+ }
2189
+ }
2190
+ }
2191
+ }
2192
+ }
2193
+ }
2194
+ }
2195
+ },
2196
+ "/api/home/pie": {
2197
+ "get": {
2198
+ "operationId": "home_pie_get",
2199
+ "summary": "GET api/home/pie",
2200
+ "x-oj-file": "home/pie/api.ts",
2201
+ "tags": [
2202
+ "home"
2203
+ ],
2204
+ "parameters": [
2205
+ {
2206
+ "name": "by",
2207
+ "in": "query",
2208
+ "required": false,
2209
+ "schema": {
2210
+ "type": [
2211
+ "string",
2212
+ "number"
2213
+ ]
2214
+ }
2215
+ }
2216
+ ],
2217
+ "responses": {
2218
+ "200": {
2219
+ "description": "OK",
2220
+ "x-oj-response-enforced": false,
2221
+ "content": {
2222
+ "application/json": {
2223
+ "schema": {
2224
+ "type": "object",
2225
+ "required": [
2226
+ "code",
2227
+ "msg",
2228
+ "data"
2229
+ ],
2230
+ "properties": {
2231
+ "code": {
2232
+ "type": "integer"
2233
+ },
2234
+ "msg": {
2235
+ "type": "string"
2236
+ },
2237
+ "data": {
2238
+ "type": "array",
2239
+ "items": {
2240
+ "type": "object",
2241
+ "required": [
2242
+ "value",
2243
+ "code"
2244
+ ],
2245
+ "properties": {
2246
+ "value": {
2247
+ "type": "number"
2248
+ },
2249
+ "code": {
2250
+ "type": "string"
2251
+ }
2252
+ }
2253
+ }
2254
+ }
2255
+ }
2256
+ }
2257
+ }
2258
+ }
2259
+ }
2260
+ }
2261
+ }
2262
+ },
2263
+ "/api/notification/notifications": {
2264
+ "get": {
2265
+ "operationId": "notification_notifications_get",
2266
+ "summary": "GET api/notification/notifications",
2267
+ "x-oj-file": "notification/api.ts",
2268
+ "tags": [
2269
+ "notification"
2270
+ ],
2271
+ "responses": {
2272
+ "200": {
2273
+ "description": "OK",
2274
+ "x-oj-response-enforced": false,
2275
+ "content": {
2276
+ "application/json": {
2277
+ "schema": {
2278
+ "type": "object",
2279
+ "required": [
2280
+ "code",
2281
+ "msg",
2282
+ "data"
2283
+ ],
2284
+ "properties": {
2285
+ "code": {
2286
+ "type": "integer"
2287
+ },
2288
+ "msg": {
2289
+ "type": "string"
2290
+ },
2291
+ "data": {
2292
+ "type": "array",
2293
+ "items": {
2294
+ "type": "object",
2295
+ "required": [
2296
+ "id",
2297
+ "scope",
2298
+ "avatar",
2299
+ "date",
2300
+ "message",
2301
+ "title"
2302
+ ],
2303
+ "properties": {
2304
+ "id": {
2305
+ "type": "string"
2306
+ },
2307
+ "scope": {
2308
+ "type": "string",
2309
+ "enum": [
2310
+ "user",
2311
+ "broadcast"
2312
+ ]
2313
+ },
2314
+ "avatar": {
2315
+ "type": "string"
2316
+ },
2317
+ "date": {
2318
+ "type": "string"
2319
+ },
2320
+ "isRead": {
2321
+ "type": "boolean"
2322
+ },
2323
+ "message": {
2324
+ "type": "string"
2325
+ },
2326
+ "title": {
2327
+ "type": "string"
2328
+ },
2329
+ "link": {
2330
+ "type": [
2331
+ "string",
2332
+ "null"
2333
+ ]
2334
+ },
2335
+ "category": {
2336
+ "type": "string",
2337
+ "enum": [
2338
+ "notice",
2339
+ "pm",
2340
+ "mention"
2341
+ ]
2342
+ }
2343
+ }
2344
+ }
2345
+ }
2346
+ }
2347
+ }
2348
+ }
2349
+ }
2350
+ }
2351
+ }
2352
+ }
2353
+ },
2354
+ "/api/notification/notifications/read": {
2355
+ "post": {
2356
+ "operationId": "notification_notifications_read_post",
2357
+ "summary": "POST api/notification/notifications/read",
2358
+ "x-oj-file": "notification/api.ts",
791
2359
  "tags": [
792
- "auth"
2360
+ "notification"
793
2361
  ],
2362
+ "requestBody": {
2363
+ "required": true,
2364
+ "content": {
2365
+ "application/json": {
2366
+ "schema": {
2367
+ "type": "object",
2368
+ "required": [
2369
+ "id"
2370
+ ],
2371
+ "properties": {
2372
+ "id": {
2373
+ "type": "string"
2374
+ }
2375
+ }
2376
+ }
2377
+ }
2378
+ }
2379
+ },
794
2380
  "responses": {
795
2381
  "200": {
796
2382
  "description": "OK"
@@ -798,13 +2384,13 @@
798
2384
  }
799
2385
  }
800
2386
  },
801
- "/api/auth/logout": {
2387
+ "/api/notification/notifications/read-all": {
802
2388
  "post": {
803
- "operationId": "auth_logout_post",
804
- "summary": "POST api/auth/logout",
805
- "x-oj-file": "auth/api.ts",
2389
+ "operationId": "notification_notifications_read_all_post",
2390
+ "summary": "POST api/notification/notifications/read-all",
2391
+ "x-oj-file": "notification/api.ts",
806
2392
  "tags": [
807
- "auth"
2393
+ "notification"
808
2394
  ],
809
2395
  "responses": {
810
2396
  "200": {
@@ -813,14 +2399,161 @@
813
2399
  }
814
2400
  }
815
2401
  },
816
- "/api/auth/refresh": {
2402
+ "/api/notification/notifications/clear": {
817
2403
  "post": {
818
- "operationId": "auth_refresh_post",
819
- "summary": "POST api/auth/refresh",
820
- "x-oj-file": "auth/api.ts",
2404
+ "operationId": "notification_notifications_clear_post",
2405
+ "summary": "POST api/notification/notifications/clear",
2406
+ "x-oj-file": "notification/api.ts",
2407
+ "tags": [
2408
+ "notification"
2409
+ ],
2410
+ "responses": {
2411
+ "200": {
2412
+ "description": "OK"
2413
+ }
2414
+ }
2415
+ }
2416
+ },
2417
+ "/api/notification/push": {
2418
+ "post": {
2419
+ "operationId": "notification_push_post",
2420
+ "summary": "POST api/notification/push",
2421
+ "x-oj-file": "notification/api.ts",
2422
+ "tags": [
2423
+ "notification"
2424
+ ],
2425
+ "requestBody": {
2426
+ "required": true,
2427
+ "content": {
2428
+ "application/json": {
2429
+ "schema": {
2430
+ "type": "object",
2431
+ "required": [
2432
+ "title",
2433
+ "message"
2434
+ ],
2435
+ "properties": {
2436
+ "userId": {
2437
+ "type": [
2438
+ "string",
2439
+ "number"
2440
+ ]
2441
+ },
2442
+ "title": {
2443
+ "type": "string"
2444
+ },
2445
+ "message": {
2446
+ "type": "string"
2447
+ },
2448
+ "link": {
2449
+ "type": "string"
2450
+ },
2451
+ "avatar": {
2452
+ "type": "string"
2453
+ },
2454
+ "category": {
2455
+ "type": "string",
2456
+ "enum": [
2457
+ "notice",
2458
+ "pm",
2459
+ "mention"
2460
+ ]
2461
+ }
2462
+ }
2463
+ }
2464
+ }
2465
+ }
2466
+ },
2467
+ "responses": {
2468
+ "200": {
2469
+ "description": "OK"
2470
+ }
2471
+ }
2472
+ }
2473
+ },
2474
+ "/api/notification/push-broadcast": {
2475
+ "post": {
2476
+ "operationId": "notification_push_broadcast_post",
2477
+ "summary": "POST api/notification/push-broadcast",
2478
+ "x-oj-file": "notification/api.ts",
2479
+ "tags": [
2480
+ "notification"
2481
+ ],
2482
+ "requestBody": {
2483
+ "required": true,
2484
+ "content": {
2485
+ "application/json": {
2486
+ "schema": {
2487
+ "type": "object",
2488
+ "required": [
2489
+ "title",
2490
+ "message"
2491
+ ],
2492
+ "properties": {
2493
+ "title": {
2494
+ "type": "string"
2495
+ },
2496
+ "message": {
2497
+ "type": "string"
2498
+ },
2499
+ "link": {
2500
+ "type": "string"
2501
+ },
2502
+ "avatar": {
2503
+ "type": "string"
2504
+ },
2505
+ "category": {
2506
+ "type": "string",
2507
+ "enum": [
2508
+ "notice",
2509
+ "pm",
2510
+ "mention"
2511
+ ]
2512
+ }
2513
+ }
2514
+ }
2515
+ }
2516
+ }
2517
+ },
2518
+ "responses": {
2519
+ "200": {
2520
+ "description": "OK"
2521
+ }
2522
+ }
2523
+ }
2524
+ },
2525
+ "/api/notification/del": {
2526
+ "post": {
2527
+ "operationId": "notification_del_post",
2528
+ "summary": "POST api/notification/del",
2529
+ "x-oj-file": "notification/del/api.ts",
821
2530
  "tags": [
822
- "auth"
2531
+ "notification"
823
2532
  ],
2533
+ "requestBody": {
2534
+ "required": true,
2535
+ "content": {
2536
+ "application/json": {
2537
+ "schema": {
2538
+ "type": "object",
2539
+ "required": [
2540
+ "id"
2541
+ ],
2542
+ "properties": {
2543
+ "id": {
2544
+ "type": "string"
2545
+ },
2546
+ "userId": {
2547
+ "type": [
2548
+ "string",
2549
+ "number"
2550
+ ]
2551
+ }
2552
+ }
2553
+ }
2554
+ }
2555
+ }
2556
+ },
824
2557
  "responses": {
825
2558
  "200": {
826
2559
  "description": "OK"
@@ -828,13 +2561,13 @@
828
2561
  }
829
2562
  }
830
2563
  },
831
- "/api/auth/password": {
832
- "put": {
833
- "operationId": "auth_password_put",
834
- "summary": "PUT api/auth/password",
835
- "x-oj-file": "auth/api.ts",
2564
+ "/api/personal-center/profile": {
2565
+ "post": {
2566
+ "operationId": "personal_center_profile_post",
2567
+ "summary": "POST api/personal-center/profile",
2568
+ "x-oj-file": "personal-center/profile/api.ts",
836
2569
  "tags": [
837
- "auth"
2570
+ "personal-center"
838
2571
  ],
839
2572
  "requestBody": {
840
2573
  "required": true,
@@ -842,18 +2575,18 @@
842
2575
  "application/json": {
843
2576
  "schema": {
844
2577
  "type": "object",
845
- "required": [
846
- "old_password",
847
- "new_password"
848
- ],
849
2578
  "properties": {
850
- "old_password": {
851
- "type": "string",
852
- "minLength": 1
2579
+ "username": {
2580
+ "type": "string"
853
2581
  },
854
- "new_password": {
855
- "type": "string",
856
- "minLength": 6
2582
+ "email": {
2583
+ "type": "string"
2584
+ },
2585
+ "phoneNumber": {
2586
+ "type": "string"
2587
+ },
2588
+ "description": {
2589
+ "type": "string"
857
2590
  }
858
2591
  }
859
2592
  }
@@ -862,33 +2595,81 @@
862
2595
  },
863
2596
  "responses": {
864
2597
  "200": {
865
- "description": "OK"
2598
+ "description": "OK",
2599
+ "x-oj-response-enforced": false,
2600
+ "content": {
2601
+ "application/json": {
2602
+ "schema": {
2603
+ "type": "object",
2604
+ "required": [
2605
+ "code",
2606
+ "msg",
2607
+ "data"
2608
+ ],
2609
+ "properties": {
2610
+ "code": {
2611
+ "type": "integer"
2612
+ },
2613
+ "msg": {
2614
+ "type": "string"
2615
+ },
2616
+ "data": {
2617
+ "type": "null"
2618
+ }
2619
+ }
2620
+ }
2621
+ }
2622
+ }
866
2623
  }
867
2624
  }
868
2625
  }
869
2626
  },
870
- "/api/auth/ldap-login": {
2627
+ "/api/personal-center/upload": {
871
2628
  "post": {
872
- "operationId": "auth_ldap_login_post",
873
- "summary": "POST api/auth/ldap-login",
874
- "x-oj-file": "auth/ldap-login/api.ts",
2629
+ "operationId": "personal_center_upload_post",
2630
+ "summary": "POST api/personal-center/upload",
2631
+ "x-oj-file": "personal-center/upload/api.ts",
875
2632
  "tags": [
876
- "auth"
2633
+ "personal-center"
877
2634
  ],
878
2635
  "responses": {
879
2636
  "200": {
880
- "description": "OK"
2637
+ "description": "OK",
2638
+ "x-oj-response-enforced": false,
2639
+ "content": {
2640
+ "application/json": {
2641
+ "schema": {
2642
+ "type": "object",
2643
+ "required": [
2644
+ "code",
2645
+ "msg",
2646
+ "data"
2647
+ ],
2648
+ "properties": {
2649
+ "code": {
2650
+ "type": "integer"
2651
+ },
2652
+ "msg": {
2653
+ "type": "string"
2654
+ },
2655
+ "data": {
2656
+ "type": "string"
2657
+ }
2658
+ }
2659
+ }
2660
+ }
2661
+ }
881
2662
  }
882
2663
  }
883
2664
  }
884
2665
  },
885
- "/api/auth/wecom/admin/apps": {
2666
+ "/api/system/departments": {
886
2667
  "get": {
887
- "operationId": "auth_wecom_admin_apps_get",
888
- "summary": "GET api/auth/wecom/admin/apps",
889
- "x-oj-file": "auth/wecom/admin/api.ts",
2668
+ "operationId": "system_departments_get",
2669
+ "summary": "GET api/system/departments",
2670
+ "x-oj-file": "system/departments/api.ts",
890
2671
  "tags": [
891
- "auth"
2672
+ "system"
892
2673
  ],
893
2674
  "responses": {
894
2675
  "200": {
@@ -915,48 +2696,54 @@
915
2696
  "items": {
916
2697
  "type": "object",
917
2698
  "required": [
918
- "suite_id",
919
- "corp_id",
920
- "agent_id",
921
- "auth_corp_id",
922
- "env",
923
- "status",
924
- "installed_at",
925
- "update_time"
2699
+ "id",
2700
+ "origin",
2701
+ "originId",
2702
+ "parentId",
2703
+ "name",
2704
+ "orderNo",
2705
+ "syncVisible",
2706
+ "deleted",
2707
+ "memberCount"
926
2708
  ],
927
2709
  "properties": {
928
- "suite_id": {
929
- "type": "string"
930
- },
931
- "corp_id": {
932
- "type": "string"
2710
+ "id": {
2711
+ "type": "number"
933
2712
  },
934
- "agent_id": {
2713
+ "origin": {
935
2714
  "type": "string"
936
2715
  },
937
- "auth_corp_id": {
2716
+ "originId": {
938
2717
  "type": "string"
939
2718
  },
940
- "env": {
941
- "type": "string"
2719
+ "parentId": {
2720
+ "type": [
2721
+ "number",
2722
+ "null"
2723
+ ]
942
2724
  },
943
- "corp_name": {
2725
+ "name": {
944
2726
  "type": [
945
2727
  "string",
946
2728
  "null"
947
2729
  ]
948
2730
  },
949
- "status": {
950
- "type": "string",
951
- "enum": [
952
- "active",
953
- "disabled"
2731
+ "nameEn": {
2732
+ "type": [
2733
+ "string",
2734
+ "null"
954
2735
  ]
955
2736
  },
956
- "installed_at": {
2737
+ "orderNo": {
957
2738
  "type": "number"
958
2739
  },
959
- "update_time": {
2740
+ "syncVisible": {
2741
+ "type": "boolean"
2742
+ },
2743
+ "deleted": {
2744
+ "type": "boolean"
2745
+ },
2746
+ "memberCount": {
960
2747
  "type": "number"
961
2748
  }
962
2749
  }
@@ -968,15 +2755,13 @@
968
2755
  }
969
2756
  }
970
2757
  }
971
- }
972
- },
973
- "/api/auth/wecom/admin/status": {
2758
+ },
974
2759
  "post": {
975
- "operationId": "auth_wecom_admin_status_post",
976
- "summary": "POST api/auth/wecom/admin/status",
977
- "x-oj-file": "auth/wecom/admin/api.ts",
2760
+ "operationId": "system_departments_post",
2761
+ "summary": "POST api/system/departments",
2762
+ "x-oj-file": "system/departments/api.ts",
978
2763
  "tags": [
979
- "auth"
2764
+ "system"
980
2765
  ],
981
2766
  "requestBody": {
982
2767
  "required": true,
@@ -985,82 +2770,33 @@
985
2770
  "schema": {
986
2771
  "type": "object",
987
2772
  "required": [
988
- "corpId",
989
- "agentId",
990
- "status"
2773
+ "name"
991
2774
  ],
992
2775
  "properties": {
993
- "corpId": {
2776
+ "name": {
994
2777
  "type": "string",
995
2778
  "minLength": 1
996
2779
  },
997
- "agentId": {
998
- "type": "string",
999
- "minLength": 1
2780
+ "parentId": {
2781
+ "type": [
2782
+ "number",
2783
+ "null"
2784
+ ]
1000
2785
  },
1001
- "status": {
1002
- "type": "string",
1003
- "enum": [
1004
- "active",
1005
- "disabled"
2786
+ "nameEn": {
2787
+ "type": [
2788
+ "string",
2789
+ "null"
1006
2790
  ]
2791
+ },
2792
+ "orderNo": {
2793
+ "type": "number"
1007
2794
  }
1008
2795
  }
1009
2796
  }
1010
- }
1011
- }
1012
- },
1013
- "responses": {
1014
- "200": {
1015
- "description": "OK",
1016
- "x-oj-response-enforced": false,
1017
- "content": {
1018
- "application/json": {
1019
- "schema": {
1020
- "type": "object",
1021
- "required": [
1022
- "code",
1023
- "msg",
1024
- "data"
1025
- ],
1026
- "properties": {
1027
- "code": {
1028
- "type": "integer"
1029
- },
1030
- "msg": {
1031
- "type": "string"
1032
- },
1033
- "data": {
1034
- "type": "object",
1035
- "required": [
1036
- "updated",
1037
- "revokedSessions"
1038
- ],
1039
- "properties": {
1040
- "updated": {
1041
- "type": "number"
1042
- },
1043
- "revokedSessions": {
1044
- "type": "number"
1045
- }
1046
- }
1047
- }
1048
- }
1049
- }
1050
- }
1051
- }
1052
- }
1053
- }
1054
- }
1055
- },
1056
- "/api/auth/wecom/admin/install": {
1057
- "get": {
1058
- "operationId": "auth_wecom_admin_install_get",
1059
- "summary": "GET api/auth/wecom/admin/install",
1060
- "x-oj-file": "auth/wecom/admin/api.ts",
1061
- "tags": [
1062
- "auth"
1063
- ],
2797
+ }
2798
+ }
2799
+ },
1064
2800
  "responses": {
1065
2801
  "200": {
1066
2802
  "description": "OK",
@@ -1084,18 +2820,10 @@
1084
2820
  "data": {
1085
2821
  "type": "object",
1086
2822
  "required": [
1087
- "installUrl",
1088
- "callbackUrl",
1089
- "expiresIn"
2823
+ "id"
1090
2824
  ],
1091
2825
  "properties": {
1092
- "installUrl": {
1093
- "type": "string"
1094
- },
1095
- "callbackUrl": {
1096
- "type": "string"
1097
- },
1098
- "expiresIn": {
2826
+ "id": {
1099
2827
  "type": "number"
1100
2828
  }
1101
2829
  }
@@ -1106,45 +2834,23 @@
1106
2834
  }
1107
2835
  }
1108
2836
  }
1109
- }
1110
- },
1111
- "/api/auth/wecom/login": {
1112
- "get": {
1113
- "operationId": "auth_wecom_login_get",
1114
- "summary": "GET api/auth/wecom/login",
1115
- "x-oj-file": "auth/wecom/api.ts",
1116
- "tags": [
1117
- "auth"
1118
- ],
1119
- "responses": {
1120
- "200": {
1121
- "description": "OK"
1122
- }
1123
- }
1124
- }
1125
- },
1126
- "/api/auth/wecom/callback": {
1127
- "get": {
1128
- "operationId": "auth_wecom_callback_get",
1129
- "summary": "GET api/auth/wecom/callback",
1130
- "x-oj-file": "auth/wecom/api.ts",
2837
+ },
2838
+ "put": {
2839
+ "operationId": "system_departments_put",
2840
+ "summary": "PUT api/system/departments",
2841
+ "x-oj-file": "system/departments/api.ts",
1131
2842
  "tags": [
1132
- "auth"
2843
+ "system"
1133
2844
  ],
1134
- "responses": {
1135
- "200": {
1136
- "description": "OK"
2845
+ "parameters": [
2846
+ {
2847
+ "name": "id",
2848
+ "in": "query",
2849
+ "required": true,
2850
+ "schema": {
2851
+ "type": "number"
2852
+ }
1137
2853
  }
1138
- }
1139
- }
1140
- },
1141
- "/api/auth/wecom/ticket": {
1142
- "post": {
1143
- "operationId": "auth_wecom_ticket_post",
1144
- "summary": "POST api/auth/wecom/ticket",
1145
- "x-oj-file": "auth/wecom/api.ts",
1146
- "tags": [
1147
- "auth"
1148
2854
  ],
1149
2855
  "requestBody": {
1150
2856
  "required": true,
@@ -1152,14 +2858,19 @@
1152
2858
  "application/json": {
1153
2859
  "schema": {
1154
2860
  "type": "object",
1155
- "required": [
1156
- "ticket"
1157
- ],
1158
2861
  "properties": {
1159
- "ticket": {
2862
+ "name": {
1160
2863
  "type": "string",
1161
- "minLength": 32,
1162
- "maxLength": 128
2864
+ "minLength": 1
2865
+ },
2866
+ "nameEn": {
2867
+ "type": [
2868
+ "string",
2869
+ "null"
2870
+ ]
2871
+ },
2872
+ "orderNo": {
2873
+ "type": "number"
1163
2874
  }
1164
2875
  }
1165
2876
  }
@@ -1168,54 +2879,56 @@
1168
2879
  },
1169
2880
  "responses": {
1170
2881
  "200": {
1171
- "description": "OK"
1172
- }
1173
- }
1174
- }
1175
- },
1176
- "/api/auth/wecom/event": {
1177
- "get": {
1178
- "operationId": "auth_wecom_event_get",
1179
- "summary": "GET api/auth/wecom/event",
1180
- "x-oj-file": "auth/wecom/api.ts",
1181
- "tags": [
1182
- "auth"
1183
- ],
1184
- "responses": {
1185
- "200": {
1186
- "description": "OK"
2882
+ "description": "OK",
2883
+ "x-oj-response-enforced": false,
2884
+ "content": {
2885
+ "application/json": {
2886
+ "schema": {
2887
+ "type": "object",
2888
+ "required": [
2889
+ "code",
2890
+ "msg",
2891
+ "data"
2892
+ ],
2893
+ "properties": {
2894
+ "code": {
2895
+ "type": "integer"
2896
+ },
2897
+ "msg": {
2898
+ "type": "string"
2899
+ },
2900
+ "data": {
2901
+ "type": "object",
2902
+ "required": [
2903
+ "ok"
2904
+ ],
2905
+ "properties": {
2906
+ "ok": {
2907
+ "type": "boolean"
2908
+ }
2909
+ }
2910
+ }
2911
+ }
2912
+ }
2913
+ }
2914
+ }
1187
2915
  }
1188
2916
  }
1189
2917
  },
1190
- "post": {
1191
- "operationId": "auth_wecom_event_post",
1192
- "summary": "POST api/auth/wecom/event",
1193
- "x-oj-file": "auth/wecom/api.ts",
1194
- "tags": [
1195
- "auth"
1196
- ],
1197
- "responses": {
1198
- "200": {
1199
- "description": "OK"
1200
- }
1201
- }
1202
- }
1203
- },
1204
- "/api/demo/todos": {
1205
- "get": {
1206
- "operationId": "demo_todos_get",
1207
- "summary": "GET api/demo/todos",
1208
- "x-oj-file": "demo/todos/api.ts",
2918
+ "delete": {
2919
+ "operationId": "system_departments_delete",
2920
+ "summary": "DELETE api/system/departments",
2921
+ "x-oj-file": "system/departments/api.ts",
1209
2922
  "tags": [
1210
- "demo"
2923
+ "system"
1211
2924
  ],
1212
2925
  "parameters": [
1213
2926
  {
1214
- "name": "keyword",
2927
+ "name": "id",
1215
2928
  "in": "query",
1216
- "required": false,
2929
+ "required": true,
1217
2930
  "schema": {
1218
- "type": "string"
2931
+ "type": "number"
1219
2932
  }
1220
2933
  }
1221
2934
  ],
@@ -1242,34 +2955,11 @@
1242
2955
  "data": {
1243
2956
  "type": "object",
1244
2957
  "required": [
1245
- "list",
1246
- "total"
2958
+ "ok"
1247
2959
  ],
1248
2960
  "properties": {
1249
- "list": {
1250
- "type": "array",
1251
- "items": {
1252
- "type": "object",
1253
- "required": [
1254
- "id",
1255
- "title",
1256
- "done"
1257
- ],
1258
- "properties": {
1259
- "id": {
1260
- "type": "number"
1261
- },
1262
- "title": {
1263
- "type": "string"
1264
- },
1265
- "done": {
1266
- "type": "boolean"
1267
- }
1268
- }
1269
- }
1270
- },
1271
- "total": {
1272
- "type": "number"
2961
+ "ok": {
2962
+ "type": "boolean"
1273
2963
  }
1274
2964
  }
1275
2965
  }
@@ -1281,13 +2971,23 @@
1281
2971
  }
1282
2972
  }
1283
2973
  },
1284
- "/api/home/line": {
1285
- "post": {
1286
- "operationId": "home_line_post",
1287
- "summary": "POST api/home/line",
1288
- "x-oj-file": "home/line/api.ts",
2974
+ "/api/system/departments/move": {
2975
+ "put": {
2976
+ "operationId": "system_departments_move_put",
2977
+ "summary": "PUT api/system/departments/move",
2978
+ "x-oj-file": "system/departments/move/api.ts",
1289
2979
  "tags": [
1290
- "home"
2980
+ "system"
2981
+ ],
2982
+ "parameters": [
2983
+ {
2984
+ "name": "id",
2985
+ "in": "query",
2986
+ "required": true,
2987
+ "schema": {
2988
+ "type": "number"
2989
+ }
2990
+ }
1291
2991
  ],
1292
2992
  "requestBody": {
1293
2993
  "required": true,
@@ -1296,11 +2996,14 @@
1296
2996
  "schema": {
1297
2997
  "type": "object",
1298
2998
  "required": [
1299
- "range"
2999
+ "parentId"
1300
3000
  ],
1301
3001
  "properties": {
1302
- "range": {
1303
- "type": "string"
3002
+ "parentId": {
3003
+ "type": [
3004
+ "number",
3005
+ "null"
3006
+ ]
1304
3007
  }
1305
3008
  }
1306
3009
  }
@@ -1328,9 +3031,14 @@
1328
3031
  "type": "string"
1329
3032
  },
1330
3033
  "data": {
1331
- "type": "array",
1332
- "items": {
1333
- "type": "number"
3034
+ "type": "object",
3035
+ "required": [
3036
+ "ok"
3037
+ ],
3038
+ "properties": {
3039
+ "ok": {
3040
+ "type": "boolean"
3041
+ }
1334
3042
  }
1335
3043
  }
1336
3044
  }
@@ -1341,24 +3049,21 @@
1341
3049
  }
1342
3050
  }
1343
3051
  },
1344
- "/api/home/pie": {
1345
- "get": {
1346
- "operationId": "home_pie_get",
1347
- "summary": "GET api/home/pie",
1348
- "x-oj-file": "home/pie/api.ts",
3052
+ "/api/system/departments/detach": {
3053
+ "post": {
3054
+ "operationId": "system_departments_detach_post",
3055
+ "summary": "POST api/system/departments/detach",
3056
+ "x-oj-file": "system/departments/detach/api.ts",
1349
3057
  "tags": [
1350
- "home"
3058
+ "system"
1351
3059
  ],
1352
3060
  "parameters": [
1353
3061
  {
1354
- "name": "by",
3062
+ "name": "id",
1355
3063
  "in": "query",
1356
- "required": false,
3064
+ "required": true,
1357
3065
  "schema": {
1358
- "type": [
1359
- "string",
1360
- "number"
1361
- ]
3066
+ "type": "number"
1362
3067
  }
1363
3068
  }
1364
3069
  ],
@@ -1383,20 +3088,13 @@
1383
3088
  "type": "string"
1384
3089
  },
1385
3090
  "data": {
1386
- "type": "array",
1387
- "items": {
1388
- "type": "object",
1389
- "required": [
1390
- "value",
1391
- "code"
1392
- ],
1393
- "properties": {
1394
- "value": {
1395
- "type": "number"
1396
- },
1397
- "code": {
1398
- "type": "string"
1399
- }
3091
+ "type": "object",
3092
+ "required": [
3093
+ "ok"
3094
+ ],
3095
+ "properties": {
3096
+ "ok": {
3097
+ "type": "boolean"
1400
3098
  }
1401
3099
  }
1402
3100
  }
@@ -1408,13 +3106,23 @@
1408
3106
  }
1409
3107
  }
1410
3108
  },
1411
- "/api/notification/notifications": {
3109
+ "/api/system/departments/members": {
1412
3110
  "get": {
1413
- "operationId": "notification_notifications_get",
1414
- "summary": "GET api/notification/notifications",
1415
- "x-oj-file": "notification/api.ts",
3111
+ "operationId": "system_departments_members_get",
3112
+ "summary": "GET api/system/departments/members",
3113
+ "x-oj-file": "system/departments/members/api.ts",
1416
3114
  "tags": [
1417
- "notification"
3115
+ "system"
3116
+ ],
3117
+ "parameters": [
3118
+ {
3119
+ "name": "id",
3120
+ "in": "query",
3121
+ "required": true,
3122
+ "schema": {
3123
+ "type": "number"
3124
+ }
3125
+ }
1418
3126
  ],
1419
3127
  "responses": {
1420
3128
  "200": {
@@ -1441,52 +3149,37 @@
1441
3149
  "items": {
1442
3150
  "type": "object",
1443
3151
  "required": [
1444
- "id",
1445
- "scope",
1446
- "avatar",
1447
- "date",
1448
- "message",
1449
- "title"
3152
+ "userId",
3153
+ "deptId",
3154
+ "orderNo",
3155
+ "isLeader",
3156
+ "isMain",
3157
+ "username"
1450
3158
  ],
1451
3159
  "properties": {
1452
- "id": {
1453
- "type": "string"
1454
- },
1455
- "scope": {
1456
- "type": "string",
1457
- "enum": [
1458
- "user",
1459
- "broadcast"
1460
- ]
3160
+ "userId": {
3161
+ "type": "number"
1461
3162
  },
1462
- "avatar": {
1463
- "type": "string"
3163
+ "deptId": {
3164
+ "type": "number"
1464
3165
  },
1465
- "date": {
1466
- "type": "string"
3166
+ "orderNo": {
3167
+ "type": "number"
1467
3168
  },
1468
- "isRead": {
3169
+ "isLeader": {
1469
3170
  "type": "boolean"
1470
3171
  },
1471
- "message": {
1472
- "type": "string"
3172
+ "isMain": {
3173
+ "type": "boolean"
1473
3174
  },
1474
- "title": {
3175
+ "username": {
1475
3176
  "type": "string"
1476
3177
  },
1477
- "link": {
3178
+ "displayName": {
1478
3179
  "type": [
1479
3180
  "string",
1480
3181
  "null"
1481
3182
  ]
1482
- },
1483
- "category": {
1484
- "type": "string",
1485
- "enum": [
1486
- "notice",
1487
- "pm",
1488
- "mention"
1489
- ]
1490
3183
  }
1491
3184
  }
1492
3185
  }
@@ -1497,78 +3190,23 @@
1497
3190
  }
1498
3191
  }
1499
3192
  }
1500
- }
1501
- },
1502
- "/api/notification/notifications/read": {
3193
+ },
1503
3194
  "post": {
1504
- "operationId": "notification_notifications_read_post",
1505
- "summary": "POST api/notification/notifications/read",
1506
- "x-oj-file": "notification/api.ts",
3195
+ "operationId": "system_departments_members_post",
3196
+ "summary": "POST api/system/departments/members",
3197
+ "x-oj-file": "system/departments/members/api.ts",
1507
3198
  "tags": [
1508
- "notification"
3199
+ "system"
1509
3200
  ],
1510
- "requestBody": {
1511
- "required": true,
1512
- "content": {
1513
- "application/json": {
1514
- "schema": {
1515
- "type": "object",
1516
- "required": [
1517
- "id"
1518
- ],
1519
- "properties": {
1520
- "id": {
1521
- "type": "string"
1522
- }
1523
- }
1524
- }
3201
+ "parameters": [
3202
+ {
3203
+ "name": "id",
3204
+ "in": "query",
3205
+ "required": true,
3206
+ "schema": {
3207
+ "type": "number"
1525
3208
  }
1526
3209
  }
1527
- },
1528
- "responses": {
1529
- "200": {
1530
- "description": "OK"
1531
- }
1532
- }
1533
- }
1534
- },
1535
- "/api/notification/notifications/read-all": {
1536
- "post": {
1537
- "operationId": "notification_notifications_read_all_post",
1538
- "summary": "POST api/notification/notifications/read-all",
1539
- "x-oj-file": "notification/api.ts",
1540
- "tags": [
1541
- "notification"
1542
- ],
1543
- "responses": {
1544
- "200": {
1545
- "description": "OK"
1546
- }
1547
- }
1548
- }
1549
- },
1550
- "/api/notification/notifications/clear": {
1551
- "post": {
1552
- "operationId": "notification_notifications_clear_post",
1553
- "summary": "POST api/notification/notifications/clear",
1554
- "x-oj-file": "notification/api.ts",
1555
- "tags": [
1556
- "notification"
1557
- ],
1558
- "responses": {
1559
- "200": {
1560
- "description": "OK"
1561
- }
1562
- }
1563
- }
1564
- },
1565
- "/api/notification/push": {
1566
- "post": {
1567
- "operationId": "notification_push_post",
1568
- "summary": "POST api/notification/push",
1569
- "x-oj-file": "notification/api.ts",
1570
- "tags": [
1571
- "notification"
1572
3210
  ],
1573
3211
  "requestBody": {
1574
3212
  "required": true,
@@ -1577,86 +3215,20 @@
1577
3215
  "schema": {
1578
3216
  "type": "object",
1579
3217
  "required": [
1580
- "title",
1581
- "message"
3218
+ "userId"
1582
3219
  ],
1583
3220
  "properties": {
1584
3221
  "userId": {
1585
- "type": [
1586
- "string",
1587
- "number"
1588
- ]
1589
- },
1590
- "title": {
1591
- "type": "string"
1592
- },
1593
- "message": {
1594
- "type": "string"
1595
- },
1596
- "link": {
1597
- "type": "string"
1598
- },
1599
- "avatar": {
1600
- "type": "string"
1601
- },
1602
- "category": {
1603
- "type": "string",
1604
- "enum": [
1605
- "notice",
1606
- "pm",
1607
- "mention"
1608
- ]
1609
- }
1610
- }
1611
- }
1612
- }
1613
- }
1614
- },
1615
- "responses": {
1616
- "200": {
1617
- "description": "OK"
1618
- }
1619
- }
1620
- }
1621
- },
1622
- "/api/notification/push-broadcast": {
1623
- "post": {
1624
- "operationId": "notification_push_broadcast_post",
1625
- "summary": "POST api/notification/push-broadcast",
1626
- "x-oj-file": "notification/api.ts",
1627
- "tags": [
1628
- "notification"
1629
- ],
1630
- "requestBody": {
1631
- "required": true,
1632
- "content": {
1633
- "application/json": {
1634
- "schema": {
1635
- "type": "object",
1636
- "required": [
1637
- "title",
1638
- "message"
1639
- ],
1640
- "properties": {
1641
- "title": {
1642
- "type": "string"
1643
- },
1644
- "message": {
1645
- "type": "string"
3222
+ "type": "number"
1646
3223
  },
1647
- "link": {
1648
- "type": "string"
3224
+ "isLeader": {
3225
+ "type": "boolean"
1649
3226
  },
1650
- "avatar": {
1651
- "type": "string"
3227
+ "isMain": {
3228
+ "type": "boolean"
1652
3229
  },
1653
- "category": {
1654
- "type": "string",
1655
- "enum": [
1656
- "notice",
1657
- "pm",
1658
- "mention"
1659
- ]
3230
+ "orderNo": {
3231
+ "type": "number"
1660
3232
  }
1661
3233
  }
1662
3234
  }
@@ -1665,57 +3237,66 @@
1665
3237
  },
1666
3238
  "responses": {
1667
3239
  "200": {
1668
- "description": "OK"
1669
- }
1670
- }
1671
- }
1672
- },
1673
- "/api/notification/del": {
1674
- "post": {
1675
- "operationId": "notification_del_post",
1676
- "summary": "POST api/notification/del",
1677
- "x-oj-file": "notification/del/api.ts",
1678
- "tags": [
1679
- "notification"
1680
- ],
1681
- "requestBody": {
1682
- "required": true,
1683
- "content": {
1684
- "application/json": {
1685
- "schema": {
1686
- "type": "object",
1687
- "required": [
1688
- "id"
1689
- ],
1690
- "properties": {
1691
- "id": {
1692
- "type": "string"
1693
- },
1694
- "userId": {
1695
- "type": [
1696
- "string",
1697
- "number"
1698
- ]
3240
+ "description": "OK",
3241
+ "x-oj-response-enforced": false,
3242
+ "content": {
3243
+ "application/json": {
3244
+ "schema": {
3245
+ "type": "object",
3246
+ "required": [
3247
+ "code",
3248
+ "msg",
3249
+ "data"
3250
+ ],
3251
+ "properties": {
3252
+ "code": {
3253
+ "type": "integer"
3254
+ },
3255
+ "msg": {
3256
+ "type": "string"
3257
+ },
3258
+ "data": {
3259
+ "type": "object",
3260
+ "required": [
3261
+ "ok"
3262
+ ],
3263
+ "properties": {
3264
+ "ok": {
3265
+ "type": "boolean"
3266
+ }
3267
+ }
3268
+ }
1699
3269
  }
1700
3270
  }
1701
3271
  }
1702
3272
  }
1703
3273
  }
1704
- },
1705
- "responses": {
1706
- "200": {
1707
- "description": "OK"
1708
- }
1709
3274
  }
1710
- }
1711
- },
1712
- "/api/personal-center/profile": {
1713
- "post": {
1714
- "operationId": "personal_center_profile_post",
1715
- "summary": "POST api/personal-center/profile",
1716
- "x-oj-file": "personal-center/profile/api.ts",
3275
+ },
3276
+ "put": {
3277
+ "operationId": "system_departments_members_put",
3278
+ "summary": "PUT api/system/departments/members",
3279
+ "x-oj-file": "system/departments/members/api.ts",
1717
3280
  "tags": [
1718
- "personal-center"
3281
+ "system"
3282
+ ],
3283
+ "parameters": [
3284
+ {
3285
+ "name": "id",
3286
+ "in": "query",
3287
+ "required": true,
3288
+ "schema": {
3289
+ "type": "number"
3290
+ }
3291
+ },
3292
+ {
3293
+ "name": "userId",
3294
+ "in": "query",
3295
+ "required": true,
3296
+ "schema": {
3297
+ "type": "number"
3298
+ }
3299
+ }
1719
3300
  ],
1720
3301
  "requestBody": {
1721
3302
  "required": true,
@@ -1724,17 +3305,14 @@
1724
3305
  "schema": {
1725
3306
  "type": "object",
1726
3307
  "properties": {
1727
- "username": {
1728
- "type": "string"
1729
- },
1730
- "email": {
1731
- "type": "string"
3308
+ "isLeader": {
3309
+ "type": "boolean"
1732
3310
  },
1733
- "phoneNumber": {
1734
- "type": "string"
3311
+ "isMain": {
3312
+ "type": "boolean"
1735
3313
  },
1736
- "description": {
1737
- "type": "string"
3314
+ "orderNo": {
3315
+ "type": "number"
1738
3316
  }
1739
3317
  }
1740
3318
  }
@@ -1762,7 +3340,15 @@
1762
3340
  "type": "string"
1763
3341
  },
1764
3342
  "data": {
1765
- "type": "null"
3343
+ "type": "object",
3344
+ "required": [
3345
+ "ok"
3346
+ ],
3347
+ "properties": {
3348
+ "ok": {
3349
+ "type": "boolean"
3350
+ }
3351
+ }
1766
3352
  }
1767
3353
  }
1768
3354
  }
@@ -1770,15 +3356,31 @@
1770
3356
  }
1771
3357
  }
1772
3358
  }
1773
- }
1774
- },
1775
- "/api/personal-center/upload": {
1776
- "post": {
1777
- "operationId": "personal_center_upload_post",
1778
- "summary": "POST api/personal-center/upload",
1779
- "x-oj-file": "personal-center/upload/api.ts",
3359
+ },
3360
+ "delete": {
3361
+ "operationId": "system_departments_members_delete",
3362
+ "summary": "DELETE api/system/departments/members",
3363
+ "x-oj-file": "system/departments/members/api.ts",
1780
3364
  "tags": [
1781
- "personal-center"
3365
+ "system"
3366
+ ],
3367
+ "parameters": [
3368
+ {
3369
+ "name": "id",
3370
+ "in": "query",
3371
+ "required": true,
3372
+ "schema": {
3373
+ "type": "number"
3374
+ }
3375
+ },
3376
+ {
3377
+ "name": "userId",
3378
+ "in": "query",
3379
+ "required": true,
3380
+ "schema": {
3381
+ "type": "number"
3382
+ }
3383
+ }
1782
3384
  ],
1783
3385
  "responses": {
1784
3386
  "200": {
@@ -1801,7 +3403,15 @@
1801
3403
  "type": "string"
1802
3404
  },
1803
3405
  "data": {
1804
- "type": "string"
3406
+ "type": "object",
3407
+ "required": [
3408
+ "ok"
3409
+ ],
3410
+ "properties": {
3411
+ "ok": {
3412
+ "type": "boolean"
3413
+ }
3414
+ }
1805
3415
  }
1806
3416
  }
1807
3417
  }
@@ -2574,6 +4184,8 @@
2574
4184
  "username",
2575
4185
  "display_name",
2576
4186
  "email",
4187
+ "position",
4188
+ "departments",
2577
4189
  "is_forbidden",
2578
4190
  "must_change",
2579
4191
  "roles"
@@ -2597,6 +4209,37 @@
2597
4209
  "null"
2598
4210
  ]
2599
4211
  },
4212
+ "position": {
4213
+ "type": [
4214
+ "string",
4215
+ "null"
4216
+ ]
4217
+ },
4218
+ "departments": {
4219
+ "type": "array",
4220
+ "items": {
4221
+ "type": "object",
4222
+ "required": [
4223
+ "id",
4224
+ "name",
4225
+ "isMain"
4226
+ ],
4227
+ "properties": {
4228
+ "id": {
4229
+ "type": "number"
4230
+ },
4231
+ "name": {
4232
+ "type": [
4233
+ "string",
4234
+ "null"
4235
+ ]
4236
+ },
4237
+ "isMain": {
4238
+ "type": "boolean"
4239
+ }
4240
+ }
4241
+ }
4242
+ },
2600
4243
  "is_forbidden": {
2601
4244
  "type": "boolean"
2602
4245
  },
@@ -2637,19 +4280,161 @@
2637
4280
  "password"
2638
4281
  ],
2639
4282
  "properties": {
2640
- "username": {
2641
- "type": "string",
2642
- "minLength": 1
2643
- },
2644
- "password": {
2645
- "type": "string",
2646
- "minLength": 6
2647
- },
4283
+ "username": {
4284
+ "type": "string",
4285
+ "minLength": 1
4286
+ },
4287
+ "password": {
4288
+ "type": "string",
4289
+ "minLength": 6
4290
+ },
4291
+ "displayName": {
4292
+ "type": "string"
4293
+ },
4294
+ "email": {
4295
+ "type": "string"
4296
+ }
4297
+ }
4298
+ }
4299
+ }
4300
+ }
4301
+ },
4302
+ "responses": {
4303
+ "200": {
4304
+ "description": "OK",
4305
+ "x-oj-response-enforced": false,
4306
+ "content": {
4307
+ "application/json": {
4308
+ "schema": {
4309
+ "type": "object",
4310
+ "required": [
4311
+ "code",
4312
+ "msg",
4313
+ "data"
4314
+ ],
4315
+ "properties": {
4316
+ "code": {
4317
+ "type": "integer"
4318
+ },
4319
+ "msg": {
4320
+ "type": "string"
4321
+ },
4322
+ "data": {
4323
+ "type": "object",
4324
+ "required": [
4325
+ "id"
4326
+ ],
4327
+ "properties": {
4328
+ "id": {
4329
+ "type": "number"
4330
+ }
4331
+ }
4332
+ }
4333
+ }
4334
+ }
4335
+ }
4336
+ }
4337
+ }
4338
+ }
4339
+ },
4340
+ "delete": {
4341
+ "operationId": "system_users_delete",
4342
+ "summary": "DELETE api/system/users",
4343
+ "x-oj-file": "system/users/api.ts",
4344
+ "tags": [
4345
+ "system"
4346
+ ],
4347
+ "parameters": [
4348
+ {
4349
+ "name": "uid",
4350
+ "in": "query",
4351
+ "required": true,
4352
+ "schema": {
4353
+ "type": "number"
4354
+ }
4355
+ }
4356
+ ],
4357
+ "responses": {
4358
+ "200": {
4359
+ "description": "OK",
4360
+ "x-oj-response-enforced": false,
4361
+ "content": {
4362
+ "application/json": {
4363
+ "schema": {
4364
+ "type": "object",
4365
+ "required": [
4366
+ "code",
4367
+ "msg",
4368
+ "data"
4369
+ ],
4370
+ "properties": {
4371
+ "code": {
4372
+ "type": "integer"
4373
+ },
4374
+ "msg": {
4375
+ "type": "string"
4376
+ },
4377
+ "data": {
4378
+ "type": "object",
4379
+ "required": [
4380
+ "ok"
4381
+ ],
4382
+ "properties": {
4383
+ "ok": {
4384
+ "type": "boolean"
4385
+ }
4386
+ }
4387
+ }
4388
+ }
4389
+ }
4390
+ }
4391
+ }
4392
+ }
4393
+ }
4394
+ }
4395
+ },
4396
+ "/api/system/users/profile": {
4397
+ "put": {
4398
+ "operationId": "system_users_profile_put",
4399
+ "summary": "PUT api/system/users/profile",
4400
+ "x-oj-file": "system/users/profile/api.ts",
4401
+ "tags": [
4402
+ "system"
4403
+ ],
4404
+ "parameters": [
4405
+ {
4406
+ "name": "uid",
4407
+ "in": "query",
4408
+ "required": true,
4409
+ "schema": {
4410
+ "type": "number"
4411
+ }
4412
+ }
4413
+ ],
4414
+ "requestBody": {
4415
+ "required": true,
4416
+ "content": {
4417
+ "application/json": {
4418
+ "schema": {
4419
+ "type": "object",
4420
+ "properties": {
2648
4421
  "displayName": {
2649
- "type": "string"
4422
+ "type": [
4423
+ "string",
4424
+ "null"
4425
+ ]
2650
4426
  },
2651
4427
  "email": {
2652
- "type": "string"
4428
+ "type": [
4429
+ "string",
4430
+ "null"
4431
+ ]
4432
+ },
4433
+ "position": {
4434
+ "type": [
4435
+ "string",
4436
+ "null"
4437
+ ]
2653
4438
  }
2654
4439
  }
2655
4440
  }
@@ -2679,11 +4464,11 @@
2679
4464
  "data": {
2680
4465
  "type": "object",
2681
4466
  "required": [
2682
- "id"
4467
+ "ok"
2683
4468
  ],
2684
4469
  "properties": {
2685
- "id": {
2686
- "type": "number"
4470
+ "ok": {
4471
+ "type": "boolean"
2687
4472
  }
2688
4473
  }
2689
4474
  }
@@ -2872,6 +4657,535 @@
2872
4657
  }
2873
4658
  }
2874
4659
  }
4660
+ },
4661
+ "/api/auth/wecom/sync/start": {
4662
+ "post": {
4663
+ "operationId": "auth_wecom_sync_start_post",
4664
+ "summary": "POST api/auth/wecom/sync/start",
4665
+ "x-oj-file": "auth/wecom/sync/api.ts",
4666
+ "tags": [
4667
+ "auth"
4668
+ ],
4669
+ "requestBody": {
4670
+ "required": false,
4671
+ "content": {
4672
+ "application/json": {
4673
+ "schema": {
4674
+ "type": "object",
4675
+ "properties": {
4676
+ "agent": {
4677
+ "type": "string"
4678
+ }
4679
+ }
4680
+ }
4681
+ }
4682
+ }
4683
+ },
4684
+ "responses": {
4685
+ "200": {
4686
+ "description": "OK",
4687
+ "x-oj-response-enforced": false,
4688
+ "content": {
4689
+ "application/json": {
4690
+ "schema": {
4691
+ "type": "object",
4692
+ "required": [
4693
+ "code",
4694
+ "msg",
4695
+ "data"
4696
+ ],
4697
+ "properties": {
4698
+ "code": {
4699
+ "type": "integer"
4700
+ },
4701
+ "msg": {
4702
+ "type": "string"
4703
+ },
4704
+ "data": {
4705
+ "type": "object",
4706
+ "required": [
4707
+ "connected",
4708
+ "authMode",
4709
+ "profileStatus",
4710
+ "status",
4711
+ "phase",
4712
+ "stats",
4713
+ "progress",
4714
+ "errCode",
4715
+ "errDetail",
4716
+ "startedAt",
4717
+ "finishedAt",
4718
+ "updateTime"
4719
+ ],
4720
+ "properties": {
4721
+ "connected": {
4722
+ "type": "boolean"
4723
+ },
4724
+ "authMode": {
4725
+ "type": "number"
4726
+ },
4727
+ "profileStatus": {
4728
+ "type": [
4729
+ "string",
4730
+ "null"
4731
+ ]
4732
+ },
4733
+ "status": {
4734
+ "type": "string",
4735
+ "enum": [
4736
+ "idle",
4737
+ "running",
4738
+ "done",
4739
+ "failed",
4740
+ "cancelled"
4741
+ ]
4742
+ },
4743
+ "phase": {
4744
+ "type": "string",
4745
+ "enum": [
4746
+ "departments",
4747
+ "members",
4748
+ "reconcile"
4749
+ ]
4750
+ },
4751
+ "stats": {
4752
+ "type": "object",
4753
+ "required": [
4754
+ "departments",
4755
+ "members",
4756
+ "skipped",
4757
+ "reconciled"
4758
+ ],
4759
+ "properties": {
4760
+ "departments": {
4761
+ "type": "number"
4762
+ },
4763
+ "members": {
4764
+ "type": "number"
4765
+ },
4766
+ "skipped": {
4767
+ "type": "number"
4768
+ },
4769
+ "reconciled": {
4770
+ "type": "boolean"
4771
+ }
4772
+ }
4773
+ },
4774
+ "progress": {
4775
+ "type": "object",
4776
+ "required": [
4777
+ "done",
4778
+ "total"
4779
+ ],
4780
+ "properties": {
4781
+ "done": {
4782
+ "type": "number"
4783
+ },
4784
+ "total": {
4785
+ "type": "number"
4786
+ }
4787
+ }
4788
+ },
4789
+ "errCode": {
4790
+ "type": [
4791
+ "string",
4792
+ "null"
4793
+ ]
4794
+ },
4795
+ "errDetail": {
4796
+ "type": [
4797
+ "object",
4798
+ "null"
4799
+ ],
4800
+ "properties": {
4801
+ "errcode": {
4802
+ "type": "number"
4803
+ },
4804
+ "phase": {
4805
+ "type": "string",
4806
+ "enum": [
4807
+ "departments",
4808
+ "members",
4809
+ "reconcile"
4810
+ ]
4811
+ },
4812
+ "deptId": {
4813
+ "type": "string"
4814
+ },
4815
+ "at": {
4816
+ "type": "number"
4817
+ }
4818
+ }
4819
+ },
4820
+ "startedAt": {
4821
+ "type": "number"
4822
+ },
4823
+ "finishedAt": {
4824
+ "type": "number"
4825
+ },
4826
+ "updateTime": {
4827
+ "type": "number"
4828
+ }
4829
+ }
4830
+ }
4831
+ }
4832
+ }
4833
+ }
4834
+ }
4835
+ }
4836
+ }
4837
+ }
4838
+ },
4839
+ "/api/auth/wecom/sync/status": {
4840
+ "get": {
4841
+ "operationId": "auth_wecom_sync_status_get",
4842
+ "summary": "GET api/auth/wecom/sync/status",
4843
+ "x-oj-file": "auth/wecom/sync/api.ts",
4844
+ "tags": [
4845
+ "auth"
4846
+ ],
4847
+ "parameters": [
4848
+ {
4849
+ "name": "agent",
4850
+ "in": "query",
4851
+ "required": false,
4852
+ "schema": {
4853
+ "type": "string"
4854
+ }
4855
+ }
4856
+ ],
4857
+ "responses": {
4858
+ "200": {
4859
+ "description": "OK",
4860
+ "x-oj-response-enforced": false,
4861
+ "content": {
4862
+ "application/json": {
4863
+ "schema": {
4864
+ "type": "object",
4865
+ "required": [
4866
+ "code",
4867
+ "msg",
4868
+ "data"
4869
+ ],
4870
+ "properties": {
4871
+ "code": {
4872
+ "type": "integer"
4873
+ },
4874
+ "msg": {
4875
+ "type": "string"
4876
+ },
4877
+ "data": {
4878
+ "type": "object",
4879
+ "required": [
4880
+ "connected",
4881
+ "authMode",
4882
+ "profileStatus",
4883
+ "status",
4884
+ "phase",
4885
+ "stats",
4886
+ "progress",
4887
+ "errCode",
4888
+ "errDetail",
4889
+ "startedAt",
4890
+ "finishedAt",
4891
+ "updateTime"
4892
+ ],
4893
+ "properties": {
4894
+ "connected": {
4895
+ "type": "boolean"
4896
+ },
4897
+ "authMode": {
4898
+ "type": "number"
4899
+ },
4900
+ "profileStatus": {
4901
+ "type": [
4902
+ "string",
4903
+ "null"
4904
+ ]
4905
+ },
4906
+ "status": {
4907
+ "type": "string",
4908
+ "enum": [
4909
+ "idle",
4910
+ "running",
4911
+ "done",
4912
+ "failed",
4913
+ "cancelled"
4914
+ ]
4915
+ },
4916
+ "phase": {
4917
+ "type": "string",
4918
+ "enum": [
4919
+ "departments",
4920
+ "members",
4921
+ "reconcile"
4922
+ ]
4923
+ },
4924
+ "stats": {
4925
+ "type": "object",
4926
+ "required": [
4927
+ "departments",
4928
+ "members",
4929
+ "skipped",
4930
+ "reconciled"
4931
+ ],
4932
+ "properties": {
4933
+ "departments": {
4934
+ "type": "number"
4935
+ },
4936
+ "members": {
4937
+ "type": "number"
4938
+ },
4939
+ "skipped": {
4940
+ "type": "number"
4941
+ },
4942
+ "reconciled": {
4943
+ "type": "boolean"
4944
+ }
4945
+ }
4946
+ },
4947
+ "progress": {
4948
+ "type": "object",
4949
+ "required": [
4950
+ "done",
4951
+ "total"
4952
+ ],
4953
+ "properties": {
4954
+ "done": {
4955
+ "type": "number"
4956
+ },
4957
+ "total": {
4958
+ "type": "number"
4959
+ }
4960
+ }
4961
+ },
4962
+ "errCode": {
4963
+ "type": [
4964
+ "string",
4965
+ "null"
4966
+ ]
4967
+ },
4968
+ "errDetail": {
4969
+ "type": [
4970
+ "object",
4971
+ "null"
4972
+ ],
4973
+ "properties": {
4974
+ "errcode": {
4975
+ "type": "number"
4976
+ },
4977
+ "phase": {
4978
+ "type": "string",
4979
+ "enum": [
4980
+ "departments",
4981
+ "members",
4982
+ "reconcile"
4983
+ ]
4984
+ },
4985
+ "deptId": {
4986
+ "type": "string"
4987
+ },
4988
+ "at": {
4989
+ "type": "number"
4990
+ }
4991
+ }
4992
+ },
4993
+ "startedAt": {
4994
+ "type": "number"
4995
+ },
4996
+ "finishedAt": {
4997
+ "type": "number"
4998
+ },
4999
+ "updateTime": {
5000
+ "type": "number"
5001
+ }
5002
+ }
5003
+ }
5004
+ }
5005
+ }
5006
+ }
5007
+ }
5008
+ }
5009
+ }
5010
+ }
5011
+ },
5012
+ "/api/auth/wecom/sync/cancel": {
5013
+ "post": {
5014
+ "operationId": "auth_wecom_sync_cancel_post",
5015
+ "summary": "POST api/auth/wecom/sync/cancel",
5016
+ "x-oj-file": "auth/wecom/sync/api.ts",
5017
+ "tags": [
5018
+ "auth"
5019
+ ],
5020
+ "requestBody": {
5021
+ "required": false,
5022
+ "content": {
5023
+ "application/json": {
5024
+ "schema": {
5025
+ "type": "object",
5026
+ "properties": {
5027
+ "agent": {
5028
+ "type": "string"
5029
+ }
5030
+ }
5031
+ }
5032
+ }
5033
+ }
5034
+ },
5035
+ "responses": {
5036
+ "200": {
5037
+ "description": "OK",
5038
+ "x-oj-response-enforced": false,
5039
+ "content": {
5040
+ "application/json": {
5041
+ "schema": {
5042
+ "type": "object",
5043
+ "required": [
5044
+ "code",
5045
+ "msg",
5046
+ "data"
5047
+ ],
5048
+ "properties": {
5049
+ "code": {
5050
+ "type": "integer"
5051
+ },
5052
+ "msg": {
5053
+ "type": "string"
5054
+ },
5055
+ "data": {
5056
+ "type": "object",
5057
+ "required": [
5058
+ "connected",
5059
+ "authMode",
5060
+ "profileStatus",
5061
+ "status",
5062
+ "phase",
5063
+ "stats",
5064
+ "progress",
5065
+ "errCode",
5066
+ "errDetail",
5067
+ "startedAt",
5068
+ "finishedAt",
5069
+ "updateTime"
5070
+ ],
5071
+ "properties": {
5072
+ "connected": {
5073
+ "type": "boolean"
5074
+ },
5075
+ "authMode": {
5076
+ "type": "number"
5077
+ },
5078
+ "profileStatus": {
5079
+ "type": [
5080
+ "string",
5081
+ "null"
5082
+ ]
5083
+ },
5084
+ "status": {
5085
+ "type": "string",
5086
+ "enum": [
5087
+ "idle",
5088
+ "running",
5089
+ "done",
5090
+ "failed",
5091
+ "cancelled"
5092
+ ]
5093
+ },
5094
+ "phase": {
5095
+ "type": "string",
5096
+ "enum": [
5097
+ "departments",
5098
+ "members",
5099
+ "reconcile"
5100
+ ]
5101
+ },
5102
+ "stats": {
5103
+ "type": "object",
5104
+ "required": [
5105
+ "departments",
5106
+ "members",
5107
+ "skipped",
5108
+ "reconciled"
5109
+ ],
5110
+ "properties": {
5111
+ "departments": {
5112
+ "type": "number"
5113
+ },
5114
+ "members": {
5115
+ "type": "number"
5116
+ },
5117
+ "skipped": {
5118
+ "type": "number"
5119
+ },
5120
+ "reconciled": {
5121
+ "type": "boolean"
5122
+ }
5123
+ }
5124
+ },
5125
+ "progress": {
5126
+ "type": "object",
5127
+ "required": [
5128
+ "done",
5129
+ "total"
5130
+ ],
5131
+ "properties": {
5132
+ "done": {
5133
+ "type": "number"
5134
+ },
5135
+ "total": {
5136
+ "type": "number"
5137
+ }
5138
+ }
5139
+ },
5140
+ "errCode": {
5141
+ "type": [
5142
+ "string",
5143
+ "null"
5144
+ ]
5145
+ },
5146
+ "errDetail": {
5147
+ "type": [
5148
+ "object",
5149
+ "null"
5150
+ ],
5151
+ "properties": {
5152
+ "errcode": {
5153
+ "type": "number"
5154
+ },
5155
+ "phase": {
5156
+ "type": "string",
5157
+ "enum": [
5158
+ "departments",
5159
+ "members",
5160
+ "reconcile"
5161
+ ]
5162
+ },
5163
+ "deptId": {
5164
+ "type": "string"
5165
+ },
5166
+ "at": {
5167
+ "type": "number"
5168
+ }
5169
+ }
5170
+ },
5171
+ "startedAt": {
5172
+ "type": "number"
5173
+ },
5174
+ "finishedAt": {
5175
+ "type": "number"
5176
+ },
5177
+ "updateTime": {
5178
+ "type": "number"
5179
+ }
5180
+ }
5181
+ }
5182
+ }
5183
+ }
5184
+ }
5185
+ }
5186
+ }
5187
+ }
5188
+ }
2875
5189
  }
2876
5190
  },
2877
5191
  "tags": [