mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-08 14:51:32 +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:
@@ -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