Skip to content

Commit

Permalink
[ACS-7600] Legal hold - Hold interface and documentation fixes (#10074)
Browse files Browse the repository at this point in the history
* [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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: DaryaBalvanovich <[email protected]>

* 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 <[email protected]>

* [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 <[email protected]>
Co-authored-by: DaryaBalvanovich <[email protected]>
Co-authored-by: tomson <[email protected]>
Co-authored-by: g-jaskowski <[email protected]>
  • Loading branch information
5 people committed Aug 13, 2024
1 parent 4d512cb commit a08af0b
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 44 deletions.
19 changes: 8 additions & 11 deletions lib/content-services/src/lib/common/services/nodes-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* 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 { 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 { NodeMetadata } from '../models/node-metadata.model';

Expand Down Expand Up @@ -182,18 +182,15 @@ export class NodesApiService {
includeSource?: boolean;
} & NodesIncludeQuery &
ContentPagingQuery
): Observable<Hold[]> {
): Observable<NodeAssignedHold[]> {
const queryOptions = Object.assign({ where: `(assocType='rma:frozenContent')` }, options);

return from(this.nodesApi.listParents(nodeId, queryOptions)).pipe(
map(({ list }) =>
list.entries?.map(
({ entry }) =>
({
id: entry.id,
name: entry.name
} as Hold)
)
list.entries?.map(({ entry }) => ({
id: entry.id,
name: entry.name
}))
)
);
}
Expand Down
24 changes: 6 additions & 18 deletions lib/js-api/src/api/gs-core-rest-api/docs/Hold.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
# Hold

## Basic usage

```ts
export interface Hold {
id: string;
name: string;
reason: string;
description?: string;
selected?: string;
}
```

## Properties

| Name | Type | Default value | Description |
|-----------------|------------|---------------|-----------------------------------|
| **id** | **string** | | Hold id |
| **name** | **string** | | Hold name |
| **reason** | **string** | | Hold reason |
| **description** | **string** | | Additional information for a hold |
| Name | Type | Default value | Description |
|-----------------|------------|---------------|----------------------------------------------|
| **id** | **string** | | Hold id |
| **name** | **string** | | Hold name |
| **reason** | **string** | | Hold reason |
| **description** | **string** | | (Optional) Additional information for a hold |
10 changes: 0 additions & 10 deletions lib/js-api/src/api/gs-core-rest-api/docs/HoldBody.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# HoldBody

## Basic usage

```ts
export interface HoldBody {
name: string;
reason: string;
description?: string;
}
```

## Properties

| Name | Type | Default value | Description |
Expand Down
8 changes: 8 additions & 0 deletions lib/js-api/src/api/gs-core-rest-api/docs/NodeAssignedHold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# NodeAssignedHold

## Properties

| Name | Type | Default value | Description |
|----------|------------|---------------|-------------|
| **id** | **string** | | Hold id |
| **name** | **string** | | Hold name |
8 changes: 3 additions & 5 deletions lib/js-api/src/api/gs-core-rest-api/model/hold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
* limitations under the License.
*/

export interface Hold {
import { HoldBody } from './holdBody';

export interface Hold extends HoldBody {
id: string;
name: string;
reason: string;
description?: string;
selected?: boolean;
}
1 change: 1 addition & 0 deletions lib/js-api/src/api/gs-core-rest-api/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ export * from './holdBody';
export * from './holdEntry';
export * from './holdPaging';
export * from './holdPagingList';
export * from './nodeAssignedHold';
export * from './bulkAssignHoldResponse';
21 changes: 21 additions & 0 deletions lib/js-api/src/api/gs-core-rest-api/model/nodeAssignedHold.ts
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit a08af0b

Please sign in to comment.