ACS-8055 add optional options and uodate nodes-api.service.md

This commit is contained in:
Darya Balvanovich
2024-06-17 21:38:57 +02:00
parent 45fd9609c2
commit e7c620dca4
3 changed files with 8 additions and 7 deletions
+4 -2
View File
@@ -84,8 +84,10 @@ Accesses and manipulates ACS document nodes using their node IDs.
- _nodeBody:_ `any` - New data for the node
- _options:_ `any` - Optional parameters supported by JS-API
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNode`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md)`>` - Updated node information<br/>
Getting legal holds assigned to a node.
- _nodeId:_ `string` - ID of the target node
- **getNodeAssignHolds**(nodeId: `string`, options: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Hold[]`](../../../lib/js-api/src/api/gs-core-rest-api/docs/Hold.md)`>`<br/>
Getting legal holds assigned to a node.
- _nodeId:_ `string` - ID of the target node
- _options:_ `any` - Optional parameters supported by JS-API
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Hold[]`](../../../lib/js-api/src/api/gs-core-rest-api/docs/Hold.md)`>` - Updated node information
## Details
@@ -244,12 +244,11 @@ export class NodesApiService {
* Gets the list of holds assigned to the node.
*
* @param nodeId ID of the target node
* @param options Optional parameters supported by JS-API
* @returns List of assigned holds
*/
getNodeAssignHolds(nodeId: string): Observable<Hold[]> {
const queryOptions = Object.assign({
where: `(assocType='rma:frozenContent')`
});
getNodeAssignHolds(nodeId: string, options?: any): Observable<Hold[]> {
const queryOptions = Object.assign({ where: `(assocType='rma:frozenContent')` }, options);
return from(this.nodesApi.listParents(nodeId, queryOptions)).pipe(
map(({ list }) =>
@@ -40,7 +40,7 @@ export class LegalHoldService {
* @param options Optional parameters supported by JS-API
* @returns List of assigned holds Hold[]
*/
getHolds(filePlanId: string, options: ContentPagingQuery = {}): Observable<Hold[]> {
getHolds(filePlanId: string, options?: ContentPagingQuery): Observable<Hold[]> {
return from(this.legalHoldApi.getHolds(filePlanId, options)).pipe(
map(({ list }) =>
list?.entries?.map(({ entry }) => ({