schemas.yaml 106 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569
  1. StringId:
  2. type: string
  3. pattern: '^[0-9]+$'
  4. description: 数据库BIGINT在JSON中的安全十进制字符串表达。
  5. UtcDateTime:
  6. type: string
  7. format: date-time
  8. pattern: 'Z$'
  9. example: '2026-07-23T03:00:00.000Z'
  10. RoleCode:
  11. type: string
  12. enum: [USER, ADMIN]
  13. AllowedModule:
  14. type: string
  15. enum: [DOCUMENT_BROWSER, BACKEND_MANAGEMENT, AUDIT_LOG, ORGANIZATION_USER_MANAGEMENT]
  16. DocumentType:
  17. type: string
  18. enum: [MAIN, SUB_PLAN, ATTACHMENT]
  19. DocumentStatus:
  20. type: string
  21. enum: [DRAFT, PUBLISHED, ARCHIVED]
  22. SecurityLevel:
  23. type: string
  24. enum: [PUBLIC, INTERNAL, SECRET, CONFIDENTIAL, TOP_SECRET]
  25. x-comparison-values:
  26. PUBLIC: 10
  27. INTERNAL: 20
  28. SECRET: 30
  29. CONFIDENTIAL: 40
  30. TOP_SECRET: 50
  31. AttachmentType:
  32. type: string
  33. enum: [SUPPORT_ACHIEVEMENT, TRAINING_MATERIAL, TYPICAL_CASE]
  34. AllowedAction:
  35. type: string
  36. enum:
  37. - VIEW
  38. - DOWNLOAD
  39. - EDIT
  40. - CONFIG_PERMISSION
  41. - DELETE
  42. - BIND_ATTACHMENT
  43. - UNBIND_ATTACHMENT
  44. CategoryType:
  45. type: string
  46. enum: [SCENE, STYLE, SITUATION, VERSION, OTHER]
  47. EnabledStatus:
  48. type: string
  49. enum: [ENABLED, DISABLED]
  50. AuditResult:
  51. type: string
  52. enum: [SUCCESS, FAILURE]
  53. AuditAction:
  54. type: string
  55. enum:
  56. - LOGIN
  57. - LOGOUT
  58. - VIEW_DOCUMENT
  59. - DOWNLOAD_DOCUMENT
  60. - UPLOAD_DOCUMENT
  61. - BATCH_IMPORT
  62. - EDIT_DOCUMENT
  63. - DELETE_DOCUMENT
  64. - CREATE_CATEGORY
  65. - EDIT_CATEGORY
  66. - DELETE_CATEGORY
  67. - CHANGE_PERMISSION
  68. - UPLOAD_PERMISSION_VOUCHER
  69. - DELETE_PERMISSION_VOUCHER
  70. - MOVE_DOCUMENT
  71. - MOVE_ATTACHMENT
  72. - BIND_ATTACHMENT
  73. - UNBIND_ATTACHMENT
  74. - RESTORE_DOCUMENT
  75. - CREATE_ORGANIZATION
  76. - EDIT_ORGANIZATION
  77. - DELETE_ORGANIZATION
  78. - CREATE_USER
  79. - EDIT_USER
  80. - DELETE_USER
  81. - RESET_USER_PASSWORD
  82. - DOCUMENT_PASSWORD_SET
  83. - DOCUMENT_PASSWORD_REMOVE
  84. - CREATE_IP_ENTRY
  85. - EDIT_IP_ENTRY
  86. - DELETE_IP_ENTRY
  87. - ASSIGN_ORG_IP
  88. - BACKUP_CREATE
  89. AuditTarget:
  90. type: string
  91. enum:
  92. - AUTH
  93. - CATEGORY
  94. - DOCUMENT
  95. - ATTACHMENT
  96. - PERMISSION
  97. - ATTACHMENT_BINDING
  98. - ORGANIZATION
  99. - USER
  100. - ROLE
  101. - IP_ENTRY
  102. - BACKUP
  103. PageResult:
  104. type: object
  105. required: [items, page, pageSize, total, totalPages]
  106. properties:
  107. items:
  108. type: array
  109. items: {}
  110. page:
  111. type: integer
  112. minimum: 1
  113. default: 1
  114. pageSize:
  115. type: integer
  116. minimum: 1
  117. maximum: 100
  118. default: 20
  119. total:
  120. type: integer
  121. minimum: 0
  122. totalPages:
  123. type: integer
  124. minimum: 0
  125. HealthData:
  126. type: object
  127. additionalProperties: false
  128. required: [service, status]
  129. properties:
  130. service:
  131. type: string
  132. enum: [dms]
  133. status:
  134. type: string
  135. enum: [UP]
  136. HealthResponse:
  137. type: object
  138. additionalProperties: false
  139. required: [code, message, data, requestId]
  140. properties:
  141. code:
  142. type: string
  143. enum: [OK]
  144. message:
  145. type: string
  146. enum: [success]
  147. data:
  148. $ref: '#/HealthData'
  149. requestId:
  150. type: string
  151. format: uuid
  152. ErrorResponse:
  153. type: object
  154. additionalProperties: false
  155. required: [code, message, details, requestId]
  156. properties:
  157. code:
  158. type: string
  159. enum:
  160. - INVALID_ARGUMENT
  161. - INVALID_CREDENTIALS
  162. - TOKEN_INVALID
  163. - TOKEN_EXPIRED
  164. - USER_DISABLED
  165. - AUTH_VERSION_MISMATCH
  166. - FORBIDDEN
  167. - SECURITY_LEVEL_FORBIDDEN
  168. - DOCUMENT_VIEW_FORBIDDEN
  169. - DOCUMENT_DOWNLOAD_FORBIDDEN
  170. - RESOURCE_NOT_FOUND
  171. - FILE_NOT_FOUND
  172. - UNSUPPORTED_FILE_TYPE
  173. - PREVIEW_UNAVAILABLE
  174. - PAYLOAD_TOO_LARGE
  175. - BATCH_MANIFEST_MISMATCH
  176. - DATA_VERSION_CONFLICT
  177. - DOCUMENT_NAME_CONFLICT
  178. - CATEGORY_IN_USE
  179. - CATEGORY_NOT_LEAF
  180. - MAIN_PLAN_HAS_CHILDREN
  181. - ATTACHMENT_IN_USE
  182. - ATTACHMENT_HAS_NO_ACL
  183. - SUB_PLAN_PERMISSION_INHERITED
  184. - DUPLICATE_PERMISSION_SUBJECT
  185. - MAIN_PLAN_NOT_FOUND
  186. - INTERNAL_ERROR
  187. - DOCUMENT_NOT_DELETED
  188. - FILE_INTEGRITY_MISMATCH
  189. - FILE_PATH_INVALID
  190. - RESTORE_FILE_CHANGED
  191. - RESTORE_CATEGORY_INVALID
  192. - RESTORE_PARENT_INVALID
  193. - RESTORE_RELATION_CONFLICT
  194. - DOCUMENT_NOT_IN_MOVE_SCOPE
  195. - ORGANIZATION_IN_USE
  196. - USER_SELF_PROTECTION
  197. - CATEGORY_FLAT_MODE_CONFLICT
  198. - PREVIEW_CONVERTER_UNAVAILABLE
  199. - PREVIEW_CONVERSION_TIMEOUT
  200. - PREVIEW_CONVERSION_FAILED
  201. - BACKUP_RUNNING
  202. - BACKUP_TARGET_UNAVAILABLE
  203. - BACKUP_TOOL_MISSING
  204. - BACKUP_FAILED
  205. message:
  206. type: string
  207. details:
  208. type: object
  209. nullable: true
  210. additionalProperties: true
  211. requestId:
  212. type: string
  213. format: uuid
  214. UserSummary:
  215. type: object
  216. additionalProperties: false
  217. required:
  218. - id
  219. - username
  220. - realName
  221. - organizationId
  222. - organizationName
  223. - roleCode
  224. - roleId
  225. - roleName
  226. - securityLevel
  227. - status
  228. - allowedModules
  229. - authVersion
  230. - rowVersion
  231. - lastLoginAt
  232. - lastLoginIp
  233. - uiTheme
  234. - permCategoryEdit
  235. - permOrgEdit
  236. - permUserEdit
  237. - permSystemManage
  238. - permAuditLog
  239. - permRoleEdit
  240. - permUpload
  241. - permAttachmentLibrary
  242. - permAttachmentUpload
  243. - managedOrgId
  244. properties:
  245. id:
  246. $ref: '#/StringId'
  247. username:
  248. type: string
  249. realName:
  250. type: string
  251. organizationId:
  252. allOf:
  253. - $ref: '#/StringId'
  254. nullable: true
  255. organizationName:
  256. type: string
  257. nullable: true
  258. roleCode:
  259. $ref: '#/RoleCode'
  260. roleId:
  261. allOf:
  262. - $ref: '#/StringId'
  263. nullable: true
  264. description: 展示角色ID(契约1.46):本人=会话选定角色(JWT roleId claim),列表行=第一挂载角色(按sortNo)。
  265. roleName:
  266. type: string
  267. nullable: true
  268. description: 展示角色名称(契约1.46):与roleId同口径;角色被删除后为null。
  269. roles:
  270. type: array
  271. description: 全部活跃启用挂载角色简表(契约1.46 多角色);登录选择框与编辑表单回显同口径,可为空数组。
  272. items:
  273. type: object
  274. additionalProperties: false
  275. required: [id, roleName]
  276. properties:
  277. id: {$ref: '#/StringId'}
  278. roleName: {type: string}
  279. seatName:
  280. type: string
  281. nullable: true
  282. maxLength: 64
  283. description: 席位(契约1.46);可空,前端右上角按「机构+空格+席位」展示。
  284. userType:
  285. type: string
  286. enum: [NORMAL, COMMANDER]
  287. description: 用户类型(契约1.46);NORMAL=普通用户、COMMANDER=首长(仍属USER类别,重置密码方式后续差异化)。
  288. securityLevel:
  289. $ref: '#/SecurityLevel'
  290. status:
  291. $ref: '#/EnabledStatus'
  292. allowedModules:
  293. type: array
  294. uniqueItems: true
  295. items:
  296. $ref: '#/AllowedModule'
  297. authVersion:
  298. type: integer
  299. minimum: 0
  300. rowVersion:
  301. type: integer
  302. minimum: 0
  303. lastLoginAt:
  304. allOf:
  305. - $ref: '#/UtcDateTime'
  306. nullable: true
  307. lastLoginIp:
  308. type: string
  309. nullable: true
  310. uiTheme:
  311. type: string
  312. enum: [blue, red, green]
  313. description: 界面主题偏好(契约1.20,账号级漫游);存量与缺省为blue。
  314. permCategoryEdit:
  315. type: boolean
  316. description: 分类编辑管理位;值取自生效角色(显式角色活跃且启用时优先,否则回退默认角色),内置admin恒为true。
  317. permOrgEdit:
  318. type: boolean
  319. description: 机构编辑管理位;值取自生效角色。
  320. permUserEdit:
  321. type: boolean
  322. description: 用户编辑管理位;值取自生效角色。
  323. permSystemManage:
  324. type: boolean
  325. description: 系统管理管理位(契约1.23);值取自生效角色,内置admin恒为true。
  326. permAuditLog:
  327. type: boolean
  328. description: 日志审计管理位(契约1.23);值取自生效角色,内置admin恒为true。
  329. permRoleEdit:
  330. type: boolean
  331. description: 角色编辑管理位(契约1.25);值取自生效角色,内置admin恒为true。
  332. permUpload:
  333. type: boolean
  334. description: 上传位(契约1.31);生效角色方案权限矩阵任一 OWN 行 canUpload 为 true 即为 true,内置admin恒为true;上传/批量导入接口按此判定。
  335. permAttachmentLibrary:
  336. type: boolean
  337. description: 附件库可见位(契约1.41);生效角色矩阵任一 OWN 行任一附件位为 true,或 ADMIN 类别恒为 true;共享资料库页签门控,接口仍按实时判定。
  338. permAttachmentUpload:
  339. type: boolean
  340. description: 附件上传位(契约1.41);生效角色矩阵任一 OWN 行 canAttachmentUpload 为 true,或 ADMIN 类别恒为 true;共享附件上传/批量导入按钮门控,接口仍按附件密级 OWN 行实时判定。
  341. managedOrgId:
  342. type: string
  343. nullable: true
  344. description: 用户级管理范围(契约1.30);为机构ID(固定锚点)、"SELF"(跟随该用户所在机构,落库哨兵0)或null(全局),内置admin恒为null。实际生效范围以生效角色锚点为准,角色锚点为"SELF"(跟随用户设置)时才回落本设置。
  345. LoginRequest:
  346. type: object
  347. additionalProperties: false
  348. required: [username, password, keepSignedIn]
  349. properties:
  350. username:
  351. type: string
  352. minLength: 1
  353. description: 登录账号(契约1.47/1.51):接受用户名或姓名——用户名精确匹配优先,未命中按姓名匹配活跃用户且仅唯一命中放行,重名歧义一律401 INVALID_CREDENTIALS;契约1.51起界面以姓名为用户名(新建同值写入两列),本字段语义不变。
  354. password:
  355. type: string
  356. format: password
  357. minLength: 1
  358. writeOnly: true
  359. keepSignedIn:
  360. type: boolean
  361. captchaId:
  362. type: string
  363. description: 图片验证码标识(安全需求4);DMS_CAPTCHA_ENABLED开启时必填(五键),关闭时不得携带(三键)
  364. captchaCode:
  365. type: string
  366. description: 图片验证码字符(安全需求4,忽略大小写);开关开启时必填
  367. roleId:
  368. type: string
  369. pattern: '^[0-9]+$'
  370. description: 会话角色选定(契约1.46 多角色,可选数字字符串);首轮返回角色选择步骤后第二轮携带,须指向该用户已挂载的活跃启用角色。
  371. RoleSelectionData:
  372. type: object
  373. additionalProperties: false
  374. required: [roleSelectionRequired, username, realName, roles]
  375. description: 多角色选择步骤(契约1.46):挂载多个活跃启用角色且未携带roleId时返回,不签发令牌、不记登录成功;前端选定后携带roleId重新提交登录。
  376. properties:
  377. roleSelectionRequired:
  378. type: boolean
  379. enum: [true]
  380. username:
  381. type: string
  382. realName:
  383. type: string
  384. roles:
  385. type: array
  386. minItems: 1
  387. items:
  388. type: object
  389. additionalProperties: false
  390. required: [id, roleName]
  391. properties:
  392. id: {$ref: '#/StringId'}
  393. roleName: {type: string}
  394. SetupPasswordPhaseData:
  395. type: object
  396. additionalProperties: false
  397. required: [phase, username, realName, portalTicket, organizations, suggestedOrganizationId]
  398. description: 本地重设密步骤(契约1.65):密码被重置审批清空(契约1.49)后本地登录不再403,无论输入什么密码(验证码/锁定/IP守卫不受影响)都返回本载荷——与门户验签SET_PASSWORD同构,前端进入与单点登录首次设密同一界面;设密提交统一走 /auth 门户型 setup-password 接口(票据一次性、5分钟有效、authVersion防复用)。organizations语义同门户验签;挂载≥2角色时返回roles逐角色分配密码(契约1.53)。
  399. properties:
  400. phase:
  401. type: string
  402. enum: [SET_PASSWORD]
  403. username:
  404. type: string
  405. realName:
  406. type: string
  407. portalTicket:
  408. type: string
  409. suggestedOrganizationId:
  410. type: string
  411. nullable: true
  412. organizations:
  413. type: array
  414. items:
  415. type: object
  416. additionalProperties: false
  417. required: [id, orgCode, orgName, orgPath]
  418. properties:
  419. id: {type: string}
  420. orgCode: {type: string}
  421. orgName: {type: string}
  422. orgPath: {type: string}
  423. roles:
  424. type: array
  425. description: 仅挂载≥2角色时返回(契约1.53 密码即角色):设密时逐角色分配密码,恰一个使用用户密码
  426. items:
  427. type: object
  428. additionalProperties: false
  429. required: [id, roleName]
  430. properties:
  431. id: {$ref: '#/StringId'}
  432. roleName: {type: string}
  433. LoginData:
  434. type: object
  435. additionalProperties: false
  436. required: [accessToken, tokenType, expiresIn, idleLogoutMinutes, tokenRotation, user]
  437. properties:
  438. accessToken:
  439. type: string
  440. tokenType:
  441. type: string
  442. enum: [Bearer]
  443. expiresIn:
  444. type: integer
  445. description: 访问令牌有效期秒数;keepSignedIn=false取环境变量DMS_JWT_EXPIRES_SECONDS(缺省3600),keepSignedIn=true固定604800。
  446. idleLogoutMinutes:
  447. type: integer
  448. minimum: 0
  449. description: 页面空闲自动登出分钟数(契约1.29);取环境变量DMS_IDLE_LOGOUT_MINUTES(缺省5),0表示关闭。
  450. tokenRotation:
  451. type: boolean
  452. description: 一次一码轮换开关回显(契约1.38,仅Java版实现);取DMS_TOKEN_ROTATION_ENABLED(缺省true),开启时写操作成功响应经X-DMS-Access-Token头返回轮换新授权码。门户设密完成响应同。
  453. user:
  454. $ref: '#/UserSummary'
  455. LoginResponse:
  456. type: object
  457. additionalProperties: false
  458. required: [code, message, data, requestId]
  459. properties:
  460. code:
  461. type: string
  462. enum: [OK]
  463. message:
  464. type: string
  465. enum: [success]
  466. data:
  467. oneOf:
  468. - $ref: '#/LoginData'
  469. - $ref: '#/RoleSelectionData'
  470. - $ref: '#/SetupPasswordPhaseData'
  471. requestId:
  472. type: string
  473. format: uuid
  474. UserResponse:
  475. type: object
  476. additionalProperties: false
  477. required: [code, message, data, requestId]
  478. properties:
  479. code:
  480. type: string
  481. enum: [OK]
  482. message:
  483. type: string
  484. enum: [success]
  485. data:
  486. $ref: '#/UserSummary'
  487. requestId:
  488. type: string
  489. format: uuid
  490. OrganizationNode:
  491. type: object
  492. additionalProperties: false
  493. required: [id, parentId, orgCode, orgName, orgPath, sortNo, status, rowVersion, children]
  494. properties:
  495. id:
  496. $ref: '#/StringId'
  497. parentId:
  498. allOf:
  499. - $ref: '#/StringId'
  500. nullable: true
  501. orgCode:
  502. type: string
  503. orgName:
  504. type: string
  505. orgPath:
  506. type: string
  507. sortNo:
  508. type: integer
  509. status:
  510. $ref: '#/EnabledStatus'
  511. rowVersion:
  512. type: integer
  513. minimum: 0
  514. children:
  515. type: array
  516. items:
  517. $ref: '#/OrganizationNode'
  518. OrganizationTreeResponse:
  519. type: object
  520. additionalProperties: false
  521. required: [code, message, data, requestId]
  522. properties:
  523. code:
  524. type: string
  525. enum: [OK]
  526. message:
  527. type: string
  528. enum: [success]
  529. data:
  530. type: array
  531. items:
  532. $ref: '#/OrganizationNode'
  533. requestId:
  534. type: string
  535. format: uuid
  536. UserPage:
  537. type: object
  538. additionalProperties: false
  539. required: [items, page, pageSize, total, totalPages]
  540. properties:
  541. items:
  542. type: array
  543. items:
  544. $ref: '#/UserSummary'
  545. page:
  546. type: integer
  547. minimum: 1
  548. pageSize:
  549. type: integer
  550. minimum: 1
  551. maximum: 100
  552. total:
  553. type: integer
  554. minimum: 0
  555. totalPages:
  556. type: integer
  557. minimum: 0
  558. UserPageResponse:
  559. type: object
  560. additionalProperties: false
  561. required: [code, message, data, requestId]
  562. properties:
  563. code:
  564. type: string
  565. enum: [OK]
  566. message:
  567. type: string
  568. enum: [success]
  569. data:
  570. $ref: '#/UserPage'
  571. requestId:
  572. type: string
  573. format: uuid
  574. EmptySuccessResponse:
  575. type: object
  576. additionalProperties: false
  577. required: [code, message, data, requestId]
  578. properties:
  579. code:
  580. type: string
  581. enum: [OK]
  582. message:
  583. type: string
  584. enum: [success]
  585. data:
  586. type: object
  587. additionalProperties: false
  588. requestId:
  589. type: string
  590. format: uuid
  591. CategoryNode:
  592. type: object
  593. additionalProperties: false
  594. required:
  595. - id
  596. - categoryCode
  597. - categoryName
  598. - categoryType
  599. - parentId
  600. - categoryPath
  601. - sortNo
  602. - documentCount
  603. - rowVersion
  604. - children
  605. properties:
  606. id:
  607. $ref: '#/StringId'
  608. categoryCode:
  609. type: string
  610. maxLength: 64
  611. categoryName:
  612. type: string
  613. maxLength: 128
  614. categoryType:
  615. $ref: '#/CategoryType'
  616. parentId:
  617. allOf:
  618. - $ref: '#/StringId'
  619. nullable: true
  620. categoryPath:
  621. type: string
  622. maxLength: 1000
  623. sortNo:
  624. type: integer
  625. documentCount:
  626. type: integer
  627. minimum: 0
  628. description: 该分类完整有效子树内所有有效MAIN数量(不按当前用户密级/权限过滤,所有登录用户口径一致)。
  629. rowVersion:
  630. type: integer
  631. minimum: 0
  632. children:
  633. type: array
  634. items:
  635. $ref: '#/CategoryNode'
  636. CreateCategoryRequest:
  637. type: object
  638. additionalProperties: false
  639. required: [categoryCode, categoryName, categoryType, parentId, sortNo]
  640. properties:
  641. categoryCode:
  642. type: string
  643. minLength: 1
  644. maxLength: 64
  645. categoryName:
  646. type: string
  647. minLength: 1
  648. maxLength: 128
  649. categoryType:
  650. $ref: '#/CategoryType'
  651. parentId:
  652. allOf:
  653. - $ref: '#/StringId'
  654. nullable: true
  655. sortNo:
  656. type: integer
  657. UpdateCategoryRequest:
  658. type: object
  659. additionalProperties: false
  660. required: [categoryName, categoryType, parentId, sortNo, rowVersion]
  661. properties:
  662. categoryName:
  663. type: string
  664. minLength: 1
  665. maxLength: 128
  666. categoryType:
  667. $ref: '#/CategoryType'
  668. parentId:
  669. allOf:
  670. - $ref: '#/StringId'
  671. nullable: true
  672. sortNo:
  673. type: integer
  674. rowVersion:
  675. type: integer
  676. minimum: 0
  677. CategoryTreeResponse:
  678. type: object
  679. additionalProperties: false
  680. required: [code, message, data, requestId]
  681. properties:
  682. code:
  683. type: string
  684. enum: [OK]
  685. message:
  686. type: string
  687. enum: [success]
  688. data:
  689. type: array
  690. items:
  691. $ref: '#/CategoryNode'
  692. requestId:
  693. type: string
  694. format: uuid
  695. CategoryResponse:
  696. type: object
  697. additionalProperties: false
  698. required: [code, message, data, requestId]
  699. properties:
  700. code:
  701. type: string
  702. enum: [OK]
  703. message:
  704. type: string
  705. enum: [success]
  706. data:
  707. $ref: '#/CategoryNode'
  708. requestId:
  709. type: string
  710. format: uuid
  711. DeleteCategoryData:
  712. type: object
  713. additionalProperties: false
  714. required: [id, deleted]
  715. properties:
  716. id:
  717. $ref: '#/StringId'
  718. deleted:
  719. type: boolean
  720. enum: [true]
  721. DeleteCategoryResponse:
  722. type: object
  723. additionalProperties: false
  724. required: [code, message, data, requestId]
  725. properties:
  726. code:
  727. type: string
  728. enum: [OK]
  729. message:
  730. type: string
  731. enum: [success]
  732. data:
  733. $ref: '#/DeleteCategoryData'
  734. requestId:
  735. type: string
  736. format: uuid
  737. PermissionSummary:
  738. type: object
  739. additionalProperties: false
  740. required: [borrowerCount, inheritedFromMainPlan]
  741. properties:
  742. borrowerCount:
  743. type: integer
  744. minimum: 0
  745. description: 生效(canView且未到期)调阅人数
  746. inheritedFromMainPlan:
  747. type: boolean
  748. DocumentSummary:
  749. type: object
  750. required:
  751. - id
  752. - documentName
  753. - summary
  754. - documentType
  755. - status
  756. - securityLevel
  757. - borrowSummary
  758. - categoryId
  759. - categoryName
  760. - categoryPath
  761. - parentDocumentId
  762. - rootDocumentId
  763. - attachmentType
  764. - fileExtension
  765. - tags
  766. - childCount
  767. - attachmentCount
  768. - viewCount
  769. - downloadCount
  770. - createdByName
  771. - createdAt
  772. - updatedAt
  773. - rowVersion
  774. - allowedActions
  775. - hasPassword
  776. - passwordProtectedActions
  777. - viewLocked
  778. properties:
  779. id:
  780. $ref: '#/StringId'
  781. documentName:
  782. type: string
  783. summary:
  784. type: string
  785. nullable: true
  786. description:
  787. type: string
  788. nullable: true
  789. description: 详细说明:管理员在"查看"对话框维护,供普通用户阅读;不参与全文检索。
  790. documentType:
  791. $ref: '#/DocumentType'
  792. status:
  793. $ref: '#/DocumentStatus'
  794. securityLevel:
  795. $ref: '#/SecurityLevel'
  796. borrowSummary:
  797. type: string
  798. description: 生效调阅人姓名以"、"连接;未配置时为"未配置";无查看权限的列表行返回"-"
  799. categoryId:
  800. allOf:
  801. - $ref: '#/StringId'
  802. nullable: true
  803. categoryName:
  804. type: string
  805. nullable: true
  806. categoryPath:
  807. type: string
  808. nullable: true
  809. parentDocumentId:
  810. allOf:
  811. - $ref: '#/StringId'
  812. nullable: true
  813. rootDocumentId:
  814. allOf:
  815. - $ref: '#/StringId'
  816. nullable: true
  817. attachmentType:
  818. allOf:
  819. - $ref: '#/AttachmentType'
  820. nullable: true
  821. fileExtension:
  822. type: string
  823. tags:
  824. type: array
  825. items:
  826. type: string
  827. childCount:
  828. type: integer
  829. minimum: 0
  830. attachmentCount:
  831. type: integer
  832. minimum: 0
  833. viewCount:
  834. type: integer
  835. minimum: 0
  836. downloadCount:
  837. type: integer
  838. minimum: 0
  839. createdByName:
  840. type: string
  841. nullable: true
  842. createdAt:
  843. $ref: '#/UtcDateTime'
  844. updatedAt:
  845. $ref: '#/UtcDateTime'
  846. rowVersion:
  847. type: integer
  848. minimum: 0
  849. allowedActions:
  850. type: array
  851. uniqueItems: true
  852. items:
  853. $ref: '#/AllowedAction'
  854. hasPassword:
  855. type: boolean
  856. description: 主案是否设置密码锁;仅MAIN可设,其余类型恒false。
  857. passwordProtectedActions:
  858. type: array
  859. uniqueItems: true
  860. items:
  861. $ref: '#/DocumentPasswordAction'
  862. description: 密码锁勾选保护的操作码集合;未设密恒为空数组。
  863. viewLocked:
  864. type: boolean
  865. description: 当前用户查看该文档正文是否需要密码;viewLocked时contentSnippet不返回。
  866. mountedPlanCount:
  867. type: integer
  868. minimum: 0
  869. description: 仅共享附件响应返回。
  870. DocumentDetail:
  871. allOf:
  872. - $ref: '#/DocumentSummary'
  873. - type: object
  874. required:
  875. - originalFileName
  876. - mimeType
  877. - fileSize
  878. - fileHash
  879. - permissionSummary
  880. - viewPasswordVerified
  881. - contentText
  882. properties:
  883. originalFileName:
  884. type: string
  885. mimeType:
  886. type: string
  887. nullable: true
  888. fileSize:
  889. type: integer
  890. minimum: 0
  891. fileHash:
  892. type: string
  893. pattern: '^[0-9a-fA-F]{64}$'
  894. permissionSummary:
  895. $ref: '#/PermissionSummary'
  896. viewPasswordVerified:
  897. type: boolean
  898. description: 查看是否已通过密码验证(未锁定恒true)。
  899. contentText:
  900. type: string
  901. nullable: true
  902. description: 提取的正文文本;viewLocked且请求头密码未验证通过时为null。
  903. contentExtractStatus:
  904. type: string
  905. enum: [SUCCESS, EMPTY, UNSUPPORTED, FAILED]
  906. description: 正文提取状态。仅管理员详情响应返回。
  907. contentExtractError:
  908. type: string
  909. nullable: true
  910. description: 提取失败的脱敏原因(异常类型+首行信息,不含绝对路径)。仅管理员详情响应返回;非FAILED时为null。
  911. contentExtractedAt:
  912. type: string
  913. format: date-time
  914. nullable: true
  915. description: 最近一次正文提取时间(UTC)。仅管理员详情响应返回。
  916. AttachmentBindingSummary:
  917. allOf:
  918. - $ref: '#/DocumentSummary'
  919. - type: object
  920. required: [bindingId, bindingSortNo, mountedPlanCount]
  921. properties:
  922. bindingId:
  923. $ref: '#/StringId'
  924. bindingSortNo:
  925. type: integer
  926. mountedPlanCount:
  927. type: integer
  928. minimum: 0
  929. DocumentPage:
  930. type: object
  931. additionalProperties: false
  932. required: [items, page, pageSize, total, totalPages]
  933. properties:
  934. items:
  935. type: array
  936. items:
  937. $ref: '#/DocumentSummary'
  938. page:
  939. type: integer
  940. minimum: 1
  941. pageSize:
  942. type: integer
  943. minimum: 1
  944. maximum: 100
  945. total:
  946. type: integer
  947. minimum: 0
  948. totalPages:
  949. type: integer
  950. minimum: 0
  951. AttachmentBindingPage:
  952. type: object
  953. additionalProperties: false
  954. required: [items, page, pageSize, total, totalPages]
  955. properties:
  956. items:
  957. type: array
  958. items:
  959. $ref: '#/AttachmentBindingSummary'
  960. page:
  961. type: integer
  962. minimum: 1
  963. pageSize:
  964. type: integer
  965. minimum: 1
  966. maximum: 100
  967. total:
  968. type: integer
  969. minimum: 0
  970. totalPages:
  971. type: integer
  972. minimum: 0
  973. MainPlanBrief:
  974. type: object
  975. additionalProperties: false
  976. required: [id, documentName, categoryName, securityLevel]
  977. properties:
  978. id:
  979. $ref: '#/StringId'
  980. documentName:
  981. type: string
  982. categoryName:
  983. type: string
  984. nullable: true
  985. securityLevel:
  986. $ref: '#/SecurityLevel'
  987. MainPlanBriefCollection:
  988. type: object
  989. additionalProperties: false
  990. required: [items, total]
  991. properties:
  992. items:
  993. type: array
  994. items:
  995. $ref: '#/MainPlanBrief'
  996. total:
  997. type: integer
  998. minimum: 0
  999. DocumentPageResponse:
  1000. type: object
  1001. additionalProperties: false
  1002. required: [code, message, data, requestId]
  1003. properties:
  1004. code:
  1005. type: string
  1006. enum: [OK]
  1007. message:
  1008. type: string
  1009. enum: [success]
  1010. data:
  1011. $ref: '#/DocumentPage'
  1012. requestId:
  1013. type: string
  1014. format: uuid
  1015. DocumentDetailResponse:
  1016. type: object
  1017. additionalProperties: false
  1018. required: [code, message, data, requestId]
  1019. properties:
  1020. code:
  1021. type: string
  1022. enum: [OK]
  1023. message:
  1024. type: string
  1025. enum: [success]
  1026. data:
  1027. $ref: '#/DocumentDetail'
  1028. requestId:
  1029. type: string
  1030. format: uuid
  1031. AttachmentBindingPageResponse:
  1032. type: object
  1033. additionalProperties: false
  1034. required: [code, message, data, requestId]
  1035. properties:
  1036. code:
  1037. type: string
  1038. enum: [OK]
  1039. message:
  1040. type: string
  1041. enum: [success]
  1042. data:
  1043. $ref: '#/AttachmentBindingPage'
  1044. requestId:
  1045. type: string
  1046. format: uuid
  1047. MainPlanBriefCollectionResponse:
  1048. type: object
  1049. additionalProperties: false
  1050. required: [code, message, data, requestId]
  1051. properties:
  1052. code:
  1053. type: string
  1054. enum: [OK]
  1055. message:
  1056. type: string
  1057. enum: [success]
  1058. data:
  1059. $ref: '#/MainPlanBriefCollection'
  1060. requestId:
  1061. type: string
  1062. format: uuid
  1063. MainDocumentCreateMetadata:
  1064. type: object
  1065. additionalProperties: false
  1066. required: [documentName, documentType, summary, categoryId, securityLevel, tags]
  1067. properties:
  1068. documentName: {type: string, minLength: 1, maxLength: 255}
  1069. documentType: {type: string, enum: [MAIN]}
  1070. summary: {type: string, nullable: true}
  1071. categoryId: {$ref: '#/StringId'}
  1072. securityLevel: {$ref: '#/SecurityLevel'}
  1073. overwriteDocumentId:
  1074. allOf: [{$ref: '#/StringId'}]
  1075. description: 仅在用户确认覆盖同名主案后提交,并必须与rowVersion同时出现。
  1076. rowVersion:
  1077. type: integer
  1078. minimum: 0
  1079. description: 被覆盖文档的当前版本;仅与overwriteDocumentId同时提交。
  1080. tags:
  1081. type: array
  1082. maxItems: 50
  1083. items: {type: string, minLength: 1, maxLength: 64}
  1084. password:
  1085. type: string
  1086. minLength: 1
  1087. maxLength: 128
  1088. description: 可选;仅新增MAIN时允许,与protectedActions必须同时出现;覆盖上传(overwriteDocumentId)时禁止携带。
  1089. protectedActions:
  1090. type: array
  1091. uniqueItems: true
  1092. items: {$ref: '#/DocumentPasswordAction'}
  1093. description: 可选;密码保护的操作码集合,与password必须同时出现。
  1094. SubPlanCreateMetadata:
  1095. type: object
  1096. additionalProperties: false
  1097. required: [documentName, documentType, summary, parentDocumentId, securityLevel, tags]
  1098. properties:
  1099. documentName: {type: string, minLength: 1, maxLength: 255}
  1100. documentType: {type: string, enum: [SUB_PLAN]}
  1101. summary: {type: string, nullable: true}
  1102. parentDocumentId: {$ref: '#/StringId'}
  1103. securityLevel: {$ref: '#/SecurityLevel'}
  1104. overwriteDocumentId:
  1105. allOf: [{$ref: '#/StringId'}]
  1106. description: 仅在用户确认覆盖同一主案下同名子案后提交,并必须与rowVersion同时出现。
  1107. rowVersion:
  1108. type: integer
  1109. minimum: 0
  1110. description: 被覆盖文档的当前版本;仅与overwriteDocumentId同时提交。
  1111. tags:
  1112. type: array
  1113. maxItems: 50
  1114. items: {type: string, minLength: 1, maxLength: 64}
  1115. DocumentCreateMetadata:
  1116. oneOf:
  1117. - $ref: '#/MainDocumentCreateMetadata'
  1118. - $ref: '#/SubPlanCreateMetadata'
  1119. discriminator:
  1120. propertyName: documentType
  1121. AttachmentCreateMetadata:
  1122. type: object
  1123. additionalProperties: false
  1124. required: [documentName, attachmentType, summary, tags, securityLevel]
  1125. properties:
  1126. documentName: {type: string, minLength: 1, maxLength: 255}
  1127. attachmentType: {$ref: '#/AttachmentType'}
  1128. securityLevel: {$ref: '#/SecurityLevel'}
  1129. summary: {type: string, nullable: true}
  1130. tags:
  1131. type: array
  1132. maxItems: 50
  1133. items: {type: string, minLength: 1, maxLength: 64}
  1134. MainDocumentUpdateRequest:
  1135. type: object
  1136. additionalProperties: false
  1137. required: [documentName, summary, categoryId, securityLevel, tags, rowVersion]
  1138. properties:
  1139. documentName: {type: string, minLength: 1, maxLength: 255}
  1140. summary: {type: string, nullable: true}
  1141. categoryId: {$ref: '#/StringId'}
  1142. securityLevel: {$ref: '#/SecurityLevel'}
  1143. tags:
  1144. type: array
  1145. maxItems: 50
  1146. items: {type: string, minLength: 1, maxLength: 64}
  1147. rowVersion: {type: integer, minimum: 0}
  1148. organizationId:
  1149. allOf:
  1150. - $ref: '#/StringId'
  1151. description: 目标归属部门;缺省沿用现有归属,调整到其他部门仅ADMIN。
  1152. SubPlanUpdateRequest:
  1153. type: object
  1154. additionalProperties: false
  1155. required: [documentName, summary, securityLevel, tags, rowVersion]
  1156. properties:
  1157. documentName: {type: string, minLength: 1, maxLength: 255}
  1158. summary: {type: string, nullable: true}
  1159. securityLevel: {$ref: '#/SecurityLevel'}
  1160. tags:
  1161. type: array
  1162. maxItems: 50
  1163. items: {type: string, minLength: 1, maxLength: 64}
  1164. rowVersion: {type: integer, minimum: 0}
  1165. organizationId:
  1166. allOf:
  1167. - $ref: '#/StringId'
  1168. description: 目标归属部门;缺省沿用现有归属,调整到其他部门仅ADMIN。
  1169. UpdateDocumentRequest:
  1170. oneOf:
  1171. - $ref: '#/MainDocumentUpdateRequest'
  1172. - $ref: '#/SubPlanUpdateRequest'
  1173. UpdateDocumentDescriptionRequest:
  1174. type: object
  1175. additionalProperties: false
  1176. required: [description]
  1177. properties:
  1178. description: {type: string, nullable: true, maxLength: 20000}
  1179. DocumentPasswordAction:
  1180. type: string
  1181. description: 主案密码锁可保护的操作码(契约1.41:挂载/解除挂载合并为单一「挂载」位,protectedActions 勾选仅接受前6码——UNBIND_ATTACHMENT 不再是合法勾选码,提交返回 400;该码保留在枚举中是因为解挂接口仍传它做密码校验与审计区分,服务端按挂载位同判定)。
  1182. enum:
  1183. - VIEW
  1184. - DOWNLOAD
  1185. - EDIT
  1186. - DELETE
  1187. - CONFIG_PERMISSION
  1188. - BIND_ATTACHMENT
  1189. - UNBIND_ATTACHMENT
  1190. UpdateDocumentPasswordRequest:
  1191. type: object
  1192. additionalProperties: false
  1193. required: [rowVersion]
  1194. properties:
  1195. rowVersion: {type: integer, minimum: 0, description: 主案当前版本,乐观锁。}
  1196. oldPassword:
  1197. type: string
  1198. maxLength: 128
  1199. description: 已设密时修改/清除必须提供且正确;未设密时禁止提供。
  1200. password:
  1201. type: string
  1202. minLength: 1
  1203. maxLength: 128
  1204. description: 新密码;缺省或空表示清除密码锁,此时不得携带protectedActions。
  1205. protectedActions:
  1206. type: array
  1207. uniqueItems: true
  1208. items: {$ref: '#/DocumentPasswordAction'}
  1209. description: 设置/修改密码时的保护操作集合;与password必须同时出现。
  1210. DocumentPasswordSummary:
  1211. type: object
  1212. additionalProperties: false
  1213. required: [id, hasPassword, protectedActions, rowVersion]
  1214. properties:
  1215. id: {$ref: '#/StringId'}
  1216. hasPassword: {type: boolean}
  1217. protectedActions:
  1218. type: array
  1219. uniqueItems: true
  1220. items: {$ref: '#/DocumentPasswordAction'}
  1221. rowVersion: {type: integer, minimum: 0}
  1222. DocumentPasswordResponse:
  1223. type: object
  1224. additionalProperties: false
  1225. required: [code, message, data, requestId]
  1226. properties:
  1227. code:
  1228. type: string
  1229. enum: [OK]
  1230. message:
  1231. type: string
  1232. enum: [success]
  1233. data:
  1234. $ref: '#/DocumentPasswordSummary'
  1235. requestId:
  1236. type: string
  1237. format: uuid
  1238. UpdateAttachmentRequest:
  1239. type: object
  1240. additionalProperties: false
  1241. required: [documentName, attachmentType, summary, tags, securityLevel, rowVersion]
  1242. properties:
  1243. documentName: {type: string, minLength: 1, maxLength: 255}
  1244. attachmentType: {$ref: '#/AttachmentType'}
  1245. securityLevel: {$ref: '#/SecurityLevel'}
  1246. summary: {type: string, nullable: true}
  1247. tags:
  1248. type: array
  1249. maxItems: 50
  1250. items: {type: string, minLength: 1, maxLength: 64}
  1251. rowVersion: {type: integer, minimum: 0}
  1252. organizationId:
  1253. allOf:
  1254. - $ref: '#/StringId'
  1255. description: 目标归属部门;缺省沿用现有归属,调整到其他部门仅ADMIN。
  1256. DeleteDocumentData:
  1257. type: object
  1258. additionalProperties: false
  1259. required: [id, deleted]
  1260. properties:
  1261. id: {$ref: '#/StringId'}
  1262. deleted: {type: boolean, enum: [true]}
  1263. DeleteDocumentResponse:
  1264. type: object
  1265. additionalProperties: false
  1266. required: [code, message, data, requestId]
  1267. properties:
  1268. code: {type: string, enum: [OK]}
  1269. message: {type: string, enum: [success]}
  1270. data: {$ref: '#/DeleteDocumentData'}
  1271. requestId: {type: string, format: uuid}
  1272. BatchImportMultipart:
  1273. type: object
  1274. additionalProperties: false
  1275. required: [files, items]
  1276. properties:
  1277. files:
  1278. type: array
  1279. minItems: 1
  1280. items: {type: string, format: binary}
  1281. description: 重复files字段,顺序与items数组严格对应。
  1282. items:
  1283. type: string
  1284. description: 文档或附件metadata对象数组的JSON字符串。
  1285. BatchImportItem:
  1286. type: object
  1287. additionalProperties: false
  1288. required: [index, originalFileName, success]
  1289. properties:
  1290. index: {type: integer, minimum: 0}
  1291. originalFileName: {type: string}
  1292. success: {type: boolean}
  1293. document: {$ref: '#/DocumentDetail'}
  1294. errorCode: {type: string}
  1295. errorMessage: {type: string}
  1296. BatchImportData:
  1297. type: object
  1298. additionalProperties: false
  1299. required: [total, successCount, failureCount, items]
  1300. properties:
  1301. total: {type: integer, minimum: 0}
  1302. successCount: {type: integer, minimum: 0}
  1303. failureCount: {type: integer, minimum: 0}
  1304. items:
  1305. type: array
  1306. items: {$ref: '#/BatchImportItem'}
  1307. BatchImportResponse:
  1308. type: object
  1309. additionalProperties: false
  1310. required: [code, message, data, requestId]
  1311. properties:
  1312. code: {type: string, enum: [OK]}
  1313. message: {type: string, enum: [success]}
  1314. data: {$ref: '#/BatchImportData'}
  1315. requestId: {type: string, format: uuid}
  1316. BindAttachmentsRequest:
  1317. type: object
  1318. additionalProperties: false
  1319. required: [attachmentIds, mainPlanRowVersion]
  1320. properties:
  1321. attachmentIds:
  1322. type: array
  1323. minItems: 1
  1324. items: {$ref: '#/StringId'}
  1325. mainPlanRowVersion:
  1326. type: integer
  1327. minimum: 0
  1328. BindAttachmentsData:
  1329. type: object
  1330. additionalProperties: false
  1331. required: [createdCount, existingCount, attachmentCount, mainPlanRowVersion]
  1332. properties:
  1333. createdCount: {type: integer, minimum: 0}
  1334. existingCount: {type: integer, minimum: 0}
  1335. attachmentCount: {type: integer, minimum: 0}
  1336. mainPlanRowVersion: {type: integer, minimum: 0}
  1337. BindAttachmentsResponse:
  1338. type: object
  1339. additionalProperties: false
  1340. required: [code, message, data, requestId]
  1341. properties:
  1342. code: {type: string, enum: [OK]}
  1343. message: {type: string, enum: [success]}
  1344. data: {$ref: '#/BindAttachmentsData'}
  1345. requestId: {type: string, format: uuid}
  1346. UnbindAttachmentData:
  1347. type: object
  1348. additionalProperties: false
  1349. required: [attachmentCount, mainPlanRowVersion]
  1350. properties:
  1351. attachmentCount: {type: integer, minimum: 0}
  1352. mainPlanRowVersion: {type: integer, minimum: 0}
  1353. UnbindAttachmentResponse:
  1354. type: object
  1355. additionalProperties: false
  1356. required: [code, message, data, requestId]
  1357. properties:
  1358. code: {type: string, enum: [OK]}
  1359. message: {type: string, enum: [success]}
  1360. data: {$ref: '#/UnbindAttachmentData'}
  1361. requestId: {type: string, format: uuid}
  1362. ReorderDocumentsRequest:
  1363. type: object
  1364. additionalProperties: false
  1365. required: [orderedIds]
  1366. properties:
  1367. orderedIds:
  1368. type: array
  1369. minItems: 2
  1370. items: {$ref: '#/StringId'}
  1371. ReorderDocumentsData:
  1372. type: object
  1373. additionalProperties: false
  1374. required: [reorderedCount]
  1375. properties:
  1376. reorderedCount: {type: integer, minimum: 0}
  1377. ReorderDocumentsResponse:
  1378. type: object
  1379. additionalProperties: false
  1380. required: [code, message, data, requestId]
  1381. properties:
  1382. code: {type: string, enum: [OK]}
  1383. message: {type: string, enum: [success]}
  1384. data: {$ref: '#/ReorderDocumentsData'}
  1385. requestId: {type: string, format: uuid}
  1386. ReorderAttachmentsRequest:
  1387. type: object
  1388. additionalProperties: false
  1389. required: [orderedBindingIds, mainPlanRowVersion]
  1390. properties:
  1391. orderedBindingIds:
  1392. type: array
  1393. minItems: 2
  1394. items: {$ref: '#/StringId'}
  1395. mainPlanRowVersion:
  1396. type: integer
  1397. minimum: 0
  1398. ReorderAttachmentsData:
  1399. type: object
  1400. additionalProperties: false
  1401. required: [reorderedCount, mainPlanRowVersion]
  1402. properties:
  1403. reorderedCount: {type: integer, minimum: 0}
  1404. mainPlanRowVersion: {type: integer, minimum: 0}
  1405. ReorderAttachmentsResponse:
  1406. type: object
  1407. additionalProperties: false
  1408. required: [code, message, data, requestId]
  1409. properties:
  1410. code: {type: string, enum: [OK]}
  1411. message: {type: string, enum: [success]}
  1412. data: {$ref: '#/ReorderAttachmentsData'}
  1413. requestId: {type: string, format: uuid}
  1414. ReorderCategoriesRequest:
  1415. type: object
  1416. additionalProperties: false
  1417. required: [parentId, orderedIds]
  1418. properties:
  1419. parentId:
  1420. oneOf:
  1421. - $ref: '#/StringId'
  1422. - type: 'null'
  1423. orderedIds:
  1424. type: array
  1425. minItems: 2
  1426. items: {$ref: '#/StringId'}
  1427. ReorderCategoriesData:
  1428. type: object
  1429. additionalProperties: false
  1430. required: [reorderedCount]
  1431. properties:
  1432. reorderedCount: {type: integer, minimum: 0}
  1433. ReorderCategoriesResponse:
  1434. type: object
  1435. additionalProperties: false
  1436. required: [code, message, data, requestId]
  1437. properties:
  1438. code: {type: string, enum: [OK]}
  1439. message: {type: string, enum: [success]}
  1440. data: {$ref: '#/ReorderCategoriesData'}
  1441. requestId: {type: string, format: uuid}
  1442. ReorderOrganizationsRequest:
  1443. type: object
  1444. additionalProperties: false
  1445. required: [parentId, orderedIds]
  1446. properties:
  1447. parentId:
  1448. oneOf:
  1449. - $ref: '#/StringId'
  1450. - type: 'null'
  1451. orderedIds:
  1452. type: array
  1453. minItems: 2
  1454. items: {$ref: '#/StringId'}
  1455. ReorderByIdsRequest:
  1456. type: object
  1457. additionalProperties: false
  1458. required: [orderedIds]
  1459. properties:
  1460. orderedIds:
  1461. type: array
  1462. minItems: 2
  1463. items: {$ref: '#/StringId'}
  1464. ReorderResultData:
  1465. type: object
  1466. additionalProperties: false
  1467. required: [reorderedCount]
  1468. properties:
  1469. reorderedCount: {type: integer, minimum: 0}
  1470. ReorderResultResponse:
  1471. type: object
  1472. additionalProperties: false
  1473. required: [code, message, data, requestId]
  1474. properties:
  1475. code: {type: string, enum: [OK]}
  1476. message: {type: string, enum: [success]}
  1477. data: {$ref: '#/ReorderResultData'}
  1478. requestId: {type: string, format: uuid}
  1479. PermissionEntry:
  1480. type: object
  1481. additionalProperties: false
  1482. required:
  1483. - id
  1484. - subjectId
  1485. - subjectName
  1486. - canView
  1487. - canDownload
  1488. - expiresAt
  1489. - voucherFileName
  1490. - voucherFileSize
  1491. - voucherUploadedAt
  1492. properties:
  1493. id: {$ref: '#/StringId'}
  1494. subjectId: {$ref: '#/StringId'}
  1495. subjectName: {type: string}
  1496. canView: {type: boolean}
  1497. canDownload: {type: boolean}
  1498. expiresAt: {$ref: '#/UtcDateTime'}
  1499. voucherFileName: {type: string, nullable: true}
  1500. voucherFileSize: {type: integer, minimum: 1, nullable: true}
  1501. voucherUploadedAt:
  1502. allOf:
  1503. - $ref: '#/UtcDateTime'
  1504. nullable: true
  1505. SavePermissionEntry:
  1506. type: object
  1507. additionalProperties: false
  1508. required:
  1509. - subjectId
  1510. - canView
  1511. - canDownload
  1512. - expiresAt
  1513. properties:
  1514. subjectId: {$ref: '#/StringId'}
  1515. canView: {type: boolean}
  1516. canDownload: {type: boolean}
  1517. expiresAt: {$ref: '#/UtcDateTime'}
  1518. SavePermissionsRequest:
  1519. type: object
  1520. additionalProperties: false
  1521. required: [documentRowVersion, entries]
  1522. properties:
  1523. documentRowVersion: {type: integer, minimum: 0}
  1524. entries:
  1525. type: array
  1526. items: {$ref: '#/SavePermissionEntry'}
  1527. description: 调阅授权全集(非增量补丁);仅用户主体,expiresAt必须晚于当前时间且不超过当前时间+7天(服务端含60秒容差);保存不触碰审批单凭证。
  1528. PermissionDetail:
  1529. type: object
  1530. additionalProperties: false
  1531. required:
  1532. - documentId
  1533. - sourceDocumentId
  1534. - inherited
  1535. - documentRowVersion
  1536. - entries
  1537. properties:
  1538. documentId: {$ref: '#/StringId'}
  1539. sourceDocumentId: {$ref: '#/StringId'}
  1540. inherited: {type: boolean}
  1541. documentRowVersion: {type: integer, minimum: 0}
  1542. entries:
  1543. type: array
  1544. items: {$ref: '#/PermissionEntry'}
  1545. description: 按subjectId升序返回全部未删除授权(含已到期条目,由前端标记)。
  1546. PermissionVoucherResult:
  1547. type: object
  1548. additionalProperties: false
  1549. required: [documentId, entryId, voucherFileName, voucherFileSize, voucherUploadedAt]
  1550. properties:
  1551. documentId: {$ref: '#/StringId'}
  1552. entryId: {$ref: '#/StringId'}
  1553. voucherFileName: {type: string}
  1554. voucherFileSize: {type: integer, minimum: 1}
  1555. voucherUploadedAt: {$ref: '#/UtcDateTime'}
  1556. PermissionVoucherResultResponse:
  1557. type: object
  1558. additionalProperties: false
  1559. required: [code, message, data, requestId]
  1560. properties:
  1561. code: {type: string, enum: [OK]}
  1562. message: {type: string, enum: [success]}
  1563. data: {$ref: '#/PermissionVoucherResult'}
  1564. requestId: {type: string, format: uuid}
  1565. PermissionVoucherDeleteResult:
  1566. type: object
  1567. additionalProperties: false
  1568. required: [documentId, entryId]
  1569. properties:
  1570. documentId: {$ref: '#/StringId'}
  1571. entryId: {$ref: '#/StringId'}
  1572. PermissionVoucherDeleteResultResponse:
  1573. type: object
  1574. additionalProperties: false
  1575. required: [code, message, data, requestId]
  1576. properties:
  1577. code: {type: string, enum: [OK]}
  1578. message: {type: string, enum: [success]}
  1579. data: {$ref: '#/PermissionVoucherDeleteResult'}
  1580. requestId: {type: string, format: uuid}
  1581. PermissionDetailResponse:
  1582. type: object
  1583. additionalProperties: false
  1584. required: [code, message, data, requestId]
  1585. properties:
  1586. code: {type: string, enum: [OK]}
  1587. message: {type: string, enum: [success]}
  1588. data: {$ref: '#/PermissionDetail'}
  1589. requestId: {type: string, format: uuid}
  1590. AuditGranularity:
  1591. type: string
  1592. enum: [DAY, WEEK, MONTH]
  1593. AuditLogSummary:
  1594. type: object
  1595. additionalProperties: false
  1596. required:
  1597. - id
  1598. - username
  1599. - realName
  1600. - organizationName
  1601. - actionType
  1602. - targetType
  1603. - targetId
  1604. - targetName
  1605. - operationResult
  1606. - failureReason
  1607. - clientIp
  1608. - requestId
  1609. - createdAt
  1610. properties:
  1611. id: {$ref: '#/StringId'}
  1612. username: {type: string, nullable: true}
  1613. realName: {type: string, nullable: true}
  1614. organizationName: {type: string, nullable: true}
  1615. actionType: {$ref: '#/AuditAction'}
  1616. targetType:
  1617. allOf: [{$ref: '#/AuditTarget'}]
  1618. nullable: true
  1619. targetId:
  1620. allOf: [{$ref: '#/StringId'}]
  1621. nullable: true
  1622. targetName: {type: string, nullable: true}
  1623. operationResult: {$ref: '#/AuditResult'}
  1624. failureReason: {type: string, nullable: true}
  1625. clientIp: {type: string, nullable: true}
  1626. requestId: {type: string, nullable: true}
  1627. createdAt: {$ref: '#/UtcDateTime'}
  1628. AuditLogPage:
  1629. type: object
  1630. additionalProperties: false
  1631. required: [items, page, pageSize, total, totalPages]
  1632. properties:
  1633. items: {type: array, items: {$ref: '#/AuditLogSummary'}}
  1634. page: {type: integer, minimum: 1}
  1635. pageSize: {type: integer, minimum: 1, maximum: 100}
  1636. total: {type: integer, minimum: 0}
  1637. totalPages: {type: integer, minimum: 0}
  1638. AuditLogPageResponse:
  1639. type: object
  1640. additionalProperties: false
  1641. required: [code, message, data, requestId]
  1642. properties:
  1643. code: {type: string, enum: [OK]}
  1644. message: {type: string, enum: [success]}
  1645. data: {$ref: '#/AuditLogPage'}
  1646. requestId: {type: string, format: uuid}
  1647. DocumentStatistics:
  1648. type: object
  1649. additionalProperties: false
  1650. required: [planDocumentCount, mainPlanCount, subPlanCount, attachmentCount, todayViewerCount]
  1651. properties:
  1652. planDocumentCount: {type: integer, minimum: 0}
  1653. mainPlanCount: {type: integer, minimum: 0}
  1654. subPlanCount: {type: integer, minimum: 0}
  1655. attachmentCount: {type: integer, minimum: 0}
  1656. todayViewerCount: {type: integer, minimum: 0}
  1657. DocumentStatisticsResponse:
  1658. type: object
  1659. additionalProperties: false
  1660. required: [code, message, data, requestId]
  1661. properties:
  1662. code: {type: string, enum: [OK]}
  1663. message: {type: string, enum: [success]}
  1664. data: {$ref: '#/DocumentStatistics'}
  1665. requestId: {type: string, format: uuid}
  1666. AuditTrendItem:
  1667. type: object
  1668. additionalProperties: false
  1669. required: [period, operationCount]
  1670. properties:
  1671. period: {type: string}
  1672. operationCount: {type: integer, minimum: 0}
  1673. AuditTrendData:
  1674. type: object
  1675. additionalProperties: false
  1676. required: [items]
  1677. properties:
  1678. items: {type: array, items: {$ref: '#/AuditTrendItem'}}
  1679. AuditTrendResponse:
  1680. type: object
  1681. additionalProperties: false
  1682. required: [code, message, data, requestId]
  1683. properties:
  1684. code: {type: string, enum: [OK]}
  1685. message: {type: string, enum: [success]}
  1686. data: {$ref: '#/AuditTrendData'}
  1687. requestId: {type: string, format: uuid}
  1688. AuditActionStatisticsItem:
  1689. type: object
  1690. additionalProperties: false
  1691. required: [actionType, count]
  1692. properties:
  1693. actionType: {$ref: '#/AuditAction'}
  1694. count: {type: integer, minimum: 0}
  1695. AuditActionStatisticsData:
  1696. type: object
  1697. additionalProperties: false
  1698. required: [items]
  1699. properties:
  1700. items: {type: array, items: {$ref: '#/AuditActionStatisticsItem'}}
  1701. AuditActionStatisticsResponse:
  1702. type: object
  1703. additionalProperties: false
  1704. required: [code, message, data, requestId]
  1705. properties:
  1706. code: {type: string, enum: [OK]}
  1707. message: {type: string, enum: [success]}
  1708. data: {$ref: '#/AuditActionStatisticsData'}
  1709. requestId: {type: string, format: uuid}
  1710. AuditUserStatisticsItem:
  1711. type: object
  1712. additionalProperties: false
  1713. required: [userId, realName, organizationName, operationCount]
  1714. properties:
  1715. userId: {$ref: '#/StringId'}
  1716. realName: {type: string, nullable: true}
  1717. organizationName: {type: string, nullable: true}
  1718. operationCount: {type: integer, minimum: 0}
  1719. AuditUserStatisticsData:
  1720. type: object
  1721. additionalProperties: false
  1722. required: [items]
  1723. properties:
  1724. items: {type: array, items: {$ref: '#/AuditUserStatisticsItem'}}
  1725. AuditUserStatisticsResponse:
  1726. type: object
  1727. additionalProperties: false
  1728. required: [code, message, data, requestId]
  1729. properties:
  1730. code: {type: string, enum: [OK]}
  1731. message: {type: string, enum: [success]}
  1732. data: {$ref: '#/AuditUserStatisticsData'}
  1733. requestId: {type: string, format: uuid}
  1734. DeletedBySnapshot:
  1735. type: object
  1736. additionalProperties: false
  1737. required: [userId, username, realName, organizationName]
  1738. properties:
  1739. userId:
  1740. allOf:
  1741. - $ref: '#/StringId'
  1742. nullable: true
  1743. username: {type: string, nullable: true}
  1744. realName: {type: string, nullable: true}
  1745. organizationName: {type: string, nullable: true}
  1746. RecycleBinDocumentSummary:
  1747. type: object
  1748. additionalProperties: false
  1749. required:
  1750. - id
  1751. - documentName
  1752. - documentType
  1753. - originalFileName
  1754. - categoryId
  1755. - categoryName
  1756. - parentDocumentId
  1757. - securityLevel
  1758. - documentStatus
  1759. - deletedAt
  1760. - updatedBy
  1761. - updatedByName
  1762. - deletedBy
  1763. - rowVersion
  1764. properties:
  1765. id: {$ref: '#/StringId'}
  1766. documentName: {type: string}
  1767. documentType: {$ref: '#/DocumentType'}
  1768. originalFileName: {type: string}
  1769. categoryId:
  1770. allOf:
  1771. - $ref: '#/StringId'
  1772. nullable: true
  1773. categoryName: {type: string, nullable: true}
  1774. parentDocumentId:
  1775. allOf:
  1776. - $ref: '#/StringId'
  1777. nullable: true
  1778. securityLevel: {$ref: '#/SecurityLevel'}
  1779. documentStatus: {$ref: '#/DocumentStatus'}
  1780. deletedAt: {$ref: '#/UtcDateTime'}
  1781. updatedBy:
  1782. allOf:
  1783. - $ref: '#/StringId'
  1784. nullable: true
  1785. updatedByName: {type: string, nullable: true}
  1786. deletedBy:
  1787. allOf:
  1788. - $ref: '#/DeletedBySnapshot'
  1789. nullable: true
  1790. rowVersion: {type: integer, minimum: 0}
  1791. RecycleBinDocumentPage:
  1792. type: object
  1793. additionalProperties: false
  1794. required: [items, page, pageSize, total, totalPages]
  1795. properties:
  1796. items:
  1797. type: array
  1798. items: {$ref: '#/RecycleBinDocumentSummary'}
  1799. page: {type: integer, minimum: 1}
  1800. pageSize: {type: integer, minimum: 1, maximum: 100}
  1801. total: {type: integer, minimum: 0}
  1802. totalPages: {type: integer, minimum: 0}
  1803. RecycleBinDocumentPageResponse:
  1804. type: object
  1805. additionalProperties: false
  1806. required: [code, message, data, requestId]
  1807. properties:
  1808. code: {type: string, enum: [OK]}
  1809. message: {type: string, enum: [success]}
  1810. data: {$ref: '#/RecycleBinDocumentPage'}
  1811. requestId: {type: string, format: uuid}
  1812. RestoreDocumentRequest:
  1813. type: object
  1814. additionalProperties: false
  1815. required: [rowVersion]
  1816. properties:
  1817. rowVersion: {type: integer, minimum: 0}
  1818. RestoredDocument:
  1819. allOf:
  1820. - $ref: '#/DocumentSummary'
  1821. - type: object
  1822. required: [originalFileName, mimeType, fileSize, permissionSummary]
  1823. properties:
  1824. originalFileName: {type: string}
  1825. mimeType: {type: string, nullable: true}
  1826. fileSize: {type: integer, minimum: 0}
  1827. permissionSummary: {$ref: '#/PermissionSummary'}
  1828. mountedPlanCount: {type: integer, minimum: 0}
  1829. RestoreDocumentResult:
  1830. type: object
  1831. additionalProperties: false
  1832. required:
  1833. - document
  1834. - restoredPermissionCount
  1835. - skippedPermissionCount
  1836. - restoredBindingCount
  1837. - skippedBindingCount
  1838. properties:
  1839. document: {$ref: '#/RestoredDocument'}
  1840. restoredPermissionCount: {type: integer, minimum: 0}
  1841. skippedPermissionCount: {type: integer, minimum: 0}
  1842. restoredBindingCount: {type: integer, minimum: 0}
  1843. skippedBindingCount: {type: integer, minimum: 0}
  1844. RestoreDocumentResponse:
  1845. type: object
  1846. additionalProperties: false
  1847. required: [code, message, data, requestId]
  1848. properties:
  1849. code: {type: string, enum: [OK]}
  1850. message: {type: string, enum: [success]}
  1851. data: {$ref: '#/RestoreDocumentResult'}
  1852. requestId: {type: string, format: uuid}
  1853. DictionaryOption:
  1854. type: object
  1855. additionalProperties: false
  1856. required: [code, label, sortNo]
  1857. properties:
  1858. code: {type: string, minLength: 1}
  1859. label: {type: string, minLength: 1}
  1860. sortNo: {type: integer, minimum: 0}
  1861. DictionaryOptionList:
  1862. type: array
  1863. items: {$ref: '#/DictionaryOption'}
  1864. UiDictionaryGroups:
  1865. type: object
  1866. additionalProperties: false
  1867. required:
  1868. - roleCodes
  1869. - allowedModules
  1870. - documentTypes
  1871. - documentStatuses
  1872. - securityLevels
  1873. - attachmentTypes
  1874. - deptScopes
  1875. - allowedActions
  1876. - categoryTypes
  1877. - enabledStatuses
  1878. - auditResults
  1879. - auditActions
  1880. - auditTargets
  1881. properties:
  1882. roleCodes: {$ref: '#/DictionaryOptionList'}
  1883. allowedModules: {$ref: '#/DictionaryOptionList'}
  1884. documentTypes: {$ref: '#/DictionaryOptionList'}
  1885. documentStatuses: {$ref: '#/DictionaryOptionList'}
  1886. securityLevels: {$ref: '#/DictionaryOptionList'}
  1887. attachmentTypes: {$ref: '#/DictionaryOptionList'}
  1888. deptScopes: {$ref: '#/DictionaryOptionList'}
  1889. allowedActions: {$ref: '#/DictionaryOptionList'}
  1890. categoryTypes: {$ref: '#/DictionaryOptionList'}
  1891. enabledStatuses: {$ref: '#/DictionaryOptionList'}
  1892. auditResults: {$ref: '#/DictionaryOptionList'}
  1893. auditActions: {$ref: '#/DictionaryOptionList'}
  1894. auditTargets: {$ref: '#/DictionaryOptionList'}
  1895. UiDictionaries:
  1896. type: object
  1897. additionalProperties: false
  1898. required: [version, locale, dictionaries]
  1899. properties:
  1900. version:
  1901. type: string
  1902. pattern: '^[0-9]{4}\.[0-9]+$'
  1903. example: '2026.1'
  1904. locale:
  1905. type: string
  1906. example: zh-CN
  1907. dictionaries: {$ref: '#/UiDictionaryGroups'}
  1908. UiDictionariesResponse:
  1909. type: object
  1910. additionalProperties: false
  1911. required: [code, message, data, requestId]
  1912. properties:
  1913. code: {type: string, enum: [OK]}
  1914. message: {type: string, enum: [success]}
  1915. data: {$ref: '#/UiDictionaries'}
  1916. requestId: {type: string, format: uuid}
  1917. CreateOrganizationRequest:
  1918. type: object
  1919. additionalProperties: false
  1920. required: [orgCode, orgName, parentId, sortNo, status]
  1921. properties:
  1922. orgCode: {type: string, minLength: 1, maxLength: 64}
  1923. orgName: {type: string, minLength: 1, maxLength: 128}
  1924. parentId:
  1925. allOf: [{$ref: '#/StringId'}]
  1926. nullable: true
  1927. sortNo: {type: integer}
  1928. status: {$ref: '#/EnabledStatus'}
  1929. UpdateOrganizationRequest:
  1930. type: object
  1931. additionalProperties: false
  1932. required: [orgName, parentId, sortNo, status, rowVersion]
  1933. properties:
  1934. orgName: {type: string, minLength: 1, maxLength: 128}
  1935. parentId:
  1936. allOf: [{$ref: '#/StringId'}]
  1937. nullable: true
  1938. sortNo: {type: integer}
  1939. status: {$ref: '#/EnabledStatus'}
  1940. rowVersion: {type: integer, minimum: 0}
  1941. OrganizationResponse:
  1942. type: object
  1943. additionalProperties: false
  1944. required: [code, message, data, requestId]
  1945. properties:
  1946. code: {type: string, enum: [OK]}
  1947. message: {type: string, enum: [success]}
  1948. data:
  1949. allOf: [{$ref: '#/OrganizationNode'}]
  1950. description: 写操作响应中children固定为空数组。
  1951. requestId: {type: string, format: uuid}
  1952. DeleteOrganizationData:
  1953. type: object
  1954. additionalProperties: false
  1955. required: [id, deleted]
  1956. properties:
  1957. id: {$ref: '#/StringId'}
  1958. deleted: {type: boolean, enum: [true]}
  1959. DeleteOrganizationResponse:
  1960. type: object
  1961. additionalProperties: false
  1962. required: [code, message, data, requestId]
  1963. properties:
  1964. code: {type: string, enum: [OK]}
  1965. message: {type: string, enum: [success]}
  1966. data: {$ref: '#/DeleteOrganizationData'}
  1967. requestId: {type: string, format: uuid}
  1968. RolePasswordAssignment:
  1969. type: object
  1970. additionalProperties: false
  1971. required: [roleId, password]
  1972. properties:
  1973. roleId: {$ref: '#/StringId'}
  1974. password:
  1975. type: string
  1976. nullable: true
  1977. minLength: 8
  1978. maxLength: 64
  1979. writeOnly: true
  1980. description: 该角色独立密码;null=该角色使用用户级密码(契约1.53)。
  1981. CreateUserRequest:
  1982. type: object
  1983. additionalProperties: false
  1984. required: [username, realName, initialPassword, organizationId, roleCode, roleIds, securityLevel, status]
  1985. properties:
  1986. username:
  1987. type: string
  1988. minLength: 1
  1989. maxLength: 64
  1990. description: 登录用户名(契约1.51):界面录入的即姓名,与realName同值写入;非空且≤64字符,无字符集限制(中文姓名直接可用)。
  1991. realName:
  1992. type: string
  1993. minLength: 1
  1994. maxLength: 64
  1995. description: 姓名(契约1.47/1.50):界面不再单独录入,创建时由用户名同步写入(前端自动填充,接口仍要求非空);活跃用户中唯一(应用层校验不加库约束),冲突返回409「姓名已存在」;登录与重置密码仍兼容按姓名唯一命中解析存量用户。
  1996. initialPassword: {type: string, format: password, minLength: 8, maxLength: 64, writeOnly: true}
  1997. organizationId:
  1998. allOf: [{$ref: '#/StringId'}]
  1999. nullable: true
  2000. roleCode: {$ref: '#/RoleCode'}
  2001. roleIds:
  2002. type: array
  2003. uniqueItems: true
  2004. description: 挂载角色ID列表(契约1.46 多角色);空数组=无挂载(登录走默认角色),逐角色校验有效且不越管理范围。
  2005. items: {$ref: '#/StringId'}
  2006. rolePasswords:
  2007. type: array
  2008. description: 角色密码分配(契约1.53 密码即角色);挂载≥2角色时必填——须覆盖全部挂载角色且恰一个password=null(使用用户密码),独立密码满足策略、两两互异且不等于initialPassword(冲突400 PASSWORD_CONFLICT);挂载≤1提交返回400「仅多角色需要分配角色密码」。
  2009. items: {$ref: '#/RolePasswordAssignment'}
  2010. seatName:
  2011. type: string
  2012. nullable: true
  2013. maxLength: 64
  2014. description: 席位(契约1.46,可选);空/null=不设置。
  2015. userType:
  2016. type: string
  2017. enum: [NORMAL, COMMANDER]
  2018. description: 用户类型(契约1.46,可选,缺省NORMAL);COMMANDER=首长(仍属USER类别)。
  2019. securityLevel: {$ref: '#/SecurityLevel'}
  2020. status: {$ref: '#/EnabledStatus'}
  2021. managedOrgId:
  2022. type: string
  2023. nullable: true
  2024. description: 用户级管理范围(契约1.30,可选);null=全局、机构ID=固定锚点(须指向未删除机构)。省略或"SELF"时跟随该用户所在机构(落库哨兵0)。
  2025. UpdateUiThemeRequest:
  2026. type: object
  2027. additionalProperties: false
  2028. required: [uiTheme]
  2029. properties:
  2030. uiTheme: {type: string, enum: [blue, red, green]}
  2031. UpdateUserRequest:
  2032. type: object
  2033. additionalProperties: false
  2034. required: [realName, organizationId, roleCode, roleIds, securityLevel, status, rowVersion]
  2035. properties:
  2036. realName:
  2037. type: string
  2038. minLength: 1
  2039. maxLength: 64
  2040. description: 姓名(契约1.47/1.50):界面不再可编辑,编辑提交保持原值;活跃用户中唯一(应用层校验排除自身,不加库约束),冲突返回409「姓名已存在」。
  2041. organizationId:
  2042. allOf: [{$ref: '#/StringId'}]
  2043. nullable: true
  2044. roleCode: {$ref: '#/RoleCode'}
  2045. roleIds:
  2046. type: array
  2047. uniqueItems: true
  2048. description: 挂载角色ID列表(契约1.46 多角色);以活跃启用挂载为基线做差集增删,空数组=清空活跃挂载(停用角色关联保留不动,重新启用后自动恢复生效),diff变化联动authVersion+1使旧Token失效。
  2049. items: {$ref: '#/StringId'}
  2050. rolePasswords:
  2051. type: array
  2052. description: 角色密码分配(契约1.53 密码即角色);仅挂载变化时受理——结果≥2须提交全量分配(恰一个password=null、独立密码互异且不等于用户级密码(以旧哈希verify比对)),≤1时省略(服务端清空全部挂载行密码);挂载未变提交返回400「挂载角色未变化,无需重新分配角色密码」。
  2053. items: {$ref: '#/RolePasswordAssignment'}
  2054. seatName:
  2055. type: string
  2056. nullable: true
  2057. maxLength: 64
  2058. description: 席位(契约1.46,可选);null=清空。
  2059. userType:
  2060. type: string
  2061. enum: [NORMAL, COMMANDER]
  2062. description: 用户类型(契约1.46,可选,缺省NORMAL);COMMANDER=首长(仍属USER类别)。
  2063. securityLevel: {$ref: '#/SecurityLevel'}
  2064. status: {$ref: '#/EnabledStatus'}
  2065. managedOrgId:
  2066. type: string
  2067. nullable: true
  2068. description: 用户级管理范围(契约1.30,可选);null=全局、机构ID=固定锚点(须指向未删除机构)、"SELF"=跟随该用户所在机构(落库哨兵0)。省略时保持原值不变。
  2069. rowVersion: {type: integer, minimum: 0}
  2070. DeleteUserData:
  2071. type: object
  2072. additionalProperties: false
  2073. required: [id, deleted]
  2074. properties:
  2075. id: {$ref: '#/StringId'}
  2076. deleted: {type: boolean, enum: [true]}
  2077. DeleteUserResponse:
  2078. type: object
  2079. additionalProperties: false
  2080. required: [code, message, data, requestId]
  2081. properties:
  2082. code: {type: string, enum: [OK]}
  2083. message: {type: string, enum: [success]}
  2084. data: {$ref: '#/DeleteUserData'}
  2085. requestId: {type: string, format: uuid}
  2086. ResetUserPasswordRequest:
  2087. type: object
  2088. additionalProperties: false
  2089. required: [newPassword, rowVersion]
  2090. properties:
  2091. newPassword: {type: string, format: password, minLength: 8, maxLength: 64, writeOnly: true}
  2092. rowVersion: {type: integer, minimum: 0}
  2093. ResetPasswordData:
  2094. type: object
  2095. additionalProperties: false
  2096. required: [id, reset, authVersion]
  2097. properties:
  2098. id: {$ref: '#/StringId'}
  2099. reset: {type: boolean, enum: [true]}
  2100. authVersion: {type: integer, minimum: 0}
  2101. ResetPasswordResponse:
  2102. type: object
  2103. additionalProperties: false
  2104. required: [code, message, data, requestId]
  2105. properties:
  2106. code: {type: string, enum: [OK]}
  2107. message: {type: string, enum: [success]}
  2108. data: {$ref: '#/ResetPasswordData'}
  2109. requestId: {type: string, format: uuid}
  2110. DocumentTagCollection:
  2111. type: object
  2112. additionalProperties: false
  2113. required: [items, total]
  2114. properties:
  2115. items:
  2116. type: array
  2117. items: {type: string}
  2118. description: 当前用户可见的主案标签,按Unicode升序。
  2119. total: {type: integer, minimum: 0}
  2120. DocumentTagsResponse:
  2121. type: object
  2122. additionalProperties: false
  2123. required: [code, message, data, requestId]
  2124. properties:
  2125. code: {type: string, enum: [OK]}
  2126. message: {type: string, enum: [success]}
  2127. data: {$ref: '#/DocumentTagCollection'}
  2128. requestId: {type: string, format: uuid}
  2129. DeptScope:
  2130. type: string
  2131. description: 权限矩阵部门范围:所属部门方案/其他部门方案(其他部门含所属部门子树外全部部门与无归属文档)。
  2132. enum: [OWN, OTHER]
  2133. RoleSummary:
  2134. type: object
  2135. additionalProperties: false
  2136. required: [id, roleName, sortNo, status, remark, isDefault, manageCategoryEdit, manageOrgEdit, manageUserEdit, manageSystemManage, manageAuditLog, manageRoleEdit, managedOrgId, memberCount, rowVersion]
  2137. properties:
  2138. id: {$ref: '#/StringId'}
  2139. roleName: {type: string, maxLength: 64}
  2140. sortNo: {type: integer, minimum: 0, maximum: 999999}
  2141. status: {$ref: '#/EnabledStatus'}
  2142. remark:
  2143. type: string
  2144. nullable: true
  2145. maxLength: 255
  2146. isDefault: {type: boolean}
  2147. manageCategoryEdit: {type: boolean, description: 分类编辑管理位(仅对ADMIN类别用户生效)}
  2148. manageOrgEdit: {type: boolean, description: 机构编辑管理位(仅对ADMIN类别用户生效)}
  2149. manageUserEdit: {type: boolean, description: 用户编辑管理位(仅对ADMIN类别用户生效)}
  2150. manageSystemManage: {type: boolean, description: 系统管理管理位(契约1.23,仅对ADMIN类别用户生效)}
  2151. manageAuditLog: {type: boolean, description: 日志审计管理位(契约1.23,仅对ADMIN类别用户生效)}
  2152. manageRoleEdit: {type: boolean, description: 角色编辑管理位(契约1.25,仅对ADMIN类别用户生效,全局生效不受锚点约束)}
  2153. managedOrgId:
  2154. type: string
  2155. nullable: true
  2156. description: 管理范围锚点(契约1.30);机构ID、"SELF"(跟随用户的管理范围设置,落库哨兵0)或null(全局)。
  2157. memberCount: {type: integer, minimum: 0}
  2158. rowVersion: {type: integer, minimum: 0}
  2159. RolePage:
  2160. type: object
  2161. additionalProperties: false
  2162. required: [items, page, pageSize, total, totalPages]
  2163. properties:
  2164. items:
  2165. type: array
  2166. items:
  2167. $ref: '#/RoleSummary'
  2168. page:
  2169. type: integer
  2170. minimum: 1
  2171. pageSize:
  2172. type: integer
  2173. minimum: 1
  2174. maximum: 100
  2175. total:
  2176. type: integer
  2177. minimum: 0
  2178. totalPages:
  2179. type: integer
  2180. minimum: 0
  2181. RolePageResponse:
  2182. type: object
  2183. additionalProperties: false
  2184. required: [code, message, data, requestId]
  2185. properties:
  2186. code: {type: string, enum: [OK]}
  2187. message: {type: string, enum: [success]}
  2188. data: {$ref: '#/RolePage'}
  2189. requestId: {type: string, format: uuid}
  2190. CreateRoleRequest:
  2191. type: object
  2192. additionalProperties: false
  2193. required: [roleName, sortNo, status, remark, isDefault, manageCategoryEdit, manageOrgEdit, manageUserEdit, manageSystemManage, manageAuditLog, manageRoleEdit, managedOrgId]
  2194. properties:
  2195. roleName: {type: string, minLength: 1, maxLength: 64}
  2196. sortNo: {type: integer, minimum: 0, maximum: 999999}
  2197. status: {$ref: '#/EnabledStatus'}
  2198. remark:
  2199. type: string
  2200. nullable: true
  2201. maxLength: 255
  2202. isDefault: {type: boolean}
  2203. manageCategoryEdit: {type: boolean}
  2204. manageOrgEdit: {type: boolean}
  2205. manageUserEdit: {type: boolean}
  2206. manageSystemManage: {type: boolean}
  2207. manageAuditLog: {type: boolean}
  2208. manageRoleEdit: {type: boolean}
  2209. managedOrgId:
  2210. type: string
  2211. nullable: true
  2212. description: 管理范围锚点(契约1.30);机构ID、"SELF"(跟随用户的管理范围设置,落库哨兵0)或null/空串(全局),机构ID须指向未删除机构。
  2213. UpdateRoleRequest:
  2214. type: object
  2215. additionalProperties: false
  2216. required: [roleName, sortNo, status, remark, isDefault, manageCategoryEdit, manageOrgEdit, manageUserEdit, manageSystemManage, manageAuditLog, manageRoleEdit, managedOrgId, rowVersion]
  2217. properties:
  2218. roleName: {type: string, minLength: 1, maxLength: 64}
  2219. sortNo: {type: integer, minimum: 0, maximum: 999999}
  2220. status: {$ref: '#/EnabledStatus'}
  2221. remark:
  2222. type: string
  2223. nullable: true
  2224. maxLength: 255
  2225. isDefault: {type: boolean}
  2226. manageCategoryEdit: {type: boolean}
  2227. manageOrgEdit: {type: boolean}
  2228. manageUserEdit: {type: boolean}
  2229. manageSystemManage: {type: boolean}
  2230. manageAuditLog: {type: boolean}
  2231. manageRoleEdit: {type: boolean}
  2232. managedOrgId:
  2233. type: string
  2234. nullable: true
  2235. description: 管理范围锚点(契约1.30);机构ID、"SELF"(跟随用户的管理范围设置,落库哨兵0)或null/空串(全局),机构ID须指向未删除机构。
  2236. rowVersion: {type: integer, minimum: 0}
  2237. RoleResponse:
  2238. type: object
  2239. additionalProperties: false
  2240. required: [code, message, data, requestId]
  2241. properties:
  2242. code: {type: string, enum: [OK]}
  2243. message: {type: string, enum: [success]}
  2244. data: {$ref: '#/RoleSummary'}
  2245. requestId: {type: string, format: uuid}
  2246. DeleteRoleData:
  2247. type: object
  2248. additionalProperties: false
  2249. required: [id, deleted]
  2250. properties:
  2251. id: {$ref: '#/StringId'}
  2252. deleted: {type: boolean, enum: [true]}
  2253. DeleteRoleResponse:
  2254. type: object
  2255. additionalProperties: false
  2256. required: [code, message, data, requestId]
  2257. properties:
  2258. code: {type: string, enum: [OK]}
  2259. message: {type: string, enum: [success]}
  2260. data: {$ref: '#/DeleteRoleData'}
  2261. requestId: {type: string, format: uuid}
  2262. RolePermissionRow:
  2263. type: object
  2264. additionalProperties: false
  2265. required: [topCategoryId, docKind, securityLevel, deptScope, canView, canUpload, canDownload, canEdit, canDelete, canConfigPermission, canBindAttachment, canUnbindAttachment, canAttachmentUpload, canAttachmentEdit, canAttachmentView, canAttachmentDownload, canAttachmentDelete]
  2266. properties:
  2267. topCategoryId:
  2268. type: string
  2269. nullable: true
  2270. description: 一级分类id(契约1.48);null=共享资料库行组(未挂载附件判定专用)。
  2271. docKind:
  2272. type: string
  2273. enum: [MAIN, ACCOMPANYING_PLAN, SUPPORT_ACHIEVEMENT, TRAINING_MATERIAL, TYPICAL_CASE]
  2274. description: 种类维度(契约1.48);MAIN=主体方案(主案8位),附件四类型=共享资料(恒OWN行,附件5位)。
  2275. securityLevel: {$ref: '#/SecurityLevel'}
  2276. deptScope: {$ref: '#/DeptScope'}
  2277. canView: {type: boolean}
  2278. canUpload:
  2279. type: boolean
  2280. description: 上传位(契约1.31);仅 OWN 行有意义,OTHER 行恒为 false,服务端提交校验拒收 OTHER 行为 true 的载荷。
  2281. canDownload: {type: boolean}
  2282. canEdit: {type: boolean}
  2283. canDelete: {type: boolean}
  2284. canConfigPermission: {type: boolean}
  2285. canBindAttachment: {type: boolean}
  2286. canUnbindAttachment: {type: boolean}
  2287. canAttachmentUpload:
  2288. type: boolean
  2289. description: 附件上传位(契约1.41);共享附件库上传文档的权限,不含挂载操作;仅 OWN 行有意义(附件无部门归属),OTHER 行恒为 false。
  2290. canAttachmentEdit:
  2291. type: boolean
  2292. description: 附件编辑位(契约1.41);覆盖共享附件库与已挂载区域附件的编辑;仅 OWN 行有意义。
  2293. canAttachmentView:
  2294. type: boolean
  2295. description: 附件查看位(契约1.41);不跟随主案权限,配置即独立可查看附件;仅 OWN 行有意义。
  2296. canAttachmentDownload:
  2297. type: boolean
  2298. description: 附件下载位(契约1.41);不跟随主案权限,配置即独立可下载附件;仅 OWN 行有意义。
  2299. canAttachmentDelete:
  2300. type: boolean
  2301. description: 附件删除位(契约1.44);附件删除不再按ADMIN类别专属,配置即独立可删除附件;仅 OWN 行有意义。
  2302. RoleMatrixListResponse:
  2303. type: object
  2304. additionalProperties: false
  2305. required: [code, message, data, requestId]
  2306. properties:
  2307. code: {type: string, enum: [OK]}
  2308. message: {type: string, enum: [success]}
  2309. data:
  2310. type: array
  2311. minItems: 20
  2312. description: 行数动态=期望键集(契约1.48 一级分类×种类×密级×部门范围),服务端读时归一化输出。
  2313. items:
  2314. $ref: '#/RolePermissionRow'
  2315. requestId: {type: string, format: uuid}
  2316. UpdateRolePermissionsRequest:
  2317. type: object
  2318. additionalProperties: false
  2319. required: [matrix, rowVersion]
  2320. properties:
  2321. matrix:
  2322. type: array
  2323. minItems: 20
  2324. description: 行数动态=期望键集(契约1.48 一级分类×种类×密级×部门范围),服务端读时归一化输出。
  2325. items:
  2326. $ref: '#/RolePermissionRow'
  2327. rowVersion: {type: integer, minimum: 0}
  2328. RolePermissionsData:
  2329. type: object
  2330. additionalProperties: false
  2331. required: [id, matrix, rowVersion]
  2332. properties:
  2333. id: {$ref: '#/StringId'}
  2334. matrix:
  2335. type: array
  2336. minItems: 20
  2337. description: 行数动态=期望键集(契约1.48 一级分类×种类×密级×部门范围),服务端读时归一化输出。
  2338. items:
  2339. $ref: '#/RolePermissionRow'
  2340. rowVersion: {type: integer, minimum: 0}
  2341. RolePermissionsResponse:
  2342. type: object
  2343. additionalProperties: false
  2344. required: [code, message, data, requestId]
  2345. properties:
  2346. code: {type: string, enum: [OK]}
  2347. message: {type: string, enum: [success]}
  2348. data: {$ref: '#/RolePermissionsData'}
  2349. requestId: {type: string, format: uuid}
  2350. RoleUsersData:
  2351. type: object
  2352. additionalProperties: false
  2353. required: [id, userIds]
  2354. description: 角色挂载用户(契约1.46 关联表化);userIds为该角色全部活跃启用挂载用户的ID列表。
  2355. properties:
  2356. id: {$ref: '#/StringId'}
  2357. userIds:
  2358. type: array
  2359. items: {$ref: '#/StringId'}
  2360. uniqueItems: true
  2361. rowVersion: {type: integer, minimum: 0}
  2362. RoleUsersResponse:
  2363. type: object
  2364. additionalProperties: false
  2365. required: [code, message, data, requestId]
  2366. properties:
  2367. code: {type: string, enum: [OK]}
  2368. message: {type: string, enum: [success]}
  2369. data: {$ref: '#/RoleUsersData'}
  2370. requestId: {type: string, format: uuid}
  2371. UpdateRoleUsersRequest:
  2372. type: object
  2373. additionalProperties: false
  2374. required: [userIds, rowVersion]
  2375. description: 整体替换该角色的活跃挂载用户集合(契约1.46);只增删本角色关联,成员变动联动对端用户authVersion+1使旧Token失效。
  2376. properties:
  2377. userIds:
  2378. type: array
  2379. items: {$ref: '#/StringId'}
  2380. uniqueItems: true
  2381. rowVersion: {type: integer, minimum: 0}
  2382. DocumentRelationPreset:
  2383. type: object
  2384. additionalProperties: false
  2385. required: [code, label, sortNo]
  2386. properties:
  2387. code: {type: string, minLength: 1, description: 预置类型稳定编码(仅用于前端下拉匹配,不落库)}
  2388. label: {type: string, minLength: 1, description: 预置关系文本(保存时直接写入relation_type)}
  2389. sortNo: {type: integer, minimum: 0}
  2390. DocumentMoveRequest:
  2391. type: object
  2392. additionalProperties: false
  2393. description: targetPosition与target二选一(非法组合返回400);主案可携带scopeCategoryId(分类子树语义),配套方案携带返回400。
  2394. properties:
  2395. targetPosition: {type: integer, minimum: 1}
  2396. target: {type: string, enum: [TOP, BOTTOM]}
  2397. scopeCategoryId: {$ref: '#/StringId'}
  2398. DocumentMoveResult:
  2399. type: object
  2400. additionalProperties: false
  2401. required: [position, total]
  2402. properties:
  2403. position: {type: integer, minimum: 1}
  2404. total: {type: integer, minimum: 0}
  2405. DocumentMoveResponse:
  2406. type: object
  2407. additionalProperties: false
  2408. required: [code, message, data, requestId]
  2409. properties:
  2410. code: {type: string, enum: [OK]}
  2411. message: {type: string, enum: [success]}
  2412. data: {$ref: '#/DocumentMoveResult'}
  2413. requestId: {type: string, format: uuid}
  2414. AttachmentMoveRequest:
  2415. type: object
  2416. additionalProperties: false
  2417. required: [mainPlanRowVersion]
  2418. description: targetPosition与target二选一(非法组合返回400);scopeAttachmentType限定页签类型范围。
  2419. properties:
  2420. mainPlanRowVersion: {type: integer, minimum: 0}
  2421. targetPosition: {type: integer, minimum: 1}
  2422. target: {type: string, enum: [TOP, BOTTOM]}
  2423. scopeAttachmentType: {$ref: '#/AttachmentType'}
  2424. AttachmentMoveResult:
  2425. type: object
  2426. additionalProperties: false
  2427. required: [position, total, mainPlanRowVersion]
  2428. properties:
  2429. position: {type: integer, minimum: 1}
  2430. total: {type: integer, minimum: 0}
  2431. mainPlanRowVersion: {type: integer, minimum: 0}
  2432. AttachmentMoveResponse:
  2433. type: object
  2434. additionalProperties: false
  2435. required: [code, message, data, requestId]
  2436. properties:
  2437. code: {type: string, enum: [OK]}
  2438. message: {type: string, enum: [success]}
  2439. data: {$ref: '#/AttachmentMoveResult'}
  2440. requestId: {type: string, format: uuid}
  2441. DocumentRelationPresetsResponse:
  2442. type: object
  2443. additionalProperties: false
  2444. required: [code, message, data, requestId]
  2445. properties:
  2446. code: {type: string, enum: [OK]}
  2447. message: {type: string, enum: [success]}
  2448. data:
  2449. type: object
  2450. additionalProperties: false
  2451. required: [presets]
  2452. properties:
  2453. presets:
  2454. type: array
  2455. items: {$ref: '#/DocumentRelationPreset'}
  2456. requestId: {type: string, format: uuid}
  2457. DocumentRelationItem:
  2458. type: object
  2459. additionalProperties: false
  2460. required: [relatedDocumentId, relatedDocumentName, relationType]
  2461. properties:
  2462. relatedDocumentId: {$ref: '#/StringId'}
  2463. relatedDocumentName: {type: string, minLength: 1}
  2464. relationType: {type: string, minLength: 1, maxLength: 64, description: 关系文本(预置label或用户自定义)}
  2465. DocumentRelationsResponse:
  2466. type: object
  2467. additionalProperties: false
  2468. required: [code, message, data, requestId]
  2469. properties:
  2470. code: {type: string, enum: [OK]}
  2471. message: {type: string, enum: [success]}
  2472. data:
  2473. type: object
  2474. additionalProperties: false
  2475. required: [items]
  2476. properties:
  2477. items:
  2478. type: array
  2479. items: {$ref: '#/DocumentRelationItem'}
  2480. requestId: {type: string, format: uuid}
  2481. UpdateDocumentRelationsRequest:
  2482. type: object
  2483. additionalProperties: false
  2484. required: [relations, rowVersion]
  2485. properties:
  2486. relations:
  2487. type: array
  2488. maxItems: 50
  2489. items:
  2490. type: object
  2491. additionalProperties: false
  2492. required: [relatedDocumentId, relationType]
  2493. properties:
  2494. relatedDocumentId: {$ref: '#/StringId'}
  2495. relationType: {type: string, minLength: 1, maxLength: 64}
  2496. uniqueItems: true
  2497. rowVersion: {type: integer, minimum: 0}
  2498. DocumentRelationsSaveResponse:
  2499. type: object
  2500. additionalProperties: false
  2501. required: [code, message, data, requestId]
  2502. properties:
  2503. code: {type: string, enum: [OK]}
  2504. message: {type: string, enum: [success]}
  2505. data:
  2506. type: object
  2507. additionalProperties: false
  2508. required: [relations, rowVersion]
  2509. properties:
  2510. relations:
  2511. type: array
  2512. items: {$ref: '#/DocumentRelationItem'}
  2513. rowVersion: {type: integer, minimum: 0}
  2514. requestId: {type: string, format: uuid}
  2515. IpEntrySummary:
  2516. type: object
  2517. additionalProperties: false
  2518. required: [id, ipValue, remark, rowVersion]
  2519. properties:
  2520. id: {$ref: '#/StringId'}
  2521. ipValue:
  2522. type: string
  2523. minLength: 1
  2524. maxLength: 64
  2525. description: 规范化后的精确IP、CIDR网段或IP范围文本(IPv6为压缩形式,网段主机位为0,范围为「起-止」两端同版本且起≤止)。
  2526. remark:
  2527. type: string
  2528. maxLength: 128
  2529. rowVersion: {type: integer, minimum: 0}
  2530. IpEntryPage:
  2531. type: object
  2532. additionalProperties: false
  2533. required: [items, page, pageSize, total, totalPages]
  2534. properties:
  2535. items:
  2536. type: array
  2537. items:
  2538. $ref: '#/IpEntrySummary'
  2539. page:
  2540. type: integer
  2541. minimum: 1
  2542. pageSize:
  2543. type: integer
  2544. minimum: 1
  2545. maximum: 100
  2546. total:
  2547. type: integer
  2548. minimum: 0
  2549. totalPages:
  2550. type: integer
  2551. minimum: 0
  2552. IpEntryPageResponse:
  2553. type: object
  2554. additionalProperties: false
  2555. required: [code, message, data, requestId]
  2556. properties:
  2557. code: {type: string, enum: [OK]}
  2558. message: {type: string, enum: [success]}
  2559. data: {$ref: '#/IpEntryPage'}
  2560. requestId: {type: string, format: uuid}
  2561. CreateIpEntryRequest:
  2562. type: object
  2563. additionalProperties: false
  2564. required: [ipValue, remark]
  2565. properties:
  2566. ipValue: {type: string, minLength: 1, maxLength: 64}
  2567. remark: {type: string, maxLength: 128}
  2568. UpdateIpEntryRequest:
  2569. type: object
  2570. additionalProperties: false
  2571. required: [ipValue, remark, rowVersion]
  2572. properties:
  2573. ipValue: {type: string, minLength: 1, maxLength: 64}
  2574. remark: {type: string, maxLength: 128}
  2575. rowVersion: {type: integer, minimum: 0}
  2576. IpEntryResponse:
  2577. type: object
  2578. additionalProperties: false
  2579. required: [code, message, data, requestId]
  2580. properties:
  2581. code: {type: string, enum: [OK]}
  2582. message: {type: string, enum: [success]}
  2583. data: {$ref: '#/IpEntrySummary'}
  2584. requestId: {type: string, format: uuid}
  2585. DeleteIpEntryData:
  2586. type: object
  2587. additionalProperties: false
  2588. required: [id, deleted]
  2589. properties:
  2590. id: {$ref: '#/StringId'}
  2591. deleted: {type: boolean, enum: [true]}
  2592. DeleteIpEntryResponse:
  2593. type: object
  2594. additionalProperties: false
  2595. required: [code, message, data, requestId]
  2596. properties:
  2597. code: {type: string, enum: [OK]}
  2598. message: {type: string, enum: [success]}
  2599. data: {$ref: '#/DeleteIpEntryData'}
  2600. requestId: {type: string, format: uuid}
  2601. OrgIpAssignmentListData:
  2602. type: object
  2603. additionalProperties: false
  2604. required: [ipEntryIds]
  2605. properties:
  2606. ipEntryIds:
  2607. type: array
  2608. items: {$ref: '#/StringId'}
  2609. uniqueItems: true
  2610. OrgIpAssignmentListResponse:
  2611. type: object
  2612. additionalProperties: false
  2613. required: [code, message, data, requestId]
  2614. properties:
  2615. code: {type: string, enum: [OK]}
  2616. message: {type: string, enum: [success]}
  2617. data: {$ref: '#/OrgIpAssignmentListData'}
  2618. requestId: {type: string, format: uuid}
  2619. UpdateOrgIpAssignmentsRequest:
  2620. type: object
  2621. additionalProperties: false
  2622. required: [ipEntryIds, rowVersion]
  2623. properties:
  2624. ipEntryIds:
  2625. type: array
  2626. items: {$ref: '#/StringId'}
  2627. uniqueItems: true
  2628. rowVersion: {type: integer, minimum: 0}
  2629. OrgIpAssignmentsData:
  2630. type: object
  2631. additionalProperties: false
  2632. required: [id, ipEntryIds, rowVersion]
  2633. properties:
  2634. id: {$ref: '#/StringId'}
  2635. ipEntryIds:
  2636. type: array
  2637. items: {$ref: '#/StringId'}
  2638. uniqueItems: true
  2639. rowVersion: {type: integer, minimum: 0}
  2640. OrgIpAssignmentsResponse:
  2641. type: object
  2642. additionalProperties: false
  2643. required: [code, message, data, requestId]
  2644. properties:
  2645. code: {type: string, enum: [OK]}
  2646. message: {type: string, enum: [success]}
  2647. data: {$ref: '#/OrgIpAssignmentsData'}
  2648. requestId: {type: string, format: uuid}
  2649. BackupTargetMode:
  2650. type: string
  2651. enum: [LOCAL, RSYNC]
  2652. description: 备份目标模式:LOCAL 本机目录(开发/单机),RSYNC rsync守护进程异机传输。
  2653. BackupTypeCode:
  2654. type: string
  2655. enum: [FULL, INCREMENTAL]
  2656. BackupTrigger:
  2657. type: string
  2658. enum: [MANUAL, SCHEDULE]
  2659. BackupPhase:
  2660. type: string
  2661. description: 备份任务阶段;null表示从未运行过任何任务。
  2662. enum: [SCANNING, EXPORTING_DB, COPYING, PUSHING, CLEANING, SUCCESS, FAILED]
  2663. BackupConfigView:
  2664. type: object
  2665. additionalProperties: false
  2666. required: [target_mode, local_path, rsync_url, schedule_enabled, schedule_time, full_interval_days, retain_full_count, rsync_password_set]
  2667. properties:
  2668. target_mode: {$ref: '#/BackupTargetMode'}
  2669. local_path: {type: string, maxLength: 1024, description: LOCAL模式的备份根目录;未配置为空串。}
  2670. rsync_url: {type: string, maxLength: 1024, description: RSYNC模式目标地址 rsync://user@host:873/module/;未配置为空串。}
  2671. schedule_enabled: {type: boolean, description: 定时备份开关。}
  2672. schedule_time: {type: string, pattern: '^([01][0-9]|2[0-3]):[0-5][0-9]$', description: 每日触发时刻(HH:MM,业务时区)。}
  2673. full_interval_days: {type: integer, minimum: 1, maximum: 365, description: 定时任务距最近全量超过该天数时自动升级为全量。}
  2674. retain_full_count: {type: integer, minimum: 1, maximum: 100, description: 保留的完整备份链数量;超出部分从最旧链开始清理。}
  2675. rsync_password_set: {type: boolean, description: rsync密码是否已设置;密码永不回显明文。}
  2676. UpdateBackupConfigRequest:
  2677. type: object
  2678. additionalProperties: false
  2679. required: [target_mode, local_path, rsync_url, rsync_password, schedule_enabled, schedule_time, full_interval_days, retain_full_count]
  2680. properties:
  2681. target_mode: {$ref: '#/BackupTargetMode'}
  2682. local_path: {type: string, nullable: true, maxLength: 1024}
  2683. rsync_url: {type: string, nullable: true, maxLength: 1024}
  2684. rsync_password:
  2685. type: string
  2686. nullable: true
  2687. maxLength: 256
  2688. writeOnly: true
  2689. description: rsync密码;null或空串表示保持已存密码不变(回显永不回明文)。
  2690. schedule_enabled: {type: boolean}
  2691. schedule_time: {type: string, pattern: '^([01][0-9]|2[0-3]):[0-5][0-9]$'}
  2692. full_interval_days: {type: integer, minimum: 1, maximum: 365}
  2693. retain_full_count: {type: integer, minimum: 1, maximum: 100}
  2694. BackupConfigResponse:
  2695. type: object
  2696. additionalProperties: false
  2697. required: [code, message, data, requestId]
  2698. properties:
  2699. code: {type: string, enum: [OK]}
  2700. message: {type: string, enum: [success]}
  2701. data: {$ref: '#/BackupConfigView'}
  2702. requestId: {type: string, format: uuid}
  2703. BackupJobStartRequest:
  2704. type: object
  2705. additionalProperties: false
  2706. required: [type]
  2707. properties:
  2708. type:
  2709. allOf: [{$ref: '#/BackupTypeCode'}]
  2710. description: INCREMENTAL无可用全量链时服务端自动升级为FULL。
  2711. BackupProgress:
  2712. type: object
  2713. additionalProperties: false
  2714. required: [backupId, type, trigger, phase, bytesTotal, bytesCopied, filesTotal, filesCopied, pushPercent, error, startedAt, finishedAt]
  2715. properties:
  2716. backupId:
  2717. type: string
  2718. nullable: true
  2719. description: 备份ID,形如 dms-bak-yyyyMMdd-HHmmss-F/-I;从未运行时为null。
  2720. type:
  2721. allOf: [{$ref: '#/BackupTypeCode'}]
  2722. nullable: true
  2723. trigger:
  2724. allOf: [{$ref: '#/BackupTrigger'}]
  2725. nullable: true
  2726. phase:
  2727. allOf: [{$ref: '#/BackupPhase'}]
  2728. nullable: true
  2729. bytesTotal: {type: integer, minimum: 0, description: 待传输字节总量(扫描/拷贝阶段累计)。}
  2730. bytesCopied: {type: integer, minimum: 0}
  2731. filesTotal: {type: integer, minimum: 0}
  2732. filesCopied: {type: integer, minimum: 0}
  2733. pushPercent:
  2734. type: integer
  2735. minimum: 0
  2736. maximum: 100
  2737. nullable: true
  2738. description: rsync整体推送进度百分比;仅RSYNC模式PUSHING阶段有值。
  2739. error:
  2740. type: string
  2741. nullable: true
  2742. description: 失败原因;仅FAILED阶段非null。
  2743. startedAt:
  2744. type: string
  2745. nullable: true
  2746. description: 开始时间(业务时区本地时间,yyyy-MM-dd HH:mm:ss,非UTC)。
  2747. finishedAt:
  2748. type: string
  2749. nullable: true
  2750. description: 结束时间(业务时区本地时间,yyyy-MM-dd HH:mm:ss,非UTC)。
  2751. BackupJobStartResponse:
  2752. type: object
  2753. additionalProperties: false
  2754. required: [code, message, data, requestId]
  2755. properties:
  2756. code: {type: string, enum: [OK]}
  2757. message: {type: string, enum: [success]}
  2758. data: {$ref: '#/BackupProgress'}
  2759. requestId: {type: string, format: uuid}
  2760. BackupCurrentJob:
  2761. allOf:
  2762. - $ref: '#/BackupProgress'
  2763. - type: object
  2764. required: [running]
  2765. properties:
  2766. running: {type: boolean, description: 当前是否有备份任务在执行。}
  2767. BackupJobCurrentResponse:
  2768. type: object
  2769. additionalProperties: false
  2770. required: [code, message, data, requestId]
  2771. properties:
  2772. code: {type: string, enum: [OK]}
  2773. message: {type: string, enum: [success]}
  2774. data: {$ref: '#/BackupCurrentJob'}
  2775. requestId: {type: string, format: uuid}
  2776. BackupCancelData:
  2777. type: object
  2778. additionalProperties: false
  2779. required: [canceled]
  2780. properties:
  2781. canceled: {type: boolean, description: 请求取消时是否存在运行中的任务。}
  2782. BackupCancelResponse:
  2783. type: object
  2784. additionalProperties: false
  2785. required: [code, message, data, requestId]
  2786. properties:
  2787. code: {type: string, enum: [OK]}
  2788. message: {type: string, enum: [success]}
  2789. data: {$ref: '#/BackupCancelData'}
  2790. requestId: {type: string, format: uuid}
  2791. BackupHistoryEntry:
  2792. type: object
  2793. additionalProperties: false
  2794. required: [id, type, parent, started_at, finished_at, database_file, database_size, transferred_files, transferred_bytes, storage_file_count, storage_total_bytes]
  2795. properties:
  2796. id: {type: string, description: 备份ID dms-bak-yyyyMMdd-HHmmss-F(全量)/-I(增量)。}
  2797. type: {$ref: '#/BackupTypeCode'}
  2798. parent:
  2799. type: string
  2800. nullable: true
  2801. description: 增量备份的前驱备份ID;全量为null。
  2802. started_at: {type: string, description: 开始时间(业务时区本地时间,yyyy-MM-dd HH:mm:ss)。}
  2803. finished_at: {type: string, description: 结束时间(业务时区本地时间,yyyy-MM-dd HH:mm:ss)。}
  2804. database_file: {type: string, description: 数据库导出文件在备份包内的相对路径。}
  2805. database_size: {type: integer, minimum: 0, description: 数据库导出文件字节数。}
  2806. transferred_files: {type: integer, minimum: 0, description: 本次实际传输的存储文件数(全量为全部,增量为差异)。}
  2807. transferred_bytes: {type: integer, minimum: 0}
  2808. storage_file_count: {type: integer, minimum: 0, description: 合并清单中的存储文件总数(链尾累计口径)。}
  2809. storage_total_bytes: {type: integer, minimum: 0}
  2810. BackupHistoryData:
  2811. type: object
  2812. additionalProperties: false
  2813. required: [entries]
  2814. properties:
  2815. entries:
  2816. type: array
  2817. items: {$ref: '#/BackupHistoryEntry'}
  2818. description: 按备份ID升序(即时间升序)排列。
  2819. BackupHistoryResponse:
  2820. type: object
  2821. additionalProperties: false
  2822. required: [code, message, data, requestId]
  2823. properties:
  2824. code: {type: string, enum: [OK]}
  2825. message: {type: string, enum: [success]}
  2826. data: {$ref: '#/BackupHistoryData'}
  2827. requestId: {type: string, format: uuid}
  2828. SystemCpuSnapshot:
  2829. type: object
  2830. additionalProperties: false
  2831. required: [percent, coreCount, loadAvgOneMinute]
  2832. properties:
  2833. percent: {type: number, minimum: 0, maximum: 100, description: CPU 总占用百分比(0.3 秒采样窗口)。}
  2834. coreCount: {type: integer, minimum: 0, description: 逻辑核数。}
  2835. loadAvgOneMinute:
  2836. type: number
  2837. nullable: true
  2838. description: 1 分钟平均负载(仅 POSIX,Windows 为 null)。
  2839. SystemMemorySnapshot:
  2840. type: object
  2841. additionalProperties: false
  2842. required: [totalBytes, usedBytes, availableBytes, usedPercent]
  2843. properties:
  2844. totalBytes: {type: integer, minimum: 0}
  2845. usedBytes: {type: integer, minimum: 0}
  2846. availableBytes: {type: integer, minimum: 0}
  2847. usedPercent: {type: number, minimum: 0, maximum: 100}
  2848. SystemSwapSnapshot:
  2849. type: object
  2850. additionalProperties: false
  2851. required: [totalBytes, usedBytes, usedPercent]
  2852. properties:
  2853. totalBytes: {type: integer, minimum: 0}
  2854. usedBytes: {type: integer, minimum: 0}
  2855. usedPercent: {type: number, minimum: 0, maximum: 100}
  2856. SystemDiskSnapshot:
  2857. type: object
  2858. additionalProperties: false
  2859. required: [device, mountpoint, fstype, totalBytes, usedBytes, freeBytes, usedPercent]
  2860. properties:
  2861. device: {type: string, description: 设备名。}
  2862. mountpoint: {type: string, description: 挂载点。}
  2863. fstype: {type: string, description: 文件系统类型。}
  2864. totalBytes: {type: integer, minimum: 0}
  2865. usedBytes: {type: integer, minimum: 0}
  2866. freeBytes: {type: integer, minimum: 0}
  2867. usedPercent: {type: number, minimum: 0, maximum: 100}
  2868. SystemMetricsCurrentData:
  2869. type: object
  2870. additionalProperties: false
  2871. required: [cpu, memory, swap, disks, bootAt]
  2872. properties:
  2873. cpu: {$ref: '#/SystemCpuSnapshot'}
  2874. memory: {$ref: '#/SystemMemorySnapshot'}
  2875. swap: {$ref: '#/SystemSwapSnapshot'}
  2876. disks:
  2877. type: array
  2878. items: {$ref: '#/SystemDiskSnapshot'}
  2879. description: 物理磁盘分区占用(不可读分区跳过)。
  2880. bootAt: {type: string, description: 开机时间(UTC,毫秒精度 Z 结尾)。}
  2881. SystemMetricsCurrentResponse:
  2882. type: object
  2883. additionalProperties: false
  2884. required: [code, message, data, requestId]
  2885. properties:
  2886. code: {type: string, enum: [OK]}
  2887. message: {type: string, enum: [success]}
  2888. data: {$ref: '#/SystemMetricsCurrentData'}
  2889. requestId: {type: string, format: uuid}
  2890. SystemMetricHistoryEntry:
  2891. type: object
  2892. additionalProperties: false
  2893. required: [sampledAt, cpuPercent, memUsedBytes, memTotalBytes]
  2894. properties:
  2895. sampledAt: {type: string, description: 采样时间(UTC,毫秒精度 Z 结尾)。}
  2896. cpuPercent:
  2897. type: number
  2898. nullable: true
  2899. description: CPU 百分比(采集失败为 null)。
  2900. memUsedBytes: {type: integer, minimum: 0}
  2901. memTotalBytes: {type: integer, minimum: 0}
  2902. SystemMetricHistoryData:
  2903. type: object
  2904. additionalProperties: false
  2905. required: [hours, entries]
  2906. properties:
  2907. hours: {type: integer, minimum: 1, description: 查询窗口小时数。}
  2908. entries:
  2909. type: array
  2910. items: {$ref: '#/SystemMetricHistoryEntry'}
  2911. description: 按时间升序排列。
  2912. SystemMetricHistoryResponse:
  2913. type: object
  2914. additionalProperties: false
  2915. required: [code, message, data, requestId]
  2916. properties:
  2917. code: {type: string, enum: [OK]}
  2918. message: {type: string, enum: [success]}
  2919. data: {$ref: '#/SystemMetricHistoryData'}
  2920. requestId: {type: string, format: uuid}
  2921. SystemProcessData:
  2922. type: object
  2923. additionalProperties: false
  2924. required: [pid, cpuPercent, memoryRssBytes, memoryVmsBytes, threadCount, startedAt, uptimeSeconds, pythonVersion]
  2925. properties:
  2926. pid: {type: integer, minimum: 1}
  2927. cpuPercent: {type: number, description: 进程 CPU 占用(按核数归一后的百分比)。}
  2928. memoryRssBytes: {type: integer, minimum: 0, description: 常驻内存。}
  2929. memoryVmsBytes: {type: integer, minimum: 0, description: 虚拟内存。}
  2930. threadCount: {type: integer, minimum: 1}
  2931. startedAt: {type: string, description: 进程启动时间(UTC,毫秒精度 Z 结尾)。}
  2932. uptimeSeconds: {type: integer, minimum: 0}
  2933. pythonVersion: {type: string, description: 运行时版本(Java 版返回 JDK 版本)。}
  2934. SystemProcessResponse:
  2935. type: object
  2936. additionalProperties: false
  2937. required: [code, message, data, requestId]
  2938. properties:
  2939. code: {type: string, enum: [OK]}
  2940. message: {type: string, enum: [success]}
  2941. data: {$ref: '#/SystemProcessData'}
  2942. requestId: {type: string, format: uuid}
  2943. SystemStorageUsageEntry:
  2944. type: object
  2945. additionalProperties: false
  2946. required: [directory, totalBytes, fileCount]
  2947. properties:
  2948. directory: {type: string, description: 存储子目录名(original/preview/extracted/temporary/quarantine/recycle/voucher)。}
  2949. totalBytes: {type: integer, minimum: 0}
  2950. fileCount: {type: integer, minimum: 0}
  2951. SystemStorageUsageData:
  2952. type: object
  2953. additionalProperties: false
  2954. required: [entries]
  2955. properties:
  2956. entries:
  2957. type: array
  2958. items: {$ref: '#/SystemStorageUsageEntry'}
  2959. SystemStorageUsageResponse:
  2960. type: object
  2961. additionalProperties: false
  2962. required: [code, message, data, requestId]
  2963. properties:
  2964. code: {type: string, enum: [OK]}
  2965. message: {type: string, enum: [success]}
  2966. data: {$ref: '#/SystemStorageUsageData'}
  2967. requestId: {type: string, format: uuid}
  2968. SystemConverterData:
  2969. type: object
  2970. additionalProperties: false
  2971. required: [available, executable, maxConcurrency, inFlight, successCount, failureCount, previewEnabled, timeoutSeconds]
  2972. properties:
  2973. available: {type: boolean, description: 转换器是否可用。}
  2974. executable: {type: string, description: LibreOffice 可执行文件路径。}
  2975. maxConcurrency: {type: integer, minimum: 1, description: 并发上限。}
  2976. inFlight: {type: integer, minimum: 0, description: 进行中的转换数。}
  2977. successCount: {type: integer, minimum: 0, description: 累计成功转换数(进程生命周期内)。}
  2978. failureCount: {type: integer, minimum: 0, description: 累计失败转换数(进程生命周期内)。}
  2979. previewEnabled: {type: boolean, description: 预览转换功能是否启用。}
  2980. timeoutSeconds: {type: integer, minimum: 1, description: 单次转换超时秒数。}
  2981. SystemConverterResponse:
  2982. type: object
  2983. additionalProperties: false
  2984. required: [code, message, data, requestId]
  2985. properties:
  2986. code: {type: string, enum: [OK]}
  2987. message: {type: string, enum: [success]}
  2988. data: {$ref: '#/SystemConverterData'}
  2989. requestId: {type: string, format: uuid}
  2990. SystemHealthItem:
  2991. type: object
  2992. additionalProperties: false
  2993. required: [item, ok, detail]
  2994. properties:
  2995. item:
  2996. type: string
  2997. enum: [DATABASE, STORAGE_WRITABLE, LIBREOFFICE, BACKUP_TARGET, STORAGE_ENCRYPTION]
  2998. ok: {type: boolean}
  2999. detail: {type: string, description: 失败原因或补充说明(成功为空/说明文字)。}
  3000. SystemHealthData:
  3001. type: object
  3002. additionalProperties: false
  3003. required: [items]
  3004. properties:
  3005. items:
  3006. type: array
  3007. items: {$ref: '#/SystemHealthItem'}
  3008. SystemHealthResponse:
  3009. type: object
  3010. additionalProperties: false
  3011. required: [code, message, data, requestId]
  3012. properties:
  3013. code: {type: string, enum: [OK]}
  3014. message: {type: string, enum: [success]}
  3015. data: {$ref: '#/SystemHealthData'}
  3016. requestId: {type: string, format: uuid}
  3017. SystemInfoData:
  3018. type: object
  3019. additionalProperties: false
  3020. required: [contractVersion, backendKind, runtimeVersion, operatingSystem, hostname, machineArch, databaseType, startedAt, uptimeSeconds, workingDirectory, storageRoot, backupConfigPath, envFilePath, logFilePath, monitoringEnabled]
  3021. properties:
  3022. contractVersion: {type: string, description: 接口契约版本(如 1.26.0)。}
  3023. backendKind: {type: string, enum: [PYTHON, JAVA], description: 后端实现类型。}
  3024. runtimeVersion: {type: string, description: 运行时版本(Python/JDK)。}
  3025. operatingSystem: {type: string}
  3026. hostname: {type: string}
  3027. machineArch: {type: string, description: 体系结构(x86_64/aarch64 等)。}
  3028. databaseType: {type: string, description: 数据库类型描述(DM (达梦)/MySQL 等)。}
  3029. startedAt: {type: string, description: 进程启动时间(UTC;psutil 缺失为空串)。}
  3030. uptimeSeconds: {type: integer, minimum: 0}
  3031. workingDirectory: {type: string}
  3032. storageRoot: {type: string}
  3033. backupConfigPath: {type: string}
  3034. envFilePath: {type: string}
  3035. logFilePath: {type: string, description: 运行日志文件路径(未启用为空串)。}
  3036. monitoringEnabled: {type: boolean, description: 监控信息展示开关(DMS_SYSTEM_MONITOR_ENABLED,缺省 false);false 时前端隐藏系统管理页维护操作之上的监控区块。}
  3037. SystemInfoResponse:
  3038. type: object
  3039. additionalProperties: false
  3040. required: [code, message, data, requestId]
  3041. properties:
  3042. code: {type: string, enum: [OK]}
  3043. message: {type: string, enum: [success]}
  3044. data: {$ref: '#/SystemInfoData'}
  3045. requestId: {type: string, format: uuid}
  3046. SystemRuntimeConfigEntry:
  3047. type: object
  3048. additionalProperties: false
  3049. required: [category, key, value, unit]
  3050. properties:
  3051. category: {type: string, description: 分类(认证/存储/上传/业务/转换/安全)。}
  3052. key: {type: string, description: 参数显示名。}
  3053. value:
  3054. description: 参数值(密钥类仅显示 已配置/未配置,永不回明文)。
  3055. unit: {type: string, description: 单位(无单位为空串)。}
  3056. SystemRuntimeConfigData:
  3057. type: object
  3058. additionalProperties: false
  3059. required: [entries]
  3060. properties:
  3061. entries:
  3062. type: array
  3063. items: {$ref: '#/SystemRuntimeConfigEntry'}
  3064. SystemRuntimeConfigResponse:
  3065. type: object
  3066. additionalProperties: false
  3067. required: [code, message, data, requestId]
  3068. properties:
  3069. code: {type: string, enum: [OK]}
  3070. message: {type: string, enum: [success]}
  3071. data: {$ref: '#/SystemRuntimeConfigData'}
  3072. requestId: {type: string, format: uuid}
  3073. SystemLogsData:
  3074. type: object
  3075. additionalProperties: false
  3076. required: [file, lines, truncated]
  3077. properties:
  3078. file: {type: string, description: 日志文件路径(未启用为空串)。}
  3079. lines:
  3080. type: array
  3081. items: {type: string}
  3082. description: 尾部日志行(级别过滤后截尾)。
  3083. truncated: {type: boolean, description: 是否经过截断。}
  3084. error:
  3085. type: string
  3086. description: 读取失败原因(成功时无此字段)。
  3087. SystemLogsResponse:
  3088. type: object
  3089. additionalProperties: false
  3090. required: [code, message, data, requestId]
  3091. properties:
  3092. code: {type: string, enum: [OK]}
  3093. message: {type: string, enum: [success]}
  3094. data: {$ref: '#/SystemLogsData'}
  3095. requestId: {type: string, format: uuid}
  3096. SystemPreviewCacheClearData:
  3097. type: object
  3098. additionalProperties: false
  3099. required: [removedFiles, removedBytes]
  3100. properties:
  3101. removedFiles: {type: integer, minimum: 0, description: 删除的预览文件数。}
  3102. removedBytes: {type: integer, minimum: 0, description: 释放的字节数。}
  3103. SystemPreviewCacheClearResponse:
  3104. type: object
  3105. additionalProperties: false
  3106. required: [code, message, data, requestId]
  3107. properties:
  3108. code: {type: string, enum: [OK]}
  3109. message: {type: string, enum: [success]}
  3110. data: {$ref: '#/SystemPreviewCacheClearData'}
  3111. requestId: {type: string, format: uuid}
  3112. SystemForceOfflineData:
  3113. type: object
  3114. additionalProperties: false
  3115. required: [userId, username, realName, authVersion]
  3116. properties:
  3117. userId: {type: string, description: 目标用户ID(字符串形式)。}
  3118. username: {type: string}
  3119. realName: {type: string, description: 目标用户姓名(契约1.47):前端提示展示姓名。}
  3120. authVersion: {type: integer, minimum: 1, description: 目标用户当前 auth_version(已 +1)。}
  3121. SystemForceOfflineResponse:
  3122. type: object
  3123. additionalProperties: false
  3124. required: [code, message, data, requestId]
  3125. properties:
  3126. code: {type: string, enum: [OK]}
  3127. message: {type: string, enum: [success]}
  3128. data: {$ref: '#/SystemForceOfflineData'}
  3129. requestId: {type: string, format: uuid}
  3130. BackupTestTargetData:
  3131. type: object
  3132. additionalProperties: false
  3133. required: [ok]
  3134. properties:
  3135. ok: {type: boolean, description: 目标是否可写。}
  3136. target:
  3137. type: string
  3138. description: 目标描述(成功时返回)。
  3139. error:
  3140. type: string
  3141. description: 失败原因(失败时返回)。
  3142. BackupTestTargetResponse:
  3143. type: object
  3144. additionalProperties: false
  3145. required: [code, message, data, requestId]
  3146. properties:
  3147. code: {type: string, enum: [OK]}
  3148. message: {type: string, enum: [success]}
  3149. data: {$ref: '#/BackupTestTargetData'}
  3150. requestId: {type: string, format: uuid}
  3151. NotificationSummary:
  3152. type: object
  3153. additionalProperties: false
  3154. required: [id, title, notifyType, action, status, createdAt]
  3155. properties:
  3156. id: {$ref: '#/StringId'}
  3157. title: {type: string, description: 通知标题。}
  3158. content: {type: string, description: 通知内容说明。}
  3159. notifyType:
  3160. type: string
  3161. enum: [APPROVAL, PASSWORD_RESET]
  3162. description: 通知类别(APPROVAL=调阅审批待办;PASSWORD_RESET=重置密码审批待办/结果,1.49新增)。
  3163. bizId:
  3164. allOf:
  3165. - $ref: '#/StringId'
  3166. description: 关联业务ID(1.37新增,APPROVAL待办指向调阅申请单;1.49起PASSWORD_RESET指向重置密码申请单,其余为null)。
  3167. action:
  3168. type: string
  3169. enum: [NONE, PENDING, AGREE, REJECT]
  3170. description: 待办操作(NONE=无需操作,PENDING=待处理,AGREE/REJECT=已同意/已拒绝)。
  3171. status:
  3172. type: string
  3173. enum: [UNREAD, READ]
  3174. description: 已读状态。
  3175. createdAt: {type: string, format: date-time, description: 创建时间(UTC毫秒精度)。}
  3176. handledAt: {type: string, format: date-time, description: 处理时间(同意/拒绝时)。}
  3177. NotificationListData:
  3178. type: object
  3179. additionalProperties: false
  3180. required: [items]
  3181. properties:
  3182. items:
  3183. type: array
  3184. items: {$ref: '#/NotificationSummary'}
  3185. NotificationListResponse:
  3186. type: object
  3187. additionalProperties: false
  3188. required: [code, message, data, requestId]
  3189. properties:
  3190. code: {type: string, enum: [OK]}
  3191. message: {type: string, enum: [success]}
  3192. data: {$ref: '#/NotificationListData'}
  3193. requestId: {type: string, format: uuid}
  3194. NotificationUnreadCountData:
  3195. type: object
  3196. additionalProperties: false
  3197. required: [count]
  3198. properties:
  3199. count: {type: integer, minimum: 0, description: 未读通知条数。}
  3200. NotificationUnreadCountResponse:
  3201. type: object
  3202. additionalProperties: false
  3203. required: [code, message, data, requestId]
  3204. properties:
  3205. code: {type: string, enum: [OK]}
  3206. message: {type: string, enum: [success]}
  3207. data: {$ref: '#/NotificationUnreadCountData'}
  3208. requestId: {type: string, format: uuid}
  3209. NotificationReadAllData:
  3210. type: object
  3211. additionalProperties: false
  3212. required: [updated]
  3213. properties:
  3214. updated: {type: integer, minimum: 0, description: 本次标记已读的条数。}
  3215. NotificationReadAllResponse:
  3216. type: object
  3217. additionalProperties: false
  3218. required: [code, message, data, requestId]
  3219. properties:
  3220. code: {type: string, enum: [OK]}
  3221. message: {type: string, enum: [success]}
  3222. data: {$ref: '#/NotificationReadAllData'}
  3223. requestId: {type: string, format: uuid}
  3224. HandleNotificationRequest:
  3225. type: object
  3226. additionalProperties: false
  3227. required: [action]
  3228. properties:
  3229. action:
  3230. type: string
  3231. enum: [AGREE, REJECT]
  3232. description: 处理动作(同意/拒绝)。
  3233. NotificationResponse:
  3234. type: object
  3235. additionalProperties: false
  3236. required: [code, message, data, requestId]
  3237. properties:
  3238. code: {type: string, enum: [OK]}
  3239. message: {type: string, enum: [success]}
  3240. data: {$ref: '#/NotificationSummary'}
  3241. requestId: {type: string, format: uuid}
  3242. BorrowRequestEntryInput:
  3243. type: object
  3244. additionalProperties: false
  3245. required: [subjectId, canView, canDownload]
  3246. properties:
  3247. subjectId: {$ref: '#/StringId'}
  3248. canView: {type: boolean, description: 调阅人查看位。}
  3249. canDownload: {type: boolean, description: 调阅人下载位(查看与下载至少一项为true)。}
  3250. BorrowRequestCreateRequest:
  3251. type: object
  3252. additionalProperties: false
  3253. required: [entries, expiresAt]
  3254. description: 调阅申请载荷(multipart的request part为该对象的JSON字符串)。
  3255. properties:
  3256. entries:
  3257. type: array
  3258. minItems: 1
  3259. items: {$ref: '#/BorrowRequestEntryInput'}
  3260. expiresAt:
  3261. type: string
  3262. format: date-time
  3263. description: 到期时间(UTC毫秒精度Z结尾,须晚于当前时间,最长7天,服务端60秒容差)。
  3264. BorrowRequestCreateResultData:
  3265. type: object
  3266. additionalProperties: false
  3267. required: [requestId, notified]
  3268. properties:
  3269. requestId: {$ref: '#/StringId'}
  3270. notified: {type: integer, minimum: 0, description: 收到APPROVAL待办通知的审批人数。}
  3271. BorrowRequestCreateResultResponse:
  3272. type: object
  3273. additionalProperties: false
  3274. required: [code, message, data, requestId]
  3275. properties:
  3276. code: {type: string, enum: [OK]}
  3277. message: {type: string, enum: [success]}
  3278. data: {$ref: '#/BorrowRequestCreateResultData'}
  3279. requestId: {type: string, format: uuid}
  3280. BorrowRequestEntry:
  3281. type: object
  3282. additionalProperties: false
  3283. required: [subjectId, subjectName, canView, canDownload]
  3284. properties:
  3285. subjectId: {$ref: '#/StringId'}
  3286. subjectName: {type: string, description: 调阅人姓名。}
  3287. canView: {type: boolean, description: 查看位。}
  3288. canDownload: {type: boolean, description: 下载位。}
  3289. BorrowRequestDetailData:
  3290. type: object
  3291. additionalProperties: false
  3292. required: [requestId, documentId, documentName, requesterId, requesterName, entries, expiresAt, status, createdAt]
  3293. properties:
  3294. requestId: {$ref: '#/StringId'}
  3295. documentId: {$ref: '#/StringId'}
  3296. documentName: {type: string, description: 文档名称。}
  3297. requesterId: {$ref: '#/StringId'}
  3298. requesterName: {type: string, description: 申请人姓名。}
  3299. entries:
  3300. type: array
  3301. items: {$ref: '#/BorrowRequestEntry'}
  3302. expiresAt: {type: string, format: date-time, description: 到期时间(UTC毫秒精度)。}
  3303. voucherFileName: {type: string, description: 审批单文件名(未上传为null)。}
  3304. voucherFileSize: {type: integer, format: int64, description: 审批单字节数(未上传为null)。}
  3305. status:
  3306. type: string
  3307. enum: [PENDING, APPROVED, REJECTED]
  3308. description: 申请状态(任一审批人处理即定)。
  3309. handledById:
  3310. allOf:
  3311. - $ref: '#/StringId'
  3312. description: 处理人ID(未处理为null)。
  3313. handledByName: {type: string, description: 处理人姓名(未处理为null)。}
  3314. handledAt: {type: string, format: date-time, description: 处理时间(未处理为null)。}
  3315. createdAt: {type: string, format: date-time, description: 申请时间(UTC毫秒精度)。}
  3316. BorrowRequestDetailResponse:
  3317. type: object
  3318. additionalProperties: false
  3319. required: [code, message, data, requestId]
  3320. properties:
  3321. code: {type: string, enum: [OK]}
  3322. message: {type: string, enum: [success]}
  3323. data: {$ref: '#/BorrowRequestDetailData'}
  3324. requestId: {type: string, format: uuid}