refactor(api-keys): remove API key reset endpoint and update documentation

Eliminate the POST /tenants/{id}/api-key endpoint for resetting tenant API keys, transitioning to a more granular API key management approach. Update related documentation and API specifications to reflect the new structure, including changes to the tenant API key management paths. Adjust frontend code and internationalization files to remove references to the deprecated API key reset functionality, enhancing clarity and consistency across the application.
This commit is contained in:
wizardchen
2026-07-06 18:27:18 +08:00
committed by lyingbug
parent 1d1e1e3d25
commit 97c36f634a
25 changed files with 265 additions and 494 deletions
+75 -55
View File
@@ -11957,56 +11957,6 @@ const docTemplate = `{
}
}
},
"/tenants/{id}/api-key": {
"post": {
"security": [
{
"Bearer": []
}
],
"description": "为指定租户生成一个新的 API Key,旧 Key 立即失效",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"租户管理"
],
"summary": "重置租户 API Key",
"parameters": [
{
"type": "integer",
"description": "租户ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "新生成的 API Key",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "权限不足",
"schema": {
"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
},
"/tenants/{id}/api-principal-config": {
"get": {
"security": [
@@ -12114,6 +12064,65 @@ const docTemplate = `{
}
}
},
"/tenants/{id}/api-principal-test-token": {
"post": {
"security": [
{
"Bearer": []
}
],
"description": "使用租户已保存的 HMAC 密钥签发短期外部用户 JWT(Owner)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"租户管理"
],
"summary": "生成 API Playground 测试 JWT",
"parameters": [
{
"type": "integer",
"description": "租户ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "测试 Token 参数",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/internal_handler.apiPrincipalTestTokenRequest"
}
}
],
"responses": {
"200": {
"description": "短期 JWT",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"400": {
"description": "请求参数错误",
"schema": {
"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
},
"403": {
"description": "权限不足",
"schema": {
"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_errors.AppError"
}
}
}
}
},
"/tenants/{id}/audit-log": {
"get": {
"security": [
@@ -14327,6 +14336,10 @@ const docTemplate = `{
"description": "===== Agent Mode Settings =====\nMaximum iterations for ReAct loop (only for agent type)",
"type": "integer"
},
"mcp_auth_wait_timeout": {
"description": "MCPAuthWaitTimeout is how many seconds to wait for in-conversation OAuth\nauthorization before skipping. \u003c=0 uses the gate's configured timeout.",
"type": "integer"
},
"mcp_selection_mode": {
"description": "MCP service selection mode: \"all\" = all enabled MCP services, \"selected\" = specific services, \"none\" = no MCP",
"type": "string"
@@ -17147,7 +17160,7 @@ const docTemplate = `{
"type": "string"
},
"user_id": {
"description": "UserID is the owner of the session. Empty for legacy rows (visible at\ntenant level) and for IM-created sessions that do not map to a WeKnora user.",
"description": "UserID is the owner scope for this session. WeKnora user UUIDs, API\nexternal-user principals, and embed visitor principals all use this column.",
"type": "string"
}
}
@@ -17486,10 +17499,6 @@ const docTemplate = `{
"github_com_Tencent_WeKnora_internal_types.Tenant": {
"type": "object",
"properties": {
"api_key": {
"description": "API key",
"type": "string"
},
"business": {
"description": "Business",
"type": "string"
@@ -19917,6 +19926,17 @@ const docTemplate = `{
}
}
},
"internal_handler.apiPrincipalTestTokenRequest": {
"type": "object",
"properties": {
"expires_in_seconds": {
"type": "integer"
},
"external_user_id": {
"type": "string"
}
}
},
"internal_handler.auditLogListResponse": {
"type": "object",
"properties": {