[ACS-7600] Legal hold - Hold interface and documentation fixes (#10074)

* [ACS-8055] Integrate endpoint for getting Legal Holds (#9771)

* ACS-8055 add listAssignedHolds API

* ACS-8055 create legal-hold service

* ACS-8055 add documentation

* ACS-8055 fix imports

* ACS-8055 clean up code

* ACS-8055 fix interface typo

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

* ACS-8055 update interface

* ACS-8055 add HoldPaging class and documentation

* ACS-8055 add interface and fix test

* ACS-8055 add documentation for legal hold service

* ACS-8055 update legal-hold.service.md

* ACS-8055 update legal-hold.service.md

* ACS-8055 update readme file

* ACS-8055 add translation

---------

Co-authored-by: DaryaBalvanovich <darya.balvanovich1@hyland.com>

* ACS-7689 Save and delete to existing hold (#9841)

* [ACS-7690] Saving adding o a new hold (#9862)

* ACS-7689 Save and delete to existing hold

* ACS-7689 Save and delete to existing hold, cleanup

* ACS-7689 Save and delete to existing hold, revert to separate methods

* ACS-7689 Save and delete to existing hold, fix specs

* ACS-7689 Save and delete to existing hold, fix specs

* ACS-7689 Save and delete to existing hold

* ACS-8055 add listAssignedHolds API

* ACS-8055 create legal-hold service

* ACS-8055 add documentation

* ACS-8055 fix imports

* ACS-8055 add HoldPaging class and documentation

* ACS-8055 add interface and fix test

* ACS-7689 Save and delete to existing hold, fix specs

* ACS-7689 Save and delete to existing hold, fix specs

* ACS-7690 integrate create and assign holds endpoints

* ACS-7690 fix imports

* ACS-7690 add bulk method

* ACS-7690 update readme file

* ACS-7690 add tests

* ACS-7690 update docs file

* ACS-7690 remove interface

* ACS-7690 update geHolds description and md file with createHold

* ACS-7690 add createHolds to md file

* ACS-7690 fix typo in spec, and description in legal-hold service

* ACS-7690 refactor create hold parameter and documentation

* ACS-7690 fixed test

* ACS-7690 fix test for getHolds

* ACS-7690 fix md for create hold action

* ACS-7690 fix rebase conflicts

---------

Co-authored-by: Tomasz Nastaly <tomasz.nastaly@hyland.com>
Co-authored-by: DaryaBalvanovich <darya.balvanovich1@hyland.com>

* ACS-7689 Update payload with hold id (#9877)

* ACS-7600 fix documentation and method name

* ACS-7600 create separate type for hold creation

* [ACS-8036] [FE] Legal Hold in ADW. Part 2 (Bulk) (#10062)

* ACS-8329 Manage bulks endpoint (#9972)

* ACS-8325 extend ContentActionRef with tooltip (#9998)

* [ACS-8425] Add functionality to select folder and assign it to a hold (#10011)

* ACS-8425 add bulkFolderHold method

* ACS-8425 refactor names and add more specific query to folder

* ACS-8425 refactor names

* ACS-8425 fix description in md file

* ACS-8425 update interfaces and add constant

* ACS-8425 fix readme file and refactor tests

* ACS-8425 fix readme

* ACS-8425 fix readme

* ACS-8036 fix import path

---------

Co-authored-by: Tomasz Nastaly <tomasz.nastaly@hyland.com>

* [ACS-7600] fix imports in dropdown widget

* [ACS-7600] fix Hold interface and documentation

* [ACS-7600] fix hold interfaces and documentation

* [ACS-7600] fix hold interfaces and documentation

* [ACS-7600] fix hold interfaces and documentation

* [ACS-7600] fix hold interfaces and documentation

* [ACS-7600] fix hold interfaces and documentation

* [ACS-7600] fix hold interfaces and documentation

---------

Co-authored-by: Darya Blavanovich <166367848+DaryaBalvanovich@users.noreply.github.com>
Co-authored-by: DaryaBalvanovich <darya.balvanovich1@hyland.com>
Co-authored-by: tomson <tomasz.nastaly@hyland.com>
Co-authored-by: g-jaskowski <grzegorz.jaskowski@hyland.com>
This commit is contained in:
tamaragruszka 2024-08-12 19:27:10 +02:00 committed by Darya Blavanovich
parent 4d512cb1a4
commit a08af0bb9d
7 changed files with 47 additions and 44 deletions

View File

@ -15,10 +15,10 @@
* limitations under the License. * limitations under the License.
*/ */
import { Injectable } from '@angular/core';
import { NodeEntry, NodePaging, NodesApi, TrashcanApi, Node, Hold, ContentPagingQuery, NodesIncludeQuery } from '@alfresco/js-api';
import { Subject, from, Observable, throwError } from 'rxjs';
import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core'; import { AlfrescoApiService, UserPreferencesService } from '@alfresco/adf-core';
import { ContentPagingQuery, Node, NodeAssignedHold, NodeEntry, NodePaging, NodesApi, NodesIncludeQuery, TrashcanApi } from '@alfresco/js-api';
import { Injectable } from '@angular/core';
import { from, Observable, Subject, throwError } from 'rxjs';
import { catchError, map } from 'rxjs/operators'; import { catchError, map } from 'rxjs/operators';
import { NodeMetadata } from '../models/node-metadata.model'; import { NodeMetadata } from '../models/node-metadata.model';
@ -182,18 +182,15 @@ export class NodesApiService {
includeSource?: boolean; includeSource?: boolean;
} & NodesIncludeQuery & } & NodesIncludeQuery &
ContentPagingQuery ContentPagingQuery
): Observable<Hold[]> { ): Observable<NodeAssignedHold[]> {
const queryOptions = Object.assign({ where: `(assocType='rma:frozenContent')` }, options); const queryOptions = Object.assign({ where: `(assocType='rma:frozenContent')` }, options);
return from(this.nodesApi.listParents(nodeId, queryOptions)).pipe( return from(this.nodesApi.listParents(nodeId, queryOptions)).pipe(
map(({ list }) => map(({ list }) =>
list.entries?.map( list.entries?.map(({ entry }) => ({
({ entry }) => id: entry.id,
({ name: entry.name
id: entry.id, }))
name: entry.name
} as Hold)
)
) )
); );
} }

View File

@ -1,22 +1,10 @@
# Hold # Hold
## Basic usage
```ts
export interface Hold {
id: string;
name: string;
reason: string;
description?: string;
selected?: string;
}
```
## Properties ## Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |
|-----------------|------------|---------------|-----------------------------------| |-----------------|------------|---------------|----------------------------------------------|
| **id** | **string** | | Hold id | | **id** | **string** | | Hold id |
| **name** | **string** | | Hold name | | **name** | **string** | | Hold name |
| **reason** | **string** | | Hold reason | | **reason** | **string** | | Hold reason |
| **description** | **string** | | Additional information for a hold | | **description** | **string** | | (Optional) Additional information for a hold |

View File

@ -1,15 +1,5 @@
# HoldBody # HoldBody
## Basic usage
```ts
export interface HoldBody {
name: string;
reason: string;
description?: string;
}
```
## Properties ## Properties
| Name | Type | Default value | Description | | Name | Type | Default value | Description |

View File

@ -0,0 +1,8 @@
# NodeAssignedHold
## Properties
| Name | Type | Default value | Description |
|----------|------------|---------------|-------------|
| **id** | **string** | | Hold id |
| **name** | **string** | | Hold name |

View File

@ -15,10 +15,8 @@
* limitations under the License. * limitations under the License.
*/ */
export interface Hold { import { HoldBody } from './holdBody';
export interface Hold extends HoldBody {
id: string; id: string;
name: string;
reason: string;
description?: string;
selected?: boolean;
} }

View File

@ -79,4 +79,5 @@ export * from './holdBody';
export * from './holdEntry'; export * from './holdEntry';
export * from './holdPaging'; export * from './holdPaging';
export * from './holdPagingList'; export * from './holdPagingList';
export * from './nodeAssignedHold';
export * from './bulkAssignHoldResponse'; export * from './bulkAssignHoldResponse';

View File

@ -0,0 +1,21 @@
/*!
* @license
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export interface NodeAssignedHold {
id: string;
name: string;
}