Skip to content

Commit 775802e

Browse files
committed
feat recommend list add landing
1 parent fb68452 commit 775802e

File tree

10 files changed

+369
-158
lines changed

10 files changed

+369
-158
lines changed

backend/api/share/v1/node.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,18 @@ type ShareNodeListItemResp struct {
1919
UpdatedAt time.Time `json:"updated_at"`
2020
}
2121

22-
type RecommendNodeListItem struct {
22+
type NodeRecommendListReq struct {
23+
KbID string `json:"kb_id"`
24+
}
25+
26+
type NodeRecommendListResp struct {
27+
NodeRecommend []NodeItem `json:"node_recommends"`
28+
BasicDocs []NodeItem `json:"basic_docs"`
29+
DirDocs []NodeItem `json:"dir_docs"`
30+
SimpleDocs []NodeItem `json:"simple_docs"`
31+
}
32+
33+
type NodeItem struct {
2334
ID string `json:"id"`
2435
Name string `json:"name"`
2536
Type domain.NodeType `json:"type"`

backend/cmd/api/wire_gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/docs/docs.go

Lines changed: 86 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4409,10 +4409,7 @@ const docTemplate = `{
44094409
"type": "object",
44104410
"properties": {
44114411
"data": {
4412-
"type": "array",
4413-
"items": {
4414-
"$ref": "#/definitions/v1.RecommendNodeListItem"
4415-
}
4412+
"$ref": "#/definitions/v1.NodeRecommendListResp"
44164413
}
44174414
}
44184415
}
@@ -7387,6 +7384,9 @@ const docTemplate = `{
73877384
"basic_doc_config": {
73887385
"type": "object",
73897386
"properties": {
7387+
"bg_color": {
7388+
"type": "string"
7389+
},
73907390
"list": {
73917391
"type": "array",
73927392
"items": {
@@ -7395,6 +7395,9 @@ const docTemplate = `{
73957395
},
73967396
"title": {
73977397
"type": "string"
7398+
},
7399+
"title_color": {
7400+
"type": "string"
73987401
}
73997402
}
74007403
},
@@ -7435,6 +7438,9 @@ const docTemplate = `{
74357438
"dir_doc_config": {
74367439
"type": "object",
74377440
"properties": {
7441+
"bg_color": {
7442+
"type": "string"
7443+
},
74387444
"list": {
74397445
"type": "array",
74407446
"items": {
@@ -7443,12 +7449,18 @@ const docTemplate = `{
74437449
},
74447450
"title": {
74457451
"type": "string"
7452+
},
7453+
"title_color": {
7454+
"type": "string"
74467455
}
74477456
}
74487457
},
74497458
"faq_config": {
74507459
"type": "object",
74517460
"properties": {
7461+
"bg_color": {
7462+
"type": "string"
7463+
},
74527464
"list": {
74537465
"type": "array",
74547466
"items": {
@@ -7468,12 +7480,18 @@ const docTemplate = `{
74687480
},
74697481
"title": {
74707482
"type": "string"
7483+
},
7484+
"title_color": {
7485+
"type": "string"
74717486
}
74727487
}
74737488
},
74747489
"simple_doc_config": {
74757490
"type": "object",
74767491
"properties": {
7492+
"bg_color": {
7493+
"type": "string"
7494+
},
74777495
"list": {
74787496
"type": "array",
74797497
"items": {
@@ -7482,6 +7500,9 @@ const docTemplate = `{
74827500
},
74837501
"title": {
74847502
"type": "string"
7503+
},
7504+
"title_color": {
7505+
"type": "string"
74857506
}
74867507
}
74877508
}
@@ -8293,6 +8314,38 @@ const docTemplate = `{
82938314
}
82948315
}
82958316
},
8317+
"v1.NodeItem": {
8318+
"type": "object",
8319+
"properties": {
8320+
"emoji": {
8321+
"type": "string"
8322+
},
8323+
"id": {
8324+
"type": "string"
8325+
},
8326+
"name": {
8327+
"type": "string"
8328+
},
8329+
"parent_id": {
8330+
"type": "string"
8331+
},
8332+
"position": {
8333+
"type": "number"
8334+
},
8335+
"recommend_nodes": {
8336+
"type": "array",
8337+
"items": {
8338+
"$ref": "#/definitions/domain.RecommendNodeListResp"
8339+
}
8340+
},
8341+
"summary": {
8342+
"type": "string"
8343+
},
8344+
"type": {
8345+
"$ref": "#/definitions/domain.NodeType"
8346+
}
8347+
}
8348+
},
82968349
"v1.NodePermissionEditReq": {
82978350
"type": "object",
82988351
"required": [
@@ -8370,6 +8423,35 @@ const docTemplate = `{
83708423
}
83718424
}
83728425
},
8426+
"v1.NodeRecommendListResp": {
8427+
"type": "object",
8428+
"properties": {
8429+
"basic_docs": {
8430+
"type": "array",
8431+
"items": {
8432+
"$ref": "#/definitions/v1.NodeItem"
8433+
}
8434+
},
8435+
"dir_docs": {
8436+
"type": "array",
8437+
"items": {
8438+
"$ref": "#/definitions/v1.NodeItem"
8439+
}
8440+
},
8441+
"node_recommends": {
8442+
"type": "array",
8443+
"items": {
8444+
"$ref": "#/definitions/v1.NodeItem"
8445+
}
8446+
},
8447+
"simple_docs": {
8448+
"type": "array",
8449+
"items": {
8450+
"$ref": "#/definitions/v1.NodeItem"
8451+
}
8452+
}
8453+
}
8454+
},
83738455
"v1.NotionParseItem": {
83748456
"type": "object",
83758457
"properties": {
@@ -8433,38 +8515,6 @@ const docTemplate = `{
84338515
}
84348516
}
84358517
},
8436-
"v1.RecommendNodeListItem": {
8437-
"type": "object",
8438-
"properties": {
8439-
"emoji": {
8440-
"type": "string"
8441-
},
8442-
"id": {
8443-
"type": "string"
8444-
},
8445-
"name": {
8446-
"type": "string"
8447-
},
8448-
"parent_id": {
8449-
"type": "string"
8450-
},
8451-
"position": {
8452-
"type": "number"
8453-
},
8454-
"recommend_nodes": {
8455-
"type": "array",
8456-
"items": {
8457-
"$ref": "#/definitions/domain.RecommendNodeListResp"
8458-
}
8459-
},
8460-
"summary": {
8461-
"type": "string"
8462-
},
8463-
"type": {
8464-
"$ref": "#/definitions/domain.NodeType"
8465-
}
8466-
}
8467-
},
84688518
"v1.ResetPasswordReq": {
84698519
"type": "object",
84708520
"required": [

0 commit comments

Comments
 (0)