mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[PRODENG-211] integrate JS-API with monorepo (part 1) (#9081)
* integrate JS-API with monorepo * [ci:force] fix token issue [ci:force] migrate docs folder [ci:force] clean personal tokens * [ci:force] gha workflow support * [ci:force] npm publish target * fix js-api test linting * [ci:force] fix test linting, mocks, https scheme * [ci:force] fix https scheme * [ci:force] typescript mappings * [ci:force] update scripts * lint fixes * linting fixes * fix linting * [ci:force] linting fixes * linting fixes * [ci:force] remove js-api upstream and corresponding scripts * [ci:force] jsdoc fixes * fix jsdoc linting * [ci:force] jsdoc fixes * [ci:force] jsdoc fixes * jsdoc fixes * jsdoc fixes * jsdoc fixes * [ci:force] fix jsdoc * [ci:force] reduce code duplication * replace 'chai' expect with node.js assert * replace 'chai' expect with node.js assert * [ci:force] remove chai and chai-spies for js-api testing * [ci:force] cleanup and fix imports * [ci:force] fix linting * [ci:force] fix unit test * [ci:force] fix sonar linting findings * [ci:force] switch activiti api models to interfaces (-2.5% reduction of bundle) * [ci:force] switch activiti api models to interfaces * [ci:force] switch AGS api models to interfaces * [ci:force] switch AGS api models to interfaces * [ci:force] switch search api models to interfaces * [ci:force] switch content api models to interfaces where applicable
This commit is contained in:
30
lib/js-api/src/api/discovery-rest-api/README.md
Normal file
30
lib/js-api/src/api/discovery-rest-api/README.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# **Discovery API**
|
||||
|
||||
Provides access to information about Alfresco Content Services.
|
||||
|
||||
> Documentation updated on: 2019-10-17T13:55:16.056+01:00
|
||||
|
||||
## Methods
|
||||
|
||||
All URIs are relative to:
|
||||
|
||||
```text
|
||||
https://localhost/alfresco/api
|
||||
```
|
||||
|
||||
| Class | Method | HTTP request | Description |
|
||||
|--------------|-------------------------------------------------------------------------------|--------------------|----------------------------|
|
||||
| DiscoveryApi | [getRepositoryInformation](docs/DiscoveryApi.md#getRepositoryInformation) | **GET** /discovery | Get repository information |
|
||||
|
||||
## Models
|
||||
|
||||
- [DiscoveryEntry](docs/DiscoveryEntry.md)
|
||||
- [EntitlementsInfo](docs/EntitlementsInfo.md)
|
||||
- [ErrorError](docs/ErrorError.md)
|
||||
- [LicenseInfo](docs/LicenseInfo.md)
|
||||
- [ModelError](docs/ModelError.md)
|
||||
- [ModuleInfo](docs/ModuleInfo.md)
|
||||
- [RepositoryEntry](docs/RepositoryEntry.md)
|
||||
- [RepositoryInfo](docs/RepositoryInfo.md)
|
||||
- [StatusInfo](docs/StatusInfo.md)
|
||||
- [VersionInfo](docs/VersionInfo.md)
|
25
lib/js-api/src/api/discovery-rest-api/api/base.api.ts
Normal file
25
lib/js-api/src/api/discovery-rest-api/api/base.api.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 { ApiClient } from '../../../api-clients/api-client';
|
||||
import { LegacyHttpClient } from '../../../api-clients/http-client.interface';
|
||||
|
||||
export abstract class BaseApi extends ApiClient {
|
||||
override get apiClient(): LegacyHttpClient {
|
||||
return this.httpClient ?? this.alfrescoApi.discoveryClient;
|
||||
}
|
||||
}
|
38
lib/js-api/src/api/discovery-rest-api/api/discovery.api.ts
Normal file
38
lib/js-api/src/api/discovery-rest-api/api/discovery.api.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 { DiscoveryEntry } from '../model/discoveryEntry';
|
||||
import { BaseApi } from './base.api';
|
||||
|
||||
/**
|
||||
* Discovery service.
|
||||
*/
|
||||
export class DiscoveryApi extends BaseApi {
|
||||
/**
|
||||
* Get repository information
|
||||
*
|
||||
* **Note:** this endpoint is available in Alfresco 5.2 and newer versions.
|
||||
*
|
||||
* @returns Promise<DiscoveryEntry>
|
||||
*/
|
||||
getRepositoryInformation(): Promise<DiscoveryEntry> {
|
||||
return this.get({
|
||||
path: '/discovery',
|
||||
returnType: DiscoveryEntry
|
||||
});
|
||||
}
|
||||
}
|
18
lib/js-api/src/api/discovery-rest-api/api/index.ts
Normal file
18
lib/js-api/src/api/discovery-rest-api/api/index.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 './discovery.api';
|
42
lib/js-api/src/api/discovery-rest-api/docs/DiscoveryApi.md
Normal file
42
lib/js-api/src/api/discovery-rest-api/docs/DiscoveryApi.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# DiscoveryApi
|
||||
|
||||
All URIs are relative to *https://localhost/alfresco/api*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|--------------------------------------------------------------------------|--------------------|----------------------------|
|
||||
| [**getRepositoryInformation**](DiscoveryApi.md#getRepositoryInformation) | **GET** /discovery | Get repository information |
|
||||
|
||||
<a name="getRepositoryInformation"></a>
|
||||
## getRepositoryInformation
|
||||
> DiscoveryEntry getRepositoryInformation()
|
||||
|
||||
Get repository information
|
||||
|
||||
**Note:** this endpoint is available in Alfresco 5.2 and newer versions.
|
||||
|
||||
Retrieves the capabilities and detailed version information from the repository.
|
||||
|
||||
**Example**
|
||||
|
||||
```javascript
|
||||
import { AlfrescoApi, DiscoveryApi} from '@alfresco/js-api';
|
||||
|
||||
const alfrescoApi = new AlfrescoApi({
|
||||
hostEcm: 'http://127.0.0.1:8080'
|
||||
});
|
||||
|
||||
const discoveryApi = new DiscoveryApi(alfrescoApi);
|
||||
|
||||
discoveryApi.getRepositoryInformation().then(
|
||||
(data) => {
|
||||
console.log('API called successfully. Returned data: ' + data);
|
||||
},
|
||||
(error) => {
|
||||
console.error(error);
|
||||
});
|
||||
```
|
||||
|
||||
### Return type
|
||||
|
||||
[**DiscoveryEntry**](DiscoveryEntry.md)
|
||||
|
@@ -0,0 +1,8 @@
|
||||
# DiscoveryEntry
|
||||
|
||||
## Properties
|
||||
| Name | Type | Notes |
|
||||
|-----------|-------------------------------------------|-------------------|
|
||||
| entry | [RepositoryEntry](RepositoryEntry.md) | [default to null] |
|
||||
|
||||
|
@@ -0,0 +1,12 @@
|
||||
# EntitlementsInfo
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Notes |
|
||||
|--------------------|---------|------------------------------|
|
||||
| maxUsers | number | [optional] [default to null] |
|
||||
| maxDocs | number | [optional] [default to null] |
|
||||
| isClusterEnabled | boolean | [optional] [default to null] |
|
||||
| isCryptodocEnabled | boolean | [optional] [default to null] |
|
||||
|
||||
|
9
lib/js-api/src/api/discovery-rest-api/docs/Error.md
Normal file
9
lib/js-api/src/api/discovery-rest-api/docs/Error.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# ModelError
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|-----------|---------------------------------|-------------|------------------------------|
|
||||
| **error** | [**ErrorError**](ErrorError.md) | | [optional] [default to null] |
|
||||
|
||||
|
14
lib/js-api/src/api/discovery-rest-api/docs/Error_error.md
Normal file
14
lib/js-api/src/api/discovery-rest-api/docs/Error_error.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# ErrorError
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Notes |
|
||||
|----------------|--------|------------------------------|
|
||||
| errorKey | string | [optional] [default to null] |
|
||||
| statusCode | number | [default to null] |
|
||||
| briefSummary | string | [default to null] |
|
||||
| stackTrace | string | [default to null] |
|
||||
| descriptionURL | string | [default to null] |
|
||||
| logId | string | [optional] [default to null] |
|
||||
|
||||
|
14
lib/js-api/src/api/discovery-rest-api/docs/LicenseInfo.md
Normal file
14
lib/js-api/src/api/discovery-rest-api/docs/LicenseInfo.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# LicenseInfo
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Notes |
|
||||
|---------------|-----------------------------------------|------------------------------|
|
||||
| issuedAt | [Date](Date.md) | [default to null] |
|
||||
| expiresAt | [Date](Date.md) | [default to null] |
|
||||
| remainingDays | number | [default to null] |
|
||||
| holder | string | [default to null] |
|
||||
| mode | string | [default to null] |
|
||||
| entitlements | [EntitlementsInfo](EntitlementsInfo.md) | [optional] [default to null] |
|
||||
|
||||
|
16
lib/js-api/src/api/discovery-rest-api/docs/ModuleInfo.md
Normal file
16
lib/js-api/src/api/discovery-rest-api/docs/ModuleInfo.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# ModuleInfo
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Notes |
|
||||
|--------------|---------------------|------------------------------|
|
||||
| id | string | [optional] [default to null] |
|
||||
| title | string | [optional] [default to null] |
|
||||
| description | string | [optional] [default to null] |
|
||||
| version | string | [optional] [default to null] |
|
||||
| installDate | [**Date**](Date.md) | [optional] [default to null] |
|
||||
| installState | string | [optional] [default to null] |
|
||||
| versionMin | string | [optional] [default to null] |
|
||||
| versionMax | string | [optional] [default to null] |
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
# RepositoryEntry
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Notes |
|
||||
|------------|-------------------------------------|-------------------|
|
||||
| repository | [RepositoryInfo](RepositoryInfo.md) | [default to null] |
|
||||
|
||||
|
13
lib/js-api/src/api/discovery-rest-api/docs/RepositoryInfo.md
Normal file
13
lib/js-api/src/api/discovery-rest-api/docs/RepositoryInfo.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# RepositoryInfo
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Notes |
|
||||
|---------|-----------------------------------|------------------------------|
|
||||
| edition | string | [default to null] |
|
||||
| version | [VersionInfo](VersionInfo.md) | [default to null] |
|
||||
| status | [StatusInfo](StatusInfo.md) | [default to null] |
|
||||
| license | [LicenseInfo](LicenseInfo.md) | [optional] [default to null] |
|
||||
| modules | [ModuleInfo**[]**](ModuleInfo.md) | [optional] [default to null] |
|
||||
|
||||
|
12
lib/js-api/src/api/discovery-rest-api/docs/StatusInfo.md
Normal file
12
lib/js-api/src/api/discovery-rest-api/docs/StatusInfo.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# StatusInfo
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type |
|
||||
|------------------------------|---------|
|
||||
| isReadOnly | boolean |
|
||||
| isAuditEnabled | boolean |
|
||||
| isQuickShareEnabled | boolean |
|
||||
| isThumbnailGenerationEnabled | boolean |
|
||||
| isDirectAccessUrlEnabled | boolean |
|
||||
|
15
lib/js-api/src/api/discovery-rest-api/docs/VersionInfo.md
Normal file
15
lib/js-api/src/api/discovery-rest-api/docs/VersionInfo.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# VersionInfo
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Notes |
|
||||
|---------|--------|-------------------|
|
||||
| major | string | [default to null] |
|
||||
| minor | string | [default to null] |
|
||||
| patch | string | [default to null] |
|
||||
| hotfix | string | [default to null] |
|
||||
| schema | number | [default to null] |
|
||||
| label | string | [default to null] |
|
||||
| display | string | [default to null] |
|
||||
|
||||
|
19
lib/js-api/src/api/discovery-rest-api/index.ts
Normal file
19
lib/js-api/src/api/discovery-rest-api/index.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 './api';
|
||||
export * from './model';
|
@@ -0,0 +1,30 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 { RepositoryEntry } from './repositoryEntry';
|
||||
|
||||
export class DiscoveryEntry {
|
||||
entry: RepositoryEntry;
|
||||
|
||||
constructor(input?: Partial<DiscoveryEntry>) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
this.entry = input.entry ? new RepositoryEntry(input.entry) : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 class EntitlementsInfo {
|
||||
maxUsers?: number;
|
||||
maxDocs?: number;
|
||||
isClusterEnabled?: boolean;
|
||||
isCryptodocEnabled?: boolean;
|
||||
|
||||
constructor(input?: Partial<EntitlementsInfo>) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
}
|
||||
}
|
||||
}
|
25
lib/js-api/src/api/discovery-rest-api/model/index.ts
Normal file
25
lib/js-api/src/api/discovery-rest-api/model/index.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 './discoveryEntry';
|
||||
export * from './entitlementsInfo';
|
||||
export * from './licenseInfo';
|
||||
export * from './moduleInfo';
|
||||
export * from './repositoryEntry';
|
||||
export * from './repositoryInfo';
|
||||
export * from './statusInfo';
|
||||
export * from './versionInfo';
|
37
lib/js-api/src/api/discovery-rest-api/model/licenseInfo.ts
Normal file
37
lib/js-api/src/api/discovery-rest-api/model/licenseInfo.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 { DateAlfresco } from '../../content-custom-api/model/dateAlfresco';
|
||||
import { EntitlementsInfo } from './entitlementsInfo';
|
||||
|
||||
export class LicenseInfo {
|
||||
issuedAt: Date;
|
||||
expiresAt: Date;
|
||||
remainingDays: number;
|
||||
holder: string;
|
||||
mode: string;
|
||||
entitlements?: EntitlementsInfo;
|
||||
|
||||
constructor(input?: Partial<LicenseInfo>) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
this.issuedAt = input.issuedAt ? DateAlfresco.parseDate(input.issuedAt) : undefined;
|
||||
this.expiresAt = input.expiresAt ? DateAlfresco.parseDate(input.expiresAt) : undefined;
|
||||
this.entitlements = input.entitlements ? new EntitlementsInfo(input.entitlements) : undefined;
|
||||
}
|
||||
}
|
||||
}
|
36
lib/js-api/src/api/discovery-rest-api/model/moduleInfo.ts
Normal file
36
lib/js-api/src/api/discovery-rest-api/model/moduleInfo.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 { DateAlfresco } from '../../content-custom-api/model/dateAlfresco';
|
||||
|
||||
export class ModuleInfo {
|
||||
id?: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
version?: string;
|
||||
installDate?: Date;
|
||||
installState?: string;
|
||||
versionMin?: string;
|
||||
versionMax?: string;
|
||||
|
||||
constructor(input?: Partial<ModuleInfo>) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
this.installDate = input.installDate ? DateAlfresco.parseDate(input.installDate) : undefined;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 { RepositoryInfo } from './repositoryInfo';
|
||||
|
||||
export class RepositoryEntry {
|
||||
repository: RepositoryInfo;
|
||||
|
||||
constructor(input?: Partial<RepositoryEntry>) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
this.repository = input.repository ? new RepositoryInfo(input.repository) : undefined;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 { LicenseInfo } from './licenseInfo';
|
||||
import { ModuleInfo } from './moduleInfo';
|
||||
import { StatusInfo } from './statusInfo';
|
||||
import { VersionInfo } from './versionInfo';
|
||||
|
||||
export class RepositoryInfo {
|
||||
edition: string;
|
||||
version: VersionInfo;
|
||||
status: StatusInfo;
|
||||
license?: LicenseInfo;
|
||||
modules?: ModuleInfo[];
|
||||
|
||||
constructor(input?: Partial<RepositoryInfo>) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
this.version = input.version ? new VersionInfo(input.version) : undefined;
|
||||
this.status = input.status ? new StatusInfo(input.status) : undefined;
|
||||
this.license = input.license ? new LicenseInfo(input.license) : undefined;
|
||||
if (input.modules) {
|
||||
this.modules = input.modules.map((item) => new ModuleInfo(item));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
30
lib/js-api/src/api/discovery-rest-api/model/statusInfo.ts
Normal file
30
lib/js-api/src/api/discovery-rest-api/model/statusInfo.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 class StatusInfo {
|
||||
isReadOnly: boolean;
|
||||
isAuditEnabled: boolean;
|
||||
isQuickShareEnabled: boolean;
|
||||
isThumbnailGenerationEnabled: boolean;
|
||||
isDirectAccessUrlEnabled: boolean;
|
||||
|
||||
constructor(input?: Partial<StatusInfo>) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
}
|
||||
}
|
||||
}
|
32
lib/js-api/src/api/discovery-rest-api/model/versionInfo.ts
Normal file
32
lib/js-api/src/api/discovery-rest-api/model/versionInfo.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 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 class VersionInfo {
|
||||
major: string;
|
||||
minor: string;
|
||||
patch: string;
|
||||
hotfix: string;
|
||||
schema: number;
|
||||
label: string;
|
||||
display: string;
|
||||
|
||||
constructor(input?: Partial<VersionInfo>) {
|
||||
if (input) {
|
||||
Object.assign(this, input);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user