🧑‍💻 Add a kernel API /api/filetree/moveDocsByID https://github.com/siyuan-note/siyuan/issues/13247

This commit is contained in:
Daniel 2024-12-05 10:49:54 +08:00
parent c1fd34f57b
commit f21f0ea60b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 145 additions and 32 deletions

View file

@ -381,8 +381,8 @@
}
```
* `id`:文档 ID
* `title`:新标题
* `id`:文档 ID
* `title`:新标题
* 返回值
```json
@ -416,7 +416,7 @@
"data": null
}
```
通过 `id` 删除文档:
* `/api/filetree/removeDocByID`
@ -428,7 +428,7 @@
}
```
* `id`:文档 ID
* `id`:文档 ID
* 返回值
```json
@ -465,6 +465,30 @@
}
```
通过 `id` 移动文档:
* `/api/filetree/moveDocsByID`
* 参数
```json
{
"fromIDs": ["20210917220056-yxtyl7i"],
"toID": "20210817205410-2kvfpfn"
}
```
* `fromIDs`:源文档 ID
* `toID`:目标父文档 ID
* 返回值
```json
{
"code": 0,
"msg": "",
"data": null
}
```
### 根据路径获取人类可读路径
* `/api/filetree/getHPathByPath`
@ -522,7 +546,7 @@
}
```
* `id`:块 ID
* `id`:块 ID
* 返回值
```json
@ -545,8 +569,8 @@
}
```
* `path`:人类可读路径
* `notebook`:笔记本 ID
* `path`:人类可读路径
* `notebook`:笔记本 ID
* 返回值
```json
@ -860,7 +884,7 @@
}
```
* `id`:待折叠块的 ID
* `id`:待折叠块的 ID
* 返回值
```json
@ -882,7 +906,7 @@
}
```
* `id`:待展开块的 ID
* `id`:待展开块的 ID
* 返回值
```json
@ -1063,7 +1087,7 @@
]
}
```
### 提交事务
* `/api/sqlite/flushTransaction`