From bf7f202b91f7a04030e6f5adc524e9b3e78bcce6 Mon Sep 17 00:00:00 2001 From: Darya Blavanovich <166367848+DaryaBalvanovich@users.noreply.github.com> Date: Wed, 19 Jun 2024 20:59:34 +0200 Subject: [PATCH] [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 --- .../services/legal-hold.service.md | 28 +++++++ docs/core/services/nodes-api.service.md | 7 +- .../lib/common/services/nodes-api.service.ts | 29 +++++++- lib/content-services/src/lib/i18n/en.json | 3 +- .../src/lib/legal-hold/index.ts | 18 +++++ .../src/lib/legal-hold/public-api.ts | 18 +++++ .../legal-hold/services/legal-hold.service.ts | 53 +++++++++++++ .../services/legal-holds.service.spec.ts | 74 +++++++++++++++++++ lib/content-services/src/public-api.ts | 1 + lib/js-api/src/api/gs-core-rest-api/README.md | 1 + .../src/api/gs-core-rest-api/api/index.ts | 1 + .../gs-core-rest-api/api/legal-hold.api.ts | 55 ++++++++++++++ .../src/api/gs-core-rest-api/docs/Hold.md | 22 ++++++ .../api/gs-core-rest-api/docs/HoldEntry.md | 6 ++ .../api/gs-core-rest-api/docs/HoldPaging.md | 8 ++ .../gs-core-rest-api/docs/HoldPagingList.md | 7 ++ .../api/gs-core-rest-api/docs/LegalHoldApi.md | 50 +++++++++++++ ...ng_list.md => RecordCategoryPagingList.md} | 0 .../src/api/gs-core-rest-api/model/hold.ts | 24 ++++++ .../api/gs-core-rest-api/model/holdEntry.ts | 28 +++++++ .../api/gs-core-rest-api/model/holdPaging.ts | 29 ++++++++ .../gs-core-rest-api/model/holdPagingList.ts | 34 +++++++++ .../src/api/gs-core-rest-api/model/index.ts | 4 + 23 files changed, 497 insertions(+), 3 deletions(-) create mode 100644 docs/content-services/services/legal-hold.service.md create mode 100644 lib/content-services/src/lib/legal-hold/index.ts create mode 100644 lib/content-services/src/lib/legal-hold/public-api.ts create mode 100644 lib/content-services/src/lib/legal-hold/services/legal-hold.service.ts create mode 100644 lib/content-services/src/lib/legal-hold/services/legal-holds.service.spec.ts create mode 100644 lib/js-api/src/api/gs-core-rest-api/api/legal-hold.api.ts create mode 100644 lib/js-api/src/api/gs-core-rest-api/docs/Hold.md create mode 100644 lib/js-api/src/api/gs-core-rest-api/docs/HoldEntry.md create mode 100644 lib/js-api/src/api/gs-core-rest-api/docs/HoldPaging.md create mode 100644 lib/js-api/src/api/gs-core-rest-api/docs/HoldPagingList.md create mode 100644 lib/js-api/src/api/gs-core-rest-api/docs/LegalHoldApi.md rename lib/js-api/src/api/gs-core-rest-api/docs/{RecordCategoryPaging_list.md => RecordCategoryPagingList.md} (100%) create mode 100644 lib/js-api/src/api/gs-core-rest-api/model/hold.ts create mode 100644 lib/js-api/src/api/gs-core-rest-api/model/holdEntry.ts create mode 100644 lib/js-api/src/api/gs-core-rest-api/model/holdPaging.ts create mode 100644 lib/js-api/src/api/gs-core-rest-api/model/holdPagingList.ts diff --git a/docs/content-services/services/legal-hold.service.md b/docs/content-services/services/legal-hold.service.md new file mode 100644 index 0000000000..623f662f16 --- /dev/null +++ b/docs/content-services/services/legal-hold.service.md @@ -0,0 +1,28 @@ +--- +Title: Legal Hold service +Added: v6.10.0 +Status: Active +Last reviewed: 2024-06-19 +--- + +# [Legal Hold service](../../../lib/content-services/src/lib/legal-hold/services/legal-hold.service.ts "Defined in legal-hold.service.ts") + +Manages holds for nodes. + +## Class members + +### Methods + +- **getHolds**(filePlanId: `string`, options?: `ContentPagingQuery`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Hold`](../../../lib/js-api/src/api/gs-core-rest-api/docs/Hold.md)`[]>`
+ Gets the list of holds for a node. + - _filePlanId_: `string` - The identifier of a file plan. You can also use the -filePlan- alias + - _options_: `ContentPagingQuery` - 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)`[]>` - List of holds + +## Details + +To create, delete or get holds Records Management should be created and user should be added to it. + +## See also + +- [LegalHoldApi](../../../lib/js-api/src/api/gs-core-rest-api/docs/LegalHoldApi.md) diff --git a/docs/core/services/nodes-api.service.md b/docs/core/services/nodes-api.service.md index 65c4884e3b..35d6c37d5a 100644 --- a/docs/core/services/nodes-api.service.md +++ b/docs/core/services/nodes-api.service.md @@ -83,7 +83,12 @@ Accesses and manipulates ACS document nodes using their node IDs. - _nodeId:_ `string` - ID of the target node - _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 + - **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
+- **getNodeAssignHolds**(nodeId: `string`, options: `{ includeSource?: boolean; } & NodesIncludeQuery & ContentPagingQuery`): [`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:_ `{ includeSource?: boolean; } & NodesIncludeQuery & ContentPagingQuery` - 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 14b05a5f55..2c940266e6 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 @@ -16,7 +16,7 @@ */ import { Injectable } from '@angular/core'; -import { NodeEntry, NodePaging, NodesApi, TrashcanApi, Node } from '@alfresco/js-api'; +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 { catchError, map } from 'rxjs/operators'; @@ -239,4 +239,31 @@ export class NodesApiService { return new NodeMetadata(metadata, nodeEntry.entry.nodeType); } + + /** + * Gets the list of holds assigned to the node. + * + * @param nodeId ID of the target node + * @param options Optional parameters supported by JS-API + * @param options.includeSource Also include **source** (in addition to **entries**) with folder information on **nodeId** + * @returns List of assigned holds Observable + */ + getNodeAssignHolds( + nodeId: string, + options?: { + includeSource?: boolean; + } & NodesIncludeQuery & + ContentPagingQuery + ): Observable { + 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 + })) + ) + ); + } } diff --git a/lib/content-services/src/lib/i18n/en.json b/lib/content-services/src/lib/i18n/en.json index 6ae29d89f1..c27ac04e91 100644 --- a/lib/content-services/src/lib/i18n/en.json +++ b/lib/content-services/src/lib/i18n/en.json @@ -1,7 +1,8 @@ { "COMMON": { "APPLY": "Apply", - "CANCEL": "Cancel" + "CANCEL": "Cancel", + "NAME": "Name" }, "ADF_VERSION_LIST": { "ACTIONS": { diff --git a/lib/content-services/src/lib/legal-hold/index.ts b/lib/content-services/src/lib/legal-hold/index.ts new file mode 100644 index 0000000000..54beb1a252 --- /dev/null +++ b/lib/content-services/src/lib/legal-hold/index.ts @@ -0,0 +1,18 @@ +/*! + * @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 * from './public-api'; diff --git a/lib/content-services/src/lib/legal-hold/public-api.ts b/lib/content-services/src/lib/legal-hold/public-api.ts new file mode 100644 index 0000000000..70ec7d89c7 --- /dev/null +++ b/lib/content-services/src/lib/legal-hold/public-api.ts @@ -0,0 +1,18 @@ +/*! + * @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 * from './services/legal-hold.service'; 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 new file mode 100644 index 0000000000..73d551e08d --- /dev/null +++ b/lib/content-services/src/lib/legal-hold/services/legal-hold.service.ts @@ -0,0 +1,53 @@ +/*! + * @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. + */ + +import { AlfrescoApiService } from '@alfresco/adf-core'; +import { ContentPagingQuery, Hold, LegalHoldApi } from '@alfresco/js-api'; +import { Injectable } from '@angular/core'; +import { Observable, from } from 'rxjs'; +import { map } from 'rxjs/operators'; + +@Injectable({ + providedIn: 'root' +}) +export class LegalHoldService { + private _legalHoldApi: LegalHoldApi; + get legalHoldApi(): LegalHoldApi { + this._legalHoldApi = this._legalHoldApi ?? new LegalHoldApi(this.apiService.getInstance()); + return this._legalHoldApi; + } + + constructor(private readonly apiService: AlfrescoApiService) {} + + /** + * Gets the list of holds. + * + * @param filePlanId The identifier of a file plan. You can also use the -filePlan- alias. + * @param options Optional parameters supported by JS-API + * @returns List of holds Observable + */ + getHolds(filePlanId: string, options?: ContentPagingQuery): Observable { + return from(this.legalHoldApi.getHolds(filePlanId, options)).pipe( + map(({ list }) => + list.entries?.map(({ entry }) => ({ + id: entry.id, + name: entry.name + })) + ) + ); + } +} diff --git a/lib/content-services/src/lib/legal-hold/services/legal-holds.service.spec.ts b/lib/content-services/src/lib/legal-hold/services/legal-holds.service.spec.ts new file mode 100644 index 0000000000..8b2f6a4e15 --- /dev/null +++ b/lib/content-services/src/lib/legal-hold/services/legal-holds.service.spec.ts @@ -0,0 +1,74 @@ +/*! + * @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. + */ + +import { TestBed } from '@angular/core/testing'; +import { LegalHoldService } from './legal-hold.service'; +import { ContentTestingModule } from '../../testing/content.testing.module'; +import { Hold, HoldPaging } from '@alfresco/js-api'; + +describe('LegalHoldsService', () => { + let service: LegalHoldService; + let legalHolds: HoldPaging; + let returnedHolds: Hold[]; + const mockId = 'mockId'; + + beforeEach(() => { + TestBed.configureTestingModule({ + imports: [ContentTestingModule] + }); + service = TestBed.inject(LegalHoldService); + + legalHolds = { + list: { + entries: [ + { + entry: { + id: mockId, + name: 'some name', + reason: 'some description' + } + } + ] + } + } as HoldPaging; + + returnedHolds = [ + { + id: mockId, + name: 'some name', + reason: 'some description', + description: undefined + } + ]; + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); + + describe('getHolds', () => { + it('should return array of Hold interface', (done) => { + spyOn(service.legalHoldApi, 'getHolds').and.returnValue(Promise.resolve(legalHolds)); + + service.getHolds(mockId).subscribe((holds) => { + expect(holds).toEqual(returnedHolds); + expect(service.legalHoldApi.getHolds).toHaveBeenCalledWith(mockId, {}); + done(); + }); + }); + }); +}); diff --git a/lib/content-services/src/public-api.ts b/lib/content-services/src/public-api.ts index b32168f614..c6453855dc 100644 --- a/lib/content-services/src/public-api.ts +++ b/lib/content-services/src/public-api.ts @@ -43,6 +43,7 @@ export * from './lib/viewer/index'; export * from './lib/security/index'; export * from './lib/infinite-scroll-datasource'; export * from './lib/prediction/index'; +export * from './lib/legal-hold/index'; export * from './lib/content.module'; export * from './lib/material.module'; diff --git a/lib/js-api/src/api/gs-core-rest-api/README.md b/lib/js-api/src/api/gs-core-rest-api/README.md index 7c7fbaa2ac..f47e649957 100644 --- a/lib/js-api/src/api/gs-core-rest-api/README.md +++ b/lib/js-api/src/api/gs-core-rest-api/README.md @@ -21,6 +21,7 @@ Class | Method | HTTP request | Description *.GssitesApi* | [**deleteRMSite**](docs/GssitesApi.md#deleteRMSite) | **DELETE** /gs-sites/rm | Delete the Records Management (RM) site *.GssitesApi* | [**getRMSite**](docs/GssitesApi.md#getRMSite) | **GET** /gs-sites/rm | Get the Records Management (RM) site *.GssitesApi* | [**updateRMSite**](docs/GssitesApi.md#updateRMSite) | **PUT** /gs-sites/rm | Update the Records Management (RM) site +*.LegalHoldApi* | [**getHolds**](docs/LegalHoldApi.md#getHolds) | **GET** /file-plans/{filePlanId}/holds | Get legal hold list *.RecordCategoriesApi* | [**createRecordCategoryChild**](docs/RecordCategoriesApi.md#createRecordCategoryChild) | **POST** /record-categories/{recordCategoryId}/children | Create a record category or a record folder *.RecordCategoriesApi* | [**deleteRecordCategory**](docs/RecordCategoriesApi.md#deleteRecordCategory) | **DELETE** /record-categories/{recordCategoryId} | Delete a record category *.RecordCategoriesApi* | [**getRecordCategory**](docs/RecordCategoriesApi.md#getRecordCategory) | **GET** /record-categories/{recordCategoryId} | Get a record category diff --git a/lib/js-api/src/api/gs-core-rest-api/api/index.ts b/lib/js-api/src/api/gs-core-rest-api/api/index.ts index 087eb26628..4df05570a1 100644 --- a/lib/js-api/src/api/gs-core-rest-api/api/index.ts +++ b/lib/js-api/src/api/gs-core-rest-api/api/index.ts @@ -26,3 +26,4 @@ export * from './transferContainers.api'; export * from './transfers.api'; export * from './unfiledContainers.api'; export * from './unfiledRecordFolders.api'; +export * from './legal-hold.api'; diff --git a/lib/js-api/src/api/gs-core-rest-api/api/legal-hold.api.ts b/lib/js-api/src/api/gs-core-rest-api/api/legal-hold.api.ts new file mode 100644 index 0000000000..2e4663bead --- /dev/null +++ b/lib/js-api/src/api/gs-core-rest-api/api/legal-hold.api.ts @@ -0,0 +1,55 @@ +/*! + * @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. + */ + +import { BaseApi } from './base.api'; +import { throwIfNotDefined } from '../../../assert'; +import { ContentPagingQuery } from '../../content-rest-api'; +import { HoldPaging } from '../model/holdPaging'; + +/** + * Legal Holds service. + * + * @module LegalHoldApi + */ +export class LegalHoldApi extends BaseApi { + /** + * List of legal holds + * + * @param filePlanId The identifier of a file plan. You can also use the -filePlan- alias. + * @param options Optional parameters + * @returns Promise + */ + getHolds(filePlanId = '-filePlan-', options?: ContentPagingQuery): Promise { + throwIfNotDefined(filePlanId, 'filePlanId'); + + const pathParams = { + filePlanId + }; + + const queryParams = { + skipCount: options?.skipCount, + maxItems: options?.maxItems + }; + + return this.get({ + path: '/file-plans/{filePlanId}/holds', + pathParams, + queryParams, + returnType: HoldPaging + }); + } +} diff --git a/lib/js-api/src/api/gs-core-rest-api/docs/Hold.md b/lib/js-api/src/api/gs-core-rest-api/docs/Hold.md new file mode 100644 index 0000000000..5aa50dacb9 --- /dev/null +++ b/lib/js-api/src/api/gs-core-rest-api/docs/Hold.md @@ -0,0 +1,22 @@ +# Hold + +## Basic usage + +```ts +export interface Hold { + name: string; + id?: 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 diff --git a/lib/js-api/src/api/gs-core-rest-api/docs/HoldEntry.md b/lib/js-api/src/api/gs-core-rest-api/docs/HoldEntry.md new file mode 100644 index 0000000000..79a1a354e3 --- /dev/null +++ b/lib/js-api/src/api/gs-core-rest-api/docs/HoldEntry.md @@ -0,0 +1,6 @@ +# HoldEntry + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entry** | [**Hold**](Hold.md) | | [default to null] diff --git a/lib/js-api/src/api/gs-core-rest-api/docs/HoldPaging.md b/lib/js-api/src/api/gs-core-rest-api/docs/HoldPaging.md new file mode 100644 index 0000000000..51946ffbe8 --- /dev/null +++ b/lib/js-api/src/api/gs-core-rest-api/docs/HoldPaging.md @@ -0,0 +1,8 @@ +# HoldPaging + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**list** | [**HoldPagingList**](HoldPagingList.md) | | [optional] [default to null] + + diff --git a/lib/js-api/src/api/gs-core-rest-api/docs/HoldPagingList.md b/lib/js-api/src/api/gs-core-rest-api/docs/HoldPagingList.md new file mode 100644 index 0000000000..f73c1eab98 --- /dev/null +++ b/lib/js-api/src/api/gs-core-rest-api/docs/HoldPagingList.md @@ -0,0 +1,7 @@ +# HoldPagingList + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | [optional] [default to null] +**entries** | [**HoldEntry[]**](HoldEntry.md) | | [optional] [default to null] diff --git a/lib/js-api/src/api/gs-core-rest-api/docs/LegalHoldApi.md b/lib/js-api/src/api/gs-core-rest-api/docs/LegalHoldApi.md new file mode 100644 index 0000000000..2942b17327 --- /dev/null +++ b/lib/js-api/src/api/gs-core-rest-api/docs/LegalHoldApi.md @@ -0,0 +1,50 @@ +# LegalHoldApi + +All URIs are relative to *https://localhost/alfresco/api/-default-/public/gs/versions/1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getHolds**](LegalHoldApi.md#getHolds) | **GET** /file-plans/{filePlanId}/holds | Get legal holds list + + +# **getHolds** +> HoldPaging getHolds(filePlanId, opts) + +Get legal holds list. + +### Example +```javascript +import LegalHoldApi from 'LegalHoldApi'; +import { AlfrescoApi } from '@alfresco/js-api'; + +this.alfrescoApi = new AlfrescoApi(); +this.alfrescoApi.setConfig({ + hostEcm: 'http://127.0.0.1:8080' +}); + +let legalHoldApi = new LegalHoldApi(this.alfrescoApi); + +let opts = { + 'skipCount': 56 // | The number of entities that exist in the collection before those included in this list. + 'maxItems': 56 // | The maximum number of items to return in the list. +}; + +legalHoldApi.getHolds('-filePlan-', opts).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + +Name | Type | Default value | Description +------------- | ------------- | ------------- | ------------- + **filePlanId** | **string** | | The site details + **skipCount** | **number**| `0` | The number of entities that exist in the collection before those included in this list. [optional] + **maxItems** | **number**| `100` | The maximum number of items to return in the list. [optional] + +### Return type + +[**HoldPaging**](HoldPaging.md) diff --git a/lib/js-api/src/api/gs-core-rest-api/docs/RecordCategoryPaging_list.md b/lib/js-api/src/api/gs-core-rest-api/docs/RecordCategoryPagingList.md similarity index 100% rename from lib/js-api/src/api/gs-core-rest-api/docs/RecordCategoryPaging_list.md rename to lib/js-api/src/api/gs-core-rest-api/docs/RecordCategoryPagingList.md diff --git a/lib/js-api/src/api/gs-core-rest-api/model/hold.ts b/lib/js-api/src/api/gs-core-rest-api/model/hold.ts new file mode 100644 index 0000000000..fb6c891d16 --- /dev/null +++ b/lib/js-api/src/api/gs-core-rest-api/model/hold.ts @@ -0,0 +1,24 @@ +/*! + * @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 Hold { + name: string; + id?: string; + reason?: string; + description?: string; + selected?: boolean; +} diff --git a/lib/js-api/src/api/gs-core-rest-api/model/holdEntry.ts b/lib/js-api/src/api/gs-core-rest-api/model/holdEntry.ts new file mode 100644 index 0000000000..d547e79893 --- /dev/null +++ b/lib/js-api/src/api/gs-core-rest-api/model/holdEntry.ts @@ -0,0 +1,28 @@ +/*! + * @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. + */ + +import { Hold } from './hold'; + +export class HoldEntry { + entry: Hold; + + constructor(input?: Partial) { + if (input) { + Object.assign(this, input); + } + } +} diff --git a/lib/js-api/src/api/gs-core-rest-api/model/holdPaging.ts b/lib/js-api/src/api/gs-core-rest-api/model/holdPaging.ts new file mode 100644 index 0000000000..7506d03ec4 --- /dev/null +++ b/lib/js-api/src/api/gs-core-rest-api/model/holdPaging.ts @@ -0,0 +1,29 @@ +/*! + * @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. + */ + +import { HoldPagingList } from './holdPagingList'; + +export class HoldPaging { + list?: HoldPagingList; + + constructor(input?: Partial) { + if (input) { + Object.assign(this, input); + this.list = input.list ? new HoldPagingList(input.list) : undefined; + } + } +} diff --git a/lib/js-api/src/api/gs-core-rest-api/model/holdPagingList.ts b/lib/js-api/src/api/gs-core-rest-api/model/holdPagingList.ts new file mode 100644 index 0000000000..9d1cb0acfc --- /dev/null +++ b/lib/js-api/src/api/gs-core-rest-api/model/holdPagingList.ts @@ -0,0 +1,34 @@ +/*! + * @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. + */ + +import { Pagination } from '../../content-rest-api'; +import { HoldEntry } from './holdEntry'; + +export class HoldPagingList { + pagination?: Pagination; + entries?: HoldEntry[]; + + constructor(input?: Partial) { + if (input) { + Object.assign(this, input); + this.pagination = input.pagination ? new Pagination(input.pagination) : undefined; + if (input.entries) { + this.entries = input.entries.map((item) => new HoldEntry(item)); + } + } + } +} diff --git a/lib/js-api/src/api/gs-core-rest-api/model/index.ts b/lib/js-api/src/api/gs-core-rest-api/model/index.ts index 5b5449c74b..2229944250 100644 --- a/lib/js-api/src/api/gs-core-rest-api/model/index.ts +++ b/lib/js-api/src/api/gs-core-rest-api/model/index.ts @@ -74,3 +74,7 @@ export * from './transferChildAssociation'; export * from './transferContainerChildAssociation'; export * from './unfiledContainerChildAssociation'; export * from './unfiledRecordFolderChildAssociation'; +export * from './hold'; +export * from './holdEntry'; +export * from './holdPaging'; +export * from './holdPagingList';