[ACS-7600] fix Hold interface and documentation

This commit is contained in:
tamaragruszka
2024-08-09 16:20:28 +02:00
committed by Darya Blavanovich
parent 6d6ef29c73
commit 8a91945d0a
8 changed files with 35 additions and 42 deletions

View File

@@ -43,10 +43,7 @@ export class NodesApiService {
return this._nodesApi;
}
constructor(
private apiService: AlfrescoApiService,
private preferences: UserPreferencesService
) {}
constructor(private apiService: AlfrescoApiService, private preferences: UserPreferencesService) {}
private getEntryFromEntity(entity: NodeEntry): Node {
return entity.entry;
@@ -190,10 +187,13 @@ export class NodesApiService {
return from(this.nodesApi.listParents(nodeId, queryOptions)).pipe(
map(({ list }) =>
list.entries?.map(({ entry }) => ({
id: entry.id,
name: entry.name
}))
list.entries?.map(
({ entry }) =>
({
id: entry.id,
name: entry.name
} as Hold)
)
)
);
}

View File

@@ -41,14 +41,7 @@ export class LegalHoldService {
* @returns List of holds Observable<Hold[]>
*/
getHolds(filePlanId: string, options?: ContentPagingQuery): Observable<Hold[]> {
return from(this.legalHoldApi.getHolds(filePlanId, options)).pipe(
map(({ list }) =>
list.entries?.map(({ entry }) => ({
id: entry.id,
name: entry.name
}))
)
);
return from(this.legalHoldApi.getHolds(filePlanId, options)).pipe(map(({ list }) => list.entries?.map(({ entry }) => entry)));
}
/**

View File

@@ -4,9 +4,9 @@
```ts
export interface Hold {
id: string;
name: string;
id?: string;
reason?: string;
reason: string;
description?: string;
selected?: string;
}
@@ -14,9 +14,9 @@ export interface Hold {
## 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** | | Additional information for a hold |

View File

@@ -12,8 +12,8 @@ export interface HoldBody {
## Properties
Name | Type | Default value | Description
--------------- | ------------- | ------------- | --------------------------------------------
**name** | **string** | | Hold name
**reason** | **string** | | Hold reason
**description** | **string** | | (Optional) Additional information for a hold
| Name | Type | Default value | Description |
|-----------------|------------|---------------|----------------------------------------------|
| **name** | **string** | | Hold name |
| **reason** | **string** | | Hold reason |
| **description** | **string** | | (Optional) Additional information for a hold |

View File

@@ -1,6 +1,6 @@
# HoldEntry
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entry** | [**Hold**](Hold.md) | | [default to null]
| Name | Type | Description | Notes |
|-----------|---------------------|-------------|-------------------|
| **entry** | [**Hold**](Hold.md) | | [default to null] |

View File

@@ -1,8 +1,8 @@
# HoldPaging
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**list** | [**HoldPagingList**](HoldPagingList.md) | | [optional] [default to null]
| Name | Type | Description | Notes |
|----------|-----------------------------------------|-------------|------------------------------|
| **list** | [**HoldPagingList**](HoldPagingList.md) | | [optional] [default to null] |

View File

@@ -1,7 +1,7 @@
# HoldPagingList
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pagination** | [**Pagination**](Pagination.md) | | [optional] [default to null]
**entries** | [**HoldEntry[]**](HoldEntry.md) | | [optional] [default to null]
| Name | Type | Description | Notes |
|----------------|---------------------------------|-------------|------------------------------|
| **pagination** | [**Pagination**](Pagination.md) | | [optional] [default to null] |
| **entries** | [**HoldEntry[]**](HoldEntry.md) | | [optional] [default to null] |

View File

@@ -16,9 +16,9 @@
*/
export interface Hold {
id?: string;
name?: string;
reason?: string;
id: string;
name: string;
reason: string;
description?: string;
selected?: boolean;
}