mirror of https://github.com/chaitin/PandaWiki.git
9175 lines
289 KiB
JSON
9175 lines
289 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "panda-wiki API documentation",
|
|
"title": "panda-wiki API",
|
|
"contact": {},
|
|
"version": "1.0"
|
|
},
|
|
"basePath": "/",
|
|
"paths": {
|
|
"/api/v1/app": {
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Update app",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"app"
|
|
],
|
|
"summary": "Update app",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "id",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "app",
|
|
"name": "app",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.UpdateAppReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Delete app",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"app"
|
|
],
|
|
"summary": "Delete app",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb id",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "app id",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/app/detail": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Get app detail",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"app"
|
|
],
|
|
"summary": "Get app detail",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb id",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "app type",
|
|
"name": "type",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.AppDetailResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/auth/delete": {
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "删除授权信息",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "删除授权信息",
|
|
"operationId": "v1-OpenAuthDelete",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/auth/get": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "获取授权信息",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "获取授权信息",
|
|
"operationId": "v1-OpenAuthGet",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"enum": [
|
|
"dingtalk",
|
|
"feishu",
|
|
"wecom",
|
|
"oauth",
|
|
"github",
|
|
"cas",
|
|
"ldap",
|
|
"widget",
|
|
"dingtalk_bot",
|
|
"feishu_bot",
|
|
"wechat_bot",
|
|
"wechat_service_bot",
|
|
"discord_bot",
|
|
"wechat_official_account",
|
|
"openai_api"
|
|
],
|
|
"type": "string",
|
|
"x-enum-varnames": [
|
|
"SourceTypeDingTalk",
|
|
"SourceTypeFeishu",
|
|
"SourceTypeWeCom",
|
|
"SourceTypeOAuth",
|
|
"SourceTypeGitHub",
|
|
"SourceTypeCAS",
|
|
"SourceTypeLDAP",
|
|
"SourceTypeWidget",
|
|
"SourceTypeDingtalkBot",
|
|
"SourceTypeFeishuBot",
|
|
"SourceTypeWechatBot",
|
|
"SourceTypeWechatServiceBot",
|
|
"SourceTypeDiscordBot",
|
|
"SourceTypeWechatOfficialAccount",
|
|
"SourceTypeOpenAIAPI"
|
|
],
|
|
"name": "source_type",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_api_auth_v1.AuthGetResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/auth/set": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "设置授权信息",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "设置授权信息",
|
|
"operationId": "v1-OpenAuthSet",
|
|
"parameters": [
|
|
{
|
|
"description": "para",
|
|
"name": "param",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.AuthSetReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/comment": {
|
|
"get": {
|
|
"description": "GetCommentModeratedList",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"comment"
|
|
],
|
|
"summary": "GetCommentModeratedList",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"enum": [
|
|
-1,
|
|
0,
|
|
1
|
|
],
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"x-enum-varnames": [
|
|
"CommentStatusReject",
|
|
"CommentStatusPending",
|
|
"CommentStatusAccepted"
|
|
],
|
|
"name": "status",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "conversationList",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.CommentLists"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/comment/list": {
|
|
"delete": {
|
|
"description": "DeleteCommentList",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"comment"
|
|
],
|
|
"summary": "DeleteCommentList",
|
|
"parameters": [
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"collectionFormat": "csv",
|
|
"name": "ids",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "total",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/conversation": {
|
|
"get": {
|
|
"description": "get conversation list",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"conversation"
|
|
],
|
|
"summary": "get conversation list",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "app_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "remote_ip",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "subject",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.ConversationListItems"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/conversation/detail": {
|
|
"get": {
|
|
"description": "get conversation detail",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"conversation"
|
|
],
|
|
"summary": "get conversation detail",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.ConversationDetailResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/conversation/message/detail": {
|
|
"get": {
|
|
"description": "Get message detail",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "Get message detail",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.ConversationMessage"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/conversation/message/list": {
|
|
"get": {
|
|
"description": "GetMessageFeedBackList",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Message"
|
|
],
|
|
"summary": "GetMessageFeedBackList",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer",
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"minimum": 1,
|
|
"type": "integer",
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "MessageList",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.PaginatedResult-array_domain_ConversationMessageListItem"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/confluence/parse": {
|
|
"post": {
|
|
"description": "Parse Confluence Export File and return document list",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "ConfluenceParse",
|
|
"parameters": [
|
|
{
|
|
"type": "file",
|
|
"description": "file",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "kb_id",
|
|
"name": "kb_id",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.ConfluenceParseResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/confluence/scrape": {
|
|
"post": {
|
|
"description": "Scrape specific Confluence documents by ID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "ConfluenceScrape",
|
|
"parameters": [
|
|
{
|
|
"description": "Scrape Request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.ConfluenceScrapeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.ConfluenceScrapeResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/epub/parse": {
|
|
"post": {
|
|
"description": "EpubParse",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "EpubParse",
|
|
"parameters": [
|
|
{
|
|
"description": "Parse URL",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.EpubParseReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.EpubParseResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/feishu/get_doc": {
|
|
"post": {
|
|
"description": "Get Docx in Feishu Spaces",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "FeishuDoc",
|
|
"parameters": [
|
|
{
|
|
"description": "Get Docx",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.FeishuGetDocReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.FeishuGetDocResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/feishu/list_doc": {
|
|
"post": {
|
|
"description": "List Docx in Feishu Spaces",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "FeishuListCloudDoc",
|
|
"parameters": [
|
|
{
|
|
"description": "Search Docx",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.FeishuListCloudDocReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.FeishuListCloudDocResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/feishu/list_spaces": {
|
|
"post": {
|
|
"description": "List All Feishu Spaces",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "FeishuListSpaces",
|
|
"parameters": [
|
|
{
|
|
"description": "List Spaces",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.FeishuSpaceListReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.FeishuSpaceListResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/feishu/search_wiki": {
|
|
"post": {
|
|
"description": "Search Wiki in Feishu Spaces",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "FeishuWikiSearch",
|
|
"parameters": [
|
|
{
|
|
"description": "Search Wiki",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.FeishuSearchWikiReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.FeishuSearchWikiResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/mindoc/parse": {
|
|
"post": {
|
|
"description": "Parse Mindoc Export File and return document list",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "MindocParse",
|
|
"parameters": [
|
|
{
|
|
"type": "file",
|
|
"description": "file",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "kb_id",
|
|
"name": "kb_id",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.MindocParseResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/mindoc/scrape": {
|
|
"post": {
|
|
"description": "Scrape specific Mindoc documents by ID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "MindocScrape",
|
|
"parameters": [
|
|
{
|
|
"description": "Scrape Request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.MindocScrapeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.MindocScrapeResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/notion/parse": {
|
|
"post": {
|
|
"description": "NotionParse",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "NotionParse",
|
|
"parameters": [
|
|
{
|
|
"description": "Scrape",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.NotionParseReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.NotionParseResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/notion/scrape": {
|
|
"post": {
|
|
"description": "NotionScrape",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "NotionScrape",
|
|
"parameters": [
|
|
{
|
|
"description": "Get Docs",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.NotionScrapeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.NotionScrapeResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/result": {
|
|
"get": {
|
|
"description": "Retrieve the result of a previously started scraping task",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "Get Crawler Result",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "task_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.CrawlerResultResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/results": {
|
|
"post": {
|
|
"description": "Retrieve the results of a previously started scraping task",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "Get Crawler Results",
|
|
"parameters": [
|
|
{
|
|
"description": "Crawler Results Request",
|
|
"name": "param",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.CrawlerResultsReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.CrawlerResultsResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/rss/parse": {
|
|
"post": {
|
|
"description": "Parse RSS",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "Parse RSS",
|
|
"parameters": [
|
|
{
|
|
"description": "Parse URL",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.RssParseReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.RssParseResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/rss/scrape": {
|
|
"post": {
|
|
"description": "RSSScrape",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "RSSScrape",
|
|
"parameters": [
|
|
{
|
|
"description": "Parse URL",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.RssScrapeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.RssScrapeResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/scrape": {
|
|
"post": {
|
|
"description": "Scrape",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "Scrape",
|
|
"parameters": [
|
|
{
|
|
"description": "Scrape",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.ScrapeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.ScrapeResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/sitemap/parse": {
|
|
"post": {
|
|
"description": "Parse Sitemap",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "Parse Sitemap",
|
|
"parameters": [
|
|
{
|
|
"description": "Parse URL",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.SitemapParseReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.SitemapParseResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/sitemap/scrape": {
|
|
"post": {
|
|
"description": "SitemapScrape",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "SitemapScrape",
|
|
"parameters": [
|
|
{
|
|
"description": "Parse URL",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.SitemapScrapeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.SitemapScrapeResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/siyuan/parse": {
|
|
"post": {
|
|
"description": "Parse Siyuan Export File and return document list",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "SiyuanParse",
|
|
"parameters": [
|
|
{
|
|
"type": "file",
|
|
"description": "file",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "kb_id",
|
|
"name": "kb_id",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.SiyuanParseResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/siyuan/scrape": {
|
|
"post": {
|
|
"description": "Scrape specific Siyuan documents by ID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "SiyuanScrape",
|
|
"parameters": [
|
|
{
|
|
"description": "Scrape Request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.SiyuanScrapeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.SiyuanScrapeResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/wikijs/parse": {
|
|
"post": {
|
|
"description": "Parse Wikijs Export File and return document list",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "WikijsParse",
|
|
"parameters": [
|
|
{
|
|
"type": "file",
|
|
"description": "file",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "kb_id",
|
|
"name": "kb_id",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.WikijsParseResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/wikijs/scrape": {
|
|
"post": {
|
|
"description": "Scrape specific Wikijs documents by ID",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "WikijsScrape",
|
|
"parameters": [
|
|
{
|
|
"description": "Scrape Request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.WikijsScrapeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.WikijsScrapeResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/crawler/yuque/parse": {
|
|
"post": {
|
|
"description": "YuqueParse",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"crawler"
|
|
],
|
|
"summary": "YuqueParse",
|
|
"parameters": [
|
|
{
|
|
"description": "Parse URL",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.YuqueParseReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.YuqueParseResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/creation/tab-complete": {
|
|
"post": {
|
|
"description": "Tab-based document completion similar to AI coding's FIM (Fill in Middle)",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"creation"
|
|
],
|
|
"summary": "Tab-based document completion",
|
|
"parameters": [
|
|
{
|
|
"description": "tab completion request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CompleteReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "success",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/creation/text": {
|
|
"post": {
|
|
"description": "Text creation",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"creation"
|
|
],
|
|
"summary": "Text creation",
|
|
"parameters": [
|
|
{
|
|
"description": "text creation request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.TextReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "success",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/file/upload": {
|
|
"post": {
|
|
"description": "Upload File",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"tags": [
|
|
"file"
|
|
],
|
|
"summary": "Upload File",
|
|
"parameters": [
|
|
{
|
|
"type": "file",
|
|
"description": "File",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Knowledge Base ID",
|
|
"name": "kb_id",
|
|
"in": "formData"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ObjectUploadResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/file/upload/anydoc": {
|
|
"post": {
|
|
"description": "Upload Anydoc File",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"tags": [
|
|
"file"
|
|
],
|
|
"summary": "Upload Anydoc File",
|
|
"parameters": [
|
|
{
|
|
"type": "file",
|
|
"description": "File",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "File Path",
|
|
"name": "path",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.AnydocUploadResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/knowledge_base": {
|
|
"post": {
|
|
"description": "CreateKnowledgeBase",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"knowledge_base"
|
|
],
|
|
"summary": "CreateKnowledgeBase",
|
|
"parameters": [
|
|
{
|
|
"description": "CreateKnowledgeBase Request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateKnowledgeBaseReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/knowledge_base/detail": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "GetKnowledgeBaseDetail",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"knowledge_base"
|
|
],
|
|
"summary": "GetKnowledgeBaseDetail",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Knowledge Base ID",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.KnowledgeBaseDetail"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "UpdateKnowledgeBase",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"knowledge_base"
|
|
],
|
|
"summary": "UpdateKnowledgeBase",
|
|
"parameters": [
|
|
{
|
|
"description": "UpdateKnowledgeBase Request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.UpdateKnowledgeBaseReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "DeleteKnowledgeBase",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"knowledge_base"
|
|
],
|
|
"summary": "DeleteKnowledgeBase",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Knowledge Base ID",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/knowledge_base/list": {
|
|
"get": {
|
|
"description": "GetKnowledgeBaseList",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"knowledge_base"
|
|
],
|
|
"summary": "GetKnowledgeBaseList",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.KnowledgeBaseListItem"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/knowledge_base/release": {
|
|
"post": {
|
|
"description": "CreateKBRelease",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"knowledge_base"
|
|
],
|
|
"summary": "CreateKBRelease",
|
|
"parameters": [
|
|
{
|
|
"description": "CreateKBRelease Request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateKBReleaseReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/knowledge_base/release/list": {
|
|
"get": {
|
|
"description": "GetKBReleaseList",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"knowledge_base"
|
|
],
|
|
"summary": "GetKBReleaseList",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Knowledge Base ID",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.GetKBReleaseListResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/knowledge_base/user/delete": {
|
|
"delete": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Remove user from knowledge base",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"knowledge_base"
|
|
],
|
|
"summary": "KBUserDelete",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "user_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/knowledge_base/user/invite": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Invite user to knowledge base",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"knowledge_base"
|
|
],
|
|
"summary": "KBUserInvite",
|
|
"parameters": [
|
|
{
|
|
"description": "Invite User Request",
|
|
"name": "param",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.KBUserInviteReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/knowledge_base/user/list": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "KBUserList",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"knowledge_base"
|
|
],
|
|
"summary": "KBUserList",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Knowledge Base ID",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.KBUserListItemResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/knowledge_base/user/update": {
|
|
"patch": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Update user permission in knowledge base",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"knowledge_base"
|
|
],
|
|
"summary": "KBUserUpdate",
|
|
"parameters": [
|
|
{
|
|
"description": "Update User Permission Request",
|
|
"name": "param",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.KBUserUpdateReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/model": {
|
|
"put": {
|
|
"description": "update model",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"model"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "update model request",
|
|
"name": "model",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.UpdateModelReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "create model",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"model"
|
|
],
|
|
"summary": "create model",
|
|
"parameters": [
|
|
{
|
|
"description": "create model request",
|
|
"name": "model",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateModelReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/model/check": {
|
|
"post": {
|
|
"description": "check model",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"model"
|
|
],
|
|
"summary": "check model",
|
|
"parameters": [
|
|
{
|
|
"description": "check model request",
|
|
"name": "model",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_domain.CheckModelReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_domain.CheckModelResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/model/list": {
|
|
"get": {
|
|
"description": "get model list",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"model"
|
|
],
|
|
"summary": "get model list",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_domain.ModelListItem"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/model/provider/supported": {
|
|
"post": {
|
|
"description": "get provider supported model list",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"model"
|
|
],
|
|
"summary": "get provider supported model list",
|
|
"parameters": [
|
|
{
|
|
"description": "get supported model list request",
|
|
"name": "params",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.GetProviderModelListReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.GetProviderModelListResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/node": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Create Node",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"summary": "Create Node",
|
|
"parameters": [
|
|
{
|
|
"description": "Node",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CreateNodeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/node/action": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Node Action",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"summary": "Node Action",
|
|
"parameters": [
|
|
{
|
|
"description": "Action",
|
|
"name": "action",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.NodeActionReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/node/batch_move": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Batch Move Node",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"summary": "Batch Move Node",
|
|
"parameters": [
|
|
{
|
|
"description": "Batch Move Node",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.BatchMoveReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/node/detail": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Get Node Detail",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"summary": "Get Node Detail",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "format",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.NodeDetailResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Update Node Detail",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"summary": "Update Node Detail",
|
|
"parameters": [
|
|
{
|
|
"description": "Node",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.UpdateNodeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/node/list": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Get Node List",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"summary": "Get Node List",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "search",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.NodeListItemResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/node/move": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Move Node",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"summary": "Move Node",
|
|
"parameters": [
|
|
{
|
|
"description": "Move Node",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.MoveNodeReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/node/permission": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "文档授权信息获取",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"NodePermission"
|
|
],
|
|
"summary": "文档授权信息获取",
|
|
"operationId": "v1-NodePermission",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.NodePermissionResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/node/permission/edit": {
|
|
"patch": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "文档授权信息更新",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"NodePermission"
|
|
],
|
|
"summary": "文档授权信息更新",
|
|
"operationId": "v1-NodePermissionEdit",
|
|
"parameters": [
|
|
{
|
|
"description": "para",
|
|
"name": "param",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.NodePermissionEditReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.NodePermissionEditResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/node/recommend_nodes": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Recommend Nodes",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"summary": "Recommend Nodes",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"collectionFormat": "csv",
|
|
"name": "node_ids",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.RecommendNodeListResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/node/summary": {
|
|
"post": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "Summary Node",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"summary": "Summary Node",
|
|
"parameters": [
|
|
{
|
|
"description": "Summary Node",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.NodeSummaryReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/stat/browsers": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "客户端统计",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"summary": "客户端统计",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
1,
|
|
7,
|
|
30,
|
|
90
|
|
],
|
|
"type": "integer",
|
|
"x-enum-varnames": [
|
|
"StatDay1",
|
|
"StatDay7",
|
|
"StatDay30",
|
|
"StatDay90"
|
|
],
|
|
"name": "day",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.HotBrowser"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/stat/conversation_distribution": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "问答来源",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"summary": "问答来源",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
1,
|
|
7,
|
|
30,
|
|
90
|
|
],
|
|
"type": "integer",
|
|
"x-enum-varnames": [
|
|
"StatDay1",
|
|
"StatDay7",
|
|
"StatDay30",
|
|
"StatDay90"
|
|
],
|
|
"name": "day",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ConversationDistribution"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/stat/count": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "全局统计",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"summary": "全局统计",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
1,
|
|
7,
|
|
30,
|
|
90
|
|
],
|
|
"type": "integer",
|
|
"x-enum-varnames": [
|
|
"StatDay1",
|
|
"StatDay7",
|
|
"StatDay30",
|
|
"StatDay90"
|
|
],
|
|
"name": "day",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.StatCountResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/stat/geo_count": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "用户地理分布",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"summary": "用户地理分布",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
1,
|
|
7,
|
|
30,
|
|
90
|
|
],
|
|
"type": "integer",
|
|
"x-enum-varnames": [
|
|
"StatDay1",
|
|
"StatDay7",
|
|
"StatDay30",
|
|
"StatDay90"
|
|
],
|
|
"name": "day",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/stat/hot_pages": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "热门文档",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"summary": "热门文档",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
1,
|
|
7,
|
|
30,
|
|
90
|
|
],
|
|
"type": "integer",
|
|
"x-enum-varnames": [
|
|
"StatDay1",
|
|
"StatDay7",
|
|
"StatDay30",
|
|
"StatDay90"
|
|
],
|
|
"name": "day",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.HotPage"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/stat/instant_count": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "GetInstantCount",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"summary": "GetInstantCount",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.InstantCountResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/stat/instant_pages": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "GetInstantPages",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"summary": "GetInstantPages",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.InstantPageResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/stat/referer_hosts": {
|
|
"get": {
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"description": "来源域名",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"summary": "来源域名",
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
1,
|
|
7,
|
|
30,
|
|
90
|
|
],
|
|
"type": "integer",
|
|
"x-enum-varnames": [
|
|
"StatDay1",
|
|
"StatDay7",
|
|
"StatDay30",
|
|
"StatDay90"
|
|
],
|
|
"name": "day",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "kb_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.HotRefererHost"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user": {
|
|
"get": {
|
|
"description": "GetUser",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "GetUser",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.UserInfoResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/create": {
|
|
"post": {
|
|
"description": "CreateUser",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "CreateUser",
|
|
"parameters": [
|
|
{
|
|
"description": "CreateUser Request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.CreateUserReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.CreateUserResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/delete": {
|
|
"delete": {
|
|
"description": "DeleteUser",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "DeleteUser",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "user_id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/list": {
|
|
"get": {
|
|
"description": "ListUsers",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "ListUsers",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.UserListResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/login": {
|
|
"post": {
|
|
"description": "Login",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "Login",
|
|
"parameters": [
|
|
{
|
|
"description": "Login Request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.LoginReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.LoginResp"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v1/user/reset_password": {
|
|
"put": {
|
|
"description": "ResetPassword",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"user"
|
|
],
|
|
"summary": "ResetPassword",
|
|
"parameters": [
|
|
{
|
|
"description": "ResetPassword Request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.ResetPasswordReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/app/web/info": {
|
|
"get": {
|
|
"description": "GetAppInfo",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_app"
|
|
],
|
|
"summary": "GetAppInfo",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb id",
|
|
"name": "X-KB-ID",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.AppInfoResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/app/wechat/service/answer": {
|
|
"get": {
|
|
"description": "GetWechatAnswer",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"Wechat"
|
|
],
|
|
"summary": "GetWechatAnswer",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "conversation id",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/app/widget/info": {
|
|
"get": {
|
|
"description": "GetWidgetAppInfo",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_app"
|
|
],
|
|
"summary": "GetWidgetAppInfo",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb id",
|
|
"name": "X-KB-ID",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/auth/get": {
|
|
"get": {
|
|
"description": "AuthGet",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_auth"
|
|
],
|
|
"summary": "AuthGet",
|
|
"operationId": "v1-AuthGet",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb_id",
|
|
"name": "X-KB-ID",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_api_share_v1.AuthGetResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/auth/github": {
|
|
"post": {
|
|
"description": "GitHub登录",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ShareAuth"
|
|
],
|
|
"summary": "GitHub登录",
|
|
"operationId": "v1-AuthGitHub",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb id",
|
|
"name": "X-KB-ID",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "para",
|
|
"name": "param",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.AuthGitHubReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.AuthGitHubResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/auth/login/simple": {
|
|
"post": {
|
|
"description": "AuthLoginSimple",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_auth"
|
|
],
|
|
"summary": "AuthLoginSimple",
|
|
"operationId": "v1-AuthLoginSimple",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb_id",
|
|
"name": "X-KB-ID",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "para",
|
|
"name": "param",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/v1.AuthLoginSimpleReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/captcha/challenge": {
|
|
"post": {
|
|
"description": "CreateCaptcha",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_captcha"
|
|
],
|
|
"summary": "CreateCaptcha",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb id",
|
|
"name": "X-KB-ID",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/gocap.ChallengeData"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/captcha/redeem": {
|
|
"post": {
|
|
"description": "RedeemCaptcha",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_captcha"
|
|
],
|
|
"summary": "RedeemCaptcha",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb id",
|
|
"name": "X-KB-ID",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/consts.RedeemCaptchaReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/gocap.VerificationResult"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/chat/completions": {
|
|
"post": {
|
|
"description": "OpenAI API compatible chat completions endpoint",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_chat"
|
|
],
|
|
"summary": "ChatCompletions",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Knowledge Base ID",
|
|
"name": "X-KB-ID",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "OpenAI API request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.OpenAICompletionsRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.OpenAICompletionsResponse"
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.OpenAIErrorResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/chat/feedback": {
|
|
"post": {
|
|
"description": "Process user feedback for chat conversations",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_chat"
|
|
],
|
|
"summary": "Handle chat feedback",
|
|
"parameters": [
|
|
{
|
|
"description": "feedback request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.FeedbackRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/chat/message": {
|
|
"post": {
|
|
"description": "ChatMessage",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_chat"
|
|
],
|
|
"summary": "ChatMessage",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "app type",
|
|
"name": "app_type",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ChatRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/chat/search": {
|
|
"post": {
|
|
"description": "ChatSearch",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_chat_search"
|
|
],
|
|
"summary": "ChatSearch",
|
|
"parameters": [
|
|
{
|
|
"description": "request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ChatSearchReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.ChatSearchResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/chat/widget": {
|
|
"post": {
|
|
"description": "ChatWidget",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_chat"
|
|
],
|
|
"summary": "ChatWidget",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "app type",
|
|
"name": "app_type",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.ChatRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/comment": {
|
|
"post": {
|
|
"description": "CreateComment",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_comment"
|
|
],
|
|
"summary": "CreateComment",
|
|
"parameters": [
|
|
{
|
|
"description": "Comment",
|
|
"name": "comment",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.CommentReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "CommentID",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/comment/list": {
|
|
"get": {
|
|
"description": "GetCommentList",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_comment"
|
|
],
|
|
"summary": "GetCommentList",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "nodeID",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "CommentList",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/share.ShareCommentLists"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/conversation/detail": {
|
|
"get": {
|
|
"description": "GetConversationDetail",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_conversation"
|
|
],
|
|
"summary": "GetConversationDetail",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb id",
|
|
"name": "X-KB-ID",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "conversation id",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/domain.ShareConversationDetailResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/node/detail": {
|
|
"get": {
|
|
"description": "GetNodeDetail",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_node"
|
|
],
|
|
"summary": "GetNodeDetail",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb id",
|
|
"name": "X-KB-ID",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "node id",
|
|
"name": "id",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "format",
|
|
"name": "format",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/node/list": {
|
|
"get": {
|
|
"description": "GetNodeList",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_node"
|
|
],
|
|
"summary": "GetNodeList",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb id",
|
|
"name": "X-KB-ID",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/node/recommend/list": {
|
|
"get": {
|
|
"description": "推荐卡片列表",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_node"
|
|
],
|
|
"summary": "推荐卡片列表",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "kb id",
|
|
"name": "X-KB-ID",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.Response"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/v1.NodeRecommendListResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/openapi/github/callback": {
|
|
"get": {
|
|
"description": "GitHub回调",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"ShareOpenapi"
|
|
],
|
|
"summary": "GitHub回调",
|
|
"operationId": "v1-GitHubCallback",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"name": "code",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"name": "state",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.PWResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_api_share_v1.GitHubCallbackResp"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/v1/stat/page": {
|
|
"post": {
|
|
"description": "RecordPage",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"share_stat"
|
|
],
|
|
"summary": "RecordPage",
|
|
"parameters": [
|
|
{
|
|
"description": "request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.StatPageReq"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/domain.Response"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"consts.AuthType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"",
|
|
"simple",
|
|
"enterprise"
|
|
],
|
|
"x-enum-comments": {
|
|
"AuthTypeEnterprise": "企业认证",
|
|
"AuthTypeNull": "无认证",
|
|
"AuthTypeSimple": "简单口令"
|
|
},
|
|
"x-enum-descriptions": [
|
|
"无认证",
|
|
"简单口令",
|
|
"企业认证"
|
|
],
|
|
"x-enum-varnames": [
|
|
"AuthTypeNull",
|
|
"AuthTypeSimple",
|
|
"AuthTypeEnterprise"
|
|
]
|
|
},
|
|
"consts.CopySetting": {
|
|
"type": "string",
|
|
"enum": [
|
|
"",
|
|
"append",
|
|
"disabled"
|
|
],
|
|
"x-enum-comments": {
|
|
"CopySettingAppend": "增加内容尾巴",
|
|
"CopySettingDisabled": "禁止复制内容",
|
|
"CopySettingNone": "无限制"
|
|
},
|
|
"x-enum-descriptions": [
|
|
"无限制",
|
|
"增加内容尾巴",
|
|
"禁止复制内容"
|
|
],
|
|
"x-enum-varnames": [
|
|
"CopySettingNone",
|
|
"CopySettingAppend",
|
|
"CopySettingDisabled"
|
|
]
|
|
},
|
|
"consts.CrawlerStatus": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"in_process",
|
|
"completed",
|
|
"failed"
|
|
],
|
|
"x-enum-varnames": [
|
|
"CrawlerStatusPending",
|
|
"CrawlerStatusInProcess",
|
|
"CrawlerStatusCompleted",
|
|
"CrawlerStatusFailed"
|
|
]
|
|
},
|
|
"consts.HomePageSetting": {
|
|
"type": "string",
|
|
"enum": [
|
|
"doc",
|
|
"custom"
|
|
],
|
|
"x-enum-comments": {
|
|
"HomePageSettingCustom": "自定义首页",
|
|
"HomePageSettingDoc": "文档页面"
|
|
},
|
|
"x-enum-descriptions": [
|
|
"文档页面",
|
|
"自定义首页"
|
|
],
|
|
"x-enum-varnames": [
|
|
"HomePageSettingDoc",
|
|
"HomePageSettingCustom"
|
|
]
|
|
},
|
|
"consts.LicenseEdition": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2
|
|
],
|
|
"x-enum-comments": {
|
|
"LicenseEditionContributor": "联创版",
|
|
"LicenseEditionEnterprise": "企业版",
|
|
"LicenseEditionFree": "开源版"
|
|
},
|
|
"x-enum-descriptions": [
|
|
"开源版",
|
|
"联创版",
|
|
"企业版"
|
|
],
|
|
"x-enum-varnames": [
|
|
"LicenseEditionFree",
|
|
"LicenseEditionContributor",
|
|
"LicenseEditionEnterprise"
|
|
]
|
|
},
|
|
"consts.NodeAccessPerm": {
|
|
"type": "string",
|
|
"enum": [
|
|
"open",
|
|
"partial",
|
|
"closed"
|
|
],
|
|
"x-enum-comments": {
|
|
"NodeAccessPermClosed": "完全禁止",
|
|
"NodeAccessPermOpen": "完全开放",
|
|
"NodeAccessPermPartial": "部分开放"
|
|
},
|
|
"x-enum-descriptions": [
|
|
"完全开放",
|
|
"部分开放",
|
|
"完全禁止"
|
|
],
|
|
"x-enum-varnames": [
|
|
"NodeAccessPermOpen",
|
|
"NodeAccessPermPartial",
|
|
"NodeAccessPermClosed"
|
|
]
|
|
},
|
|
"consts.NodePermName": {
|
|
"type": "string",
|
|
"enum": [
|
|
"visible",
|
|
"visitable",
|
|
"answerable"
|
|
],
|
|
"x-enum-comments": {
|
|
"NodePermNameAnswerable": "可被问答",
|
|
"NodePermNameVisible": "导航内可见",
|
|
"NodePermNameVisitable": "可被访问"
|
|
},
|
|
"x-enum-descriptions": [
|
|
"导航内可见",
|
|
"可被访问",
|
|
"可被问答"
|
|
],
|
|
"x-enum-varnames": [
|
|
"NodePermNameVisible",
|
|
"NodePermNameVisitable",
|
|
"NodePermNameAnswerable"
|
|
]
|
|
},
|
|
"consts.RedeemCaptchaReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"solutions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"consts.SourceType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"dingtalk",
|
|
"feishu",
|
|
"wecom",
|
|
"oauth",
|
|
"github",
|
|
"cas",
|
|
"ldap",
|
|
"widget",
|
|
"dingtalk_bot",
|
|
"feishu_bot",
|
|
"wechat_bot",
|
|
"wechat_service_bot",
|
|
"discord_bot",
|
|
"wechat_official_account",
|
|
"openai_api"
|
|
],
|
|
"x-enum-varnames": [
|
|
"SourceTypeDingTalk",
|
|
"SourceTypeFeishu",
|
|
"SourceTypeWeCom",
|
|
"SourceTypeOAuth",
|
|
"SourceTypeGitHub",
|
|
"SourceTypeCAS",
|
|
"SourceTypeLDAP",
|
|
"SourceTypeWidget",
|
|
"SourceTypeDingtalkBot",
|
|
"SourceTypeFeishuBot",
|
|
"SourceTypeWechatBot",
|
|
"SourceTypeWechatServiceBot",
|
|
"SourceTypeDiscordBot",
|
|
"SourceTypeWechatOfficialAccount",
|
|
"SourceTypeOpenAIAPI"
|
|
]
|
|
},
|
|
"consts.StatDay": {
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
7,
|
|
30,
|
|
90
|
|
],
|
|
"x-enum-varnames": [
|
|
"StatDay1",
|
|
"StatDay7",
|
|
"StatDay30",
|
|
"StatDay90"
|
|
]
|
|
},
|
|
"consts.UserKBPermission": {
|
|
"type": "string",
|
|
"enum": [
|
|
"",
|
|
"full_control",
|
|
"doc_manage",
|
|
"data_operate"
|
|
],
|
|
"x-enum-comments": {
|
|
"UserKBPermissionDataOperate": "数据运营",
|
|
"UserKBPermissionDocManage": "文档管理",
|
|
"UserKBPermissionFullControl": "完全控制",
|
|
"UserKBPermissionNull": "无权限"
|
|
},
|
|
"x-enum-descriptions": [
|
|
"无权限",
|
|
"完全控制",
|
|
"文档管理",
|
|
"数据运营"
|
|
],
|
|
"x-enum-varnames": [
|
|
"UserKBPermissionNull",
|
|
"UserKBPermissionFullControl",
|
|
"UserKBPermissionDocManage",
|
|
"UserKBPermissionDataOperate"
|
|
]
|
|
},
|
|
"consts.UserRole": {
|
|
"type": "string",
|
|
"enum": [
|
|
"admin",
|
|
"user"
|
|
],
|
|
"x-enum-comments": {
|
|
"UserRoleAdmin": "管理员",
|
|
"UserRoleUser": "普通用户"
|
|
},
|
|
"x-enum-descriptions": [
|
|
"管理员",
|
|
"普通用户"
|
|
],
|
|
"x-enum-varnames": [
|
|
"UserRoleAdmin",
|
|
"UserRoleUser"
|
|
]
|
|
},
|
|
"consts.WatermarkSetting": {
|
|
"type": "string",
|
|
"enum": [
|
|
"",
|
|
"hidden",
|
|
"visible"
|
|
],
|
|
"x-enum-comments": {
|
|
"WatermarkDisabled": "未开启水印",
|
|
"WatermarkHidden": "隐形水印",
|
|
"WatermarkVisible": "显性水印"
|
|
},
|
|
"x-enum-descriptions": [
|
|
"未开启水印",
|
|
"隐形水印",
|
|
"显性水印"
|
|
],
|
|
"x-enum-varnames": [
|
|
"WatermarkDisabled",
|
|
"WatermarkHidden",
|
|
"WatermarkVisible"
|
|
]
|
|
},
|
|
"domain.AIFeedbackSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ai_feedback_type": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"is_enabled": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"domain.AccessSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"base_url": {
|
|
"type": "string"
|
|
},
|
|
"enterprise_auth": {
|
|
"$ref": "#/definitions/domain.EnterpriseAuth"
|
|
},
|
|
"hosts": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"is_forbidden": {
|
|
"description": "禁止访问",
|
|
"type": "boolean"
|
|
},
|
|
"ports": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"private_key": {
|
|
"type": "string"
|
|
},
|
|
"public_key": {
|
|
"type": "string"
|
|
},
|
|
"simple_auth": {
|
|
"$ref": "#/definitions/domain.SimpleAuth"
|
|
},
|
|
"source_type": {
|
|
"description": "企业认证来源",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/consts.SourceType"
|
|
}
|
|
]
|
|
},
|
|
"ssl_ports": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"trusted_proxies": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.AnydocUploadResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer"
|
|
},
|
|
"data": {
|
|
"type": "string"
|
|
},
|
|
"err": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.AppDetailResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"recommend_nodes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.RecommendNodeListResp"
|
|
}
|
|
},
|
|
"settings": {
|
|
"$ref": "#/definitions/domain.AppSettingsResp"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/domain.AppType"
|
|
}
|
|
}
|
|
},
|
|
"domain.AppInfoResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"recommend_nodes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.RecommendNodeListResp"
|
|
}
|
|
},
|
|
"settings": {
|
|
"$ref": "#/definitions/domain.AppSettingsResp"
|
|
}
|
|
}
|
|
},
|
|
"domain.AppSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ai_feedback_settings": {
|
|
"description": "AI feedback",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.AIFeedbackSettings"
|
|
}
|
|
]
|
|
},
|
|
"auto_sitemap": {
|
|
"type": "boolean"
|
|
},
|
|
"body_code": {
|
|
"type": "string"
|
|
},
|
|
"btns": {
|
|
"type": "array",
|
|
"items": {}
|
|
},
|
|
"catalog_settings": {
|
|
"description": "catalog settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.CatalogSettings"
|
|
}
|
|
]
|
|
},
|
|
"contribute_settings": {
|
|
"$ref": "#/definitions/domain.ContributeSettings"
|
|
},
|
|
"copy_setting": {
|
|
"enum": [
|
|
"",
|
|
"append",
|
|
"disabled"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/consts.CopySetting"
|
|
}
|
|
]
|
|
},
|
|
"desc": {
|
|
"description": "seo",
|
|
"type": "string"
|
|
},
|
|
"dingtalk_bot_client_id": {
|
|
"type": "string"
|
|
},
|
|
"dingtalk_bot_client_secret": {
|
|
"type": "string"
|
|
},
|
|
"dingtalk_bot_is_enabled": {
|
|
"description": "DingTalkBot",
|
|
"type": "boolean"
|
|
},
|
|
"dingtalk_bot_template_id": {
|
|
"type": "string"
|
|
},
|
|
"disclaimer_settings": {
|
|
"description": "Disclaimer Settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.DisclaimerSettings"
|
|
}
|
|
]
|
|
},
|
|
"discord_bot_is_enabled": {
|
|
"description": "DisCordBot",
|
|
"type": "boolean"
|
|
},
|
|
"discord_bot_token": {
|
|
"type": "string"
|
|
},
|
|
"document_feedback_is_enabled": {
|
|
"description": "document feedback",
|
|
"type": "boolean"
|
|
},
|
|
"feishu_bot_app_id": {
|
|
"type": "string"
|
|
},
|
|
"feishu_bot_app_secret": {
|
|
"type": "string"
|
|
},
|
|
"feishu_bot_is_enabled": {
|
|
"description": "FeishuBot",
|
|
"type": "boolean"
|
|
},
|
|
"footer_settings": {
|
|
"description": "footer settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.FooterSettings"
|
|
}
|
|
]
|
|
},
|
|
"head_code": {
|
|
"description": "inject code",
|
|
"type": "string"
|
|
},
|
|
"home_page_setting": {
|
|
"$ref": "#/definitions/consts.HomePageSetting"
|
|
},
|
|
"icon": {
|
|
"type": "string"
|
|
},
|
|
"keyword": {
|
|
"type": "string"
|
|
},
|
|
"openai_api_bot_settings": {
|
|
"description": "OpenAI API Bot settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.OpenAIAPIBotSettings"
|
|
}
|
|
]
|
|
},
|
|
"recommend_node_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"recommend_questions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"search_placeholder": {
|
|
"type": "string"
|
|
},
|
|
"theme_and_style": {
|
|
"$ref": "#/definitions/domain.ThemeAndStyle"
|
|
},
|
|
"theme_mode": {
|
|
"description": "theme",
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"description": "nav",
|
|
"type": "string"
|
|
},
|
|
"watermark_content": {
|
|
"type": "string"
|
|
},
|
|
"watermark_setting": {
|
|
"enum": [
|
|
"",
|
|
"hidden",
|
|
"visible"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/consts.WatermarkSetting"
|
|
}
|
|
]
|
|
},
|
|
"web_app_comment_settings": {
|
|
"description": "webapp comment settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.WebAppCommentSettings"
|
|
}
|
|
]
|
|
},
|
|
"web_app_custom_style": {
|
|
"description": "WebAppCustomStyle",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.WebAppCustomSettings"
|
|
}
|
|
]
|
|
},
|
|
"web_app_landing_settings": {
|
|
"description": "WebAppLandingSettings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.WebAppLandingSettings"
|
|
}
|
|
]
|
|
},
|
|
"wechat_app_agent_id": {
|
|
"type": "string"
|
|
},
|
|
"wechat_app_corpid": {
|
|
"type": "string"
|
|
},
|
|
"wechat_app_encodingaeskey": {
|
|
"type": "string"
|
|
},
|
|
"wechat_app_is_enabled": {
|
|
"description": "WechatAppBot",
|
|
"type": "boolean"
|
|
},
|
|
"wechat_app_secret": {
|
|
"type": "string"
|
|
},
|
|
"wechat_app_token": {
|
|
"type": "string"
|
|
},
|
|
"wechat_official_account_app_id": {
|
|
"type": "string"
|
|
},
|
|
"wechat_official_account_app_secret": {
|
|
"type": "string"
|
|
},
|
|
"wechat_official_account_encodingaeskey": {
|
|
"type": "string"
|
|
},
|
|
"wechat_official_account_is_enabled": {
|
|
"description": "WechatOfficialAccount",
|
|
"type": "boolean"
|
|
},
|
|
"wechat_official_account_token": {
|
|
"type": "string"
|
|
},
|
|
"wechat_service_corpid": {
|
|
"type": "string"
|
|
},
|
|
"wechat_service_encodingaeskey": {
|
|
"type": "string"
|
|
},
|
|
"wechat_service_is_enabled": {
|
|
"description": "WechatServiceBot",
|
|
"type": "boolean"
|
|
},
|
|
"wechat_service_secret": {
|
|
"type": "string"
|
|
},
|
|
"wechat_service_token": {
|
|
"type": "string"
|
|
},
|
|
"welcome_str": {
|
|
"description": "welcome",
|
|
"type": "string"
|
|
},
|
|
"widget_bot_settings": {
|
|
"description": "Widget bot settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.WidgetBotSettings"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"domain.AppSettingsResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ai_feedback_settings": {
|
|
"description": "AI feedback",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.AIFeedbackSettings"
|
|
}
|
|
]
|
|
},
|
|
"auto_sitemap": {
|
|
"type": "boolean"
|
|
},
|
|
"body_code": {
|
|
"type": "string"
|
|
},
|
|
"btns": {
|
|
"type": "array",
|
|
"items": {}
|
|
},
|
|
"catalog_settings": {
|
|
"description": "catalog settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.CatalogSettings"
|
|
}
|
|
]
|
|
},
|
|
"contribute_settings": {
|
|
"$ref": "#/definitions/domain.ContributeSettings"
|
|
},
|
|
"copy_setting": {
|
|
"$ref": "#/definitions/consts.CopySetting"
|
|
},
|
|
"desc": {
|
|
"description": "seo",
|
|
"type": "string"
|
|
},
|
|
"dingtalk_bot_client_id": {
|
|
"type": "string"
|
|
},
|
|
"dingtalk_bot_client_secret": {
|
|
"type": "string"
|
|
},
|
|
"dingtalk_bot_is_enabled": {
|
|
"description": "DingTalkBot",
|
|
"type": "boolean"
|
|
},
|
|
"dingtalk_bot_template_id": {
|
|
"type": "string"
|
|
},
|
|
"disclaimer_settings": {
|
|
"description": "Disclaimer Settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.DisclaimerSettings"
|
|
}
|
|
]
|
|
},
|
|
"discord_bot_is_enabled": {
|
|
"description": "DisCordBot",
|
|
"type": "boolean"
|
|
},
|
|
"discord_bot_token": {
|
|
"type": "string"
|
|
},
|
|
"document_feedback_is_enabled": {
|
|
"description": "document feedback",
|
|
"type": "boolean"
|
|
},
|
|
"feishu_bot_app_id": {
|
|
"type": "string"
|
|
},
|
|
"feishu_bot_app_secret": {
|
|
"type": "string"
|
|
},
|
|
"feishu_bot_is_enabled": {
|
|
"description": "FeishuBot",
|
|
"type": "boolean"
|
|
},
|
|
"footer_settings": {
|
|
"description": "footer settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.FooterSettings"
|
|
}
|
|
]
|
|
},
|
|
"head_code": {
|
|
"description": "inject code",
|
|
"type": "string"
|
|
},
|
|
"home_page_setting": {
|
|
"$ref": "#/definitions/consts.HomePageSetting"
|
|
},
|
|
"icon": {
|
|
"type": "string"
|
|
},
|
|
"keyword": {
|
|
"type": "string"
|
|
},
|
|
"openai_api_bot_settings": {
|
|
"description": "OpenAI API settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.OpenAIAPIBotSettings"
|
|
}
|
|
]
|
|
},
|
|
"recommend_node_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"recommend_questions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"search_placeholder": {
|
|
"type": "string"
|
|
},
|
|
"theme_and_style": {
|
|
"$ref": "#/definitions/domain.ThemeAndStyle"
|
|
},
|
|
"theme_mode": {
|
|
"description": "theme",
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"description": "nav",
|
|
"type": "string"
|
|
},
|
|
"watermark_content": {
|
|
"type": "string"
|
|
},
|
|
"watermark_setting": {
|
|
"$ref": "#/definitions/consts.WatermarkSetting"
|
|
},
|
|
"web_app_comment_settings": {
|
|
"description": "webapp comment settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.WebAppCommentSettings"
|
|
}
|
|
]
|
|
},
|
|
"web_app_custom_style": {
|
|
"description": "WebAppCustomStyle",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.WebAppCustomSettings"
|
|
}
|
|
]
|
|
},
|
|
"web_app_landing_settings": {
|
|
"description": "WebApp Landing Settings",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.WebAppLandingSettings"
|
|
}
|
|
]
|
|
},
|
|
"wechat_app_agent_id": {
|
|
"type": "string"
|
|
},
|
|
"wechat_app_corpid": {
|
|
"type": "string"
|
|
},
|
|
"wechat_app_encodingaeskey": {
|
|
"type": "string"
|
|
},
|
|
"wechat_app_is_enabled": {
|
|
"description": "WechatAppBot",
|
|
"type": "boolean"
|
|
},
|
|
"wechat_app_secret": {
|
|
"type": "string"
|
|
},
|
|
"wechat_app_token": {
|
|
"type": "string"
|
|
},
|
|
"wechat_official_account_app_id": {
|
|
"type": "string"
|
|
},
|
|
"wechat_official_account_app_secret": {
|
|
"type": "string"
|
|
},
|
|
"wechat_official_account_encodingaeskey": {
|
|
"type": "string"
|
|
},
|
|
"wechat_official_account_is_enabled": {
|
|
"description": "WechatOfficialAccount",
|
|
"type": "boolean"
|
|
},
|
|
"wechat_official_account_token": {
|
|
"type": "string"
|
|
},
|
|
"wechat_service_corpid": {
|
|
"type": "string"
|
|
},
|
|
"wechat_service_encodingaeskey": {
|
|
"type": "string"
|
|
},
|
|
"wechat_service_is_enabled": {
|
|
"description": "WechatServiceBot",
|
|
"type": "boolean"
|
|
},
|
|
"wechat_service_secret": {
|
|
"type": "string"
|
|
},
|
|
"wechat_service_token": {
|
|
"type": "string"
|
|
},
|
|
"welcome_str": {
|
|
"description": "welcome",
|
|
"type": "string"
|
|
},
|
|
"widget_bot_settings": {
|
|
"description": "WidgetBot",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.WidgetBotSettings"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"domain.AppType": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"enum": [
|
|
1,
|
|
2,
|
|
3,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
8,
|
|
9
|
|
],
|
|
"x-enum-varnames": [
|
|
"AppTypeWeb",
|
|
"AppTypeWidget",
|
|
"AppTypeDingTalkBot",
|
|
"AppTypeFeishuBot",
|
|
"AppTypeWechatBot",
|
|
"AppTypeWechatServiceBot",
|
|
"AppTypeDisCordBot",
|
|
"AppTypeWechatOfficialAccount",
|
|
"AppTypeOpenAIAPI"
|
|
]
|
|
},
|
|
"domain.AuthUserInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"avatar_url": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.BatchMoveReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"ids",
|
|
"kb_id"
|
|
],
|
|
"properties": {
|
|
"ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.BrandGroup": {
|
|
"type": "object",
|
|
"properties": {
|
|
"links": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.Link"
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.BrowserCount": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.CatalogSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"catalog_folder": {
|
|
"description": "1: 展开, 2: 折叠, default: 1",
|
|
"type": "integer"
|
|
},
|
|
"catalog_visible": {
|
|
"description": "1: 显示, 2: 隐藏, default: 1",
|
|
"type": "integer"
|
|
},
|
|
"catalog_width": {
|
|
"description": "200 - 300, default: 260",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.ChatRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"app_type",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"app_type": {
|
|
"enum": [
|
|
1,
|
|
2
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.AppType"
|
|
}
|
|
]
|
|
},
|
|
"captcha_token": {
|
|
"type": "string"
|
|
},
|
|
"conversation_id": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"nonce": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ChatSearchReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"captcha_token": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ChatSearchResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"node_result": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.NodeContentChunkSSE"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.CommentInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"auth_user_id": {
|
|
"type": "integer"
|
|
},
|
|
"avatar": {
|
|
"description": "avatar",
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"remote_ip": {
|
|
"type": "string"
|
|
},
|
|
"user_name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.CommentListItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"info": {
|
|
"$ref": "#/definitions/domain.CommentInfo"
|
|
},
|
|
"ip_address": {
|
|
"description": "ip地址",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.IPAddress"
|
|
}
|
|
]
|
|
},
|
|
"node_id": {
|
|
"type": "string"
|
|
},
|
|
"node_name": {
|
|
"description": "文档标题",
|
|
"type": "string"
|
|
},
|
|
"node_type": {
|
|
"type": "integer"
|
|
},
|
|
"root_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"description": "status : -1 reject 0 pending 1 accept",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.CommentStatus"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"domain.CommentReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"content",
|
|
"node_id"
|
|
],
|
|
"properties": {
|
|
"captcha_token": {
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"node_id": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "string"
|
|
},
|
|
"root_id": {
|
|
"type": "string"
|
|
},
|
|
"user_name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.CommentStatus": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"enum": [
|
|
-1,
|
|
0,
|
|
1
|
|
],
|
|
"x-enum-varnames": [
|
|
"CommentStatusReject",
|
|
"CommentStatusPending",
|
|
"CommentStatusAccepted"
|
|
]
|
|
},
|
|
"domain.CompleteReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"prefix": {
|
|
"description": "For FIM (Fill in Middle) style completion",
|
|
"type": "string"
|
|
},
|
|
"suffix": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ContributeSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"is_enable": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"domain.ConversationDetailResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"app_id": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"ip_address": {
|
|
"$ref": "#/definitions/domain.IPAddress"
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ConversationMessage"
|
|
}
|
|
},
|
|
"references": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ConversationReference"
|
|
}
|
|
},
|
|
"remote_ip": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ConversationDistribution": {
|
|
"type": "object",
|
|
"properties": {
|
|
"app_id": {
|
|
"type": "string"
|
|
},
|
|
"app_type": {
|
|
"$ref": "#/definitions/domain.AppType"
|
|
},
|
|
"count": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.ConversationInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user_info": {
|
|
"$ref": "#/definitions/domain.UserInfo"
|
|
}
|
|
}
|
|
},
|
|
"domain.ConversationListItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"app_name": {
|
|
"type": "string"
|
|
},
|
|
"app_type": {
|
|
"$ref": "#/definitions/domain.AppType"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"feedback_info": {
|
|
"description": "用户反馈信息",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.FeedBackInfo"
|
|
}
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"info": {
|
|
"description": "用户信息",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.ConversationInfo"
|
|
}
|
|
]
|
|
},
|
|
"ip_address": {
|
|
"$ref": "#/definitions/domain.IPAddress"
|
|
},
|
|
"remote_ip": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ConversationMessage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"app_id": {
|
|
"type": "string"
|
|
},
|
|
"completion_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"conversation_id": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"info": {
|
|
"description": "feedbackinfo",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.FeedBackInfo"
|
|
}
|
|
]
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"description": "parent_id",
|
|
"type": "string"
|
|
},
|
|
"prompt_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"provider": {
|
|
"description": "model",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_domain.ModelProvider"
|
|
}
|
|
]
|
|
},
|
|
"remote_ip": {
|
|
"description": "stats",
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/schema.RoleType"
|
|
},
|
|
"total_tokens": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.ConversationMessageListItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"app_id": {
|
|
"type": "string"
|
|
},
|
|
"app_type": {
|
|
"$ref": "#/definitions/domain.AppType"
|
|
},
|
|
"conversation_id": {
|
|
"type": "string"
|
|
},
|
|
"conversation_info": {
|
|
"description": "userInfo",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.ConversationInfo"
|
|
}
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"info": {
|
|
"description": "feedbackInfo",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.FeedBackInfo"
|
|
}
|
|
]
|
|
},
|
|
"ip_address": {
|
|
"$ref": "#/definitions/domain.IPAddress"
|
|
},
|
|
"question": {
|
|
"type": "string"
|
|
},
|
|
"remote_ip": {
|
|
"description": "stats",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ConversationReference": {
|
|
"type": "object",
|
|
"properties": {
|
|
"app_id": {
|
|
"type": "string"
|
|
},
|
|
"conversation_id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"node_id": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateKBReleaseReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"kb_id",
|
|
"message",
|
|
"tag"
|
|
],
|
|
"properties": {
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"node_ids": {
|
|
"description": "create release after these nodes published",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"tag": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateKnowledgeBaseReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"hosts": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"ports": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"private_key": {
|
|
"type": "string"
|
|
},
|
|
"public_key": {
|
|
"type": "string"
|
|
},
|
|
"ssl_ports": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateModelReq": {
|
|
"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"
|
|
},
|
|
"parameters": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_domain.ModelParam"
|
|
},
|
|
"provider": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_domain.ModelProvider"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"chat",
|
|
"embedding",
|
|
"rerank",
|
|
"analysis"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.ModelType"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"domain.CreateNodeReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"kb_id",
|
|
"name",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"emoji": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "string"
|
|
},
|
|
"position": {
|
|
"type": "number"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
1,
|
|
2
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.NodeType"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"domain.DisclaimerSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.EnterpriseAuth": {
|
|
"type": "object",
|
|
"properties": {
|
|
"enabled": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"domain.FeedBackInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"feedback_content": {
|
|
"type": "string"
|
|
},
|
|
"feedback_type": {
|
|
"type": "string"
|
|
},
|
|
"score": {
|
|
"$ref": "#/definitions/domain.ScoreType"
|
|
}
|
|
}
|
|
},
|
|
"domain.FeedbackRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"message_id"
|
|
],
|
|
"properties": {
|
|
"conversation_id": {
|
|
"type": "string"
|
|
},
|
|
"feedback_content": {
|
|
"description": "限制内容长度",
|
|
"type": "string",
|
|
"maxLength": 200
|
|
},
|
|
"message_id": {
|
|
"type": "string"
|
|
},
|
|
"score": {
|
|
"description": "-1 踩 ,0 1 赞成",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.ScoreType"
|
|
}
|
|
]
|
|
},
|
|
"type": {
|
|
"description": "内容不准确,没有帮助,.......",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.FooterSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"brand_desc": {
|
|
"type": "string"
|
|
},
|
|
"brand_groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BrandGroup"
|
|
}
|
|
},
|
|
"brand_logo": {
|
|
"type": "string"
|
|
},
|
|
"brand_name": {
|
|
"type": "string"
|
|
},
|
|
"corp_name": {
|
|
"type": "string"
|
|
},
|
|
"footer_style": {
|
|
"type": "string"
|
|
},
|
|
"icp": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.GetKBReleaseListResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.KBReleaseListItemResp"
|
|
}
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.GetProviderModelListReq": {
|
|
"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"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.ModelType"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"domain.GetProviderModelListResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"models": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ProviderModelListItem"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.HotBrowser": {
|
|
"type": "object",
|
|
"properties": {
|
|
"browser": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BrowserCount"
|
|
}
|
|
},
|
|
"os": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.BrowserCount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.HotPage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"node_id": {
|
|
"type": "string"
|
|
},
|
|
"node_name": {
|
|
"type": "string"
|
|
},
|
|
"scene": {
|
|
"$ref": "#/definitions/domain.StatPageScene"
|
|
}
|
|
}
|
|
},
|
|
"domain.HotRefererHost": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"referer_host": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.IPAddress": {
|
|
"type": "object",
|
|
"properties": {
|
|
"city": {
|
|
"type": "string"
|
|
},
|
|
"country": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"province": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.InstantCountResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"time": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.InstantPageResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"info": {
|
|
"$ref": "#/definitions/domain.AuthUserInfo"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"ip_address": {
|
|
"$ref": "#/definitions/domain.IPAddress"
|
|
},
|
|
"node_id": {
|
|
"type": "string"
|
|
},
|
|
"node_name": {
|
|
"type": "string"
|
|
},
|
|
"scene": {
|
|
"$ref": "#/definitions/domain.StatPageScene"
|
|
},
|
|
"user_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.KBReleaseListItemResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"tag": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.KnowledgeBaseDetail": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_settings": {
|
|
"$ref": "#/definitions/domain.AccessSettings"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"dataset_id": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"perm": {
|
|
"description": "用户对知识库的权限",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/consts.UserKBPermission"
|
|
}
|
|
]
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.KnowledgeBaseListItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_settings": {
|
|
"$ref": "#/definitions/domain.AccessSettings"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"dataset_id": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.Link": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.MessageFrom": {
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
2
|
|
],
|
|
"x-enum-varnames": [
|
|
"MessageFromGroup",
|
|
"MessageFromPrivate"
|
|
]
|
|
},
|
|
"domain.ModelType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"chat",
|
|
"embedding",
|
|
"rerank",
|
|
"analysis"
|
|
],
|
|
"x-enum-varnames": [
|
|
"ModelTypeChat",
|
|
"ModelTypeEmbedding",
|
|
"ModelTypeRerank",
|
|
"ModelTypeAnalysis"
|
|
]
|
|
},
|
|
"domain.MoveNodeReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"kb_id"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"next_id": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "string"
|
|
},
|
|
"prev_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.NodeActionReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"action",
|
|
"ids",
|
|
"kb_id"
|
|
],
|
|
"properties": {
|
|
"action": {
|
|
"type": "string",
|
|
"enum": [
|
|
"delete"
|
|
]
|
|
},
|
|
"ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.NodeContentChunkSSE": {
|
|
"type": "object",
|
|
"properties": {
|
|
"emoji": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"node_id": {
|
|
"type": "string"
|
|
},
|
|
"summary": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.NodeGroupDetail": {
|
|
"type": "object",
|
|
"properties": {
|
|
"auth_group_id": {
|
|
"type": "integer"
|
|
},
|
|
"auth_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"node_id": {
|
|
"type": "string"
|
|
},
|
|
"perm": {
|
|
"$ref": "#/definitions/consts.NodePermName"
|
|
}
|
|
}
|
|
},
|
|
"domain.NodeListItemResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "string"
|
|
},
|
|
"editor": {
|
|
"type": "string"
|
|
},
|
|
"editor_id": {
|
|
"type": "string"
|
|
},
|
|
"emoji": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"$ref": "#/definitions/domain.NodePermissions"
|
|
},
|
|
"position": {
|
|
"type": "number"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/domain.NodeStatus"
|
|
},
|
|
"summary": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/domain.NodeType"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.NodeMeta": {
|
|
"type": "object",
|
|
"properties": {
|
|
"emoji": {
|
|
"type": "string"
|
|
},
|
|
"summary": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.NodePermissions": {
|
|
"type": "object",
|
|
"properties": {
|
|
"answerable": {
|
|
"description": "可被问答",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/consts.NodeAccessPerm"
|
|
}
|
|
]
|
|
},
|
|
"visible": {
|
|
"description": "导航内可见",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/consts.NodeAccessPerm"
|
|
}
|
|
]
|
|
},
|
|
"visitable": {
|
|
"description": "可被访问",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/consts.NodeAccessPerm"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"domain.NodeStatus": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"enum": [
|
|
1,
|
|
2
|
|
],
|
|
"x-enum-varnames": [
|
|
"NodeStatusDraft",
|
|
"NodeStatusReleased"
|
|
]
|
|
},
|
|
"domain.NodeSummaryReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"ids",
|
|
"kb_id"
|
|
],
|
|
"properties": {
|
|
"ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.NodeType": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"enum": [
|
|
1,
|
|
2
|
|
],
|
|
"x-enum-varnames": [
|
|
"NodeTypeFolder",
|
|
"NodeTypeDocument"
|
|
]
|
|
},
|
|
"domain.ObjectUploadResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string"
|
|
},
|
|
"key": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAIAPIBotSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"is_enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"secret_key": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAIChoice": {
|
|
"type": "object",
|
|
"properties": {
|
|
"delta": {
|
|
"description": "for streaming",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.OpenAIMessage"
|
|
}
|
|
]
|
|
},
|
|
"finish_reason": {
|
|
"type": "string"
|
|
},
|
|
"index": {
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"$ref": "#/definitions/domain.OpenAIMessage"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAICompletionsRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"messages",
|
|
"model"
|
|
],
|
|
"properties": {
|
|
"frequency_penalty": {
|
|
"type": "number"
|
|
},
|
|
"max_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.OpenAIMessage"
|
|
}
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"presence_penalty": {
|
|
"type": "number"
|
|
},
|
|
"response_format": {
|
|
"$ref": "#/definitions/domain.OpenAIResponseFormat"
|
|
},
|
|
"stop": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"stream": {
|
|
"type": "boolean"
|
|
},
|
|
"temperature": {
|
|
"type": "number"
|
|
},
|
|
"tool_choice": {
|
|
"$ref": "#/definitions/domain.OpenAIToolChoice"
|
|
},
|
|
"tools": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.OpenAITool"
|
|
}
|
|
},
|
|
"top_p": {
|
|
"type": "number"
|
|
},
|
|
"user": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAICompletionsResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"choices": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.OpenAIChoice"
|
|
}
|
|
},
|
|
"created": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"object": {
|
|
"type": "string"
|
|
},
|
|
"usage": {
|
|
"$ref": "#/definitions/domain.OpenAIUsage"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAIError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"param": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAIErrorResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"$ref": "#/definitions/domain.OpenAIError"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAIFunction": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parameters": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAIFunctionCall": {
|
|
"type": "object",
|
|
"required": [
|
|
"arguments",
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"arguments": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAIFunctionChoice": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAIMessage": {
|
|
"type": "object",
|
|
"required": [
|
|
"role"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"type": "string"
|
|
},
|
|
"tool_call_id": {
|
|
"type": "string"
|
|
},
|
|
"tool_calls": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.OpenAIToolCall"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAIResponseFormat": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAITool": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"function": {
|
|
"$ref": "#/definitions/domain.OpenAIFunction"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAIToolCall": {
|
|
"type": "object",
|
|
"required": [
|
|
"function",
|
|
"id",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"function": {
|
|
"$ref": "#/definitions/domain.OpenAIFunctionCall"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAIToolChoice": {
|
|
"type": "object",
|
|
"properties": {
|
|
"function": {
|
|
"$ref": "#/definitions/domain.OpenAIFunctionChoice"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.OpenAIUsage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"completion_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"prompt_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"total_tokens": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.PWResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer"
|
|
},
|
|
"data": {},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"success": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"domain.PaginatedResult-array_domain_ConversationMessageListItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ConversationMessageListItem"
|
|
}
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"domain.ProviderModelListItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"model": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.RecommendNodeListResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"emoji": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"$ref": "#/definitions/domain.NodePermissions"
|
|
},
|
|
"position": {
|
|
"type": "number"
|
|
},
|
|
"recommend_nodes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.RecommendNodeListResp"
|
|
}
|
|
},
|
|
"summary": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/domain.NodeType"
|
|
}
|
|
}
|
|
},
|
|
"domain.Response": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"success": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"domain.ScoreType": {
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
-1
|
|
],
|
|
"x-enum-varnames": [
|
|
"Like",
|
|
"DisLike"
|
|
]
|
|
},
|
|
"domain.ShareCommentListItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"info": {
|
|
"$ref": "#/definitions/domain.CommentInfo"
|
|
},
|
|
"ip_address": {
|
|
"description": "ip地址",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.IPAddress"
|
|
}
|
|
]
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"node_id": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "string"
|
|
},
|
|
"root_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ShareConversationDetailResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ShareConversationMessage"
|
|
}
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ShareConversationMessage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/schema.RoleType"
|
|
}
|
|
}
|
|
},
|
|
"domain.SimpleAuth": {
|
|
"type": "object",
|
|
"properties": {
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.SocialMediaAccount": {
|
|
"type": "object",
|
|
"properties": {
|
|
"channel": {
|
|
"type": "string"
|
|
},
|
|
"icon": {
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.StatPageReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"scene"
|
|
],
|
|
"properties": {
|
|
"node_id": {
|
|
"type": "string"
|
|
},
|
|
"scene": {
|
|
"enum": [
|
|
1,
|
|
2,
|
|
3,
|
|
4
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.StatPageScene"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"domain.StatPageScene": {
|
|
"type": "integer",
|
|
"enum": [
|
|
1,
|
|
2,
|
|
3,
|
|
4
|
|
],
|
|
"x-enum-varnames": [
|
|
"StatPageSceneWelcome",
|
|
"StatPageSceneNodeDetail",
|
|
"StatPageSceneChat",
|
|
"StatPageSceneLogin"
|
|
]
|
|
},
|
|
"domain.TextReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"text"
|
|
],
|
|
"properties": {
|
|
"action": {
|
|
"description": "action: improve, summary, extend, shorten, etc.",
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.ThemeAndStyle": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bg_image": {
|
|
"type": "string"
|
|
},
|
|
"doc_width": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.UpdateAppReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"settings": {
|
|
"$ref": "#/definitions/domain.AppSettings"
|
|
}
|
|
}
|
|
},
|
|
"domain.UpdateKnowledgeBaseReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"id"
|
|
],
|
|
"properties": {
|
|
"access_settings": {
|
|
"$ref": "#/definitions/domain.AccessSettings"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.UpdateModelReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"base_url",
|
|
"id",
|
|
"model",
|
|
"provider",
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"api_header": {
|
|
"type": "string"
|
|
},
|
|
"api_key": {
|
|
"type": "string"
|
|
},
|
|
"api_version": {
|
|
"description": "for azure openai",
|
|
"type": "string"
|
|
},
|
|
"base_url": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"is_active": {
|
|
"type": "boolean"
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"parameters": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_domain.ModelParam"
|
|
},
|
|
"provider": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_domain.ModelProvider"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"chat",
|
|
"embedding",
|
|
"rerank",
|
|
"analysis"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.ModelType"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"domain.UpdateNodeReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"kb_id"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"emoji": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"position": {
|
|
"type": "number"
|
|
},
|
|
"summary": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.UserInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"auth_user_id": {
|
|
"type": "integer"
|
|
},
|
|
"avatar": {
|
|
"description": "avatar",
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"from": {
|
|
"$ref": "#/definitions/domain.MessageFrom"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"real_name": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain.WebAppCommentSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"is_enable": {
|
|
"type": "boolean"
|
|
},
|
|
"moderation_enable": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"domain.WebAppCustomSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"allow_theme_switching": {
|
|
"type": "boolean"
|
|
},
|
|
"footer_show_intro": {
|
|
"type": "boolean"
|
|
},
|
|
"header_search_placeholder": {
|
|
"type": "string"
|
|
},
|
|
"show_brand_info": {
|
|
"type": "boolean"
|
|
},
|
|
"social_media_accounts": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.SocialMediaAccount"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.WebAppLandingSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"banner_config": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bg_url": {
|
|
"type": "string"
|
|
},
|
|
"btns": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"href": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"hot_search": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"placeholder": {
|
|
"type": "string"
|
|
},
|
|
"subtitle": {
|
|
"type": "string"
|
|
},
|
|
"subtitle_color": {
|
|
"type": "string"
|
|
},
|
|
"subtitle_font_size": {
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"title_color": {
|
|
"type": "string"
|
|
},
|
|
"title_font_size": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"basic_doc_config": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bg_color": {
|
|
"type": "string"
|
|
},
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"title_color": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"carousel_config": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bg_color": {
|
|
"type": "string"
|
|
},
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"desc": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"com_config_order": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"dir_doc_config": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bg_color": {
|
|
"type": "string"
|
|
},
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"title_color": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"faq_config": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bg_color": {
|
|
"type": "string"
|
|
},
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"type": "string"
|
|
},
|
|
"question": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"title_color": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"simple_doc_config": {
|
|
"type": "object",
|
|
"properties": {
|
|
"bg_color": {
|
|
"type": "string"
|
|
},
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"title_color": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.WidgetBotSettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"btn_logo": {
|
|
"type": "string"
|
|
},
|
|
"btn_text": {
|
|
"type": "string"
|
|
},
|
|
"is_open": {
|
|
"type": "boolean"
|
|
},
|
|
"theme_mode": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"github_com_chaitin_panda-wiki_api_auth_v1.AuthGetResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"auths": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.AuthItem"
|
|
}
|
|
},
|
|
"client_id": {
|
|
"type": "string"
|
|
},
|
|
"client_secret": {
|
|
"type": "string"
|
|
},
|
|
"proxy": {
|
|
"type": "string"
|
|
},
|
|
"source_type": {
|
|
"$ref": "#/definitions/consts.SourceType"
|
|
}
|
|
}
|
|
},
|
|
"github_com_chaitin_panda-wiki_api_share_v1.AuthGetResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"auth_type": {
|
|
"$ref": "#/definitions/consts.AuthType"
|
|
},
|
|
"license_edition": {
|
|
"$ref": "#/definitions/consts.LicenseEdition"
|
|
},
|
|
"source_type": {
|
|
"$ref": "#/definitions/consts.SourceType"
|
|
}
|
|
}
|
|
},
|
|
"github_com_chaitin_panda-wiki_api_share_v1.GitHubCallbackResp": {
|
|
"type": "object"
|
|
},
|
|
"github_com_chaitin_panda-wiki_domain.CheckModelReq": {
|
|
"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"
|
|
},
|
|
"parameters": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_domain.ModelParam"
|
|
},
|
|
"provider": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_domain.ModelProvider"
|
|
},
|
|
"type": {
|
|
"enum": [
|
|
"chat",
|
|
"embedding",
|
|
"rerank",
|
|
"analysis"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/domain.ModelType"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"github_com_chaitin_panda-wiki_domain.CheckModelResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"github_com_chaitin_panda-wiki_domain.ModelListItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"api_header": {
|
|
"type": "string"
|
|
},
|
|
"api_key": {
|
|
"type": "string"
|
|
},
|
|
"api_version": {
|
|
"description": "for azure openai",
|
|
"type": "string"
|
|
},
|
|
"base_url": {
|
|
"type": "string"
|
|
},
|
|
"completion_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"is_active": {
|
|
"type": "boolean"
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"parameters": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_domain.ModelParam"
|
|
},
|
|
"prompt_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"provider": {
|
|
"$ref": "#/definitions/github_com_chaitin_panda-wiki_domain.ModelProvider"
|
|
},
|
|
"total_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/domain.ModelType"
|
|
}
|
|
}
|
|
},
|
|
"github_com_chaitin_panda-wiki_domain.ModelParam": {
|
|
"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"
|
|
},
|
|
"temperature": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"github_com_chaitin_panda-wiki_domain.ModelProvider": {
|
|
"type": "string",
|
|
"enum": [
|
|
"BaiZhiCloud"
|
|
],
|
|
"x-enum-varnames": [
|
|
"ModelProviderBrandBaiZhiCloud"
|
|
]
|
|
},
|
|
"gocap.ChallengeData": {
|
|
"type": "object",
|
|
"properties": {
|
|
"challenge": {
|
|
"$ref": "#/definitions/gocap.ChallengeItem"
|
|
},
|
|
"expires": {
|
|
"description": "过期时间,毫秒级时间戳",
|
|
"type": "integer"
|
|
},
|
|
"token": {
|
|
"description": "质询令牌",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"gocap.ChallengeItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"c": {
|
|
"description": "质询数量",
|
|
"type": "integer"
|
|
},
|
|
"d": {
|
|
"description": "质询难度",
|
|
"type": "integer"
|
|
},
|
|
"s": {
|
|
"description": "质询大小",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"gocap.VerificationResult": {
|
|
"type": "object",
|
|
"properties": {
|
|
"expires": {
|
|
"description": "过期时间,毫秒级时间戳",
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"success": {
|
|
"type": "boolean"
|
|
},
|
|
"token": {
|
|
"description": "验证令牌",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"schema.RoleType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"assistant",
|
|
"user",
|
|
"system",
|
|
"tool"
|
|
],
|
|
"x-enum-varnames": [
|
|
"Assistant",
|
|
"User",
|
|
"System",
|
|
"Tool"
|
|
]
|
|
},
|
|
"share.ShareCommentLists": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ShareCommentListItem"
|
|
}
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"v1.AuthGitHubReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"redirect_url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.AuthGitHubResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.AuthItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"avatar_url": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"last_login_time": {
|
|
"type": "string"
|
|
},
|
|
"source_type": {
|
|
"$ref": "#/definitions/consts.SourceType"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.AuthLoginSimpleReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.AuthSetReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"source_type"
|
|
],
|
|
"properties": {
|
|
"client_id": {
|
|
"type": "string"
|
|
},
|
|
"client_secret": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"proxy": {
|
|
"type": "string"
|
|
},
|
|
"source_type": {
|
|
"enum": [
|
|
"github"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/consts.SourceType"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"v1.CommentLists": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.CommentListItem"
|
|
}
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"v1.ConfluenceParseItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.ConfluenceParseResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"docs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.ConfluenceParseItem"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.ConfluenceScrapeReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"doc_id",
|
|
"id",
|
|
"kb_id"
|
|
],
|
|
"properties": {
|
|
"doc_id": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.ConfluenceScrapeResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.ConversationListItems": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.ConversationListItem"
|
|
}
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"v1.CrawlerResultItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/consts.CrawlerStatus"
|
|
},
|
|
"task_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.CrawlerResultResp": {
|
|
"type": "object",
|
|
"required": [
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/consts.CrawlerStatus"
|
|
}
|
|
}
|
|
},
|
|
"v1.CrawlerResultsReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"task_ids"
|
|
],
|
|
"properties": {
|
|
"task_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1.CrawlerResultsResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.CrawlerResultItem"
|
|
}
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/consts.CrawlerStatus"
|
|
}
|
|
}
|
|
},
|
|
"v1.CreateUserReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"account",
|
|
"password",
|
|
"role"
|
|
],
|
|
"properties": {
|
|
"account": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"minLength": 8
|
|
},
|
|
"role": {
|
|
"enum": [
|
|
"admin",
|
|
"user"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/consts.UserRole"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"v1.CreateUserResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.EpubParseReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"filename",
|
|
"kb_id",
|
|
"key"
|
|
],
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"key": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.EpubParseResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"task_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.FeishuGetDocReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"doc_id",
|
|
"id",
|
|
"kb_id"
|
|
],
|
|
"properties": {
|
|
"doc_id": {
|
|
"type": "string"
|
|
},
|
|
"file_type": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"space_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.FeishuGetDocResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.FeishuListCloudDocReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"app_id",
|
|
"app_secret",
|
|
"user_access_token"
|
|
],
|
|
"properties": {
|
|
"app_id": {
|
|
"type": "string"
|
|
},
|
|
"app_secret": {
|
|
"type": "string"
|
|
},
|
|
"user_access_token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.FeishuListCloudDocResp": {
|
|
"type": "object",
|
|
"required": [
|
|
"doc_id",
|
|
"id"
|
|
],
|
|
"properties": {
|
|
"doc_id": {
|
|
"type": "string"
|
|
},
|
|
"file_type": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"space_id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.FeishuSearchWikiReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"app_id",
|
|
"app_secret",
|
|
"user_access_token"
|
|
],
|
|
"properties": {
|
|
"app_id": {
|
|
"type": "string"
|
|
},
|
|
"app_secret": {
|
|
"type": "string"
|
|
},
|
|
"space_id": {
|
|
"type": "string"
|
|
},
|
|
"user_access_token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.FeishuSearchWikiResp": {
|
|
"type": "object",
|
|
"required": [
|
|
"doc_id",
|
|
"id"
|
|
],
|
|
"properties": {
|
|
"doc_id": {
|
|
"type": "string"
|
|
},
|
|
"file_type": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"space_id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.FeishuSpaceListReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"app_id",
|
|
"app_secret",
|
|
"user_access_token"
|
|
],
|
|
"properties": {
|
|
"app_id": {
|
|
"type": "string"
|
|
},
|
|
"app_secret": {
|
|
"type": "string"
|
|
},
|
|
"user_access_token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.FeishuSpaceListResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"space_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.KBUserInviteReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"kb_id",
|
|
"perm",
|
|
"user_id"
|
|
],
|
|
"properties": {
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"perm": {
|
|
"enum": [
|
|
"full_control",
|
|
"doc_manage",
|
|
"data_operate"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/consts.UserKBPermission"
|
|
}
|
|
]
|
|
},
|
|
"user_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.KBUserListItemResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"perms": {
|
|
"$ref": "#/definitions/consts.UserKBPermission"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/consts.UserRole"
|
|
}
|
|
}
|
|
},
|
|
"v1.KBUserUpdateReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"kb_id",
|
|
"perm",
|
|
"user_id"
|
|
],
|
|
"properties": {
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"perm": {
|
|
"enum": [
|
|
"full_control",
|
|
"doc_manage",
|
|
"data_operate"
|
|
],
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/consts.UserKBPermission"
|
|
}
|
|
]
|
|
},
|
|
"user_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.LoginReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"account",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"account": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.LoginResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"token": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.MindocParseItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.MindocParseResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"docs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.MindocParseItem"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.MindocScrapeReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"doc_id",
|
|
"id",
|
|
"kb_id"
|
|
],
|
|
"properties": {
|
|
"doc_id": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.MindocScrapeResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.NodeDetailResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"meta": {
|
|
"$ref": "#/definitions/domain.NodeMeta"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"$ref": "#/definitions/domain.NodePermissions"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/domain.NodeStatus"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/domain.NodeType"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.NodeItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"emoji": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "string"
|
|
},
|
|
"position": {
|
|
"type": "number"
|
|
},
|
|
"recommend_nodes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.RecommendNodeListResp"
|
|
}
|
|
},
|
|
"summary": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/domain.NodeType"
|
|
}
|
|
}
|
|
},
|
|
"v1.NodePermissionEditReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"ids",
|
|
"kb_id"
|
|
],
|
|
"properties": {
|
|
"answerable_groups": {
|
|
"description": "可被问答",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"$ref": "#/definitions/domain.NodePermissions"
|
|
},
|
|
"visible_groups": {
|
|
"description": "导航内可见",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"visitable_groups": {
|
|
"description": "可被访问",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1.NodePermissionEditResp": {
|
|
"type": "object"
|
|
},
|
|
"v1.NodePermissionResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"answerable_groups": {
|
|
"description": "可被问答",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.NodeGroupDetail"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"$ref": "#/definitions/domain.NodePermissions"
|
|
},
|
|
"visible_groups": {
|
|
"description": "导航内可见",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.NodeGroupDetail"
|
|
}
|
|
},
|
|
"visitable_groups": {
|
|
"description": "可被访问",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/domain.NodeGroupDetail"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1.NodeRecommendListResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"basic_docs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.NodeItem"
|
|
}
|
|
},
|
|
"dir_docs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.NodeItem"
|
|
}
|
|
},
|
|
"node_recommends": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.NodeItem"
|
|
}
|
|
},
|
|
"simple_docs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.NodeItem"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1.NotionParseItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.NotionParseReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"integration"
|
|
],
|
|
"properties": {
|
|
"integration": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.NotionParseResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"docs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.NotionParseItem"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.NotionScrapeReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"doc_id",
|
|
"id",
|
|
"kb_id"
|
|
],
|
|
"properties": {
|
|
"doc_id": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.NotionScrapeResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.ResetPasswordReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"new_password"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"new_password": {
|
|
"type": "string",
|
|
"minLength": 8
|
|
}
|
|
}
|
|
},
|
|
"v1.RssParseItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"desc": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.RssParseReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.RssParseResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.RssParseItem"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1.RssScrapeReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"kb_id",
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.RssScrapeResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.ScrapeReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"kb_id",
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.ScrapeResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"task_id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.SitemapParseItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.SitemapParseReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.SitemapParseResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.SitemapParseItem"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1.SitemapScrapeReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"kb_id",
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.SitemapScrapeResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.SiyuanParseItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.SiyuanParseResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"docs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.SiyuanParseItem"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.SiyuanScrapeReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"doc_id",
|
|
"id",
|
|
"kb_id"
|
|
],
|
|
"properties": {
|
|
"doc_id": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.SiyuanScrapeResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.StatCountResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"conversation_count": {
|
|
"type": "integer"
|
|
},
|
|
"ip_count": {
|
|
"type": "integer"
|
|
},
|
|
"page_visit_count": {
|
|
"type": "integer"
|
|
},
|
|
"session_count": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"v1.UserInfoResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"is_token": {
|
|
"type": "boolean"
|
|
},
|
|
"last_access": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/consts.UserRole"
|
|
}
|
|
}
|
|
},
|
|
"v1.UserListItemResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"last_access": {
|
|
"type": "string"
|
|
},
|
|
"role": {
|
|
"$ref": "#/definitions/consts.UserRole"
|
|
}
|
|
}
|
|
},
|
|
"v1.UserListResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"users": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.UserListItemResp"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"v1.WikijsParseItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.WikijsParseResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"docs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.WikijsParseItem"
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.WikijsScrapeReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"doc_id",
|
|
"id",
|
|
"kb_id"
|
|
],
|
|
"properties": {
|
|
"doc_id": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.WikijsScrapeResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"content": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.YuqueParseItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"task_id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.YuqueParseReq": {
|
|
"type": "object",
|
|
"required": [
|
|
"filename",
|
|
"kb_id",
|
|
"key"
|
|
],
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string"
|
|
},
|
|
"kb_id": {
|
|
"type": "string"
|
|
},
|
|
"key": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"v1.YuqueParseResp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/v1.YuqueParseItem"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"bearerAuth": {
|
|
"description": "Type \"Bearer\" + a space + your token to authorize",
|
|
"type": "apiKey",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
}
|
|
} |