{ "swagger": "2.0", "info": { "description": "KoalaQA API swagger document.", "title": "KoalaQA API", "contact": {}, "version": "2.0" }, "basePath": "/api", "paths": { "/admin/bot": { "get": { "produces": [ "application/json" ], "tags": [ "bot" ], "summary": "get bot info", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.BotGetRes" } } } ] } } } }, "put": { "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "bot" ], "summary": "set bot info", "parameters": [ { "type": "file", "description": "upload avatar", "name": "avatar", "in": "formData" }, { "type": "string", "name": "name", "in": "formData", "required": true }, { "type": "string", "name": "unknown_prompt", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/discussion": { "get": { "description": "backend list discussions", "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "backend list discussions", "parameters": [ { "type": "integer", "name": "forum_id", "in": "query", "required": true }, { "type": "string", "name": "keyword", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.DiscussionListItem" } } } } ] } } } ] } } } } }, "/admin/discussion/ask": { "get": { "description": "backend ask session group", "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "backend ask session group", "parameters": [ { "type": "string", "name": "content", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" }, { "type": "string", "name": "username", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/svc.ListAsksRes" } } } } ] } } } ] } } } } }, "/admin/discussion/ask/session": { "get": { "description": "backend ask session", "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "backend ask session", "parameters": [ { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "type": "string", "name": "session_id", "in": "query", "required": true }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" }, { "type": "integer", "name": "user_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/model.AskSession" }, { "type": "object", "properties": { "summary_discs": { "type": "array", "items": { "$ref": "#/definitions/model.AskSessionSummaryDisc" } } } } ] } } } } ] } } } ] } } } } }, "/admin/forum": { "get": { "produces": [ "application/json" ], "tags": [ "forum" ], "summary": "list forum", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/svc.ForumRes" }, { "type": "object", "properties": { "groups": { "type": "array", "items": { "$ref": "#/definitions/model.ForumGroups" } }, "links": { "$ref": "#/definitions/model.ForumLinks" } } } ] } } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "forum" ], "summary": "update forum", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "allOf": [ { "$ref": "#/definitions/svc.ForumUpdateReq" }, { "type": "object", "properties": { "forums": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/model.ForumInfo" }, { "type": "object", "properties": { "groups": { "type": "array", "items": { "$ref": "#/definitions/model.ForumGroups" } }, "links": { "$ref": "#/definitions/model.ForumLinks" } } } ] } } } } ] } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/forum/{forum_id}/tags": { "get": { "produces": [ "application/json" ], "tags": [ "forum" ], "summary": "list forum all tag", "parameters": [ { "type": "integer", "description": "forum id", "name": "forum_id", "in": "path" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.DiscussionTag" } } } } ] } } } } ] } } } } }, "/admin/group": { "get": { "produces": [ "application/json" ], "tags": [ "group" ], "summary": "list group", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/model.GroupWithItem" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.GroupItemInfo" } } } } ] } } } } ] } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "group" ], "summary": "update group", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.GroupUpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/kb": { "get": { "produces": [ "application/json" ], "tags": [ "knowledge_base" ], "summary": "list kb", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/svc.KBListItem" } } } } ] } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "knowledge_base" ], "summary": "create kb", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.KBCreateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/admin/kb/document/feishu/auth_url": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "document" ], "summary": "feishu auth url", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.FeishuAuthURLReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/admin/kb/document/feishu/user": { "get": { "produces": [ "application/json" ], "tags": [ "document" ], "summary": "feishu user", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/admin.docUserRes" } } } ] } } } } }, "/admin/kb/document/file/export": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "document" ], "summary": "export file document", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.FileExportReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/admin/kb/document/file/list": { "post": { "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "document" ], "summary": "list file documents", "parameters": [ { "type": "file", "description": "upload file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.AnydocListRes" } } } ] } } } } }, "/admin/kb/document/sitemap/export": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "document" ], "summary": "export sitemap document", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.SitemapExportReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/admin/kb/document/sitemap/list": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "document" ], "summary": "list sitemap documents", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.SitemapListReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.AnydocListRes" } } } ] } } } } }, "/admin/kb/document/url/export": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "document" ], "summary": "export url document", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.URLExportReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/admin/kb/document/url/list": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "document" ], "summary": "list url documents", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.URLListReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.AnydocListRes" } } } ] } } } } }, "/admin/kb/space/remote": { "post": { "produces": [ "application/json" ], "tags": [ "space" ], "summary": "list remote doc", "parameters": [ { "description": "req param", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.ListRemoteReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.ListAnydocNode" } } } ] } } } } }, "/admin/kb/{kb_id}": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "knowledge_base" ], "summary": "update kb", "parameters": [ { "type": "integer", "description": "kb id", "name": "kb_id", "in": "path", "required": true }, { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.KBUpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "knowledge_base" ], "summary": "delete kb", "parameters": [ { "type": "integer", "description": "kb id", "name": "kb_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/kb/{kb_id}/document": { "get": { "produces": [ "application/json" ], "tags": [ "document" ], "summary": "list kb document", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ], "type": "integer", "x-enum-comments": { "FileTypeFile": "未知文件类型", "FileTypeFolder": "文件夹" }, "x-enum-descriptions": [ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "文件夹", "未知文件类型", "" ], "x-enum-varnames": [ "FileTypeUnknown", "FileTypeMarkdown", "FileTypeHTML", "FileTypeJSON", "FileTypeURL", "FileTypeDOCX", "FileTypeDOC", "FileTypePPTX", "FileTypeXLSX", "FileTypeXLS", "FileTypePDF", "FileTypeImage", "FileTypeCSV", "FileTypeXML", "FileTypeZIP", "FileTypeEPub", "FileTypeFolder", "FileTypeFile", "FileTypeMax" ], "name": "file_type", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" }, { "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "type": "integer", "x-enum-varnames": [ "DocStatusUnknown", "DocStatusApplySuccess", "DocStatusPendingReview", "DocStatusPendingApply", "DocStatusApplyFailed", "DocStatusAppling", "DocStatusPendingExport", "DocStatusExportSuccess", "DocStatusExportFailed", "DocStatusPendingExec" ], "name": "status", "in": "query" }, { "type": "string", "name": "title", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/svc.DocListItem" } } } } ] } } } ] } } } } }, "/admin/kb/{kb_id}/document/group_ids": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "document" ], "summary": "update doc group_ids", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UpdateGroupIDsReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/kb/{kb_id}/document/{doc_id}": { "get": { "produces": [ "application/json" ], "tags": [ "document" ], "summary": "get kb document detail", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "doc_id", "name": "doc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.KBDocumentDetail" } } } ] } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "document" ], "summary": "delete kb document", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "doc_id", "name": "doc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/kb/{kb_id}/question": { "get": { "produces": [ "application/json" ], "tags": [ "question" ], "summary": "list kb question", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ], "type": "integer", "x-enum-comments": { "FileTypeFile": "未知文件类型", "FileTypeFolder": "文件夹" }, "x-enum-descriptions": [ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "文件夹", "未知文件类型", "" ], "x-enum-varnames": [ "FileTypeUnknown", "FileTypeMarkdown", "FileTypeHTML", "FileTypeJSON", "FileTypeURL", "FileTypeDOCX", "FileTypeDOC", "FileTypePPTX", "FileTypeXLSX", "FileTypeXLS", "FileTypePDF", "FileTypeImage", "FileTypeCSV", "FileTypeXML", "FileTypeZIP", "FileTypeEPub", "FileTypeFolder", "FileTypeFile", "FileTypeMax" ], "name": "file_type", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" }, { "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "type": "integer", "x-enum-varnames": [ "DocStatusUnknown", "DocStatusApplySuccess", "DocStatusPendingReview", "DocStatusPendingApply", "DocStatusApplyFailed", "DocStatusAppling", "DocStatusPendingExport", "DocStatusExportSuccess", "DocStatusExportFailed", "DocStatusPendingExec" ], "name": "status", "in": "query" }, { "type": "string", "name": "title", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/svc.DocListItem" } } } } ] } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "question" ], "summary": "create kb question", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.DocCreateQAReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/admin/kb/{kb_id}/question/file": { "post": { "produces": [ "application/json" ], "tags": [ "question" ], "summary": "upload kb question assets", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "file", "description": "upload file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/kb/{kb_id}/question/{qa_id}": { "get": { "produces": [ "application/json" ], "tags": [ "question" ], "summary": "kb question detail", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "qa_id", "name": "qa_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.KBDocumentDetail" } } } ] } } } }, "put": { "produces": [ "application/json" ], "tags": [ "question" ], "summary": "update kb question", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "qa_id", "name": "qa_id", "in": "path", "required": true }, { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.DocUpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "question" ], "summary": "delete kb question", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "qa_id", "name": "qa_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/kb/{kb_id}/question/{qa_id}/review": { "post": { "produces": [ "application/json" ], "tags": [ "question" ], "summary": "review kb question", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "qa_id", "name": "qa_id", "in": "path", "required": true }, { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.ReviewReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/kb/{kb_id}/space": { "get": { "produces": [ "application/json" ], "tags": [ "space" ], "summary": "list kb space", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/svc.ListSpaceItem" } } } } ] } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "space" ], "summary": "create kb space", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "description": "request param", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.CreateSpaceReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/admin/kb/{kb_id}/space/{space_id}": { "get": { "produces": [ "application/json" ], "tags": [ "space" ], "summary": "get kb space detail", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "space_id", "name": "space_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/svc.GetSpaceRes" }, { "type": "object", "properties": { "platform_opt": { "$ref": "#/definitions/model.PlatformOpt" } } } ] } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "space" ], "summary": "update kb space", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "space_id", "name": "space_id", "in": "path", "required": true }, { "description": "request param", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UpdateSpaceReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "space" ], "summary": "delete kb space", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "space_id", "name": "space_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/kb/{kb_id}/space/{space_id}/folder": { "get": { "produces": [ "application/json" ], "tags": [ "space" ], "summary": "list kb space folder", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "space_id", "name": "space_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/svc.ListSpaceFolderItem" }, { "type": "object", "properties": { "export_opt": { "$ref": "#/definitions/model.ExportOpt" } } } ] } } } } ] } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "space" ], "summary": "create kb space folder", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "space_id", "name": "space_id", "in": "path", "required": true }, { "description": "req param", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.CreateSpaceFolderReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/kb/{kb_id}/space/{space_id}/folder/{folder_id}": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "space" ], "summary": "update kb space folder", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "space_id", "name": "space_id", "in": "path", "required": true }, { "type": "integer", "description": "folder_id", "name": "folder_id", "in": "path", "required": true }, { "description": "req params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UpdateSpaceFolderReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "space" ], "summary": "delete kb space folder", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "space_id", "name": "space_id", "in": "path", "required": true }, { "type": "integer", "description": "folder_id", "name": "folder_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/kb/{kb_id}/space/{space_id}/folder/{folder_id}/doc": { "get": { "produces": [ "application/json" ], "tags": [ "space" ], "summary": "list kb space folder doc", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "space_id", "name": "space_id", "in": "path", "required": true }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "type": "integer", "name": "parent_id", "in": "query", "required": true }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" }, { "type": "array", "items": { "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "type": "integer" }, "collectionFormat": "csv", "name": "status", "in": "query" }, { "type": "string", "name": "title", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/svc.DocListItem" } } } } ] } } } ] } } } } }, "/admin/kb/{kb_id}/space/{space_id}/refresh": { "put": { "produces": [ "application/json" ], "tags": [ "space" ], "summary": "update kb space all folder", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "space_id", "name": "space_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/kb/{kb_id}/space/{space_id}/remote": { "get": { "produces": [ "application/json" ], "tags": [ "space" ], "summary": "list kb space remote doc", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "space_id", "name": "space_id", "in": "path", "required": true }, { "type": "string", "name": "remote_folder_id", "in": "query" }, { "type": "string", "name": "remote_sub_folder_id", "in": "query" }, { "type": "boolean", "name": "shallow", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.ListAnydocNode" } } } ] } } } } }, "/admin/kb/{kb_id}/web": { "get": { "produces": [ "application/json" ], "tags": [ "web" ], "summary": "list kb web", "parameters": [ { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" }, { "type": "string", "name": "title", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/svc.ListWebItem" } } } } ] } } } ] } } } } }, "/admin/kb/{kb_id}/web/{doc_id}": { "put": { "produces": [ "application/json" ], "tags": [ "web" ], "summary": "update kb web", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "doc_id", "name": "doc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "web" ], "summary": "delete kb web", "parameters": [ { "type": "integer", "description": "kb_id", "name": "kb_id", "in": "path", "required": true }, { "type": "integer", "description": "doc_id", "name": "doc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/llm/polish": { "post": { "description": "polish text", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "llm" ], "summary": "polish text", "parameters": [ { "description": "polish text", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.PolishReq" } } ], "responses": { "200": { "description": "polish text", "schema": { "type": "string" } } } } }, "/admin/llm/system-prompt": { "get": { "description": "get system chat prompt", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "llm" ], "summary": "get system chat prompt", "responses": { "200": { "description": "system chat prompt", "schema": { "type": "string" } } } }, "put": { "description": "update system chat prompt", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "llm" ], "summary": "update system chat prompt", "parameters": [ { "description": "update prompt", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UpdatePromptReq" } } ], "responses": { "200": { "description": "success", "schema": { "type": "string" } } } } }, "/admin/model": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "modelkit" ], "summary": "create model", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.MKCreateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/admin/model/check": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "modelkit" ], "summary": "check model", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.ModelKitCheckReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.CheckModelRes" } } } ] } } } } }, "/admin/model/list": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "modelkit" ], "summary": "list model", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.LLM" } } } } ] } } } } }, "/admin/model/provider/supported": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "modelkit" ], "summary": "list model provider supported", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.MKSupportedReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.MKSupportedRes" } } } ] } } } } }, "/admin/model/{id}": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "modelkit" ], "summary": "update model", "parameters": [ { "type": "integer", "description": "model_id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.MKUpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "object" } } } ] } } } } }, "/admin/model/{id}/active": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "modelkit" ], "summary": "active model", "parameters": [ { "description": "req params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.ActiveModelReq" } }, { "type": "integer", "description": "model_id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "object" } } } ] } } } } }, "/admin/org": { "get": { "produces": [ "application/json" ], "tags": [ "org" ], "summary": "list org", "parameters": [ { "type": "string", "name": "name", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/svc.OrgListItem" } } } } ] } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "org" ], "summary": "create org", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.OrgUpsertReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/admin/org/{org_id}": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "org" ], "summary": "update org", "parameters": [ { "type": "integer", "description": "org id", "name": "org_id", "in": "path", "required": true }, { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.OrgUpsertReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "org" ], "summary": "delete org", "parameters": [ { "type": "integer", "description": "org id", "name": "org_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/rank/ai_insight": { "get": { "produces": [ "application/json" ], "tags": [ "rank" ], "summary": "ai insight rank", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/model.RankTimeGroup" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.RankTimeGroupItem" } } } } ] } } } } ] } } } } }, "/admin/rank/ai_insight/{ai_insight_id}/discussion": { "get": { "produces": [ "application/json" ], "tags": [ "rank" ], "summary": "list ai insight discussion", "parameters": [ { "type": "integer", "description": "ai_insight_id", "name": "ai_insight_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/svc.AIInsightDiscussionItem" } } } } ] } } } ] } } } } }, "/admin/stat/discussion": { "get": { "produces": [ "application/json" ], "tags": [ "stat" ], "summary": "stat discussion", "parameters": [ { "type": "integer", "name": "begin", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/svc.StatDiscussionRes" }, { "type": "object", "properties": { "discussions": { "type": "array", "items": { "$ref": "#/definitions/svc.StatDiscussionItem" } } } } ] } } } ] } } } } }, "/admin/stat/search": { "get": { "produces": [ "application/json" ], "tags": [ "stat" ], "summary": "stat search count", "parameters": [ { "type": "integer", "name": "begin", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/admin/stat/trend": { "get": { "produces": [ "application/json" ], "tags": [ "stat" ], "summary": "stat trend", "parameters": [ { "type": "integer", "name": "begin", "in": "query", "required": true }, { "type": "integer", "name": "stat_group", "in": "query", "required": true }, { "type": "array", "items": { "enum": [ 1, 2, 3, 4, 5, 6, 7, 8 ], "type": "integer" }, "collectionFormat": "csv", "name": "stat_types", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/model.StatTrend" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.StatTrendItem" } } } } ] } } } } ] } } } ] } } } } }, "/admin/stat/visit": { "get": { "produces": [ "application/json" ], "tags": [ "stat" ], "summary": "stat visit", "parameters": [ { "type": "integer", "name": "begin", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.StatVisitRes" } } } ] } } } } }, "/admin/system/brand": { "get": { "produces": [ "application/json" ], "tags": [ "brand" ], "summary": "brand detail", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SystemBrand" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "brand" ], "summary": "update brand config", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SystemBrand" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/system/discussion": { "get": { "produces": [ "application/json" ], "tags": [ "system_discussion" ], "summary": "system discussion detail", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SystemDiscussion" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "system_discussion" ], "summary": "update system discussion config", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SystemDiscussion" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/system/login_method": { "get": { "produces": [ "application/json" ], "tags": [ "login_method" ], "summary": "login_method detail", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.Auth" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "login_method" ], "summary": "update login_method config", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.Auth" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/system/notify_sub": { "get": { "produces": [ "application/json" ], "tags": [ "message_notify_sub" ], "summary": "list message notify sub", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/model.MessageNotifySub" }, { "type": "object", "properties": { "info": { "$ref": "#/definitions/model.MessageNotifySubInfo" } } } ] } } } } ] } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "message_notify_sub" ], "summary": "upsert message notify sub", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.MessageNotifySubCreateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/admin/system/public_address": { "get": { "produces": [ "application/json" ], "tags": [ "public_address" ], "summary": "public_address detail", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.PublicAddress" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "public_address" ], "summary": "update public_address config", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.PublicAddress" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/system/seo": { "get": { "produces": [ "application/json" ], "tags": [ "seo" ], "summary": "set config detail", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SystemSEO" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "seo" ], "summary": "update seo config", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SystemSEO" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/system/web_plugin": { "get": { "produces": [ "application/json" ], "tags": [ "web_plugin" ], "summary": "web plugin detail", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SystemWebPlugin" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_plugin" ], "summary": "update web plugin config", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.SystemWebPlugin" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/system/webhook": { "get": { "produces": [ "application/json" ], "tags": [ "webhook" ], "summary": "list webhook", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.Webhook" } } } } ] } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webhook" ], "summary": "create webhook", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.WebhookCreateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/admin/system/webhook/{webhook_id}": { "get": { "produces": [ "application/json" ], "tags": [ "webhook" ], "summary": "webhook detail", "parameters": [ { "type": "integer", "description": "wenhook id", "name": "webhook_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.WebhookConfig" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "webhook" ], "summary": "update webhook config", "parameters": [ { "type": "integer", "description": "wenhook id", "name": "webhook_id", "in": "path", "required": true }, { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.WebhookUpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "webhook" ], "summary": "delete webhook", "parameters": [ { "type": "integer", "description": "wenhook id", "name": "webhook_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/user": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "list user", "parameters": [ { "type": "string", "name": "email", "in": "query" }, { "type": "string", "name": "name", "in": "query" }, { "type": "integer", "name": "org_id", "in": "query" }, { "type": "string", "name": "org_name", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "enum": [ 0, 1, 2, 3, 4, 5 ], "type": "integer", "x-enum-varnames": [ "UserRoleUnknown", "UserRoleAdmin", "UserRoleOperator", "UserRoleUser", "UserRoleGuest", "UserRoleMax" ], "name": "role", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/svc.UserListItem" } } } } ] } } } ] } } } } }, "/admin/user/history/search": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "list user search history", "parameters": [ { "type": "string", "name": "keyword", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" }, { "type": "string", "name": "username", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.UserSearchHistory" } } } } ] } } } ] } } } } }, "/admin/user/join_org": { "post": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "user join org", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UserJoinOrgReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/user/review": { "get": { "description": "list user review", "produces": [ "application/json" ], "tags": [ "user_review" ], "summary": "list user review", "parameters": [ { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" }, { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "name": "state", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.UserReviewWithUser" } } } } ] } } } ] } } } } }, "/admin/user/review/{review_id}": { "put": { "description": "update user review", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user_review" ], "summary": "update user review", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UserReviewUpdateReq" } }, { "type": "string", "description": "review id", "name": "review_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/admin/user/{user_id}": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "user detail", "parameters": [ { "type": "integer", "description": "user id", "name": "user_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.User" } } } ] } } } }, "put": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "update user", "parameters": [ { "type": "integer", "description": "user id", "name": "user_id", "in": "path", "required": true }, { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UserUpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "delete user", "parameters": [ { "type": "integer", "description": "user id", "name": "user_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/bot": { "get": { "produces": [ "application/json" ], "tags": [ "bot" ], "summary": "get bot info", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.BotGetRes" } } } ] } } } } }, "/csrf": { "get": { "description": "get csrf", "produces": [ "application/json" ], "tags": [ "csrf" ], "summary": "get csrf", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/discussion": { "get": { "description": "list discussions", "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "list discussions", "parameters": [ { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "name": "discussion_ids", "in": "query" }, { "enum": [ "hot", "new", "publish" ], "type": "string", "x-enum-varnames": [ "DiscussionListFilterHot", "DiscussionListFilterNew", "DiscussionListFilterPublish" ], "name": "filter", "in": "query" }, { "type": "integer", "name": "forum_id", "in": "query" }, { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "name": "group_ids", "in": "query" }, { "type": "string", "name": "keyword", "in": "query" }, { "type": "boolean", "name": "only_mine", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "enum": [ 0, 1, 2, 3, 4 ], "type": "integer", "x-enum-varnames": [ "DiscussionStateUnknown", "DiscussionStateNone", "DiscussionStateResolved", "DiscussionStateClosed", "DiscussionStateInProgress" ], "name": "resolved", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" }, { "type": "boolean", "name": "stat", "in": "query" }, { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "name": "tag_ids", "in": "query" }, { "enum": [ "qa", "feedback", "blog", "issue" ], "type": "string", "x-enum-varnames": [ "DiscussionTypeQA", "DiscussionTypeFeedback", "DiscussionTypeBlog", "DiscussionTypeIssue" ], "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.DiscussionListItem" } } } } ] } } } ] } } } }, "post": { "description": "create discussion", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "create discussion", "parameters": [ { "description": "discussion", "name": "discussion", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.DiscussionCreateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/discussion/ask": { "post": { "description": "user ask", "produces": [ "text/event-stream" ], "tags": [ "discussion" ], "summary": "user ask", "parameters": [ { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "name": "group_ids", "in": "query" }, { "type": "string", "name": "question", "in": "query", "required": true }, { "type": "string", "name": "session_id", "in": "query", "required": true } ], "responses": {} } }, "/discussion/ask/session": { "get": { "description": "create or get last session id", "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "create or get last session id", "parameters": [ { "type": "boolean", "name": "force_create", "in": "query" }, { "type": "string", "name": "session_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/discussion/ask/{ask_session_id}": { "get": { "description": "discussion ask history", "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "discussion ask history", "parameters": [ { "type": "string", "description": "ask_session_id", "name": "ask_session_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/model.AskSession" }, { "type": "object", "properties": { "summary_discs": { "type": "array", "items": { "$ref": "#/definitions/model.AskSessionSummaryDisc" } } } } ] } } } } ] } } } ] } } } } }, "/discussion/complete": { "post": { "description": "tab complete", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "tab complete", "parameters": [ { "description": "req params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.DiscussionCompeletReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/discussion/content_summary": { "post": { "description": "discussion content summary", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "discussion content summary", "parameters": [ { "description": "req params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.DiscussionContentSummaryReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/discussion/follow": { "get": { "description": "list follow discussions", "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "list follow discussions", "parameters": [ { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.Discussion" } } } } ] } } } ] } } } } }, "/discussion/summary": { "post": { "description": "discussions summary", "produces": [ "text/event-stream" ], "tags": [ "discussion" ], "summary": "discussions summary", "parameters": [ { "type": "string", "name": "keyword", "in": "query", "required": true }, { "type": "array", "items": { "type": "string" }, "collectionFormat": "csv", "name": "uuids", "in": "query", "required": true } ], "responses": {} } }, "/discussion/summary/content": { "post": { "description": "content summary", "produces": [ "text/event-stream" ], "tags": [ "discussion" ], "summary": "content summary", "parameters": [ { "type": "integer", "name": "forum_id", "in": "query", "required": true }, { "type": "array", "items": { "type": "integer" }, "collectionFormat": "csv", "name": "group_ids", "in": "query" }, { "type": "string", "name": "session_id", "in": "query", "required": true } ], "responses": {} } }, "/discussion/upload": { "post": { "description": "discussion upload file", "consumes": [ "multipart/formdata" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "discussion upload file", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.DiscussUploadFileReq" } }, { "type": "file", "description": "upload file", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/discussion/{disc_id}": { "get": { "description": "detail discussion", "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "detail discussion", "parameters": [ { "type": "boolean", "name": "no_view", "in": "query" }, { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.DiscussionDetail" } } } ] } } } }, "put": { "description": "update discussion", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "update discussion", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true }, { "description": "discussion", "name": "discussion", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.DiscussionUpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": {} } } ] } } } }, "delete": { "description": "delete discussion", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "delete discussion", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": {} } } ] } } } } }, "/discussion/{disc_id}/ai_learn": { "post": { "description": "discussion ai learn", "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "discussion ai learn", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/discussion/{disc_id}/associate": { "get": { "description": "list associate discussion", "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "list associate discussion", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.DiscussionListItem" } } } } ] } } } ] } } } }, "post": { "description": "associate discussion", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "associate discussion", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true }, { "description": "discussion", "name": "discussion", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.AssociateDiscussionReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/discussion/{disc_id}/close": { "put": { "description": "close discussion", "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "close discussion", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/discussion/{disc_id}/comment": { "post": { "description": "create comment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "create comment", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true }, { "description": "comment", "name": "comment", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.CommentCreateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/discussion/{disc_id}/comment/{comment_id}": { "put": { "description": "update comment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "update comment", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true }, { "type": "number", "description": "comment_id", "name": "comment_id", "in": "path", "required": true }, { "description": "comment", "name": "comment", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.CommentUpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": {} } } ] } } } }, "delete": { "description": "delete comment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "delete comment", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true }, { "type": "integer", "description": "comment_id", "name": "comment_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": {} } } ] } } } } }, "/discussion/{disc_id}/comment/{comment_id}/accept": { "post": { "description": "accept comment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "accept comment", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true }, { "type": "integer", "description": "comment_id", "name": "comment_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": {} } } ] } } } } }, "/discussion/{disc_id}/comment/{comment_id}/dislike": { "post": { "description": "dislike comment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "dislike comment", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true }, { "type": "integer", "description": "comment_id", "name": "comment_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/discussion/{disc_id}/comment/{comment_id}/like": { "post": { "description": "like comment", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "like comment", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true }, { "type": "integer", "description": "comment_id", "name": "comment_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/discussion/{disc_id}/comment/{comment_id}/revoke_like": { "post": { "description": "revoke comment like", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "revoke comment like", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true }, { "type": "integer", "description": "comment_id", "name": "comment_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/discussion/{disc_id}/follow": { "get": { "description": "get discussion follow info", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "get discussion follow info", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.DiscussionListFollowRes" } } } ] } } } }, "post": { "description": "follow discussion", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "follow discussion", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } }, "delete": { "description": "unfollow discussion", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "unfollow discussion", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/discussion/{disc_id}/like": { "post": { "description": "like discussion", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "like discussion", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": {} } } ] } } } } }, "/discussion/{disc_id}/requirement": { "post": { "description": "discussion requirement", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "discussion requirement", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/discussion/{disc_id}/resolve": { "post": { "description": "resolve feedback", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "resolve feedback", "parameters": [ { "description": "req params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.ResolveFeedbackReq" } }, { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/discussion/{disc_id}/resolve_issue": { "post": { "description": "resolve issue", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "resolve issue", "parameters": [ { "description": "req params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.ResolveIssueReq" } }, { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/discussion/{disc_id}/revoke_like": { "post": { "description": "revoke like discussion", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "revoke like discussion", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": {} } } ] } } } } }, "/discussion/{disc_id}/similarity": { "get": { "description": "list similarity discussion", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "discussion" ], "summary": "list similarity discussion", "parameters": [ { "type": "string", "description": "disc_id", "name": "disc_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.DiscussionListItem" } } } } ] } } } ] } } } } }, "/forum": { "get": { "produces": [ "application/json" ], "tags": [ "forum" ], "summary": "list forums", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/svc.ForumRes" } } } } ] } } } } }, "/forum/{forum_id}/tags": { "get": { "produces": [ "application/json" ], "tags": [ "forum" ], "summary": "list forum tags", "parameters": [ { "type": "integer", "description": "forum id", "name": "forum_id", "in": "path" }, { "enum": [ "qa", "feedback", "blog", "issue" ], "type": "string", "x-enum-varnames": [ "DiscussionTypeQA", "DiscussionTypeFeedback", "DiscussionTypeBlog", "DiscussionTypeIssue" ], "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.DiscussionTag" } } } } ] } } } } ] } } } } }, "/group": { "get": { "produces": [ "application/json" ], "tags": [ "group_frontend" ], "summary": "frontend list group", "parameters": [ { "type": "integer", "description": "forum id", "name": "forum_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "allOf": [ { "$ref": "#/definitions/model.GroupWithItem" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.GroupItemInfo" } } } } ] } } } } ] } } } ] } } } } }, "/rank/contribute": { "get": { "produces": [ "application/json" ], "tags": [ "rank" ], "summary": "contribyte rank", "parameters": [ { "enum": [ 1, 2, 3 ], "type": "integer", "x-enum-varnames": [ "RankTypeContribute", "RankTypeAIInsight", "RankTypeAllContribute" ], "name": "type", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/svc.RankContributeItem" } } } } ] } } } ] } } } } }, "/stat": { "post": { "produces": [ "application/json" ], "tags": [ "stat" ], "summary": "stat", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/system/brand": { "get": { "produces": [ "application/json" ], "tags": [ "brand" ], "summary": "brand detail", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SystemBrand" } } } ] } } } } }, "/system/discussion": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "system discussion detail", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SystemDiscussion" } } } ] } } } } }, "/system/info": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get system info", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/router.SystemInfoRes" } } } ] } } } } }, "/system/notify_sub": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "list notify sub", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.MessageNotifySub" } } } } ] } } } ] } } } } }, "/system/seo": { "get": { "produces": [ "application/json" ], "tags": [ "seo" ], "summary": "set config detail", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SystemSEO" } } } ] } } } } }, "/system/web_plugin": { "get": { "produces": [ "application/json" ], "tags": [ "web_plugin" ], "summary": "web plugin detail", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SystemWebPlugin" } } } ] } } } } }, "/user": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "user detail", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.UserInfo" } } } ] } } } }, "put": { "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "update user", "parameters": [ { "type": "file", "description": "avatar", "name": "avatar", "in": "formData" }, { "type": "string", "name": "email", "in": "formData" }, { "type": "string", "name": "intro", "in": "formData" }, { "type": "string", "name": "name", "in": "formData" }, { "type": "string", "name": "old_password", "in": "formData" }, { "type": "string", "name": "password", "in": "formData" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/user/login": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "user login", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UserLoginReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/user/login/cors": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "user cors login", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UserLoginReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/user/login/third": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "get user third login url", "parameters": [ { "type": "boolean", "name": "app", "in": "query" }, { "type": "string", "name": "redirect", "in": "query" }, { "type": "integer", "name": "type", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/user/login_method": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "login_method detail", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.AuthFrontendGetRes" } } } ] } } } } }, "/user/logout": { "post": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "user logout", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/user/notify/list": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "list notify message", "parameters": [ { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "type": "boolean", "name": "read", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.MessageNotify" } } } } ] } } } ] } } } } }, "/user/notify/read": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "read notify message", "parameters": [ { "description": "req params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.NotifyReadReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/user/notify/unread": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "get notify message unread num", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/user/notify/web": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "update notify web switch", "parameters": [ { "description": "req params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UpdateWebNotifyReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/user/notify_sub": { "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "unbind user notifu sub", "parameters": [ { "description": "req params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UnbindNotifySubReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/user/notify_sub/auth_url": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "get user notify sub bind url", "parameters": [ { "type": "boolean", "name": "app", "in": "query" }, { "enum": [ 0, 1 ], "type": "integer", "x-enum-varnames": [ "MessageNotifySubTypeUnknown", "MessageNotifySubTypeDingtalk" ], "name": "type", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/user/notify_sub/bind": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "list notify sub", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.UserNotiySub" } } } } ] } } } ] } } } } }, "/user/point": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "list user point", "parameters": [ { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.UserPointRecord" } } } } ] } } } ] } } } } }, "/user/quick_reply": { "get": { "produces": [ "application/json" ], "tags": [ "user_quick_reply" ], "summary": "list user quick reply", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.UserQuickReply" } } } } ] } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user_quick_reply" ], "summary": "create user quick reply", "parameters": [ { "description": "req params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UserQuickReplyReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/user/quick_reply/reindex": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user_quick_reply" ], "summary": "reindex user quick reply", "parameters": [ { "description": "req params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.QuickReplyReindexReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/user/quick_reply/{quick_reply_id}": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user_quick_reply" ], "summary": "update user quick reply", "parameters": [ { "description": "req params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UserQuickReplyReq" } }, { "type": "integer", "description": "quick_reply_id", "name": "quick_reply_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "user_quick_reply" ], "summary": "delete user quick reply", "parameters": [ { "type": "integer", "description": "quick_reply_id", "name": "quick_reply_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/user/register": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "register user", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UserRegisterReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/user/review/guest": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user_review" ], "summary": "create guest review", "parameters": [ { "description": "request params", "name": "req", "in": "body", "required": true, "schema": { "$ref": "#/definitions/svc.UserReviewGuestCreateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/context.Response" } } } } }, "/user/trend": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "list user trend", "parameters": [ { "enum": [ "qa", "feedback", "blog", "issue" ], "type": "string", "x-enum-varnames": [ "DiscussionTypeQA", "DiscussionTypeFeedback", "DiscussionTypeBlog", "DiscussionTypeIssue" ], "name": "discussion_type", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "minimum": 1, "type": "integer", "name": "size", "in": "query" }, { "enum": [ 1, 2, 3 ], "type": "integer", "x-enum-varnames": [ "TrendTypeCreateDiscuss", "TrendTypeAnswerAccepted", "TrendTypeAnswer" ], "name": "trend_type", "in": "query" }, { "type": "integer", "name": "user_id", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "allOf": [ { "$ref": "#/definitions/model.ListRes" }, { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/model.Trend" } } } } ] } } } ] } } } } }, "/user/{user_id}": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "stat user info", "parameters": [ { "type": "integer", "description": "user id", "name": "user_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/context.Response" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/svc.UserStatisticsRes" } } } ] } } } } } }, "definitions": { "admin.docUserRes": { "type": "object", "properties": { "client_id": { "type": "string" }, "client_secret": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "user_info": { "$ref": "#/definitions/anydoc.UserInfoRes" } } }, "anydoc.ListDoc": { "type": "object", "properties": { "error": { "type": "string" }, "file": { "type": "boolean" }, "file_type": { "type": "string" }, "id": { "type": "string" }, "summary": { "type": "string" }, "title": { "type": "string" }, "updated_at": { "type": "integer" } } }, "anydoc.UserInfoRes": { "type": "object", "properties": { "access_token": { "type": "string" }, "email": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "refresh_token": { "type": "string" } } }, "context.Response": { "type": "object", "properties": { "data": {}, "err": { "type": "string" }, "msg": { "type": "string" }, "success": { "type": "boolean" }, "trace_id": { "type": "string" } } }, "model.AskSession": { "type": "object", "properties": { "bot": { "type": "boolean" }, "content": { "type": "string" }, "created_at": { "type": "integer" }, "id": { "type": "integer" }, "source": { "$ref": "#/definitions/model.AskSessionSource" }, "summary": { "type": "boolean" }, "summary_discs": { "$ref": "#/definitions/model.JSONB-array_model_AskSessionSummaryDisc" }, "updated_at": { "type": "integer" }, "user_id": { "type": "integer" }, "uuid": { "type": "string" } } }, "model.AskSessionSource": { "type": "integer", "enum": [ 0, 1 ], "x-enum-varnames": [ "AskSessionSourceWeb", "AskSessionSourcePlugin" ] }, "model.AskSessionSummaryDisc": { "type": "object", "properties": { "forum_id": { "type": "integer" }, "title": { "type": "string" }, "uuid": { "type": "string" } } }, "model.Auth": { "type": "object", "properties": { "auth_infos": { "type": "array", "items": { "$ref": "#/definitions/model.AuthInfo" } }, "enable_register": { "type": "boolean" }, "need_review": { "type": "boolean" }, "prompt": { "type": "string" }, "public_access": { "type": "boolean" }, "public_forum_ids": { "description": "Deprecated: only use in migration", "type": "array", "items": { "type": "integer" } } } }, "model.AuthConfig": { "type": "object", "properties": { "oauth": { "$ref": "#/definitions/model.AuthConfigOauth" } } }, "model.AuthConfigOauth": { "type": "object", "properties": { "client_id": { "type": "string" }, "client_secret": { "type": "string" }, "corp_id": { "type": "string" }, "url": { "type": "string" } } }, "model.AuthInfo": { "type": "object", "properties": { "button_desc": { "type": "string" }, "config": { "$ref": "#/definitions/model.AuthConfig" }, "type": { "type": "integer", "maximum": 4, "minimum": 1 } } }, "model.CommentLikeState": { "type": "integer", "enum": [ 1, 2 ], "x-enum-varnames": [ "CommentLikeStateLike", "CommentLikeStateDislike" ] }, "model.CreateSpaceFolderInfo": { "type": "object", "properties": { "children": { "type": "array", "items": { "$ref": "#/definitions/model.CreateSpaceFolderInfo" } }, "doc_id": { "type": "string" }, "file": { "type": "boolean" }, "file_type": { "type": "string" }, "title": { "type": "string" } } }, "model.Discussion": { "type": "object", "properties": { "associate_id": { "type": "integer" }, "bot_unknown": { "type": "boolean" }, "comment": { "type": "integer" }, "content": { "type": "string" }, "created_at": { "type": "integer" }, "dislike": { "type": "integer" }, "forum_id": { "type": "integer" }, "group_ids": { "type": "array", "items": { "type": "integer" } }, "hot": { "type": "integer" }, "id": { "type": "integer" }, "last_visited": { "description": "发帖人上次访问时间", "type": "integer" }, "like": { "type": "integer" }, "members": { "type": "array", "items": { "type": "integer" } }, "rag_id": { "type": "string" }, "resolved": { "$ref": "#/definitions/model.DiscussionState" }, "resolved_at": { "type": "integer" }, "summary": { "type": "string" }, "tag_ids": { "type": "array", "items": { "type": "integer" } }, "tags": { "description": "Deprecated", "type": "array", "items": { "type": "string" } }, "title": { "type": "string" }, "type": { "$ref": "#/definitions/model.DiscussionType" }, "updated_at": { "type": "integer" }, "user_id": { "type": "integer" }, "uuid": { "type": "string" }, "view": { "type": "integer" }, "visit": { "description": "发帖人访问次数", "type": "integer" } } }, "model.DiscussionComment": { "type": "object", "properties": { "accepted": { "type": "boolean" }, "bot": { "type": "boolean" }, "content": { "type": "string" }, "created_at": { "type": "integer" }, "dislike": { "type": "integer" }, "id": { "type": "integer" }, "like": { "type": "integer" }, "replies": { "type": "array", "items": { "$ref": "#/definitions/model.DiscussionReply" } }, "updated_at": { "type": "integer" }, "user_avatar": { "type": "string" }, "user_id": { "type": "integer" }, "user_like_state": { "$ref": "#/definitions/model.CommentLikeState" }, "user_name": { "type": "string" }, "user_role": { "$ref": "#/definitions/model.UserRole" } } }, "model.DiscussionDetail": { "type": "object", "properties": { "alert": { "type": "boolean" }, "associate": { "$ref": "#/definitions/model.DiscussionListItem" }, "associate_id": { "type": "integer" }, "bot_unknown": { "type": "boolean" }, "comment": { "type": "integer" }, "comments": { "type": "array", "items": { "$ref": "#/definitions/model.DiscussionComment" } }, "content": { "type": "string" }, "created_at": { "type": "integer" }, "current_user_id": { "type": "integer" }, "dislike": { "type": "integer" }, "forum_id": { "type": "integer" }, "group_ids": { "type": "array", "items": { "type": "integer" } }, "groups": { "type": "array", "items": { "$ref": "#/definitions/model.DiscussionGroup" } }, "hot": { "type": "integer" }, "id": { "type": "integer" }, "last_visited": { "description": "发帖人上次访问时间", "type": "integer" }, "like": { "type": "integer" }, "members": { "type": "array", "items": { "type": "integer" } }, "rag_id": { "type": "string" }, "resolved": { "$ref": "#/definitions/model.DiscussionState" }, "resolved_at": { "type": "integer" }, "summary": { "type": "string" }, "tag_ids": { "type": "array", "items": { "type": "integer" } }, "tags": { "description": "Deprecated", "type": "array", "items": { "type": "string" } }, "title": { "type": "string" }, "type": { "$ref": "#/definitions/model.DiscussionType" }, "updated_at": { "type": "integer" }, "user_avatar": { "type": "string" }, "user_id": { "type": "integer" }, "user_like": { "type": "boolean" }, "user_name": { "type": "string" }, "user_role": { "$ref": "#/definitions/model.UserRole" }, "uuid": { "type": "string" }, "view": { "type": "integer" }, "visit": { "description": "发帖人访问次数", "type": "integer" } } }, "model.DiscussionGroup": { "type": "object", "properties": { "group_id": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" } } }, "model.DiscussionListItem": { "type": "object", "properties": { "associate_id": { "type": "integer" }, "bot_unknown": { "type": "boolean" }, "comment": { "type": "integer" }, "content": { "type": "string" }, "created_at": { "type": "integer" }, "dislike": { "type": "integer" }, "forum_id": { "type": "integer" }, "group_ids": { "type": "array", "items": { "type": "integer" } }, "hot": { "type": "integer" }, "id": { "type": "integer" }, "last_visited": { "description": "发帖人上次访问时间", "type": "integer" }, "like": { "type": "integer" }, "members": { "type": "array", "items": { "type": "integer" } }, "rag_id": { "type": "string" }, "resolved": { "$ref": "#/definitions/model.DiscussionState" }, "resolved_at": { "type": "integer" }, "similarity": { "type": "number" }, "summary": { "type": "string" }, "tag_ids": { "type": "array", "items": { "type": "integer" } }, "tags": { "description": "Deprecated", "type": "array", "items": { "type": "string" } }, "title": { "type": "string" }, "type": { "$ref": "#/definitions/model.DiscussionType" }, "updated_at": { "type": "integer" }, "user_avatar": { "type": "string" }, "user_id": { "type": "integer" }, "user_name": { "type": "string" }, "uuid": { "type": "string" }, "view": { "type": "integer" }, "visit": { "description": "发帖人访问次数", "type": "integer" } } }, "model.DiscussionReply": { "type": "object", "properties": { "accepted": { "type": "boolean" }, "bot": { "type": "boolean" }, "content": { "type": "string" }, "created_at": { "type": "integer" }, "dislike": { "type": "integer" }, "id": { "type": "integer" }, "like": { "type": "integer" }, "updated_at": { "type": "integer" }, "user_avatar": { "type": "string" }, "user_id": { "type": "integer" }, "user_like_state": { "$ref": "#/definitions/model.CommentLikeState" }, "user_name": { "type": "string" }, "user_role": { "$ref": "#/definitions/model.UserRole" } } }, "model.DiscussionState": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "x-enum-varnames": [ "DiscussionStateUnknown", "DiscussionStateNone", "DiscussionStateResolved", "DiscussionStateClosed", "DiscussionStateInProgress" ] }, "model.DiscussionTag": { "type": "object", "properties": { "count": { "type": "integer" }, "created_at": { "type": "integer" }, "forum_id": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" }, "updated_at": { "type": "integer" } } }, "model.DiscussionType": { "type": "string", "enum": [ "qa", "feedback", "blog", "issue" ], "x-enum-varnames": [ "DiscussionTypeQA", "DiscussionTypeFeedback", "DiscussionTypeBlog", "DiscussionTypeIssue" ] }, "model.DocStatus": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], "x-enum-varnames": [ "DocStatusUnknown", "DocStatusApplySuccess", "DocStatusPendingReview", "DocStatusPendingApply", "DocStatusApplyFailed", "DocStatusAppling", "DocStatusPendingExport", "DocStatusExportSuccess", "DocStatusExportFailed", "DocStatusPendingExec" ] }, "model.DocType": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "x-enum-varnames": [ "DocTypeUnknown", "DocTypeQuestion", "DocTypeDocument", "DocTypeSpace", "DocTypeWeb" ] }, "model.ExportFolder": { "type": "object", "properties": { "doc_ids": { "type": "array", "items": { "type": "string" } }, "folder_id": { "type": "string" } } }, "model.ExportOpt": { "type": "object", "properties": { "file_type": { "type": "string" }, "folders": { "description": "需要导出的文档", "type": "array", "items": { "$ref": "#/definitions/model.ExportFolder" } }, "space_id": { "type": "string" } } }, "model.FileType": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ], "x-enum-comments": { "FileTypeFile": "未知文件类型", "FileTypeFolder": "文件夹" }, "x-enum-descriptions": [ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "文件夹", "未知文件类型", "" ], "x-enum-varnames": [ "FileTypeUnknown", "FileTypeMarkdown", "FileTypeHTML", "FileTypeJSON", "FileTypeURL", "FileTypeDOCX", "FileTypeDOC", "FileTypePPTX", "FileTypeXLSX", "FileTypeXLS", "FileTypePDF", "FileTypeImage", "FileTypeCSV", "FileTypeXML", "FileTypeZIP", "FileTypeEPub", "FileTypeFolder", "FileTypeFile", "FileTypeMax" ] }, "model.ForumGroups": { "type": "object", "properties": { "group_ids": { "type": "array", "items": { "type": "integer" } }, "type": { "$ref": "#/definitions/model.DiscussionType" } } }, "model.ForumInfo": { "type": "object", "required": [ "name" ], "properties": { "blog_ids": { "type": "array", "items": { "type": "integer" } }, "groups": { "$ref": "#/definitions/model.JSONB-array_model_ForumGroups" }, "id": { "type": "integer" }, "index": { "type": "integer" }, "links": { "$ref": "#/definitions/model.JSONB-model_ForumLinks" }, "name": { "type": "string" }, "route_name": { "type": "string" }, "tag_enabled": { "type": "boolean" }, "tag_ids": { "type": "array", "items": { "type": "integer" } } } }, "model.ForumLink": { "type": "object", "properties": { "address": { "type": "string" }, "name": { "type": "string" } } }, "model.ForumLinks": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "links": { "type": "array", "items": { "$ref": "#/definitions/model.ForumLink" } } } }, "model.GroupItemInfo": { "type": "object", "properties": { "id": { "type": "integer" }, "index": { "type": "integer" }, "name": { "type": "string" } } }, "model.GroupWithItem": { "type": "object", "properties": { "id": { "type": "integer" }, "index": { "type": "integer" }, "name": { "type": "string" } } }, "model.JSONB-array_model_AskSessionSummaryDisc": { "type": "object" }, "model.JSONB-array_model_ForumGroups": { "type": "object" }, "model.JSONB-array_model_RankTimeGroupItem": { "type": "object" }, "model.JSONB-array_model_StatTrendItem": { "type": "object" }, "model.JSONB-model_ExportOpt": { "type": "object" }, "model.JSONB-model_ForumLinks": { "type": "object" }, "model.JSONB-model_PlatformOpt": { "type": "object" }, "model.KBDocumentDetail": { "type": "object", "properties": { "created_at": { "type": "integer" }, "desc": { "type": "string" }, "disc_forum_id": { "type": "integer" }, "disc_uuid": { "type": "string" }, "doc_id": { "type": "string" }, "doc_type": { "$ref": "#/definitions/model.DocType" }, "export_at": { "type": "integer" }, "export_opt": { "$ref": "#/definitions/model.JSONB-model_ExportOpt" }, "export_task_id": { "type": "string" }, "file_type": { "$ref": "#/definitions/model.FileType" }, "group_ids": { "type": "array", "items": { "type": "integer" } }, "id": { "type": "integer" }, "json": { "type": "string" }, "kb_id": { "type": "integer" }, "markdown": { "type": "string" }, "message": { "type": "string" }, "parent_id": { "type": "integer" }, "platform": { "$ref": "#/definitions/platform.PlatformType" }, "platform_opt": { "$ref": "#/definitions/model.JSONB-model_PlatformOpt" }, "rag_id": { "type": "string" }, "root_parent_id": { "type": "integer" }, "similar_id": { "type": "integer" }, "status": { "$ref": "#/definitions/model.DocStatus" }, "title": { "type": "string" }, "updated_at": { "type": "integer" } } }, "model.LLM": { "type": "object", "properties": { "api_header": { "type": "string" }, "api_key": { "type": "string" }, "api_version": { "type": "string" }, "base_url": { "type": "string" }, "completion_tokens": { "type": "integer" }, "created_at": { "type": "integer" }, "id": { "type": "integer" }, "is_active": { "type": "boolean" }, "model": { "type": "string" }, "parameters": { "$ref": "#/definitions/model.LLMModelParam" }, "prompt_tokens": { "type": "integer" }, "provider": { "type": "string" }, "rag_id": { "type": "string" }, "show_name": { "type": "string" }, "total_tokens": { "type": "integer" }, "type": { "$ref": "#/definitions/model.LLMType" }, "updated_at": { "type": "integer" } } }, "model.LLMModelParam": { "type": "object", "properties": { "context_window": { "type": "integer" }, "max_tokens": { "type": "integer" }, "r1_enabled": { "type": "boolean" }, "support_computer_use": { "type": "boolean" }, "support_images": { "type": "boolean" }, "support_prompt_cache": { "type": "boolean" } } }, "model.LLMType": { "type": "string", "enum": [ "chat", "embedding", "rerank", "analysis", "analysis-vl" ], "x-enum-varnames": [ "LLMTypeChat", "LLMTypeEmbedding", "LLMTypeRerank", "LLMTypeAnalysis", "LLMTypeAnalysisVL" ] }, "model.ListRes": { "type": "object", "properties": { "total": { "type": "integer" } } }, "model.MessageNotify": { "type": "object", "properties": { "created_at": { "type": "integer" }, "discuss_id": { "type": "integer" }, "discuss_title": { "type": "string" }, "discuss_uuid": { "type": "string" }, "discussion_type": { "$ref": "#/definitions/model.DiscussionType" }, "forum_id": { "type": "integer" }, "from_bot": { "type": "boolean" }, "from_id": { "type": "integer" }, "from_name": { "type": "string" }, "id": { "type": "integer" }, "parent_comment": { "type": "string" }, "read": { "type": "boolean" }, "review_id": { "type": "integer" }, "review_status": { "type": "integer" }, "review_type": { "type": "integer" }, "to_bot": { "type": "boolean" }, "to_id": { "type": "integer" }, "to_name": { "type": "string" }, "type": { "$ref": "#/definitions/model.MsgNotifyType" }, "updated_at": { "type": "integer" }, "user_id": { "description": "通知到谁,除了发给机器人的信息,user_id 与 to_id 相同", "type": "integer" }, "user_point": { "type": "integer" } } }, "model.MessageNotifySub": { "type": "object", "properties": { "created_at": { "type": "integer" }, "enabled": { "type": "boolean" }, "id": { "type": "integer" }, "type": { "$ref": "#/definitions/model.MessageNotifySubType" }, "updated_at": { "type": "integer" } } }, "model.MessageNotifySubInfo": { "type": "object", "properties": { "client_id": { "type": "string" }, "client_secret": { "type": "string" } } }, "model.MessageNotifySubType": { "type": "integer", "enum": [ 0, 1 ], "x-enum-varnames": [ "MessageNotifySubTypeUnknown", "MessageNotifySubTypeDingtalk" ] }, "model.MsgNotifyType": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ], "x-enum-varnames": [ "MsgNotifyTypeUnknown", "MsgNotifyTypeReplyDiscuss", "MsgNotifyTypeReplyComment", "MsgNotifyTypeApplyComment", "MsgNotifyTypeLikeComment", "MsgNotifyTypeDislikeComment", "MsgNotifyTypeBotUnknown", "MsgNotifyTypeLikeDiscussion", "MsgNotifyTypeUserReview", "MsgNotifyTypeResolveByAdmin", "MsgNotifyTypeCloseDiscussion", "MsgNotifyTypeAssociateIssue", "MsgNotifyTypeIssueInProgress", "MsgNotifyTypeIssueResolved", "MsgNotifyTypeUserPoint" ] }, "model.OrgType": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "OrgTypeNormal", "OrgTypeDefault", "OrgTypeAdmin" ] }, "model.PlatformOpt": { "type": "object", "properties": { "access_token": { "type": "string" }, "app_id": { "type": "string" }, "phone": { "type": "string" }, "refresh_token": { "type": "string" }, "secret": { "type": "string" }, "url": { "type": "string" }, "user_third_id": { "type": "string" }, "username": { "type": "string" } } }, "model.PublicAddress": { "type": "object", "required": [ "address" ], "properties": { "address": { "type": "string" } } }, "model.RankTimeGroup": { "type": "object", "properties": { "items": { "$ref": "#/definitions/model.JSONB-array_model_RankTimeGroupItem" }, "time": { "type": "integer" } } }, "model.RankTimeGroupItem": { "type": "object", "properties": { "associate_id": { "type": "integer" }, "extra": { "type": "string" }, "foreign_id": { "type": "integer" }, "id": { "type": "integer" }, "score_id": { "type": "string" } } }, "model.RankType": { "type": "integer", "enum": [ 1, 2, 3 ], "x-enum-varnames": [ "RankTypeContribute", "RankTypeAIInsight", "RankTypeAllContribute" ] }, "model.StatTrend": { "type": "object", "properties": { "items": { "$ref": "#/definitions/model.JSONB-array_model_StatTrendItem" }, "ts": { "type": "integer" } } }, "model.StatTrendItem": { "type": "object", "properties": { "count": { "type": "integer" }, "type": { "$ref": "#/definitions/model.StatType" } } }, "model.StatType": { "type": "integer", "enum": [ 1, 2, 3, 4, 5, 6, 7, 8 ], "x-enum-varnames": [ "StatTypeVisit", "StatTypeSearch", "StatTypeBotUnknown", "StatTypeBotAccept", "StatTypeDiscussionQA", "StatTypeDiscussionBlog", "StatTypeDiscussionIssue", "StatTypeBotUnknownComment" ] }, "model.SystemBrand": { "type": "object", "properties": { "logo": { "type": "string" }, "text": { "type": "string" }, "theme": { "type": "string" } } }, "model.SystemDiscussion": { "type": "object", "properties": { "auto_close": { "type": "integer" }, "content_placeholder": { "type": "string" } } }, "model.SystemSEO": { "type": "object", "properties": { "desc": { "type": "string" }, "keywords": { "type": "array", "items": { "type": "string" } } } }, "model.SystemWebPlugin": { "type": "object", "properties": { "display": { "type": "boolean" }, "enabled": { "type": "boolean" }, "plugin": { "type": "boolean" } } }, "model.Trend": { "type": "object", "properties": { "created_at": { "type": "integer" }, "discuss_id": { "type": "integer" }, "discuss_title": { "type": "string" }, "discuss_uuid": { "type": "string" }, "discussion_type": { "$ref": "#/definitions/model.DiscussionType" }, "forum_id": { "type": "integer" }, "id": { "type": "integer" }, "trend_type": { "$ref": "#/definitions/model.TrendType" }, "updated_at": { "type": "integer" }, "user_id": { "description": "谁的行为", "type": "integer" } } }, "model.TrendType": { "type": "integer", "enum": [ 1, 2, 3 ], "x-enum-varnames": [ "TrendTypeCreateDiscuss", "TrendTypeAnswerAccepted", "TrendTypeAnswer" ] }, "model.User": { "type": "object", "properties": { "avatar": { "type": "string" }, "builtin": { "type": "boolean" }, "created_at": { "type": "integer" }, "email": { "type": "string" }, "id": { "type": "integer" }, "intro": { "type": "string" }, "invisible": { "type": "boolean" }, "key": { "type": "string" }, "last_login": { "type": "integer" }, "name": { "type": "string" }, "org_ids": { "type": "array", "items": { "type": "integer" } }, "password": { "type": "string" }, "point": { "type": "integer" }, "role": { "$ref": "#/definitions/model.UserRole" }, "updated_at": { "type": "integer" }, "web_notify": { "type": "boolean" } } }, "model.UserInfo": { "type": "object", "properties": { "auth_type": { "type": "integer" }, "avatar": { "type": "string" }, "builtin": { "type": "boolean" }, "cors": { "type": "boolean" }, "email": { "type": "string" }, "intro": { "type": "string" }, "key": { "type": "string" }, "no_password": { "type": "boolean" }, "org_ids": { "type": "array", "items": { "type": "integer" } }, "point": { "type": "integer" }, "role": { "$ref": "#/definitions/model.UserRole" }, "uid": { "type": "integer" }, "username": { "type": "string" }, "web_notify": { "type": "boolean" } } }, "model.UserNotiySub": { "type": "object", "properties": { "created_at": { "type": "integer" }, "id": { "type": "integer" }, "third_id": { "type": "string" }, "type": { "$ref": "#/definitions/model.MessageNotifySubType" }, "updated_at": { "type": "integer" }, "user_id": { "type": "integer" } } }, "model.UserPointRecord": { "type": "object", "properties": { "created_at": { "type": "integer" }, "foreign": { "type": "integer" }, "from_id": { "type": "integer" }, "id": { "type": "integer" }, "point": { "type": "integer" }, "revoke_id": { "type": "integer" }, "type": { "$ref": "#/definitions/model.UserPointType" }, "updated_at": { "type": "integer" }, "user_id": { "type": "integer" } } }, "model.UserPointType": { "type": "integer", "enum": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ], "x-enum-comments": { "UserPointTypeAcceptAnswer": "采纳别人回答", "UserPointTypeAnswerAccepted": "回答被采纳", "UserPointTypeAnswerDisliked": "回答被点踩", "UserPointTypeDislikeAnswer": "点踩别人回答" }, "x-enum-descriptions": [ "", "回答被采纳", "", "", "", "采纳别人回答", "", "回答被点踩", "点踩别人回答", "", "", "" ], "x-enum-varnames": [ "UserPointTypeCreateBlog", "UserPointTypeAnswerAccepted", "UserPointTypeLikeBlog", "UserPointTypeAnswerLiked", "UserPointTypeAssociateIssue", "UserPointTypeAcceptAnswer", "UserPointTypeAnswerQA", "UserPointTypeAnswerDisliked", "UserPointTypeDislikeAnswer", "UserPointTypeUserRole", "UserPointTypeUserAvatar", "UserPointTypeUserIntro" ] }, "model.UserQuickReply": { "type": "object", "properties": { "content": { "type": "string" }, "created_at": { "type": "integer" }, "id": { "type": "integer" }, "index": { "type": "integer" }, "name": { "type": "string" }, "updated_at": { "type": "integer" }, "user_id": { "type": "integer" } } }, "model.UserReviewWithUser": { "type": "object", "properties": { "auth_type": { "type": "integer" }, "created_at": { "type": "integer" }, "id": { "type": "integer" }, "reason": { "type": "string" }, "state": { "type": "integer" }, "type": { "type": "integer" }, "updated_at": { "type": "integer" }, "user_avatar": { "type": "string" }, "user_email": { "type": "string" }, "user_id": { "type": "integer" }, "user_name": { "type": "string" } } }, "model.UserRole": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5 ], "x-enum-varnames": [ "UserRoleUnknown", "UserRoleAdmin", "UserRoleOperator", "UserRoleUser", "UserRoleGuest", "UserRoleMax" ] }, "model.UserSearchHistory": { "type": "object", "properties": { "created_at": { "type": "integer" }, "id": { "type": "integer" }, "keyword": { "type": "string" }, "updated_at": { "type": "integer" }, "user_id": { "type": "integer" }, "user_role": { "$ref": "#/definitions/model.UserRole" }, "username": { "type": "string" } } }, "model.Webhook": { "type": "object", "required": [ "type", "url" ], "properties": { "created_at": { "type": "integer" }, "id": { "type": "integer" }, "msg_types": { "type": "array", "items": { "type": "integer" } }, "name": { "type": "string" }, "sign": { "type": "string" }, "type": { "maximum": 2, "minimum": 1, "allOf": [ { "$ref": "#/definitions/model.WebhookType" } ] }, "updated_at": { "type": "integer" }, "url": { "type": "string" } } }, "model.WebhookConfig": { "type": "object", "required": [ "type", "url" ], "properties": { "msg_types": { "type": "array", "items": { "type": "integer" } }, "sign": { "type": "string" }, "type": { "maximum": 2, "minimum": 1, "allOf": [ { "$ref": "#/definitions/model.WebhookType" } ] }, "url": { "type": "string" } } }, "model.WebhookType": { "type": "integer", "enum": [ 1, 2 ], "x-enum-varnames": [ "WebhookTypeDingtalk", "WebhookTypeHTTP" ] }, "platform.PlatformType": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], "x-enum-varnames": [ "PlatformUnknown", "PlatformConfluence", "PlatformFeishu", "PlatformFile", "PlatformNotion", "PlatformSitemap", "PlatformURL", "PlatformWikiJS", "PlatformYuQue", "PlatformPandawiki", "PlatformDingtalk" ] }, "router.SystemInfoRes": { "type": "object", "properties": { "latest_version": { "type": "string" }, "version": { "type": "string" } } }, "svc.AIInsightDiscussionItem": { "type": "object", "properties": { "created_at": { "type": "integer" }, "deleted": { "type": "boolean" }, "discussion_id": { "type": "string" }, "id": { "type": "integer" }, "rank_id": { "type": "integer" }, "title": { "type": "string" }, "updated_at": { "type": "integer" } } }, "svc.ActiveModelReq": { "type": "object", "properties": { "active": { "type": "boolean" } } }, "svc.AnydocListRes": { "type": "object", "properties": { "docs": { "type": "array", "items": { "$ref": "#/definitions/anydoc.ListDoc" } }, "uuid": { "type": "string" } } }, "svc.AssociateDiscussionReq": { "type": "object", "properties": { "content": { "type": "string" }, "group_ids": { "type": "array", "items": { "type": "integer" } }, "issue_uuid": { "type": "string" }, "title": { "type": "string" } } }, "svc.AuthFrontendGetAuth": { "type": "object", "properties": { "button_desc": { "type": "string" }, "type": { "type": "integer" } } }, "svc.AuthFrontendGetRes": { "type": "object", "properties": { "auth_types": { "type": "array", "items": { "$ref": "#/definitions/svc.AuthFrontendGetAuth" } }, "enable_register": { "type": "boolean" }, "prompt": { "type": "string" }, "public_access": { "type": "boolean" } } }, "svc.BotGetRes": { "type": "object", "properties": { "avatar": { "type": "string" }, "name": { "type": "string" }, "unknown_prompt": { "type": "string" }, "user_id": { "type": "integer" } } }, "svc.CheckModelRes": { "type": "object", "properties": { "content": { "type": "string" }, "error": { "type": "string" } } }, "svc.CommentCreateReq": { "type": "object", "required": [ "content" ], "properties": { "comment_id": { "type": "integer" }, "content": { "type": "string" } } }, "svc.CommentUpdateReq": { "type": "object", "required": [ "content" ], "properties": { "content": { "type": "string" } } }, "svc.CreateSpaceFolderReq": { "type": "object", "required": [ "docs" ], "properties": { "docs": { "type": "array", "items": { "$ref": "#/definitions/svc.CreateSpaceForlderItem" } } } }, "svc.CreateSpaceForlderItem": { "type": "object", "required": [ "doc_id" ], "properties": { "doc_id": { "type": "string" }, "folders": { "$ref": "#/definitions/model.CreateSpaceFolderInfo" }, "title": { "type": "string" } } }, "svc.CreateSpaceReq": { "type": "object", "required": [ "title" ], "properties": { "opt": { "$ref": "#/definitions/model.PlatformOpt" }, "platform": { "$ref": "#/definitions/platform.PlatformType" }, "title": { "type": "string" } } }, "svc.DiscussUploadFileReq": { "type": "object", "properties": { "uuid": { "type": "string" } } }, "svc.DiscussionCompeletReq": { "type": "object", "properties": { "prefix": { "type": "string" }, "suffix": { "type": "string" } } }, "svc.DiscussionContentSummaryReq": { "type": "object", "required": [ "content", "title" ], "properties": { "content": { "type": "string" }, "title": { "type": "string" } } }, "svc.DiscussionCreateReq": { "type": "object", "required": [ "title" ], "properties": { "content": { "type": "string" }, "forum_id": { "type": "integer" }, "group_ids": { "type": "array", "items": { "type": "integer" } }, "summary": { "type": "string" }, "title": { "type": "string" }, "type": { "$ref": "#/definitions/model.DiscussionType" } } }, "svc.DiscussionListFilter": { "type": "string", "enum": [ "hot", "new", "publish" ], "x-enum-varnames": [ "DiscussionListFilterHot", "DiscussionListFilterNew", "DiscussionListFilterPublish" ] }, "svc.DiscussionListFollowRes": { "type": "object", "properties": { "followed": { "type": "boolean" }, "follower": { "type": "integer" } } }, "svc.DiscussionUpdateReq": { "type": "object", "properties": { "content": { "type": "string" }, "group_ids": { "type": "array", "items": { "type": "integer" } }, "summary": { "type": "string" }, "title": { "type": "string" } } }, "svc.DocCreateQAReq": { "type": "object", "required": [ "markdown", "title" ], "properties": { "ai_insight_id": { "type": "integer" }, "desc": { "type": "string" }, "markdown": { "type": "string" }, "title": { "type": "string" } } }, "svc.DocListItem": { "type": "object", "properties": { "created_at": { "type": "integer" }, "desc": { "type": "string" }, "doc_id": { "type": "string" }, "file_type": { "$ref": "#/definitions/model.FileType" }, "group_ids": { "type": "array", "items": { "type": "integer" } }, "id": { "type": "integer" }, "parent_id": { "type": "integer" }, "platform": { "$ref": "#/definitions/platform.PlatformType" }, "similar_id": { "type": "integer" }, "status": { "$ref": "#/definitions/model.DocStatus" }, "title": { "type": "string" }, "updated_at": { "type": "integer" } } }, "svc.DocUpdateReq": { "type": "object", "required": [ "title" ], "properties": { "desc": { "type": "string" }, "markdown": { "type": "string" }, "title": { "type": "string" } } }, "svc.FeishuAuthURLReq": { "type": "object", "required": [ "client_id", "client_secret", "kb_id", "name" ], "properties": { "client_id": { "type": "string" }, "client_secret": { "type": "string" }, "id": { "type": "integer" }, "kb_id": { "type": "integer" }, "name": { "type": "string" } } }, "svc.FileExportReq": { "type": "object", "required": [ "doc_id", "kb_id", "title", "uuid" ], "properties": { "desc": { "type": "string" }, "doc_id": { "type": "string" }, "kb_id": { "type": "integer" }, "title": { "type": "string" }, "uuid": { "type": "string" } } }, "svc.ForumBlog": { "type": "object", "properties": { "id": { "type": "integer" }, "title": { "type": "string" } } }, "svc.ForumRes": { "type": "object", "required": [ "name" ], "properties": { "blog_ids": { "type": "array", "items": { "type": "integer" } }, "blogs": { "type": "array", "items": { "$ref": "#/definitions/svc.ForumBlog" } }, "groups": { "$ref": "#/definitions/model.JSONB-array_model_ForumGroups" }, "id": { "type": "integer" }, "index": { "type": "integer" }, "links": { "$ref": "#/definitions/model.JSONB-model_ForumLinks" }, "name": { "type": "string" }, "route_name": { "type": "string" }, "tag_enabled": { "type": "boolean" }, "tag_ids": { "type": "array", "items": { "type": "integer" } }, "tags": { "type": "array", "items": { "$ref": "#/definitions/svc.ForumTag" } } } }, "svc.ForumTag": { "type": "object", "properties": { "count": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" } } }, "svc.ForumUpdateReq": { "type": "object", "properties": { "forums": { "type": "array", "items": { "$ref": "#/definitions/model.ForumInfo" } } } }, "svc.GetSpaceRes": { "type": "object", "properties": { "created_at": { "type": "integer" }, "id": { "type": "integer" }, "platform": { "$ref": "#/definitions/platform.PlatformType" }, "title": { "type": "string" }, "updated_at": { "type": "integer" } } }, "svc.GroupUpdateReq": { "type": "object", "properties": { "groups": { "type": "array", "items": { "$ref": "#/definitions/model.GroupWithItem" } } } }, "svc.KBCreateReq": { "type": "object", "required": [ "name" ], "properties": { "desc": { "type": "string" }, "name": { "type": "string" } } }, "svc.KBListItem": { "type": "object", "properties": { "created_at": { "type": "integer" }, "desc": { "type": "string" }, "doc_count": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" }, "qa_count": { "type": "integer" }, "space_count": { "type": "integer" }, "updated_at": { "type": "integer" }, "web_count": { "type": "integer" } } }, "svc.KBUpdateReq": { "type": "object", "required": [ "name" ], "properties": { "desc": { "type": "string" }, "name": { "type": "string" } } }, "svc.ListAnydocNode": { "type": "object", "properties": { "children": { "type": "array", "items": { "$ref": "#/definitions/svc.ListAnydocNode" } }, "value": { "$ref": "#/definitions/anydoc.ListDoc" } } }, "svc.ListAsksRes": { "type": "object", "properties": { "bot": { "type": "boolean" }, "content": { "type": "string" }, "created_at": { "type": "integer" }, "id": { "type": "integer" }, "source": { "$ref": "#/definitions/model.AskSessionSource" }, "summary": { "type": "boolean" }, "summary_discs": { "$ref": "#/definitions/model.JSONB-array_model_AskSessionSummaryDisc" }, "updated_at": { "type": "integer" }, "user_id": { "type": "integer" }, "username": { "type": "string" }, "uuid": { "type": "string" } } }, "svc.ListRemoteReq": { "type": "object", "properties": { "opt": { "$ref": "#/definitions/model.PlatformOpt" }, "platform": { "$ref": "#/definitions/platform.PlatformType" }, "remote_folder_id": { "type": "string" }, "remote_sub_folder_id": { "type": "string" }, "shallow": { "type": "boolean" } } }, "svc.ListSpaceFolderItem": { "type": "object", "properties": { "created_at": { "type": "integer" }, "doc_id": { "type": "string" }, "failed": { "type": "integer" }, "id": { "type": "integer" }, "rag_id": { "type": "string" }, "status": { "$ref": "#/definitions/model.DocStatus" }, "success": { "type": "integer" }, "title": { "type": "string" }, "total": { "type": "integer" }, "updated_at": { "type": "integer" } } }, "svc.ListSpaceItem": { "type": "object", "properties": { "created_at": { "type": "integer" }, "id": { "type": "integer" }, "platform": { "$ref": "#/definitions/platform.PlatformType" }, "title": { "type": "string" }, "total": { "type": "integer" }, "updated_at": { "type": "integer" } } }, "svc.ListWebItem": { "type": "object", "properties": { "created_at": { "type": "integer" }, "desc": { "type": "string" }, "file_type": { "$ref": "#/definitions/model.FileType" }, "group_ids": { "type": "array", "items": { "type": "integer" } }, "id": { "type": "integer" }, "status": { "$ref": "#/definitions/model.DocStatus" }, "title": { "type": "string" }, "updated_at": { "type": "integer" } } }, "svc.MKCreateReq": { "type": "object", "required": [ "base_url", "model", "provider", "type" ], "properties": { "api_header": { "type": "string" }, "api_key": { "type": "string" }, "api_version": { "description": "for azure openai", "type": "string" }, "base_url": { "type": "string" }, "model": { "type": "string" }, "param": { "$ref": "#/definitions/model.LLMModelParam" }, "provider": { "type": "string" }, "show_name": { "type": "string" }, "type": { "enum": [ "chat", "embedding", "rerank", "analysis", "analysis-vl" ], "allOf": [ { "$ref": "#/definitions/model.LLMType" } ] } } }, "svc.MKModelItem": { "type": "object", "properties": { "model": { "type": "string" } } }, "svc.MKSupportedReq": { "type": "object", "required": [ "base_url", "provider", "type" ], "properties": { "api_header": { "type": "string" }, "api_key": { "type": "string" }, "base_url": { "type": "string" }, "provider": { "type": "string" }, "type": { "enum": [ "chat", "embedding", "rerank", "analysis", "analysis-vl" ], "allOf": [ { "$ref": "#/definitions/model.LLMType" } ] } } }, "svc.MKSupportedRes": { "type": "object", "properties": { "error": { "type": "string" }, "models": { "type": "array", "items": { "$ref": "#/definitions/svc.MKModelItem" } } } }, "svc.MKUpdateReq": { "type": "object", "required": [ "base_url", "model", "provider", "type" ], "properties": { "api_header": { "type": "string" }, "api_key": { "type": "string" }, "api_version": { "description": "for azure openai", "type": "string" }, "base_url": { "type": "string" }, "model": { "type": "string" }, "param": { "$ref": "#/definitions/model.LLMModelParam" }, "provider": { "type": "string" }, "show_name": { "type": "string" }, "type": { "enum": [ "chat", "embedding", "rerank", "analysis", "analysis-vl" ], "allOf": [ { "$ref": "#/definitions/model.LLMType" } ] } } }, "svc.MessageNotifySubCreateReq": { "type": "object", "required": [ "type" ], "properties": { "enabled": { "type": "boolean" }, "info": { "$ref": "#/definitions/model.MessageNotifySubInfo" }, "type": { "$ref": "#/definitions/model.MessageNotifySubType" } } }, "svc.ModelKitCheckReq": { "type": "object", "required": [ "base_url", "model", "provider", "type" ], "properties": { "api_header": { "type": "string" }, "api_key": { "type": "string" }, "api_version": { "description": "for azure openai", "type": "string" }, "base_url": { "type": "string" }, "model": { "type": "string" }, "provider": { "type": "string" }, "show_name": { "type": "string" }, "type": { "enum": [ "chat", "embedding", "rerank", "analysis", "analysis-vl" ], "allOf": [ { "$ref": "#/definitions/model.LLMType" } ] } } }, "svc.NotifyReadReq": { "type": "object", "properties": { "id": { "type": "integer" } } }, "svc.OrgListItem": { "type": "object", "properties": { "builtin": { "type": "boolean" }, "count": { "type": "integer" }, "created_at": { "type": "integer" }, "forum_ids": { "type": "array", "items": { "type": "integer" } }, "forum_names": { "type": "array", "items": { "type": "string" } }, "id": { "type": "integer" }, "name": { "type": "string" }, "type": { "$ref": "#/definitions/model.OrgType" }, "updated_at": { "type": "integer" } } }, "svc.OrgUpsertReq": { "type": "object", "required": [ "name" ], "properties": { "forum_ids": { "type": "array", "items": { "type": "integer" } }, "name": { "type": "string" } } }, "svc.PolishReq": { "type": "object", "properties": { "text": { "type": "string" } } }, "svc.QuickReplyReindexReq": { "type": "object", "required": [ "ids" ], "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } }, "svc.RankContributeItem": { "type": "object", "properties": { "avatar": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "score": { "type": "number" } } }, "svc.ResolveFeedbackReq": { "type": "object", "properties": { "resolve": { "maximum": 3, "allOf": [ { "$ref": "#/definitions/model.DiscussionState" } ] } } }, "svc.ResolveIssueReq": { "type": "object", "properties": { "resolve": { "enum": [ 2, 4 ], "allOf": [ { "$ref": "#/definitions/model.DiscussionState" } ] } } }, "svc.ReviewReq": { "type": "object", "required": [ "add_new", "content", "title" ], "properties": { "add_new": { "type": "boolean" }, "content": { "type": "string" }, "title": { "type": "string" } } }, "svc.SitemapExportReq": { "type": "object", "required": [ "doc_id", "kb_id", "title", "uuid" ], "properties": { "desc": { "type": "string" }, "doc_id": { "type": "string" }, "kb_id": { "type": "integer" }, "title": { "type": "string" }, "uuid": { "type": "string" } } }, "svc.SitemapListReq": { "type": "object", "required": [ "url" ], "properties": { "url": { "type": "string" } } }, "svc.StatDiscussionItem": { "type": "object", "properties": { "count": { "type": "integer" }, "key": { "$ref": "#/definitions/model.DiscussionType" } } }, "svc.StatDiscussionRes": { "type": "object", "properties": { "accept": { "type": "integer" }, "bot_accept": { "type": "integer" }, "bot_unknown": { "type": "integer" }, "human_resp_time": { "type": "integer" } } }, "svc.StatVisitRes": { "type": "object", "properties": { "pv": { "type": "integer" }, "uv": { "type": "integer" } } }, "svc.URLExportReq": { "type": "object", "required": [ "doc_id", "kb_id", "title", "uuid" ], "properties": { "desc": { "type": "string" }, "doc_id": { "type": "string" }, "kb_id": { "type": "integer" }, "title": { "type": "string" }, "uuid": { "type": "string" } } }, "svc.URLListReq": { "type": "object", "required": [ "url" ], "properties": { "url": { "type": "string" } } }, "svc.UnbindNotifySubReq": { "type": "object", "required": [ "type" ], "properties": { "type": { "$ref": "#/definitions/model.MessageNotifySubType" } } }, "svc.UpdateGroupIDsReq": { "type": "object", "required": [ "ids", "type" ], "properties": { "group_ids": { "type": "array", "items": { "type": "integer" } }, "ids": { "type": "array", "items": { "type": "integer" } }, "type": { "$ref": "#/definitions/model.DocType" } } }, "svc.UpdatePromptReq": { "type": "object", "properties": { "prompt": { "type": "string" } } }, "svc.UpdateSpaceFolderReq": { "type": "object", "properties": { "update_type": { "$ref": "#/definitions/topic.KBSpaceUpdateType" } } }, "svc.UpdateSpaceReq": { "type": "object", "properties": { "opt": { "$ref": "#/definitions/model.PlatformOpt" }, "title": { "type": "string" } } }, "svc.UpdateWebNotifyReq": { "type": "object", "properties": { "enable": { "type": "boolean" } } }, "svc.UserJoinOrgReq": { "type": "object", "properties": { "org_ids": { "type": "array", "minItems": 1, "items": { "type": "integer" } }, "user_ids": { "type": "array", "minItems": 1, "items": { "type": "integer" } } } }, "svc.UserListItem": { "type": "object", "properties": { "avatar": { "type": "string" }, "builtin": { "type": "boolean" }, "created_at": { "type": "integer" }, "email": { "type": "string" }, "id": { "type": "integer" }, "last_login": { "type": "integer" }, "name": { "type": "string" }, "org_ids": { "type": "array", "items": { "type": "integer" } }, "org_names": { "type": "array", "items": { "type": "string" } }, "role": { "$ref": "#/definitions/model.UserRole" }, "updated_at": { "type": "integer" } } }, "svc.UserLoginReq": { "type": "object", "required": [ "email", "password" ], "properties": { "email": { "type": "string" }, "password": { "type": "string" } } }, "svc.UserQuickReplyReq": { "type": "object", "required": [ "content", "name" ], "properties": { "content": { "type": "string" }, "name": { "type": "string", "maxLength": 10 } } }, "svc.UserRegisterReq": { "type": "object", "required": [ "email", "name", "password" ], "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "password": { "type": "string" } } }, "svc.UserReviewGuestCreateReq": { "type": "object", "required": [ "reason" ], "properties": { "reason": { "type": "string" } } }, "svc.UserReviewUpdateReq": { "type": "object", "required": [ "state" ], "properties": { "state": { "type": "integer", "maximum": 2, "minimum": 1 } } }, "svc.UserStatisticsRes": { "type": "object", "properties": { "answer_count": { "type": "integer" }, "avatar": { "type": "string" }, "blog_count": { "type": "integer" }, "intro": { "type": "string" }, "name": { "type": "string" }, "point": { "type": "integer" }, "qa_count": { "type": "integer" }, "role": { "$ref": "#/definitions/model.UserRole" } } }, "svc.UserUpdateReq": { "type": "object", "properties": { "email": { "type": "string" }, "name": { "type": "string" }, "org_ids": { "type": "array", "items": { "type": "integer" } }, "password": { "type": "string" }, "role": { "maximum": 4, "minimum": 1, "allOf": [ { "$ref": "#/definitions/model.UserRole" } ] } } }, "svc.WebhookCreateReq": { "type": "object", "required": [ "name", "type", "url" ], "properties": { "msg_types": { "type": "array", "items": { "type": "integer" } }, "name": { "type": "string" }, "sign": { "type": "string" }, "type": { "maximum": 2, "minimum": 1, "allOf": [ { "$ref": "#/definitions/model.WebhookType" } ] }, "url": { "type": "string" } } }, "svc.WebhookUpdateReq": { "type": "object", "required": [ "name", "type", "url" ], "properties": { "msg_types": { "type": "array", "items": { "type": "integer" } }, "name": { "type": "string" }, "sign": { "type": "string" }, "type": { "maximum": 2, "minimum": 1, "allOf": [ { "$ref": "#/definitions/model.WebhookType" } ] }, "url": { "type": "string" } } }, "topic.KBSpaceUpdateType": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "KBSpaceUpdateTypeAll", "KBSpaceUpdateTypeIncr", "KBSpaceUpdateTypeFailed" ] } } }