{ "openapi": "3.1.0", "info": { "title": "gitdata admin api", "description": "GitData 管理后台 API。独立进程(adminhost)、独立会话 Cookie(gitdata_admin_session)、固定角色 super_admin/operator/viewer。", "license": { "name": "" }, "version": "1.0" }, "servers": [ { "url": "/api/v1" } ], "paths": { "/admin/admins": { "get": { "tags": [ "admin-admins" ], "description": "管理员账号列表;仅超级管理员可见。", "operationId": "list_admins", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "sort", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } } ], "responses": { "200": { "description": "admin page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_Page_AdminDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "403": { "description": "operation not allowed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "post": { "tags": [ "admin-admins" ], "description": "创建管理员账号;仅超级管理员可操作。", "operationId": "create_admin", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAdminCmd" } } }, "required": true }, "responses": { "200": { "description": "admin created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "409": { "description": "resource conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/admins/{id}": { "get": { "tags": [ "admin-admins" ], "description": "管理员账号详情。", "operationId": "get_admin", "parameters": [ { "name": "id", "in": "path", "description": "admin id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "admin detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminDto" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "delete": { "tags": [ "admin-admins" ], "description": "删除管理员账号;禁止删除自己与最后一个超级管理员。", "operationId": "delete_admin", "parameters": [ { "name": "id", "in": "path", "description": "admin id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "admin deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "409": { "description": "resource conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "patch": { "tags": [ "admin-admins" ], "description": "更新管理员显示名/角色/启用状态;禁止操作最后一个超级管理员。", "operationId": "update_admin", "parameters": [ { "name": "id", "in": "path", "description": "admin id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAdminCmd" } } }, "required": true }, "responses": { "200": { "description": "admin updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminDto" } } } }, "409": { "description": "resource conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/admins/{id}/reset-password": { "post": { "tags": [ "admin-admins" ], "description": "重置管理员口令并要求下次登录强制改密。", "operationId": "reset_admin_password", "parameters": [ { "name": "id", "in": "path", "description": "admin id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResetAdminPasswordCmd" } } }, "required": true }, "responses": { "200": { "description": "password reset", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/admins/{id}/revoke-sessions": { "post": { "tags": [ "admin-admins" ], "description": "踢出管理员全部会话:提升口令版本使已签发会话立即失效;操作他人需超级管理员。", "operationId": "revoke_admin_sessions", "parameters": [ { "name": "id", "in": "path", "description": "admin id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "sessions revoked", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "403": { "description": "operation not allowed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/auth/login": { "post": { "tags": [ "admin-auth" ], "description": "管理员用户名口令登录;会话使用独立的 gitdata_admin_session Cookie。", "operationId": "login", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminLoginCmd" } } }, "required": true }, "responses": { "200": { "description": "login accepted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminLoginResp" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "401": { "description": "invalid credentials", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "429": { "description": "rate limit exceeded", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/auth/logout": { "post": { "tags": [ "admin-auth" ], "description": "退出管理端会话;重复调用始终返回成功。", "operationId": "logout", "responses": { "200": { "description": "logged out", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/chat/attachments": { "get": { "tags": [ "admin-chat" ], "description": "聊天附件列表:按房间/上传者/状态/文件名筛选。", "operationId": "list_attachments", "parameters": [ { "name": "room_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "user_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "attachment page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_Page_AdminChatAttachmentDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/chat/attachments/{id}": { "delete": { "tags": [ "admin-chat" ], "description": "删除聊天附件记录并清理未被其它记录引用的对象存储文件;仅超级管理员可操作。", "operationId": "delete_attachment", "parameters": [ { "name": "id", "in": "path", "description": "attachment id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "attachment deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_DeleteChatAttachmentResp" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/chat/messages": { "get": { "tags": [ "admin-chat" ], "description": "消息列表:按房间/作者/状态/关键字/时间筛选,返回附件与表情计数。", "operationId": "list_messages", "parameters": [ { "name": "room_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "author_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "from", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "date-time" } }, { "name": "to", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "date-time" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "message page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_Page_AdminChatMessageDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/chat/messages/bulk-delete": { "post": { "tags": [ "admin-chat" ], "description": "批量软删除消息(≤100 条),清空内容并移除附件/表情/编辑等从属记录。", "operationId": "bulk_delete_messages", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkDeleteChatMessagesCmd" } } }, "required": true }, "responses": { "200": { "description": "bulk delete result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_BulkDeleteChatMessagesResp" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/chat/messages/export": { "get": { "tags": [ "admin-chat" ], "description": "按当前筛选导出消息 CSV(最多 10000 行)。", "operationId": "export_messages", "parameters": [ { "name": "room_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "author_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "from", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "date-time" } }, { "name": "to", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "date-time" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "csv export" } } } }, "/admin/chat/messages/{id}": { "get": { "tags": [ "admin-chat" ], "description": "消息详情:正文、编辑历史、表情聚合、附件与所属线程。", "operationId": "get_message", "parameters": [ { "name": "id", "in": "path", "description": "message id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "message detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminChatMessageDetail" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/chat/rooms": { "get": { "tags": [ "admin-chat" ], "description": "房间列表:关键字、Space、类型、可见性与启停状态筛选。", "operationId": "list_rooms", "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "space_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "kind", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "status", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "visibility", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "room page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_Page_AdminChatRoomSummary" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/chat/rooms/{id}": { "get": { "tags": [ "admin-chat" ], "description": "房间详情:基础信息、成员/消息计数与删除/封禁/邀请统计。", "operationId": "get_room", "parameters": [ { "name": "id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "room detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminChatRoomDetail" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "delete": { "tags": [ "admin-chat" ], "description": "删除房间及其消息/成员/线程/附件,动作不可恢复;仅超级管理员可操作。", "operationId": "delete_room", "parameters": [ { "name": "id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "room deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_DeleteChatRoomResp" } } } }, "409": { "description": "child rooms exist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "patch": { "tags": [ "admin-chat" ], "description": "更新房间属性:名称、主题、私有、NSFW 与启停。", "operationId": "update_room", "parameters": [ { "name": "id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateChatRoomCmd" } } }, "required": true }, "responses": { "200": { "description": "room updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminChatRoomDetail" } } } }, "409": { "description": "resource conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/chat/rooms/{id}/members": { "get": { "tags": [ "admin-chat" ], "description": "房间成员列表:可按在席/已离开筛选。", "operationId": "list_members", "parameters": [ { "name": "id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "member page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_Page_AdminChatRoomMemberDto" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/chat/rooms/{id}/members/{uid}": { "delete": { "tags": [ "admin-chat" ], "description": "将成员移出房间,动作即时生效并广播 member_left 事件。", "operationId": "remove_member", "parameters": [ { "name": "id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "member removed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_RemoveChatMemberResp" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/chat/rooms/{id}/purge": { "post": { "tags": [ "admin-chat" ], "description": "清空房间全部消息、线程与附件(保留房间本身);仅超级管理员可操作。", "operationId": "purge_room", "parameters": [ { "name": "id", "in": "path", "description": "room id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "room messages purged", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_PurgeChatMessagesResp" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/chat/stats": { "get": { "tags": [ "admin-chat" ], "description": "聊天域统计:房间/消息/线程/附件/成员/封禁汇总与房间类型分布。", "operationId": "stats", "responses": { "200": { "description": "chat stats", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminChatStatsDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/dashboard": { "get": { "tags": [ "admin-system" ], "description": "管理看板聚合:核心计数、14 天增长趋势、活跃会话、最近审计与失败、队列概览。", "operationId": "dashboard", "responses": { "200": { "description": "dashboard", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_DashboardDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/logs/audit": { "get": { "tags": [ "admin-logs" ], "description": "管理操作审计日志(登录事件与成功变更)。", "operationId": "list_audit_logs", "parameters": [ { "name": "admin_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "admin_username", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "action", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "target_type", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "target_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "from", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "date-time" } }, { "name": "to", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "date-time" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "audit page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AuditLogPageDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/logs/audit/export": { "get": { "tags": [ "admin-logs" ], "description": "按筛选条件导出审计日志 CSV(最多 10000 行)。", "operationId": "export_audit_logs", "parameters": [ { "name": "admin_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "admin_username", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "action", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "target_type", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "target_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "from", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "date-time" } }, { "name": "to", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "date-time" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "csv export" } } } }, "/admin/logs/jobs": { "get": { "tags": [ "admin-logs" ], "description": "作业错误日志:聚合 import/search/system_tasks/webhook/pipeline 的失败信息。", "operationId": "list_job_logs", "parameters": [ { "name": "source", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "from", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "date-time" } }, { "name": "to", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "date-time" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "job log page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_JobLogPageDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/me": { "get": { "tags": [ "admin-auth" ], "description": "当前管理员资料。", "operationId": "me", "responses": { "200": { "description": "current admin", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/me/password": { "patch": { "tags": [ "admin-auth" ], "description": "修改当前管理员口令;口令版本变更会失效其他管理端会话。", "operationId": "change_password", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangePasswordCmd" } } }, "required": true }, "responses": { "200": { "description": "password changed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/queues": { "get": { "tags": [ "admin-queues" ], "description": "队列快照:Redis git 同步队列、邮件 pub/sub 与各数据库作业队列深度/状态。", "operationId": "list_queues", "responses": { "200": { "description": "queue snapshots", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_Vec_QueueSnapshotDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/queues/{name}/failed": { "get": { "tags": [ "admin-queues" ], "description": "队列失败明细:返回该队列来源的失败作业(数据库队列),可按任务模块重试。", "operationId": "failed_jobs", "parameters": [ { "name": "name", "in": "path", "description": "queue name", "required": true, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "failed job page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_JobLogPageDto" } } } }, "400": { "description": "unsupported queue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/queues/{name}/purge": { "post": { "tags": [ "admin-queues" ], "description": "清空队列:git 同步队列直接删除 Redis list,数据库队列删除终态记录;仅超级管理员可操作。", "operationId": "purge", "parameters": [ { "name": "name", "in": "path", "description": "queue name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "queue purged", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_QueueActionResp" } } } }, "400": { "description": "unsupported queue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/queues/{name}/requeue-failed": { "post": { "tags": [ "admin-queues" ], "description": "重排失败作业(search_index/import/chat_webhook/pipeline/deletion/system_tasks)。", "operationId": "requeue_failed", "parameters": [ { "name": "name", "in": "path", "description": "queue name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "failed items requeued", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_QueueActionResp" } } } }, "400": { "description": "unsupported queue", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/spaces": { "get": { "tags": [ "admin-spaces" ], "description": "Space 列表:关键字、状态、Owner 与分页。", "operationId": "list_spaces", "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "status", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "owner_id", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "uuid" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "space page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_Page_AdminSpaceSummary" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/spaces/{id}": { "get": { "tags": [ "admin-spaces" ], "description": "Space 详情:Owner、成员数、仓库/房间/目录统计。", "operationId": "get_space", "parameters": [ { "name": "id", "in": "path", "description": "space id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "space detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminSpaceDetail" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "delete": { "tags": [ "admin-spaces" ], "description": "停用 Space(软删除);仅超级管理员可操作。", "operationId": "delete_space", "parameters": [ { "name": "id", "in": "path", "description": "space id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "space deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "patch": { "tags": [ "admin-spaces" ], "description": "更新 Space:名称、描述、私有与启用状态。", "operationId": "update_space", "parameters": [ { "name": "id", "in": "path", "description": "space id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSpaceCmd" } } }, "required": true }, "responses": { "200": { "description": "space updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminSpaceDetail" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/spaces/{id}/members": { "get": { "tags": [ "admin-spaces" ], "description": "Space 成员列表。", "operationId": "list_space_members", "parameters": [ { "name": "id", "in": "path", "description": "space id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "status", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "member page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_Page_AdminSpaceMemberDto" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "post": { "tags": [ "admin-spaces" ], "description": "管理员将用户加入 Space:已存在记录则重新激活,并同步成员计数。", "operationId": "add_space_member", "parameters": [ { "name": "id", "in": "path", "description": "space id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddSpaceMemberCmd" } } }, "required": true }, "responses": { "200": { "description": "member added", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AddSpaceMemberResp" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/spaces/{id}/members/{uid}": { "delete": { "tags": [ "admin-spaces" ], "description": "将成员移出 Space。", "operationId": "remove_space_member", "parameters": [ { "name": "id", "in": "path", "description": "space id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "member removed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_RemoveMemberResp" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/spaces/{id}/transfer": { "post": { "tags": [ "admin-spaces" ], "description": "转移 Space 所有权;仅超级管理员可操作。", "operationId": "transfer_space", "parameters": [ { "name": "id", "in": "path", "description": "space id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TransferSpaceCmd" } } }, "required": true }, "responses": { "200": { "description": "space transferred", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminSpaceDetail" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "409": { "description": "resource conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/storage/download-url": { "get": { "tags": [ "admin-storage" ], "description": "生成对象预签名下载地址(最长 1 小时)。", "operationId": "download_url", "parameters": [ { "name": "key", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "presigned download url", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_DownloadUrlDto" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/storage/objects": { "get": { "tags": [ "admin-storage" ], "description": "对象浏览:前缀过滤与 token 分页。", "operationId": "list_objects", "parameters": [ { "name": "prefix", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "token", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "minimum": 0 } } ], "responses": { "200": { "description": "object page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_StorageObjectPageDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "delete": { "tags": [ "admin-storage" ], "description": "删除存储对象;仅超级管理员可操作。", "operationId": "delete_object", "parameters": [ { "name": "key", "in": "query", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "object deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_DeleteObjectResp" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/storage/overview": { "get": { "tags": [ "admin-storage" ], "description": "存储总览:单桶按前缀聚合的用量与对象数(60s 缓存,refresh=true 强制重算)。", "operationId": "overview", "parameters": [ { "name": "refresh", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } } ], "responses": { "200": { "description": "storage overview", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_StorageOverviewDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/system/config": { "get": { "tags": [ "admin-system" ], "description": "生效配置快照(脱敏):进程监听、功能开关、检索/导入/Git 限制、存储与数据库/Redis/会话/邮件端点,不含任何密钥。", "operationId": "config", "responses": { "200": { "description": "system config", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_SystemConfigDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/system/status": { "get": { "tags": [ "admin-system" ], "description": "系统状态:进程信息、DB/Redis/S3/搜索健康、核心计数、队列汇总与最近失败。", "operationId": "status", "responses": { "200": { "description": "system status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_SystemStatusDto" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/tasks": { "get": { "tags": [ "admin-tasks" ], "description": "统一任务视图:import/search_index/chat_webhook/pipeline/deletion/system_tasks。", "operationId": "list_tasks", "parameters": [ { "name": "source", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "state", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "from", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "date-time" } }, { "name": "to", "in": "query", "required": false, "schema": { "type": [ "string", "null" ], "format": "date-time" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "task page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_TaskPageDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/tasks/stats": { "get": { "tags": [ "admin-tasks" ], "description": "任务统计:各来源的排队/执行中/成功/失败计数,用于任务总览与看板。", "operationId": "task_stats", "responses": { "200": { "description": "task stats", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_TaskStatsDto" } } } } } } }, "/admin/tasks/{source}/bulk": { "post": { "tags": [ "admin-tasks" ], "description": "批量重试或取消同一来源的任务,单次最多 100 个;逐条返回结果。", "operationId": "bulk_tasks", "parameters": [ { "name": "source", "in": "path", "description": "task source", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkTaskCmd" } } }, "required": true }, "responses": { "200": { "description": "bulk result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_BulkTaskResp" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/tasks/{source}/{id}": { "get": { "tags": [ "admin-tasks" ], "description": "任务详情;import token 与 webhook payload 已脱敏。", "operationId": "get_task", "parameters": [ { "name": "source", "in": "path", "description": "task source", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "task id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "task detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_TaskDetailDto" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "delete": { "tags": [ "admin-tasks" ], "description": "删除终态任务记录;仅超级管理员可操作。", "operationId": "delete_task", "parameters": [ { "name": "source", "in": "path", "description": "task source", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "task id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "task deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "409": { "description": "resource conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/tasks/{source}/{id}/cancel": { "post": { "tags": [ "admin-tasks" ], "description": "取消任务:队列中/进行中的作业按来源置取消态。", "operationId": "cancel_task", "parameters": [ { "name": "source", "in": "path", "description": "task source", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "task id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "task cancelled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_TaskActionResp" } } } }, "409": { "description": "resource conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/tasks/{source}/{id}/retry": { "post": { "tags": [ "admin-tasks" ], "description": "重试任务:仅失败/取消态可重试。", "operationId": "retry_task", "parameters": [ { "name": "source", "in": "path", "description": "task source", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "description": "task id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "task retried", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_TaskActionResp" } } } }, "409": { "description": "resource conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/users": { "get": { "tags": [ "admin-users" ], "description": "用户列表:关键字(用户名/显示名/邮箱)、状态筛选与分页。", "operationId": "list_users", "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "status", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "sort", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } } ], "responses": { "200": { "description": "user page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_Page_AdminUserSummary" } } } }, "401": { "description": "authentication required", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "post": { "tags": [ "admin-users" ], "description": "创建用户(管理员代办):直接写入账号、资料与已激活邮箱;仅超级管理员可操作。", "operationId": "create_user", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserCmd" } } }, "required": true }, "responses": { "200": { "description": "user created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_CreateUserResp" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "403": { "description": "operation not allowed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "409": { "description": "resource conflict", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/users/bulk": { "post": { "tags": [ "admin-users" ], "description": "批量用户操作:activate/deactivate/restrict/unrestrict/revoke_sessions/suspend/delete,单次最多 100 个目标。", "operationId": "bulk_users", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkUsersCmd" } } }, "required": true }, "responses": { "200": { "description": "bulk result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_BulkUsersResp" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "403": { "description": "operation not allowed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/users/export": { "get": { "tags": [ "admin-users" ], "description": "按当前筛选条件导出用户 CSV(最多 5000 行)。", "operationId": "export_users", "parameters": [ { "name": "q", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "status", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "sort", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } } ], "responses": { "200": { "description": "csv export" } } } }, "/admin/users/{uid}": { "get": { "tags": [ "admin-users" ], "description": "用户详情:账号状态、邮箱、会话、所属 Space 与封禁记录。", "operationId": "get_user", "parameters": [ { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "user detail", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminUserDetail" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "delete": { "tags": [ "admin-users" ], "description": "强制注销用户:立即执行匿名化并禁用账号;仅超级管理员可操作。", "operationId": "delete_user", "parameters": [ { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "user deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_DeleteUserResp" } } } }, "403": { "description": "operation not allowed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } }, "patch": { "tags": [ "admin-users" ], "description": "更新用户账号标志:显示名、启用、受限、禁止登录。", "operationId": "update_user", "parameters": [ { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserCmd" } } }, "required": true }, "responses": { "200": { "description": "user updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminUserSummary" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/users/{uid}/reset-password": { "post": { "tags": [ "admin-users" ], "description": "重置用户口令并吊销全部会话。", "operationId": "reset_user_password", "parameters": [ { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResetUserPasswordCmd" } } }, "required": true }, "responses": { "200": { "description": "password reset", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/users/{uid}/revoke-sessions": { "post": { "tags": [ "admin-users" ], "description": "吊销用户全部有效会话。", "operationId": "revoke_user_sessions", "parameters": [ { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "sessions revoked", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_RevokeSessionsResp" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/users/{uid}/security": { "get": { "tags": [ "admin-users" ], "description": "用户安全概览:二次验证状态、恢复码、活跃会话、SSH Key 与访问密钥数量。", "operationId": "get_user_security", "parameters": [ { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "security overview", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminUserSecurityDto" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/users/{uid}/sessions": { "get": { "tags": [ "admin-users" ], "description": "用户会话列表:可按 kind 过滤、包含已吊销会话,用于会话级踢下线。", "operationId": "list_user_sessions", "parameters": [ { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "kind", "in": "query", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "include_revoked", "in": "query", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "offset", "in": "query", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } } ], "responses": { "200": { "description": "session page", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminUserSessionPage" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/users/{uid}/sessions/{session_id}": { "delete": { "tags": [ "admin-users" ], "description": "吊销用户单个会话;运维及以上角色可操作。", "operationId": "revoke_user_session", "parameters": [ { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "session_id", "in": "path", "description": "session id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "session revoked", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/users/{uid}/suspend": { "post": { "tags": [ "admin-users" ], "description": "封禁用户:写入封禁记录、标记受限并吊销全部会话。", "operationId": "suspend_user", "parameters": [ { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuspendUserCmd" } } }, "required": true }, "responses": { "200": { "description": "user suspended", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_AdminSuspensionDto" } } } }, "400": { "description": "request failed validation", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/users/{uid}/suspensions/{suspension_id}/revoke": { "post": { "tags": [ "admin-users" ], "description": "撤销用户封禁记录;无剩余生效封禁时解除受限标志。", "operationId": "revoke_suspension", "parameters": [ { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "suspension_id", "in": "path", "description": "suspension id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "suspension revoked", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "404": { "description": "resource not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } }, "/admin/users/{uid}/two-factor": { "delete": { "tags": [ "admin-users" ], "description": "强制清除用户二次验证(用户遗失设备时使用);仅超级管理员可操作。", "operationId": "clear_user_two_factor", "parameters": [ { "name": "uid", "in": "path", "description": "user id", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "two-factor cleared", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } }, "403": { "description": "operation not allowed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppResponseData_NoData" } } } } } } } }, "components": { "schemas": { "AddSpaceMemberCmd": { "type": "object", "required": [ "user_id" ], "properties": { "alias_name": { "type": [ "string", "null" ] }, "user_id": { "type": "string", "format": "uuid" } } }, "AddSpaceMemberResp": { "type": "object", "required": [ "space_id", "user_id", "status", "added" ], "properties": { "added": { "type": "boolean" }, "space_id": { "type": "string", "format": "uuid" }, "status": { "type": "string" }, "user_id": { "type": "string", "format": "uuid" } } }, "AdminChatAttachmentDto": { "type": "object", "required": [ "id", "user_id", "filename", "content_type", "size", "bucket", "s3_key", "status", "created_at" ], "properties": { "bucket": { "type": "string" }, "content_type": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "display_name": { "type": [ "string", "null" ] }, "filename": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": [ "string", "null" ], "format": "uuid" }, "room_id": { "type": [ "string", "null" ], "format": "uuid" }, "s3_key": { "type": "string" }, "size": { "type": "integer", "format": "int64" }, "status": { "type": "string" }, "user_id": { "type": "string", "format": "uuid" }, "username": { "type": [ "string", "null" ] } } }, "AdminChatKindCount": { "type": "object", "required": [ "kind", "count" ], "properties": { "count": { "type": "integer", "format": "int64" }, "kind": { "type": "string" } } }, "AdminChatMessageDetail": { "type": "object", "required": [ "message", "edits", "reactions", "attachments" ], "properties": { "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/AdminChatAttachmentDto" } }, "edits": { "type": "array", "items": { "$ref": "#/components/schemas/AdminChatMessageEditDto" } }, "message": { "$ref": "#/components/schemas/AdminChatMessageDto" }, "reactions": { "type": "array", "items": { "$ref": "#/components/schemas/AdminChatReactionGroupDto" } }, "thread": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/AdminChatThreadDto" } ] } } }, "AdminChatMessageDto": { "type": "object", "required": [ "id", "room_id", "author_id", "author_type", "message_type", "content", "seq", "flags", "pinned", "attachment_count", "reaction_count", "created_at" ], "properties": { "attachment_count": { "type": "integer", "format": "int64" }, "author_display_name": { "type": [ "string", "null" ] }, "author_id": { "type": "string", "format": "uuid" }, "author_type": { "type": "string" }, "author_username": { "type": [ "string", "null" ] }, "content": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": [ "string", "null" ], "format": "date-time" }, "edited_at": { "type": [ "string", "null" ], "format": "date-time" }, "flags": { "type": "integer", "format": "int64" }, "id": { "type": "string", "format": "uuid" }, "message_type": { "type": "string" }, "pinned": { "type": "boolean" }, "reaction_count": { "type": "integer", "format": "int64" }, "reply_to_id": { "type": [ "string", "null" ], "format": "uuid" }, "room_id": { "type": "string", "format": "uuid" }, "room_name": { "type": [ "string", "null" ] }, "seq": { "type": "integer", "format": "int64" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" } } }, "AdminChatMessageEditDto": { "type": "object", "required": [ "id", "editor_id", "content", "created_at" ], "properties": { "content": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "editor_id": { "type": "string", "format": "uuid" }, "editor_username": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" } } }, "AdminChatReactionGroupDto": { "type": "object", "required": [ "emoji", "count" ], "properties": { "count": { "type": "integer", "format": "int64" }, "emoji": { "type": "string" } } }, "AdminChatRoomDetail": { "type": "object", "required": [ "room", "deleted_messages", "threads", "attachments", "attachment_bytes", "bans", "invites" ], "properties": { "attachment_bytes": { "type": "integer", "format": "int64" }, "attachments": { "type": "integer", "format": "int64" }, "bans": { "type": "integer", "format": "int64" }, "deleted_messages": { "type": "integer", "format": "int64" }, "invites": { "type": "integer", "format": "int64" }, "room": { "$ref": "#/components/schemas/AdminChatRoomSummary" }, "threads": { "type": "integer", "format": "int64" } } }, "AdminChatRoomMemberDto": { "type": "object", "required": [ "user_id", "role", "joined_at" ], "properties": { "display_name": { "type": [ "string", "null" ] }, "joined_at": { "type": "string", "format": "date-time" }, "left_at": { "type": [ "string", "null" ], "format": "date-time" }, "nick": { "type": [ "string", "null" ] }, "role": { "type": "string" }, "user_id": { "type": "string", "format": "uuid" }, "username": { "type": [ "string", "null" ] } } }, "AdminChatRoomSummary": { "type": "object", "required": [ "id", "kind", "name", "lower_name", "owner_id", "is_private", "nsfw", "is_active", "members", "messages", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "is_private": { "type": "boolean" }, "kind": { "type": "string" }, "last_message_at": { "type": [ "string", "null" ], "format": "date-time" }, "lower_name": { "type": "string" }, "members": { "type": "integer", "format": "int64" }, "messages": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "nsfw": { "type": "boolean" }, "owner_id": { "type": "string", "format": "uuid" }, "owner_username": { "type": [ "string", "null" ] }, "space_id": { "type": [ "string", "null" ], "format": "uuid" }, "space_name": { "type": [ "string", "null" ] }, "topic": { "type": [ "string", "null" ] }, "updated_at": { "type": "string", "format": "date-time" } } }, "AdminChatStatsDto": { "type": "object", "required": [ "rooms", "active_rooms", "private_rooms", "kinds", "messages", "deleted_messages", "messages_24h", "threads", "attachments", "attachment_bytes", "pending_attachments", "members", "bans" ], "properties": { "active_rooms": { "type": "integer", "format": "int64" }, "attachment_bytes": { "type": "integer", "format": "int64" }, "attachments": { "type": "integer", "format": "int64" }, "bans": { "type": "integer", "format": "int64" }, "deleted_messages": { "type": "integer", "format": "int64" }, "kinds": { "type": "array", "items": { "$ref": "#/components/schemas/AdminChatKindCount" } }, "members": { "type": "integer", "format": "int64" }, "messages": { "type": "integer", "format": "int64" }, "messages_24h": { "type": "integer", "format": "int64" }, "pending_attachments": { "type": "integer", "format": "int64" }, "private_rooms": { "type": "integer", "format": "int64" }, "rooms": { "type": "integer", "format": "int64" }, "threads": { "type": "integer", "format": "int64" } } }, "AdminChatThreadDto": { "type": "object", "required": [ "id", "owner_id", "reply_count", "participant_count", "archived", "locked", "created_at" ], "properties": { "archived": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "locked": { "type": "boolean" }, "name": { "type": [ "string", "null" ] }, "owner_id": { "type": "string", "format": "uuid" }, "participant_count": { "type": "integer", "format": "int64" }, "reply_count": { "type": "integer", "format": "int64" } } }, "AdminDto": { "type": "object", "required": [ "id", "username", "display_name", "role", "is_active", "must_change_password", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "display_name": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "last_login_at": { "type": [ "string", "null" ], "format": "date-time" }, "last_login_ip": { "type": [ "string", "null" ] }, "must_change_password": { "type": "boolean" }, "role": { "$ref": "#/components/schemas/AdminRole" }, "updated_at": { "type": "string", "format": "date-time" }, "username": { "type": "string" } } }, "AdminEndpointDto": { "type": "object", "required": [ "enabled", "bind_addr", "port", "session_cookie_name", "session_table_name", "cors_allow_origins", "cors_allow_credentials" ], "properties": { "bind_addr": { "type": "string" }, "cors_allow_credentials": { "type": "boolean" }, "cors_allow_origins": { "type": "array", "items": { "type": "string" } }, "enabled": { "type": "boolean" }, "port": { "type": "integer", "format": "int32", "minimum": 0 }, "session_cookie_name": { "type": "string" }, "session_table_name": { "type": "string" } } }, "AdminLoginCmd": { "type": "object", "required": [ "username", "password" ], "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "AdminLoginResp": { "type": "object", "required": [ "admin", "must_change_password" ], "properties": { "admin": { "$ref": "#/components/schemas/AdminDto" }, "must_change_password": { "type": "boolean" } } }, "AdminRole": { "type": "string", "enum": [ "super_admin", "operator", "viewer" ] }, "AdminSpaceDetail": { "type": "object", "required": [ "space", "repos_count", "repos_size", "rooms_count", "dirs_count" ], "properties": { "dirs_count": { "type": "integer", "format": "int64" }, "repos_count": { "type": "integer", "format": "int64" }, "repos_size": { "type": "integer", "format": "int64" }, "rooms_count": { "type": "integer", "format": "int64" }, "space": { "$ref": "#/components/schemas/AdminSpaceSummary" } } }, "AdminSpaceMemberDto": { "type": "object", "required": [ "user_id", "status", "joined_at" ], "properties": { "alias_name": { "type": [ "string", "null" ] }, "display_name": { "type": [ "string", "null" ] }, "joined_at": { "type": "string", "format": "date-time" }, "last_active_at": { "type": [ "string", "null" ], "format": "date-time" }, "status": { "type": "string" }, "user_id": { "type": "string", "format": "uuid" }, "username": { "type": [ "string", "null" ] } } }, "AdminSpaceSummary": { "type": "object", "required": [ "id", "name", "lower_name", "owner_id", "is_private", "is_active", "allow_join", "allow_invite", "member_must_enable_2fa", "nums_members", "created_at", "updated_at" ], "properties": { "allow_invite": { "type": "boolean" }, "allow_join": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "is_private": { "type": "boolean" }, "lower_name": { "type": "string" }, "member_must_enable_2fa": { "type": "boolean" }, "name": { "type": "string" }, "nums_members": { "type": "integer", "format": "int64" }, "owner_id": { "type": "string", "format": "uuid" }, "owner_username": { "type": [ "string", "null" ] }, "updated_at": { "type": "string", "format": "date-time" } } }, "AdminSuspensionDto": { "type": "object", "required": [ "id", "suspension_type", "starts_at" ], "properties": { "ends_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "reason": { "type": [ "string", "null" ] }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" }, "starts_at": { "type": "string", "format": "date-time" }, "suspended_by": { "type": [ "string", "null" ], "format": "uuid" }, "suspension_type": { "type": "string" } } }, "AdminUserDetail": { "type": "object", "required": [ "user", "emails", "sessions", "spaces", "suspensions" ], "properties": { "emails": { "type": "array", "items": { "$ref": "#/components/schemas/AdminUserEmailDto" } }, "sessions": { "type": "array", "items": { "$ref": "#/components/schemas/AdminUserSessionDto" } }, "spaces": { "type": "array", "items": { "$ref": "#/components/schemas/AdminUserSpaceDto" } }, "suspensions": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSuspensionDto" } }, "user": { "$ref": "#/components/schemas/AdminUserSummary" } } }, "AdminUserEmailDto": { "type": "object", "required": [ "id", "email", "is_primary", "is_activated", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "email": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "is_activated": { "type": "boolean" }, "is_primary": { "type": "boolean" } } }, "AdminUserSecurityDto": { "type": "object", "required": [ "totp_enabled", "recovery_codes_total", "recovery_codes_used", "active_sessions", "ssh_keys", "access_keys", "passwd_version" ], "properties": { "access_keys": { "type": "integer", "format": "int64" }, "active_sessions": { "type": "integer", "format": "int64" }, "passwd_version": { "type": "integer", "format": "int64" }, "password_last_changed_at": { "type": [ "string", "null" ], "format": "date-time" }, "recovery_codes_total": { "type": "integer", "format": "int64" }, "recovery_codes_used": { "type": "integer", "format": "int64" }, "ssh_keys": { "type": "integer", "format": "int64" }, "totp_enabled": { "type": "boolean" } } }, "AdminUserSessionDto": { "type": "object", "required": [ "id", "kind", "last_seen_at", "created_at", "expires_at", "is_revoked" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "expires_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_revoked": { "type": "boolean" }, "kind": { "type": "string" }, "last_seen_at": { "type": "string", "format": "date-time" } } }, "AdminUserSessionPage": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/AdminUserSessionRow" } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "AdminUserSessionRow": { "type": "object", "required": [ "id", "kind", "last_seen_at", "created_at", "expires_at", "is_revoked" ], "properties": { "app_id": { "type": [ "string", "null" ] }, "client_ip_hash": { "type": [ "string", "null" ] }, "created_at": { "type": "string", "format": "date-time" }, "device_id": { "type": [ "string", "null" ], "format": "uuid" }, "expires_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_revoked": { "type": "boolean" }, "kind": { "type": "string" }, "last_seen_at": { "type": "string", "format": "date-time" }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" }, "user_agent_hash": { "type": [ "string", "null" ] } } }, "AdminUserSpaceDto": { "type": "object", "required": [ "id", "name", "lower_name", "is_active" ], "properties": { "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "lower_name": { "type": "string" }, "name": { "type": "string" } } }, "AdminUserSummary": { "type": "object", "required": [ "uid", "username", "display_name", "avatar_url", "is_active", "is_restricted", "prohibit_login", "bot", "system", "suspended", "created_at" ], "properties": { "avatar_url": { "type": "string" }, "bot": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "display_name": { "type": "string" }, "is_active": { "type": "boolean" }, "is_restricted": { "type": "boolean" }, "last_login_at": { "type": [ "string", "null" ], "format": "date-time" }, "prohibit_login": { "type": "boolean" }, "suspended": { "type": "boolean" }, "system": { "type": "boolean" }, "uid": { "type": "string", "format": "uuid" }, "username": { "type": "string" } } }, "AppResponseData_AddSpaceMemberResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "space_id", "user_id", "status", "added" ], "properties": { "added": { "type": "boolean" }, "space_id": { "type": "string", "format": "uuid" }, "status": { "type": "string" }, "user_id": { "type": "string", "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_AdminChatMessageDetail": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "message", "edits", "reactions", "attachments" ], "properties": { "attachments": { "type": "array", "items": { "$ref": "#/components/schemas/AdminChatAttachmentDto" } }, "edits": { "type": "array", "items": { "$ref": "#/components/schemas/AdminChatMessageEditDto" } }, "message": { "$ref": "#/components/schemas/AdminChatMessageDto" }, "reactions": { "type": "array", "items": { "$ref": "#/components/schemas/AdminChatReactionGroupDto" } }, "thread": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/AdminChatThreadDto" } ] } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_AdminChatRoomDetail": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "room", "deleted_messages", "threads", "attachments", "attachment_bytes", "bans", "invites" ], "properties": { "attachment_bytes": { "type": "integer", "format": "int64" }, "attachments": { "type": "integer", "format": "int64" }, "bans": { "type": "integer", "format": "int64" }, "deleted_messages": { "type": "integer", "format": "int64" }, "invites": { "type": "integer", "format": "int64" }, "room": { "$ref": "#/components/schemas/AdminChatRoomSummary" }, "threads": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_AdminChatStatsDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "rooms", "active_rooms", "private_rooms", "kinds", "messages", "deleted_messages", "messages_24h", "threads", "attachments", "attachment_bytes", "pending_attachments", "members", "bans" ], "properties": { "active_rooms": { "type": "integer", "format": "int64" }, "attachment_bytes": { "type": "integer", "format": "int64" }, "attachments": { "type": "integer", "format": "int64" }, "bans": { "type": "integer", "format": "int64" }, "deleted_messages": { "type": "integer", "format": "int64" }, "kinds": { "type": "array", "items": { "$ref": "#/components/schemas/AdminChatKindCount" } }, "members": { "type": "integer", "format": "int64" }, "messages": { "type": "integer", "format": "int64" }, "messages_24h": { "type": "integer", "format": "int64" }, "pending_attachments": { "type": "integer", "format": "int64" }, "private_rooms": { "type": "integer", "format": "int64" }, "rooms": { "type": "integer", "format": "int64" }, "threads": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_AdminDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "username", "display_name", "role", "is_active", "must_change_password", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "display_name": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "last_login_at": { "type": [ "string", "null" ], "format": "date-time" }, "last_login_ip": { "type": [ "string", "null" ] }, "must_change_password": { "type": "boolean" }, "role": { "$ref": "#/components/schemas/AdminRole" }, "updated_at": { "type": "string", "format": "date-time" }, "username": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_AdminLoginResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "admin", "must_change_password" ], "properties": { "admin": { "$ref": "#/components/schemas/AdminDto" }, "must_change_password": { "type": "boolean" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_AdminSpaceDetail": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "space", "repos_count", "repos_size", "rooms_count", "dirs_count" ], "properties": { "dirs_count": { "type": "integer", "format": "int64" }, "repos_count": { "type": "integer", "format": "int64" }, "repos_size": { "type": "integer", "format": "int64" }, "rooms_count": { "type": "integer", "format": "int64" }, "space": { "$ref": "#/components/schemas/AdminSpaceSummary" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_AdminSuspensionDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "suspension_type", "starts_at" ], "properties": { "ends_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "reason": { "type": [ "string", "null" ] }, "revoked_at": { "type": [ "string", "null" ], "format": "date-time" }, "starts_at": { "type": "string", "format": "date-time" }, "suspended_by": { "type": [ "string", "null" ], "format": "uuid" }, "suspension_type": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_AdminUserDetail": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user", "emails", "sessions", "spaces", "suspensions" ], "properties": { "emails": { "type": "array", "items": { "$ref": "#/components/schemas/AdminUserEmailDto" } }, "sessions": { "type": "array", "items": { "$ref": "#/components/schemas/AdminUserSessionDto" } }, "spaces": { "type": "array", "items": { "$ref": "#/components/schemas/AdminUserSpaceDto" } }, "suspensions": { "type": "array", "items": { "$ref": "#/components/schemas/AdminSuspensionDto" } }, "user": { "$ref": "#/components/schemas/AdminUserSummary" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_AdminUserSecurityDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "totp_enabled", "recovery_codes_total", "recovery_codes_used", "active_sessions", "ssh_keys", "access_keys", "passwd_version" ], "properties": { "access_keys": { "type": "integer", "format": "int64" }, "active_sessions": { "type": "integer", "format": "int64" }, "passwd_version": { "type": "integer", "format": "int64" }, "password_last_changed_at": { "type": [ "string", "null" ], "format": "date-time" }, "recovery_codes_total": { "type": "integer", "format": "int64" }, "recovery_codes_used": { "type": "integer", "format": "int64" }, "ssh_keys": { "type": "integer", "format": "int64" }, "totp_enabled": { "type": "boolean" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_AdminUserSessionPage": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/AdminUserSessionRow" } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_AdminUserSummary": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "uid", "username", "display_name", "avatar_url", "is_active", "is_restricted", "prohibit_login", "bot", "system", "suspended", "created_at" ], "properties": { "avatar_url": { "type": "string" }, "bot": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "display_name": { "type": "string" }, "is_active": { "type": "boolean" }, "is_restricted": { "type": "boolean" }, "last_login_at": { "type": [ "string", "null" ], "format": "date-time" }, "prohibit_login": { "type": "boolean" }, "suspended": { "type": "boolean" }, "system": { "type": "boolean" }, "uid": { "type": "string", "format": "uuid" }, "username": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_AuditLogPageDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/AuditLogDto" } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_BulkDeleteChatMessagesResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "succeeded", "failed" ], "properties": { "failed": { "type": "array", "items": { "$ref": "#/components/schemas/BulkChatMessageFailure" } }, "succeeded": { "type": "array", "items": { "type": "string", "format": "uuid" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_BulkTaskResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "source", "action", "succeeded", "failed" ], "properties": { "action": { "type": "string" }, "failed": { "type": "array", "items": { "$ref": "#/components/schemas/BulkTaskFailure" } }, "source": { "type": "string" }, "succeeded": { "type": "array", "items": { "type": "string", "format": "uuid" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_BulkUsersResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "action", "succeeded", "failed" ], "properties": { "action": { "type": "string" }, "failed": { "type": "array", "items": { "$ref": "#/components/schemas/BulkUserFailure" } }, "succeeded": { "type": "array", "items": { "type": "string", "format": "uuid" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_CreateUserResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "uid", "username", "email" ], "properties": { "email": { "type": "string" }, "uid": { "type": "string", "format": "uuid" }, "username": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_DashboardDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "counts", "trend", "active_sessions", "restricted_users", "recent_audit", "recent_failures", "queues", "generated_at" ], "properties": { "active_sessions": { "type": "integer", "format": "int64" }, "counts": { "$ref": "#/components/schemas/CountsDto" }, "generated_at": { "type": "string", "format": "date-time" }, "queues": { "type": "array", "items": { "$ref": "#/components/schemas/QueueSnapshotDto" } }, "recent_audit": { "type": "array", "items": { "$ref": "#/components/schemas/AuditLogDto" } }, "recent_failures": { "type": "array", "items": { "$ref": "#/components/schemas/JobLogDto" } }, "restricted_users": { "type": "integer", "format": "int64" }, "trend": { "type": "array", "items": { "$ref": "#/components/schemas/TrendPointDto" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_DeleteChatAttachmentResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "id", "s3_key", "deleted", "storage_deleted" ], "properties": { "deleted": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "s3_key": { "type": "string" }, "storage_deleted": { "type": "boolean" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_DeleteChatRoomResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "room_id", "messages_deleted", "members_deleted", "attachments_deleted", "threads_deleted" ], "properties": { "attachments_deleted": { "type": "integer", "format": "int64", "minimum": 0 }, "members_deleted": { "type": "integer", "format": "int64", "minimum": 0 }, "messages_deleted": { "type": "integer", "format": "int64", "minimum": 0 }, "room_id": { "type": "string", "format": "uuid" }, "threads_deleted": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_DeleteObjectResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "key", "deleted" ], "properties": { "deleted": { "type": "boolean" }, "key": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_DeleteUserResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "user_id", "anonymized" ], "properties": { "anonymized": { "type": "boolean" }, "user_id": { "type": "string", "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_DownloadUrlDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "key", "url", "expires_in_secs" ], "properties": { "expires_in_secs": { "type": "integer", "format": "int32", "minimum": 0 }, "key": { "type": "string" }, "url": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_JobLogPageDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/JobLogDto" } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_NoData": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "default": null }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_Page_AdminChatAttachmentDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "user_id", "filename", "content_type", "size", "bucket", "s3_key", "status", "created_at" ], "properties": { "bucket": { "type": "string" }, "content_type": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "display_name": { "type": [ "string", "null" ] }, "filename": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "message_id": { "type": [ "string", "null" ], "format": "uuid" }, "room_id": { "type": [ "string", "null" ], "format": "uuid" }, "s3_key": { "type": "string" }, "size": { "type": "integer", "format": "int64" }, "status": { "type": "string" }, "user_id": { "type": "string", "format": "uuid" }, "username": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_Page_AdminChatMessageDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "room_id", "author_id", "author_type", "message_type", "content", "seq", "flags", "pinned", "attachment_count", "reaction_count", "created_at" ], "properties": { "attachment_count": { "type": "integer", "format": "int64" }, "author_display_name": { "type": [ "string", "null" ] }, "author_id": { "type": "string", "format": "uuid" }, "author_type": { "type": "string" }, "author_username": { "type": [ "string", "null" ] }, "content": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "deleted_at": { "type": [ "string", "null" ], "format": "date-time" }, "edited_at": { "type": [ "string", "null" ], "format": "date-time" }, "flags": { "type": "integer", "format": "int64" }, "id": { "type": "string", "format": "uuid" }, "message_type": { "type": "string" }, "pinned": { "type": "boolean" }, "reaction_count": { "type": "integer", "format": "int64" }, "reply_to_id": { "type": [ "string", "null" ], "format": "uuid" }, "room_id": { "type": "string", "format": "uuid" }, "room_name": { "type": [ "string", "null" ] }, "seq": { "type": "integer", "format": "int64" }, "thread_id": { "type": [ "string", "null" ], "format": "uuid" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_Page_AdminChatRoomMemberDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "user_id", "role", "joined_at" ], "properties": { "display_name": { "type": [ "string", "null" ] }, "joined_at": { "type": "string", "format": "date-time" }, "left_at": { "type": [ "string", "null" ], "format": "date-time" }, "nick": { "type": [ "string", "null" ] }, "role": { "type": "string" }, "user_id": { "type": "string", "format": "uuid" }, "username": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_Page_AdminChatRoomSummary": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "kind", "name", "lower_name", "owner_id", "is_private", "nsfw", "is_active", "members", "messages", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "is_private": { "type": "boolean" }, "kind": { "type": "string" }, "last_message_at": { "type": [ "string", "null" ], "format": "date-time" }, "lower_name": { "type": "string" }, "members": { "type": "integer", "format": "int64" }, "messages": { "type": "integer", "format": "int64" }, "name": { "type": "string" }, "nsfw": { "type": "boolean" }, "owner_id": { "type": "string", "format": "uuid" }, "owner_username": { "type": [ "string", "null" ] }, "space_id": { "type": [ "string", "null" ], "format": "uuid" }, "space_name": { "type": [ "string", "null" ] }, "topic": { "type": [ "string", "null" ] }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_Page_AdminDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "username", "display_name", "role", "is_active", "must_change_password", "created_at", "updated_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "display_name": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "last_login_at": { "type": [ "string", "null" ], "format": "date-time" }, "last_login_ip": { "type": [ "string", "null" ] }, "must_change_password": { "type": "boolean" }, "role": { "$ref": "#/components/schemas/AdminRole" }, "updated_at": { "type": "string", "format": "date-time" }, "username": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_Page_AdminSpaceMemberDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "user_id", "status", "joined_at" ], "properties": { "alias_name": { "type": [ "string", "null" ] }, "display_name": { "type": [ "string", "null" ] }, "joined_at": { "type": "string", "format": "date-time" }, "last_active_at": { "type": [ "string", "null" ], "format": "date-time" }, "status": { "type": "string" }, "user_id": { "type": "string", "format": "uuid" }, "username": { "type": [ "string", "null" ] } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_Page_AdminSpaceSummary": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "id", "name", "lower_name", "owner_id", "is_private", "is_active", "allow_join", "allow_invite", "member_must_enable_2fa", "nums_members", "created_at", "updated_at" ], "properties": { "allow_invite": { "type": "boolean" }, "allow_join": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "is_active": { "type": "boolean" }, "is_private": { "type": "boolean" }, "lower_name": { "type": "string" }, "member_must_enable_2fa": { "type": "boolean" }, "name": { "type": "string" }, "nums_members": { "type": "integer", "format": "int64" }, "owner_id": { "type": "string", "format": "uuid" }, "owner_username": { "type": [ "string", "null" ] }, "updated_at": { "type": "string", "format": "date-time" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_Page_AdminUserSummary": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "type": "object", "required": [ "uid", "username", "display_name", "avatar_url", "is_active", "is_restricted", "prohibit_login", "bot", "system", "suspended", "created_at" ], "properties": { "avatar_url": { "type": "string" }, "bot": { "type": "boolean" }, "created_at": { "type": "string", "format": "date-time" }, "display_name": { "type": "string" }, "is_active": { "type": "boolean" }, "is_restricted": { "type": "boolean" }, "last_login_at": { "type": [ "string", "null" ], "format": "date-time" }, "prohibit_login": { "type": "boolean" }, "suspended": { "type": "boolean" }, "system": { "type": "boolean" }, "uid": { "type": "string", "format": "uuid" }, "username": { "type": "string" } } } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_PurgeChatMessagesResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "room_id", "messages_deleted", "attachments_deleted", "threads_deleted" ], "properties": { "attachments_deleted": { "type": "integer", "format": "int64", "minimum": 0 }, "messages_deleted": { "type": "integer", "format": "int64", "minimum": 0 }, "room_id": { "type": "string", "format": "uuid" }, "threads_deleted": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_QueueActionResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "queue", "affected" ], "properties": { "affected": { "type": "integer", "format": "int64", "minimum": 0 }, "queue": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_RemoveChatMemberResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "room_id", "user_id", "removed" ], "properties": { "removed": { "type": "boolean" }, "room_id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string", "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_RemoveMemberResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "space_id", "user_id", "removed" ], "properties": { "removed": { "type": "boolean" }, "space_id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string", "format": "uuid" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_RevokeSessionsResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "revoked" ], "properties": { "revoked": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_StorageObjectPageDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "prefix", "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/StorageObjectDto" } }, "next_token": { "type": [ "string", "null" ] }, "prefix": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_StorageOverviewDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "bucket", "total_bytes", "total_objects", "categories", "generated_at", "cached" ], "properties": { "bucket": { "type": "string" }, "cached": { "type": "boolean" }, "categories": { "type": "array", "items": { "$ref": "#/components/schemas/StorageCategoryDto" } }, "generated_at": { "type": "string", "format": "date-time" }, "total_bytes": { "type": "integer", "format": "int64", "minimum": 0 }, "total_objects": { "type": "integer", "format": "int64", "minimum": 0 } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_SystemConfigDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "version", "hosts", "admin", "features", "search", "import", "git", "storage", "database", "redis", "session", "email", "generated_at" ], "properties": { "admin": { "$ref": "#/components/schemas/AdminEndpointDto" }, "database": { "$ref": "#/components/schemas/DatabaseConfigDto" }, "email": { "$ref": "#/components/schemas/EmailConfigDto" }, "features": { "$ref": "#/components/schemas/FeaturesDto" }, "generated_at": { "type": "string", "format": "date-time" }, "git": { "$ref": "#/components/schemas/GitConfigDto" }, "hosts": { "type": "array", "items": { "$ref": "#/components/schemas/HostEntryDto" } }, "import": { "$ref": "#/components/schemas/ImportConfigDto" }, "redis": { "$ref": "#/components/schemas/RedisConfigDto" }, "search": { "$ref": "#/components/schemas/SearchConfigDto" }, "session": { "$ref": "#/components/schemas/SessionConfigDto" }, "storage": { "$ref": "#/components/schemas/StorageConfigDto" }, "version": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_SystemStatusDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "process", "dependencies", "features", "counts", "queues", "recent_failures", "generated_at" ], "properties": { "counts": { "$ref": "#/components/schemas/CountsDto" }, "dependencies": { "$ref": "#/components/schemas/DependenciesDto" }, "features": { "$ref": "#/components/schemas/FeaturesDto" }, "generated_at": { "type": "string", "format": "date-time" }, "process": { "$ref": "#/components/schemas/ProcessInfoDto" }, "queues": { "type": "array", "items": { "$ref": "#/components/schemas/QueueSnapshotDto" } }, "recent_failures": { "type": "array", "items": { "$ref": "#/components/schemas/JobLogDto" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_TaskActionResp": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "source", "id", "state" ], "properties": { "id": { "type": "string", "format": "uuid" }, "source": { "type": "string" }, "state": { "type": "string" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_TaskDetailDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "task", "detail" ], "properties": { "detail": {}, "task": { "$ref": "#/components/schemas/TaskDto" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_TaskPageDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/TaskDto" } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_TaskStatsDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "object", "required": [ "sources", "total", "generated_at" ], "properties": { "generated_at": { "type": "string", "format": "date-time" }, "sources": { "type": "array", "items": { "$ref": "#/components/schemas/TaskSourceStatDto" } }, "total": { "type": "integer", "format": "int64" } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AppResponseData_Vec_QueueSnapshotDto": { "type": "object", "required": [ "code", "message", "request_id", "log_id" ], "properties": { "code": { "type": "integer", "format": "int32" }, "data": { "type": "array", "items": { "type": "object", "required": [ "name", "kind", "enabled", "queued", "running", "failed", "succeeded" ], "properties": { "depth": { "type": [ "integer", "null" ], "format": "int64" }, "enabled": { "type": "boolean" }, "failed": { "type": "integer", "format": "int64" }, "kind": { "type": "string" }, "name": { "type": "string" }, "note": { "type": [ "string", "null" ] }, "queued": { "type": "integer", "format": "int64" }, "running": { "type": "integer", "format": "int64" }, "succeeded": { "type": "integer", "format": "int64" } } } }, "error": { "type": [ "string", "null" ] }, "error_code": { "type": [ "string", "null" ] }, "log_id": { "type": "string" }, "message": { "type": "string" }, "request_id": { "type": "string" } } }, "AuditLogDto": { "type": "object", "required": [ "id", "admin_username", "action", "detail", "created_at" ], "properties": { "action": { "type": "string" }, "admin_id": { "type": [ "string", "null" ], "format": "uuid" }, "admin_username": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "detail": {}, "id": { "type": "string", "format": "uuid" }, "ip": { "type": [ "string", "null" ] }, "request_id": { "type": [ "string", "null" ] }, "target_id": { "type": [ "string", "null" ] }, "target_type": { "type": [ "string", "null" ] }, "user_agent": { "type": [ "string", "null" ] } } }, "AuditLogPageDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/AuditLogDto" } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "BulkChatMessageFailure": { "type": "object", "required": [ "id", "error" ], "properties": { "error": { "type": "string" }, "id": { "type": "string", "format": "uuid" } } }, "BulkDeleteChatMessagesCmd": { "type": "object", "required": [ "message_ids" ], "properties": { "message_ids": { "type": "array", "items": { "type": "string", "format": "uuid" } }, "reason": { "type": [ "string", "null" ] } } }, "BulkDeleteChatMessagesResp": { "type": "object", "required": [ "succeeded", "failed" ], "properties": { "failed": { "type": "array", "items": { "$ref": "#/components/schemas/BulkChatMessageFailure" } }, "succeeded": { "type": "array", "items": { "type": "string", "format": "uuid" } } } }, "BulkTaskCmd": { "type": "object", "required": [ "action", "ids" ], "properties": { "action": { "type": "string" }, "ids": { "type": "array", "items": { "type": "string", "format": "uuid" } } } }, "BulkTaskFailure": { "type": "object", "required": [ "id", "error" ], "properties": { "error": { "type": "string" }, "id": { "type": "string", "format": "uuid" } } }, "BulkTaskResp": { "type": "object", "required": [ "source", "action", "succeeded", "failed" ], "properties": { "action": { "type": "string" }, "failed": { "type": "array", "items": { "$ref": "#/components/schemas/BulkTaskFailure" } }, "source": { "type": "string" }, "succeeded": { "type": "array", "items": { "type": "string", "format": "uuid" } } } }, "BulkUserFailure": { "type": "object", "required": [ "uid", "error" ], "properties": { "error": { "type": "string" }, "uid": { "type": "string", "format": "uuid" } } }, "BulkUsersCmd": { "type": "object", "required": [ "action", "ids" ], "properties": { "action": { "type": "string" }, "ends_at": { "type": [ "string", "null" ], "format": "date-time" }, "ids": { "type": "array", "items": { "type": "string", "format": "uuid" } }, "reason": { "type": [ "string", "null" ] }, "suspension_type": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SuspensionType" } ] } } }, "BulkUsersResp": { "type": "object", "required": [ "action", "succeeded", "failed" ], "properties": { "action": { "type": "string" }, "failed": { "type": "array", "items": { "$ref": "#/components/schemas/BulkUserFailure" } }, "succeeded": { "type": "array", "items": { "type": "string", "format": "uuid" } } } }, "ChangePasswordCmd": { "type": "object", "required": [ "current_password", "new_password" ], "properties": { "current_password": { "type": "string" }, "new_password": { "type": "string" } } }, "CountsDto": { "type": "object", "required": [ "users", "active_users", "spaces", "active_spaces", "repos", "rooms", "issues", "messages", "admin_users" ], "properties": { "active_spaces": { "type": "integer", "format": "int64" }, "active_users": { "type": "integer", "format": "int64" }, "admin_users": { "type": "integer", "format": "int64" }, "issues": { "type": "integer", "format": "int64" }, "messages": { "type": "integer", "format": "int64" }, "repos": { "type": "integer", "format": "int64" }, "rooms": { "type": "integer", "format": "int64" }, "spaces": { "type": "integer", "format": "int64" }, "users": { "type": "integer", "format": "int64" } } }, "CreateAdminCmd": { "type": "object", "required": [ "username", "password", "role" ], "properties": { "display_name": { "type": [ "string", "null" ] }, "password": { "type": "string" }, "role": { "$ref": "#/components/schemas/AdminRole" }, "username": { "type": "string" } } }, "CreateUserCmd": { "type": "object", "required": [ "username", "email", "password" ], "properties": { "display_name": { "type": [ "string", "null" ] }, "email": { "type": "string" }, "email_activated": { "type": [ "boolean", "null" ] }, "is_active": { "type": [ "boolean", "null" ] }, "password": { "type": "string" }, "username": { "type": "string" } } }, "CreateUserResp": { "type": "object", "required": [ "uid", "username", "email" ], "properties": { "email": { "type": "string" }, "uid": { "type": "string", "format": "uuid" }, "username": { "type": "string" } } }, "DashboardDto": { "type": "object", "required": [ "counts", "trend", "active_sessions", "restricted_users", "recent_audit", "recent_failures", "queues", "generated_at" ], "properties": { "active_sessions": { "type": "integer", "format": "int64" }, "counts": { "$ref": "#/components/schemas/CountsDto" }, "generated_at": { "type": "string", "format": "date-time" }, "queues": { "type": "array", "items": { "$ref": "#/components/schemas/QueueSnapshotDto" } }, "recent_audit": { "type": "array", "items": { "$ref": "#/components/schemas/AuditLogDto" } }, "recent_failures": { "type": "array", "items": { "$ref": "#/components/schemas/JobLogDto" } }, "restricted_users": { "type": "integer", "format": "int64" }, "trend": { "type": "array", "items": { "$ref": "#/components/schemas/TrendPointDto" } } } }, "DatabaseConfigDto": { "type": "object", "required": [ "replica_count" ], "properties": { "database": { "type": [ "string", "null" ] }, "endpoint": { "type": [ "string", "null" ] }, "host": { "type": [ "string", "null" ] }, "max_connections": { "type": [ "integer", "null" ], "format": "int32", "minimum": 0 }, "min_connections": { "type": [ "integer", "null" ], "format": "int32", "minimum": 0 }, "port": { "type": [ "integer", "null" ], "format": "int32", "minimum": 0 }, "replica_count": { "type": "integer", "minimum": 0 }, "ssl_mode": { "type": [ "string", "null" ] } } }, "DeleteChatAttachmentResp": { "type": "object", "required": [ "id", "s3_key", "deleted", "storage_deleted" ], "properties": { "deleted": { "type": "boolean" }, "id": { "type": "string", "format": "uuid" }, "s3_key": { "type": "string" }, "storage_deleted": { "type": "boolean" } } }, "DeleteChatRoomResp": { "type": "object", "required": [ "room_id", "messages_deleted", "members_deleted", "attachments_deleted", "threads_deleted" ], "properties": { "attachments_deleted": { "type": "integer", "format": "int64", "minimum": 0 }, "members_deleted": { "type": "integer", "format": "int64", "minimum": 0 }, "messages_deleted": { "type": "integer", "format": "int64", "minimum": 0 }, "room_id": { "type": "string", "format": "uuid" }, "threads_deleted": { "type": "integer", "format": "int64", "minimum": 0 } } }, "DeleteObjectResp": { "type": "object", "required": [ "key", "deleted" ], "properties": { "deleted": { "type": "boolean" }, "key": { "type": "string" } } }, "DeleteUserResp": { "type": "object", "required": [ "user_id", "anonymized" ], "properties": { "anonymized": { "type": "boolean" }, "user_id": { "type": "string", "format": "uuid" } } }, "DependenciesDto": { "type": "object", "required": [ "database", "redis", "storage", "search" ], "properties": { "database": { "$ref": "#/components/schemas/DependencyDto" }, "redis": { "$ref": "#/components/schemas/DependencyDto" }, "search": { "$ref": "#/components/schemas/DependencyDto" }, "storage": { "$ref": "#/components/schemas/DependencyDto" } } }, "DependencyDto": { "type": "object", "required": [ "ok" ], "properties": { "detail": { "type": [ "string", "null" ] }, "latency_ms": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "ok": { "type": "boolean" } } }, "DownloadUrlDto": { "type": "object", "required": [ "key", "url", "expires_in_secs" ], "properties": { "expires_in_secs": { "type": "integer", "format": "int32", "minimum": 0 }, "key": { "type": "string" }, "url": { "type": "string" } } }, "EmailConfigDto": { "type": "object", "required": [ "enabled", "queue_enabled", "smtp_host", "smtp_port" ], "properties": { "enabled": { "type": "boolean" }, "from_address": { "type": [ "string", "null" ] }, "from_name": { "type": [ "string", "null" ] }, "queue_enabled": { "type": "boolean" }, "smtp_host": { "type": "string" }, "smtp_port": { "type": "integer", "format": "int32", "minimum": 0 } } }, "FeaturesDto": { "type": "object", "required": [ "search_enabled", "import_enabled", "email_enabled", "email_queue_enabled" ], "properties": { "email_enabled": { "type": "boolean" }, "email_queue_enabled": { "type": "boolean" }, "import_enabled": { "type": "boolean" }, "search_enabled": { "type": "boolean" } } }, "GitConfigDto": { "type": "object", "required": [ "repo_root", "objects_root", "max_blob_size", "sync_topic", "sync_concurrency", "base_url", "graphql_complexity_limit", "graphql_introspection" ], "properties": { "base_url": { "type": "string" }, "graphql_complexity_limit": { "type": "integer", "format": "int64", "minimum": 0 }, "graphql_introspection": { "type": "boolean" }, "max_blob_size": { "type": "integer", "format": "int64", "minimum": 0 }, "objects_root": { "type": "string" }, "repo_root": { "type": "string" }, "sync_concurrency": { "type": "integer", "minimum": 0 }, "sync_topic": { "type": "string" } } }, "HostEntryDto": { "type": "object", "required": [ "name", "enabled" ], "properties": { "bind_addr": { "type": [ "string", "null" ] }, "enabled": { "type": "boolean" }, "name": { "type": "string" }, "port": { "type": [ "integer", "null" ], "format": "int32", "minimum": 0 } } }, "ImportConfigDto": { "type": "object", "required": [ "enabled", "allowed_hosts", "allow_insecure_tls", "max_concurrent_jobs", "max_repo_bytes", "max_attempts" ], "properties": { "allow_insecure_tls": { "type": "boolean" }, "allowed_hosts": { "type": "array", "items": { "type": "string" } }, "enabled": { "type": "boolean" }, "max_attempts": { "type": "integer", "format": "int32" }, "max_concurrent_jobs": { "type": "integer", "minimum": 0 }, "max_repo_bytes": { "type": "integer", "format": "int64", "minimum": 0 } } }, "JobLogDto": { "type": "object", "required": [ "source", "id", "state", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "error": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "source": { "type": "string" }, "state": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "JobLogPageDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/JobLogDto" } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "NoData": { "default": null }, "PageQuery": { "type": "object", "properties": { "limit": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "offset": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 }, "sort": { "type": [ "string", "null" ] } } }, "ProcessInfoDto": { "type": "object", "required": [ "version", "uptime_secs" ], "properties": { "uptime_secs": { "type": "integer", "format": "int64", "minimum": 0 }, "version": { "type": "string" } } }, "PurgeChatMessagesResp": { "type": "object", "required": [ "room_id", "messages_deleted", "attachments_deleted", "threads_deleted" ], "properties": { "attachments_deleted": { "type": "integer", "format": "int64", "minimum": 0 }, "messages_deleted": { "type": "integer", "format": "int64", "minimum": 0 }, "room_id": { "type": "string", "format": "uuid" }, "threads_deleted": { "type": "integer", "format": "int64", "minimum": 0 } } }, "QueueActionResp": { "type": "object", "required": [ "queue", "affected" ], "properties": { "affected": { "type": "integer", "format": "int64", "minimum": 0 }, "queue": { "type": "string" } } }, "QueueSnapshotDto": { "type": "object", "required": [ "name", "kind", "enabled", "queued", "running", "failed", "succeeded" ], "properties": { "depth": { "type": [ "integer", "null" ], "format": "int64" }, "enabled": { "type": "boolean" }, "failed": { "type": "integer", "format": "int64" }, "kind": { "type": "string" }, "name": { "type": "string" }, "note": { "type": [ "string", "null" ] }, "queued": { "type": "integer", "format": "int64" }, "running": { "type": "integer", "format": "int64" }, "succeeded": { "type": "integer", "format": "int64" } } }, "RedisConfigDto": { "type": "object", "required": [ "endpoint", "mode", "pool_size" ], "properties": { "database": { "type": [ "integer", "null" ], "format": "int32", "minimum": 0 }, "endpoint": { "type": "string" }, "mode": { "type": "string" }, "pool_size": { "type": "integer", "minimum": 0 } } }, "RemoveChatMemberResp": { "type": "object", "required": [ "room_id", "user_id", "removed" ], "properties": { "removed": { "type": "boolean" }, "room_id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string", "format": "uuid" } } }, "RemoveMemberResp": { "type": "object", "required": [ "space_id", "user_id", "removed" ], "properties": { "removed": { "type": "boolean" }, "space_id": { "type": "string", "format": "uuid" }, "user_id": { "type": "string", "format": "uuid" } } }, "ResetAdminPasswordCmd": { "type": "object", "required": [ "new_password" ], "properties": { "new_password": { "type": "string" } } }, "ResetUserPasswordCmd": { "type": "object", "required": [ "new_password" ], "properties": { "new_password": { "type": "string" } } }, "RevokeSessionsResp": { "type": "object", "required": [ "revoked" ], "properties": { "revoked": { "type": "integer", "format": "int64", "minimum": 0 } } }, "SearchConfigDto": { "type": "object", "required": [ "enabled", "index_prefix", "max_file_bytes", "batch_size", "poll_interval_secs" ], "properties": { "batch_size": { "type": "integer", "minimum": 0 }, "enabled": { "type": "boolean" }, "index_prefix": { "type": "string" }, "max_file_bytes": { "type": "integer", "minimum": 0 }, "poll_interval_secs": { "type": "integer", "format": "int64", "minimum": 0 } } }, "SessionConfigDto": { "type": "object", "required": [ "mode", "cookie_same_site" ], "properties": { "cookie_domain": { "type": [ "string", "null" ] }, "cookie_name": { "type": [ "string", "null" ] }, "cookie_same_site": { "type": "string" }, "cookie_secure": { "type": [ "boolean", "null" ] }, "lifespan_secs": { "type": [ "integer", "null" ], "format": "int64" }, "mode": { "type": "string" }, "table_name": { "type": [ "string", "null" ] } } }, "StorageCategoryDto": { "type": "object", "required": [ "name", "prefix", "bytes", "objects" ], "properties": { "bytes": { "type": "integer", "format": "int64", "minimum": 0 }, "name": { "type": "string" }, "objects": { "type": "integer", "format": "int64", "minimum": 0 }, "prefix": { "type": "string" } } }, "StorageConfigDto": { "type": "object", "properties": { "bucket": { "type": [ "string", "null" ] }, "path_style": { "type": [ "boolean", "null" ] }, "region": { "type": [ "string", "null" ] } } }, "StorageObjectDto": { "type": "object", "required": [ "key", "size" ], "properties": { "etag": { "type": [ "string", "null" ] }, "key": { "type": "string" }, "last_modified": {}, "size": { "type": "integer", "format": "int64", "minimum": 0 } } }, "StorageObjectPageDto": { "type": "object", "required": [ "prefix", "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/StorageObjectDto" } }, "next_token": { "type": [ "string", "null" ] }, "prefix": { "type": "string" } } }, "StorageOverviewDto": { "type": "object", "required": [ "bucket", "total_bytes", "total_objects", "categories", "generated_at", "cached" ], "properties": { "bucket": { "type": "string" }, "cached": { "type": "boolean" }, "categories": { "type": "array", "items": { "$ref": "#/components/schemas/StorageCategoryDto" } }, "generated_at": { "type": "string", "format": "date-time" }, "total_bytes": { "type": "integer", "format": "int64", "minimum": 0 }, "total_objects": { "type": "integer", "format": "int64", "minimum": 0 } } }, "SuspendUserCmd": { "type": "object", "required": [ "suspension_type" ], "properties": { "ends_at": { "type": [ "string", "null" ], "format": "date-time" }, "reason": { "type": [ "string", "null" ] }, "suspension_type": { "$ref": "#/components/schemas/SuspensionType" } } }, "SuspensionType": { "type": "string", "enum": [ "temporary", "permanent" ] }, "SystemConfigDto": { "type": "object", "required": [ "version", "hosts", "admin", "features", "search", "import", "git", "storage", "database", "redis", "session", "email", "generated_at" ], "properties": { "admin": { "$ref": "#/components/schemas/AdminEndpointDto" }, "database": { "$ref": "#/components/schemas/DatabaseConfigDto" }, "email": { "$ref": "#/components/schemas/EmailConfigDto" }, "features": { "$ref": "#/components/schemas/FeaturesDto" }, "generated_at": { "type": "string", "format": "date-time" }, "git": { "$ref": "#/components/schemas/GitConfigDto" }, "hosts": { "type": "array", "items": { "$ref": "#/components/schemas/HostEntryDto" } }, "import": { "$ref": "#/components/schemas/ImportConfigDto" }, "redis": { "$ref": "#/components/schemas/RedisConfigDto" }, "search": { "$ref": "#/components/schemas/SearchConfigDto" }, "session": { "$ref": "#/components/schemas/SessionConfigDto" }, "storage": { "$ref": "#/components/schemas/StorageConfigDto" }, "version": { "type": "string" } } }, "SystemStatusDto": { "type": "object", "required": [ "process", "dependencies", "features", "counts", "queues", "recent_failures", "generated_at" ], "properties": { "counts": { "$ref": "#/components/schemas/CountsDto" }, "dependencies": { "$ref": "#/components/schemas/DependenciesDto" }, "features": { "$ref": "#/components/schemas/FeaturesDto" }, "generated_at": { "type": "string", "format": "date-time" }, "process": { "$ref": "#/components/schemas/ProcessInfoDto" }, "queues": { "type": "array", "items": { "$ref": "#/components/schemas/QueueSnapshotDto" } }, "recent_failures": { "type": "array", "items": { "$ref": "#/components/schemas/JobLogDto" } } } }, "TaskActionResp": { "type": "object", "required": [ "source", "id", "state" ], "properties": { "id": { "type": "string", "format": "uuid" }, "source": { "type": "string" }, "state": { "type": "string" } } }, "TaskDetailDto": { "type": "object", "required": [ "task", "detail" ], "properties": { "detail": {}, "task": { "$ref": "#/components/schemas/TaskDto" } } }, "TaskDto": { "type": "object", "required": [ "id", "source", "title", "state", "created_at" ], "properties": { "created_at": { "type": "string", "format": "date-time" }, "finished_at": { "type": [ "string", "null" ], "format": "date-time" }, "id": { "type": "string", "format": "uuid" }, "last_error": { "type": [ "string", "null" ] }, "source": { "type": "string" }, "state": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": [ "string", "null" ], "format": "date-time" } } }, "TaskPageDto": { "type": "object", "required": [ "items", "total", "limit", "offset" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/TaskDto" } }, "limit": { "type": "integer", "format": "int64", "minimum": 0 }, "offset": { "type": "integer", "format": "int64", "minimum": 0 }, "total": { "type": "integer", "format": "int64" } } }, "TaskSourceStatDto": { "type": "object", "required": [ "source", "queued", "running", "succeeded", "failed" ], "properties": { "failed": { "type": "integer", "format": "int64" }, "queued": { "type": "integer", "format": "int64" }, "running": { "type": "integer", "format": "int64" }, "source": { "type": "string" }, "succeeded": { "type": "integer", "format": "int64" } } }, "TaskStatsDto": { "type": "object", "required": [ "sources", "total", "generated_at" ], "properties": { "generated_at": { "type": "string", "format": "date-time" }, "sources": { "type": "array", "items": { "$ref": "#/components/schemas/TaskSourceStatDto" } }, "total": { "type": "integer", "format": "int64" } } }, "TransferSpaceCmd": { "type": "object", "required": [ "new_owner_id" ], "properties": { "new_owner_id": { "type": "string", "format": "uuid" } } }, "TrendPointDto": { "type": "object", "required": [ "date", "users", "spaces", "repos" ], "properties": { "date": { "type": "string" }, "repos": { "type": "integer", "format": "int64" }, "spaces": { "type": "integer", "format": "int64" }, "users": { "type": "integer", "format": "int64" } } }, "UpdateAdminCmd": { "type": "object", "properties": { "display_name": { "type": [ "string", "null" ] }, "is_active": { "type": [ "boolean", "null" ] }, "role": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/AdminRole" } ] } } }, "UpdateChatRoomCmd": { "type": "object", "properties": { "is_active": { "type": [ "boolean", "null" ] }, "is_private": { "type": [ "boolean", "null" ] }, "name": { "type": [ "string", "null" ] }, "nsfw": { "type": [ "boolean", "null" ] }, "topic": { "type": [ "string", "null" ] } } }, "UpdateSpaceCmd": { "type": "object", "properties": { "allow_invite": { "type": [ "boolean", "null" ] }, "allow_join": { "type": [ "boolean", "null" ] }, "description": { "type": [ "string", "null" ] }, "is_active": { "type": [ "boolean", "null" ] }, "is_private": { "type": [ "boolean", "null" ] }, "member_must_enable_2fa": { "type": [ "boolean", "null" ] }, "name": { "type": [ "string", "null" ] } } }, "UpdateUserCmd": { "type": "object", "properties": { "display_name": { "type": [ "string", "null" ] }, "is_active": { "type": [ "boolean", "null" ] }, "is_restricted": { "type": [ "boolean", "null" ] }, "prohibit_login": { "type": [ "boolean", "null" ] } } } }, "securitySchemes": { "admin_session_cookie": { "type": "apiKey", "in": "cookie", "name": "gitdata_admin_session" } } }, "security": [ { "admin_session_cookie": [] } ] }