Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion backend/api/share/v1/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,18 @@ type ShareNodeListItemResp struct {
UpdatedAt time.Time `json:"updated_at"`
}

type RecommendNodeListItem struct {
type NodeRecommendListReq struct {
KbID string `json:"kb_id"`
}

type NodeRecommendListResp struct {
NodeRecommend []NodeItem `json:"node_recommends"`
BasicDocs []NodeItem `json:"basic_docs"`
DirDocs []NodeItem `json:"dir_docs"`
SimpleDocs []NodeItem `json:"simple_docs"`
}

type NodeItem struct {
ID string `json:"id"`
Name string `json:"name"`
Type domain.NodeType `json:"type"`
Expand Down
2 changes: 1 addition & 1 deletion backend/cmd/api/wire_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

299 changes: 263 additions & 36 deletions backend/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4409,10 +4409,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/v1.RecommendNodeListItem"
}
"$ref": "#/definitions/v1.NodeRecommendListResp"
}
}
}
Expand Down Expand Up @@ -5057,6 +5054,14 @@ const docTemplate = `{
}
]
},
"web_app_landing_settings": {
"description": "WebAppLandingSettings",
"allOf": [
{
"$ref": "#/definitions/domain.WebAppLandingSettings"
}
]
},
"wechat_app_agent_id": {
"type": "string"
},
Expand Down Expand Up @@ -5277,6 +5282,14 @@ const docTemplate = `{
}
]
},
"web_app_landing_settings": {
"description": "WebApp Landing Settings",
"allOf": [
{
"$ref": "#/definitions/domain.WebAppLandingSettings"
}
]
},
"wechat_app_agent_id": {
"type": "string"
},
Expand Down Expand Up @@ -7310,6 +7323,191 @@ const docTemplate = `{
}
}
},
"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": {
"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": {
Expand Down Expand Up @@ -8116,6 +8314,38 @@ const docTemplate = `{
}
}
},
"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": [
Expand Down Expand Up @@ -8193,6 +8423,35 @@ const docTemplate = `{
}
}
},
"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": {
Expand Down Expand Up @@ -8256,38 +8515,6 @@ const docTemplate = `{
}
}
},
"v1.RecommendNodeListItem": {
"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.ResetPasswordReq": {
"type": "object",
"required": [
Expand Down
Loading