[ACS-12332] Add checkout and cancel-checkout node support (#12133)

* [ACS-12332] Add checkout and cancel-checkout node support

* [ACS-12332] cr fix
This commit is contained in:
Mykyta Maliarchuk
2026-08-13 09:32:32 +02:00
committed by GitHub
parent 4931475950
commit 3aa17e49fe
7 changed files with 229 additions and 2 deletions
+17
View File
@@ -18,6 +18,7 @@ Accesses and manipulates ACS document nodes using their node IDs.
- [Getting folder node contents](#getting-folder-node-contents)
- [Creating and updating nodes](#creating-and-updating-nodes)
- [Deleting and restoring nodes](#deleting-and-restoring-nodes)
- [Checking out nodes](#checking-out-nodes)
- [See also](#see-also)
## Class members
@@ -103,6 +104,16 @@ Accesses and manipulates ACS document nodes using their node IDs.
- _nodeId:_ `string` - ID of the target node
- _opts:_ `{ where?: string; includeSource?: boolean;} & NodesIncludeQuery & ContentPagingQuery` - additional options that API can take
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeAssociationPaging`](../../../lib/js-api/src/api/content-rest-api/docs/NodesApi.md#NodeAssociationPaging)`>` - List of node's parents.
- **checkoutNode**(nodeId: `string`, opts?: `NodesIncludeQuery`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-ng2-components/blob/develop/lib/js-api/src/api/content-rest-api/docs/NodeEntry.md)`>`<br/>
Checks out a file node for offline editing. Creates a private working copy and locks the original.
- _nodeId:_ `string` - ID of the file node to check out
- _opts:_ `NodesIncludeQuery` - (Optional) Additional query parameters (`include`, `fields`)
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-ng2-components/blob/develop/lib/js-api/src/api/content-rest-api/docs/NodeEntry.md)`>` - The working copy node
- **cancelCheckoutNode**(nodeId: `string`, opts?: `NodesIncludeQuery`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-ng2-components/blob/develop/lib/js-api/src/api/content-rest-api/docs/NodeEntry.md)`>`<br/>
Cancels a checkout. Accepts either the working copy or the original checked-out node. Deletes the working copy and unlocks the original.
- _nodeId:_ `string` - ID of the working copy or original checked-out node
- _opts:_ `NodesIncludeQuery` - (Optional) Additional query parameters (`include`, `fields`)
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-ng2-components/blob/develop/lib/js-api/src/api/content-rest-api/docs/NodeEntry.md)`>` - The original (unlocked) node
## Details
@@ -160,6 +171,12 @@ and
pages in the Alfresco JS API for further details and options. Note that you can also use the
[Deleted Nodes Api service](deleted-nodes-api.service.md) get a list of all items currently in the trashcan.
### Checking out nodes
Use `checkoutNode` to lock a file node for offline editing. This creates a private working copy and locks the original node so other users cannot modify it. On success, the Observable emits the working copy `NodeEntry`.
Use `cancelCheckoutNode` to discard the working copy and unlock the original. You can pass either the working copy node ID or the original node ID. On success, the Observable emits the original (unlocked) `NodeEntry`.
## See also
- [Deleted nodes api service](deleted-nodes-api.service.md)