Move Document in Sidebar
move_docRelocate a document to a new parent in AFFiNE by validating and adding the destination link first, then optionally removing the source link. Rejects cyclic moves and reports partial outcomes.
Instructions
Move a doc in the AFFiNE sidebar. The destination link is validated and added before the optional source link is removed, cycles are rejected, and partial outcomes are reported explicitly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| docId | Yes | The doc to move. | |
| workspaceId | No | ||
| toParentDocId | Yes | The new parent doc that will contain the embed. | |
| fromParentDocId | No | The current parent doc to remove the embed from. If omitted, only adds to new parent. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| code | No | ||
| kind | No | ||
| docId | No | ||
| error | No | ||
| moved | No | ||
| details | No | ||
| retryable | No | ||
| workspaceId | No | ||
| toParentDocId | No | ||
| removedFromParent | No |