From e7c620dca455d323c52ffd3864a4105a78848b2f Mon Sep 17 00:00:00 2001 From: Darya Balvanovich Date: Wed, 12 Jun 2024 23:33:00 +0200 Subject: [PATCH] ACS-8055 add optional options and uodate nodes-api.service.md --- docs/core/services/nodes-api.service.md | 6 ++++-- .../src/lib/common/services/nodes-api.service.ts | 7 +++---- .../src/lib/legal-hold/services/legal-hold.service.ts | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/core/services/nodes-api.service.md b/docs/core/services/nodes-api.service.md index 28685d9f51..def2f9761b 100644 --- a/docs/core/services/nodes-api.service.md +++ b/docs/core/services/nodes-api.service.md @@ -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
- 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)`>`
+ 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 diff --git a/lib/content-services/src/lib/common/services/nodes-api.service.ts b/lib/content-services/src/lib/common/services/nodes-api.service.ts index 8d5a6a5b67..9c28d4a624 100644 --- a/lib/content-services/src/lib/common/services/nodes-api.service.ts +++ b/lib/content-services/src/lib/common/services/nodes-api.service.ts @@ -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 { - const queryOptions = Object.assign({ - where: `(assocType='rma:frozenContent')` - }); + getNodeAssignHolds(nodeId: string, options?: any): Observable { + const queryOptions = Object.assign({ where: `(assocType='rma:frozenContent')` }, options); return from(this.nodesApi.listParents(nodeId, queryOptions)).pipe( map(({ list }) => diff --git a/lib/content-services/src/lib/legal-hold/services/legal-hold.service.ts b/lib/content-services/src/lib/legal-hold/services/legal-hold.service.ts index 3241cbde82..8ade0c3fa9 100644 --- a/lib/content-services/src/lib/legal-hold/services/legal-hold.service.ts +++ b/lib/content-services/src/lib/legal-hold/services/legal-hold.service.ts @@ -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 { + getHolds(filePlanId: string, options?: ContentPagingQuery): Observable { return from(this.legalHoldApi.getHolds(filePlanId, options)).pipe( map(({ list }) => list?.entries?.map(({ entry }) => ({