[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:
Denys Vuika
2023-11-21 10:27:51 +00:00
committed by GitHub
parent 804fa2ffd4
commit ea2c0ce229
1334 changed files with 82605 additions and 1068 deletions

View File

@@ -0,0 +1,32 @@
# **Model API**
Provides access to the model features of Alfresco Content Services.
> Documentation updated on: 2021-02-23T00:57:02.188+05:30
## Methods
All URIs are relative to:
```text
https://localhost/alfresco/api/-default-/public/alfresco/versions/1
```
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
AspectsApi | [**getAspect**](docs/AspectsApi.md#getAspect) | **GET** /aspects/{aspectId} | Get an aspect
AspectsApi | [**listAspects**](docs/AspectsApi.md#listAspects) | **GET** /aspects | List aspects
TypesApi | [**getType**](docs/TypesApi.md#getType) | **GET** /types/{typeId} | Get a type
TypesApi | [**listTypes**](docs/TypesApi.md#listTypes) | **GET** /types | List types
## Models
- [Aspect](docs/Aspect.md)
- [AspectEntry](docs/AspectEntry.md)
- [AspectPaging](docs/AspectPaging.md)
- [AspectPagingList](docs/AspectPagingList.md)
- [Model](docs/Model.md)
- [Type](docs/Type.md)
- [TypeEntry](docs/TypeEntry.md)
- [TypePaging](docs/TypePaging.md)
- [TypePagingList](docs/TypePagingList.md)

View File

@@ -0,0 +1,111 @@
/*!
* @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 { AspectEntry } from '../model/aspectEntry';
import { AspectPaging } from '../model/aspectPaging';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
import { buildCollectionParam } from '../../../alfrescoApiClient';
export class ListAspectsOpts {
/**
* Optionally filter the list. Here are some examples:
*
* An aspect should be represented in the following format(prefix:name). e.g 'cm:title'.
*
* The following where clause will only return aspects from the namespace1:model and namespace2:model.
*
* - where=(modelId in ('namespace1:model','namespace2:model'))
* - where=(modelId in ('namespace1:model INCLUDESUBASPECTS','namespace2:model'))
*
* The following where clause will only return sub aspects for the given parents.
*
* - where=(parentId in ('namespace1:parent','namespace2:parent'))
*
* The following where clause will only return aspects that match the pattern.
*
* - where=(namespaceUri matches('http://www.alfresco.*'))
*
* The following where clause will only return aspects that don't match the pattern.
*
* - where=(not namespaceUri matches('http://www.alfresco.*'))
*/
where?: string;
// The number of entities that exist in the collection before those included in this list.
// If not supplied then the default value is 0.
skipCount?: number;
// The maximum number of items to return in the list.
// If not supplied then the default value is 100.
maxItems?: number;
/**
* Returns additional information about the aspect. The following optional fields can be requested:
* - properties
* - mandatoryAspects
* - associations
*/
include?: string[];
}
/**
* Aspects service.
*/
export class AspectsApi extends BaseApi {
/**
* Get an aspect
*
* **Note:** This is available in Alfresco 7.0.0 and newer versions.
*
* @param aspectId The `Qname` of an aspect(prefix:name) e.g 'cm:title'
* @returns Promise<AspectEntry>
*/
getAspect(aspectId: string): Promise<AspectEntry> {
throwIfNotDefined(aspectId, 'aspectId');
const pathParams = {
aspectId
};
return this.get<AspectEntry>({
path: '/aspects/{aspectId}',
pathParams,
returnType: AspectEntry
});
}
/**
* List aspects
*
* **Note:** This is available in Alfresco 7.0.0 and newer versions.
*
* @param opts Optional parameters
* @returns Promise<AspectPaging>
*/
listAspects(opts?: ListAspectsOpts): Promise<AspectPaging> {
const queryParams = {
where: opts?.where,
skipCount: opts?.skipCount,
maxItems: opts?.maxItems,
include: buildCollectionParam(opts?.include, 'csv')
};
return this.get<AspectPaging>({
path: '/aspects',
queryParams,
returnType: AspectPaging
});
}
}

View 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.contentClient;
}
}

View 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 './aspects.api';
export * from './types.api';

View File

@@ -0,0 +1,108 @@
/*!
* @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 { TypeEntry } from '../model/typeEntry';
import { TypePaging } from '../model/typePaging';
import { BaseApi } from './base.api';
import { throwIfNotDefined } from '../../../assert';
import { buildCollectionParam } from '../../../alfrescoApiClient';
export interface ListTypesOpts {
/**
* Optionally filter the list. Here are some examples:
*
* A type should be represented in the following format(prefix:name). e.g 'cm:content'.
*
* The following where clause will only return types from the namespace1:model and namespace2:model.
* - where=(modelId in ('namespace1:model','namespace2:model'))
* - where=(modelId in ('namespace1:model INCLUDESUBTYPES','namespace2:model'))
*
* The following where clause will only return sub types for the given parents.
* - where=(parentId in ('namespace1:parent','namespace2:parent'))
*
* The following where clause will only return types that match the pattern.
* - where=(namespaceUri matches('http://www.alfresco.*'))
*
* The following where clause will only return types that don't match the pattern.
* - where=(not namespaceUri matches('http://www.alfresco.*'))
*/
where?: string;
// The number of entities that exist in the collection before those included in this list.
// If not supplied then the default value is 0.
skipCount?: number;
// The maximum number of items to return in the list.
// If not supplied then the default value is 100.
maxItems?: number;
/**
* Returns additional information about the type.
* The following optional fields can be requested:
* - properties
* - mandatoryAspects
* - associations
*/
include?: string[];
}
/**
* Types service.
*/
export class TypesApi extends BaseApi {
/**
* Get a type
*
* **Note:** This is available in Alfresco 7.0.0 and newer versions.
*
* @param typeId The `Qname` of a type(prefix:name) e.g 'cm:content'
* @returns Promise<TypeEntry>
*/
getType(typeId: string): Promise<TypeEntry> {
throwIfNotDefined(typeId, 'typeId');
const pathParams = {
typeId
};
return this.get<TypeEntry>({
path: '/types/{typeId}',
pathParams,
returnType: TypeEntry
});
}
/**
* List types
*
* **Note:** This is available in Alfresco 7.0.0 and newer versions.
*
* @param opts Optional parameters
* @returns Promise<TypePaging>
*/
listTypes(opts?: ListTypesOpts): Promise<TypePaging> {
const queryParams = {
where: opts?.where,
skipCount: opts?.skipCount,
maxItems: opts?.maxItems,
include: buildCollectionParam(opts?.include, 'csv')
};
return this.get<TypePaging>({
path: '/types',
queryParams,
returnType: TypePaging
});
}
}

View File

@@ -0,0 +1,14 @@
# AbstractClassAssociation
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [default to null]
**title** | **string** | | [optional] [default to null]
**description** | **string** | | [optional] [default to null]
**isChild** | **boolean** | | [optional] [default to null]
**isProtected** | **boolean** | | [optional] [default to null]
**source** | [**AbstractClassAssociationSource**](AbstractClassAssociationSource.md) | | [optional] [default to null]
**target** | [**AbstractClassAssociationSource**](AbstractClassAssociationSource.md) | | [optional] [default to null]

View File

@@ -0,0 +1,12 @@
# AbstractClassAssociationSource
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**role** | **string** | | [optional] [default to null]
**cls** | **string** | | [optional] [default to null]
**isMandatory** | **boolean** | | [optional] [default to null]
**isMany** | **boolean** | | [optional] [default to null]
**isMandatoryEnforced** | **boolean** | | [optional] [default to null]

View File

@@ -0,0 +1,16 @@
# Aspect
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [default to null]
**title** | **string** | | [default to null]
**description** | **string** | | [optional] [default to null]
**parentId** | **string** | | [optional] [default to null]
**properties** | [**Property[]**](../../content-rest-api/docs/Property.md) | | [optional] [default to null]
**isContainer** | **boolean** | | [optional] [default to null]
**isArchive** | **boolean** | | [optional] [default to null]
**includedInSupertypeQuery** | **boolean** | | [optional] [default to null]
**mandatoryAspects** | **string[]** | | [optional] [default to null]
**associations** | [**AbstractClassAssociation[]**](AbstractClassAssociation.md) | | [optional] [default to null]
**model** | [**Model**](Model.md) | | [optional] [default to null]

View File

@@ -0,0 +1,8 @@
# AspectEntry
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entry** | [**Aspect**](Aspect.md) | | [default to null]

View File

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

View File

@@ -0,0 +1,9 @@
# AspectPagingList
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pagination** | [**Pagination**](../../content-rest-api/docs/Pagination.md) | | [optional] [default to null]
**entries** | [**AspectEntry[]**](AspectEntry.md) | | [optional] [default to null]

View File

@@ -0,0 +1,151 @@
# AspectsApi
All URIs are relative to *https://localhost/alfresco/api/-default-/public/alfresco/versions/1*
| Method | HTTP request | Description |
|-----------------------------|-----------------------------|---------------|
| [getAspect](#getAspect) | **GET** /aspects/{aspectId} | Get an aspect |
| [listAspects](#listAspects) | **GET** /aspects | List aspects |
## getAspect
Get an aspect
> This is available in Alfresco 7.0.0 and newer versions.
**Parameters**
| Name | Type | Description |
|--------------|--------|----------------------------------------------------|
| **aspectId** | string | The Qname of an aspect(prefix:name) e.g 'cm:title' |
**Return type**: [AspectEntry](AspectEntry.md)
**Example**
```javascript
import { AlfrescoApi, AspectsApi} from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi({
hostEcm: 'http://127.0.0.1:8080'
});
const aspectsApi = new AspectsApi(alfrescoApi);
aspectsApi.getAspect(aspectId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
```
## listAspects
List aspects
> This is available in Alfresco 7.0.0 and newer versions.
Gets a list of aspects from the data dictionary. The System aspects will be ignored by default.
```json
{
"list": {
"pagination": {
"count": 0,
"hasMoreItems": true,
"totalItems": 0,
"skipCount": 0,
"maxItems": 0
},
"entries": [
{
"entry": {
"associations": [],
"mandatoryAspects": [],
"includedInSupertypeQuery": true,
"description": "Titled",
"isContainer": false,
"model": {
"id": "cm:contentmodel",
"author": "Alfresco",
"description": "Alfresco Content Domain Model",
"namespaceUri": "http://www.alfresco.org/model/content/1.0",
"namespacePrefix": "cm"
},
"id": "cm:titled",
"title": "Titled",
"properties": [
{
"id": "cm:title",
"title": "Title",
"description": "Content Title",
"dataType": "d:mltext",
"isMultiValued": false,
"isMandatory": false,
"isMandatoryEnforced": false,
"isProtected": false
}
]
}
}
]
}
}
```
**Parameters**
| Name | Type | Description | Notes |
|-------|--------|-----------------------------|------------|
| where | string | Optionally filter the list. | [optional] |
Here are some examples:
An aspect should represented in the following format(prefix:name). e.g 'cm:title'.
The following where clause will only return aspects from the namespace1:model and namespace2:model.
```text
where=(modelId in ('namespace1:model','namespace2:model'))
where=(modelId in ('namespace1:model INCLUDESUBASPECTS','namespace2:model'))
```
The following where clause will only return sub aspects for the given parents.
```text
where=(parentId in ('namespace1:parent','namespace2:parent'))
```
The following where clause will only return aspects that match the pattern.
```text
where=(namespaceUri matches('http://www.alfresco.*'))
```
The following where clause will only return aspects that don't match the pattern.
```text
where=(not namespaceUri matches('http://www.alfresco.*'))
```
| Name | Type | Description | Notes |
|---------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------|
| **skipCount** | number | The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. | [optional] [default to 0] |
| **maxItems** | number | The maximum number of items to return in the list. If not supplied then the default value is 100. | [optional] [default to 100] |
| **include** | string | Returns additional information about the aspect. The following optional fields can be requested: `properties`, `mandatoryAspects`, `associations` | [optional] |
**Return type**: [AspectPaging](AspectPaging.md)
**Example**
```javascript
import { AlfrescoApi, AspectsApi} from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi({
hostEcm: 'http://127.0.0.1:8080'
});
const aspectsApi = new AspectsApi(alfrescoApi);
aspectsApi.listAspects(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
```

View File

@@ -0,0 +1,11 @@
# Model
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [default to null]
**author** | **string** | | [optional] [default to null]
**description** | **string** | | [optional] [default to null]
**namespaceUri** | **string** | | [optional] [default to null]
**namespacePrefix** | **string** | | [optional] [default to null]

View File

@@ -0,0 +1,17 @@
# Type
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [default to null]
**title** | **string** | | [default to null]
**description** | **string** | | [optional] [default to null]
**parentId** | **string** | | [optional] [default to null]
**properties** | [**Property[]**](../../content-rest-api/docs/Property.md) | | [optional] [default to null]
**isContainer** | **boolean** | | [optional] [default to null]
**isArchive** | **boolean** | | [optional] [default to null]
**includedInSupertypeQuery** | **boolean** | | [optional] [default to null]
**mandatoryAspects** | **string[]** | | [optional] [default to null]
**associations** | [**AbstractClassAssociation[]**](AbstractClassAssociation.md) | | [optional] [default to null]
**model** | [**Model**](Model.md) | | [optional] [default to null]

View File

@@ -0,0 +1,8 @@
# TypeEntry
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entry** | [**Type**](Type.md) | | [default to null]

View File

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

View File

@@ -0,0 +1,9 @@
# TypePagingList
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pagination** | [**Pagination**](../../content-rest-api/docs/Pagination.md) | | [optional] [default to null]
**entries** | [**TypeEntry[]**](TypeEntry.md) | | [optional] [default to null]

View File

@@ -0,0 +1,170 @@
# TypesApi
All URIs are relative to *https://localhost/alfresco/api/-default-/public/alfresco/versions/1*
| Method | HTTP request | Description |
|----------------------------------------|-------------------------|-------------|
| [**getType**](TypesApi.md#getType) | **GET** /types/{typeId} | Get a type |
| [**listTypes**](TypesApi.md#listTypes) | **GET** /types | List types |
<a name="getType"></a>
## getType
> TypeEntry getType(typeId)
Get a type
**Note:** This is available in Alfresco 7.0.0 and newer versions.
Get information for type **typeId**.
### Example
```javascript
import { AlfrescoApi, TypesApi} from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi({
hostEcm: 'http://127.0.0.1:8080'
});
const typesApi = new TypesApi(alfrescoApi);
typesApi.getType(typeId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
| Name | Type | Description | Notes |
|------------|------------|---------------------------------------------------|-------|
| **typeId** | **string** | The Qname of a type(prefix:name) e.g 'cm:content' |
**Return type**: [**TypeEntry**](TypeEntry.md)
<a name="listTypes"></a>
## listTypes
> TypePaging listTypes(opts)
List types
**Note:** This is available in Alfresco 7.0.0 and newer versions.
Gets a list of types from the data dictionary. The System types will be ignored by default.
```json
{
"list": {
"pagination": {
"count": 0,
"hasMoreItems": true,
"totalItems": 0,
"skipCount": 0,
"maxItems": 0
},
"entries": [
{
"entry": {
"associations": [],
"isArchive": true,
"mandatoryAspects": [
"cm:auditable",
"sys:referenceable",
"sys:localized"
],
"includedInSupertypeQuery": true,
"description": "Base Content Object",
"isContainer": false,
"model": {
"id": "cm:contentmodel",
"author": "Alfresco",
"description": "Alfresco Content Domain Model",
"namespaceUri": "http://www.alfresco.org/model/content/1.0",
"namespacePrefix": "cm"
},
"id": "cm:content",
"title": "Content",
"parentId": "cm:cmobject"
"properties": [
{
"id": "cm:name",
"title": "Name",
"description": "Name",
"dataType": "d:text",
"isMultiValued": false,
"isMandatory": true,
"isMandatoryEnforced": true
"isProtected": false
}
]
}
}
]
}
}
```
**Example**
```javascript
import { AlfrescoApi, TypesApi} from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi({
hostEcm: 'http://127.0.0.1:8080'
});
const typesApi = new TypesApi(alfrescoApi);
typesApi.listTypes(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
```
### Parameters
| Name | Type | Description | Notes |
|-----------|--------|-----------------------------|-------|
| **where** | string | Optionally filter the list. |
Here are some examples:
A type should be represented in the following format `(prefix:name)`. e.g 'cm:content'.
The following where clause will only return types from the namespace1:model and namespace2:model.
```text
where=(modelId in ('namespace1:model','namespace2:model'))
where=(modelId in ('namespace1:model INCLUDESUBTYPES','namespace2:model'))
```
The following where clause will only return sub types for the given parents.
```text
where=(parentId in ('namespace1:parent','namespace2:parent'))
```
The following where clause will only return types that match the pattern.
```text
where=(namespaceUri matches('http://www.alfresco.*'))
```
The following where clause will only return types that don't match the pattern.
```text
where=(not namespaceUri matches('http://www.alfresco.*'))
```
| Name | Type | Description | Notes |
|----------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
| opts.skipCount | number | The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. | [default to 0 |
| opts.maxItems | number | The maximum number of items to return in the list. If not supplied then the default value is 100. | default to 100 |
| opts.include | string[] | Returns additional information about the type. The following optional fields can be requested: `properties`, `mandatoryAspects`, `associations` | |
**Return type**: [TypePaging](TypePaging.md)

View 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';

View File

@@ -0,0 +1,40 @@
/*!
* @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 { Property } from '../../content-rest-api';
import { AbstractClassAssociation } from './abstractClassAssociation';
import { Model } from './model';
export class AbstractClass {
id: string;
title: string;
description?: string;
parentId?: string;
properties?: Property[];
isContainer?: boolean;
isArchive?: boolean;
includedInSupertypeQuery?: boolean;
mandatoryAspects?: string[];
associations?: AbstractClassAssociation[];
model?: Model;
constructor(input?: Partial<AbstractClass>) {
if (input) {
Object.assign(this, input);
}
}
}

View File

@@ -0,0 +1,28 @@
/*!
* @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 { AbstractClassAssociationSource } from './abstractClassAssociationSource';
export interface AbstractClassAssociation {
id: string;
title?: string;
description?: string;
isChild?: boolean;
isProtected?: boolean;
source?: AbstractClassAssociationSource;
target?: AbstractClassAssociationSource;
}

View File

@@ -0,0 +1,24 @@
/*!
* @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 interface AbstractClassAssociationSource {
role?: string;
cls?: string;
isMandatory?: boolean;
isMany?: boolean;
isMandatoryEnforced?: boolean;
}

View File

@@ -0,0 +1,22 @@
/*!
* @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 { AbstractClass } from './abstractClass';
export class Aspect extends AbstractClass {
}

View 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.
*/
import { Aspect } from './aspect';
export class AspectEntry {
entry: Aspect;
constructor(input?: Partial<AspectEntry>) {
if (input) {
Object.assign(this, input);
this.entry = input.entry ? new Aspect(input.entry) : undefined;
}
}
}

View File

@@ -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 { AspectPagingList } from './aspectPagingList';
export class AspectPaging {
list?: AspectPagingList;
constructor(input?: Partial<AspectPaging>) {
if (input) {
Object.assign(this, input);
this.list = input.list ? new AspectPagingList(input.list) : undefined;
}
}
}

View File

@@ -0,0 +1,34 @@
/*!
* @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 { AspectEntry } from './aspectEntry';
import { Pagination } from '../../content-rest-api';
export class AspectPagingList {
pagination?: Pagination;
entries?: AspectEntry[];
constructor(input?: Partial<AspectPagingList>) {
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 AspectEntry(item));
}
}
}
}

View File

@@ -0,0 +1,28 @@
/*!
* @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 './abstractClass';
export * from './abstractClassAssociation';
export * from './abstractClassAssociationSource';
export * from './aspect';
export * from './aspectEntry';
export * from './aspectPaging';
export * from './aspectPagingList';
export * from './type';
export * from './typeEntry';
export * from './typePaging';
export * from './typePagingList';

View File

@@ -0,0 +1,24 @@
/*!
* @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 interface Model {
id: string;
author?: string;
description?: string;
namespaceUri?: string;
namespacePrefix?: string;
}

View File

@@ -0,0 +1,22 @@
/*!
* @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 { AbstractClass } from './abstractClass';
export class Type extends AbstractClass {
}

View File

@@ -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 { Type } from './type';
export class TypeEntry {
entry: Type;
constructor(input?: Partial<TypeEntry>) {
if (input) {
Object.assign(this, input);
this.entry = input.entry ? new Type(input.entry) : undefined;
}
}
}

View File

@@ -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 { TypePagingList } from './typePagingList';
export class TypePaging {
list?: TypePagingList;
constructor(input?: Partial<TypePaging>) {
if (input) {
Object.assign(this, input);
this.list = input.list ? new TypePagingList(input.list) : undefined;
}
}
}

View File

@@ -0,0 +1,35 @@
/*!
* @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 { Pagination } from '../../content-rest-api/model/pagination';
import { TypeEntry } from './typeEntry';
export class TypePagingList {
pagination?: Pagination;
entries?: TypeEntry[];
constructor(input?: Partial<TypePagingList>) {
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 TypeEntry(item));
}
}
}
}